/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/
.header-fixed {
    position: fixed;
    width: 100%;
    top: 0;
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Add margin to body to prevent content from hiding behind fixed header */
body {
    padding-top: 90px;
    /* Reduced default padding */
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px;
    /* Reduced default height */
    z-index: 999;
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(8px, 3vw, 20px);
    /* Responsive padding */
}

.header .logo {
    padding-top: 20px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    height: 100%;
}

.header .logo img {
    max-height: 70%;
    width: auto;
    object-fit: contain;
}

/* Site name styling for both RTL and LTR */
.header .sitename {
    line-height: 1.2;
    font-weight: 500;
    font-size: clamp(20px, 3vw, 35px);
    /* Fluid typography */
    margin: 0;
    padding: 0 clamp(4px, 1vw, 10px);
}

.header .logo h1 {
    font-size: clamp(24px, 2.5vw, 30px);
    margin: 0;
    font-weight: 700;
    color: var(--heading-color);
    font-family: var(--default-font);
}

/* Navigation text sizes */
html[dir="rtl"] .nav-link {
    font-size: clamp(14px, 1.5vw, 16px);
}

html[dir="ltr"] .nav-link {
    font-size: clamp(16px, 1.8vw, 20px);
}

.header .logo span {
    color: black;
    font-size: clamp(28px, 3.2vw, 36px);
}

/* Call-to-action button */
.header .btn-getstarted,
.header .btn-getstarted:focus {
    color: var(--contrast-color);
    background: var(--accent-color);
    font-size: clamp(12px, 1.2vw, 14px);
    padding: clamp(6px, 1vw, 8px) clamp(20px, 2.5vw, 26px);
    margin: 0;
    border-radius: 50px;
    transition: 0.3s;
}

.header .btn-getstarted:hover,
.header .btn-getstarted:focus:hover {
    color: var(--contrast-color);
    background: color-mix(in srgb, var(--accent-color), transparent 15%);
}

/* Mobile navigation */
@media (max-width: 767.98px) {
    body {
        padding-top: 70px;
    }

    .header {
        height: 70px;
    }

    .header nav {
        display: none !important;
    }

    .header {
        justify-content: space-between;
    }

    /* RTL/LTR specific mobile nav toggle positioning */
    html[dir="rtl"] .mobile-nav-toggle {
        margin-right: auto;
        margin-left: 0;
    }

    html[dir="ltr"] .mobile-nav-toggle {
        margin-left: auto;
        margin-right: 0;
    }
}

@media (max-width: 570px) {
    body {
        padding-top: 60px;
    }

    .header {
        height: 60px;
        padding: 0 8px;
    }

    .header .logo {
        padding-top: 20px;
    }

    .header .logo img {
        max-height: 60%;
    }

    .header .sitename {
        font-size: clamp(16px, 2.5vw, 20px);
    }

    .header .logo h1 {
        font-size: clamp(18px, 2vw, 24px);
    }

    .header .logo span {
        font-size: clamp(22px, 2.8vw, 28px);
    }

    .header .btn-getstarted,
    .header .btn-getstarted:focus {
        font-size: 10px;
        padding: 4px 12px;
        border-radius: 25px;
    }
}

.scrolled .header {
    box-shadow: 0px 0 18px rgba(0, 0, 0, 0.1);
}

/* Mobile sidebar navigation */
.mobile-nav-sidebar {
    overflow-y: auto !important;
    height: 100vh;
    position: fixed;
    top: 0;
    width: clamp(280px, 80%, 300px);
    background: white;
    z-index: 1050;
    transition: transform 0.3s ease-in-out;
    -webkit-overflow-scrolling: touch;
}

/* RTL/LTR specific sidebar positioning */
html[dir="ltr"] .mobile-nav-sidebar {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

html[dir="rtl"] .mobile-nav-sidebar {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

html[dir="ltr"] body.mobile-nav-active .mobile-nav-sidebar,
html[dir="rtl"] body.mobile-nav-active .mobile-nav-sidebar {
    transform: translateX(0);
}

.mobile-nav-active .mobile-nav-toggle {
    color: #fff;
    position: fixed;
    font-size: clamp(24px, 3vw, 32px);
    top: clamp(8px, 1.5vw, 15px);
    right: clamp(8px, 1.5vw, 15px);
    margin-right: 0;
    z-index: 9999;
}

/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
    --heading-font: var(--default-font);
    color: var(--default-color);
    background-color: var(--background-color);
    font-size: 13px;
    padding: 35px 0 25px;
    position: relative;
}

.footer .icon {
    font-size: 20px;
    color: var(--accent-color);
}

.footer h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer p {
    margin: 0;
    font-size: 20px;
}

.footer .address p {
    margin-bottom: 0px;
}

.footer .social-links a {
    color: white;
    font-size: 20px;
    transition: 0.3s;
    margin: 0 1px; /* Further reduced margin between social icons */
}

.footer .social-links a:hover {
    color: var(--accent-color);
}

.footer .copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* fallback */
    border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .copyright p {
    margin-bottom: 0;
}

.footer .credits {
    margin-top: 5px;
    font-size: 13px;
}

#footer .col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem; /* Reduced gap */
}

#footer .social-links {
    margin: 0;
    display: flex;
    gap: 0.15rem; /* Reduced gap between social icons */
}

@media (max-width: 767px) {
    .footer {
        padding: 30px 0 20px;
    }

    .footer h4 {
        margin-bottom: 10px;
    }

    #footer .col {
        justify-content: center;
    }

    #footer .draggable-container {
        max-width: 200px;
    }
}

@media (max-width: 575px) {
    .footer .col-lg-3,
    .footer .col-md-6 {
        gap: 0.25rem !important; /* Reduced gap further for mobile */
    }

    .footer {
        padding: 25px 0 15px;
        font-size: 12.5px;
    }

    .footer .icon {
        font-size: 18px;
    }

    .footer h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .footer .social-links a {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin: 0 1px; /* Reduced margin */
    }

    .footer .row.gy-3 {
        row-gap: 10px;
    }
}
