/* ============================================
   NAVBAR DESIGN - MATCHING SCREENSHOT
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #F5F6F7;
    border-bottom: 2px solid var(--primary-navy);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(18, 41, 107, 0.05);
}

.navbar.scrolled {
    background: #F5F6F7;
    box-shadow: 0 4px 16px rgba(18, 41, 107, 0.08);
}

/* Navbar Container - Separate from page containers */
.navbar .container,
.nav-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    width: 100%;
}

/* Tablet Optimizations for Navbar - Only for desktop (>1100px) */
@media (max-width: 1399px) and (min-width: 1101px) {
    .navbar .container,
    .nav-container {
        max-width: 95%;
        padding: 0 clamp(1.5rem, 3vw, 2rem);
    }

    .nav-wrapper {
        gap: 1.5rem;
    }

    .nav-menu a {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .logo-img {
        height: 55px;
    }

    .btn-appointment {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1400px) {
    .navbar .container,
    .nav-container {
        max-width: 80%;
    }
}

/* ============================================
   TABLET NAVBAR MODE (768px - 1100px) - Single source of truth
   Forces hamburger menu for iPad Pro (1024px) and all tablets
   ============================================ */
@media (max-width: 1400px) {
    /* Switch to flexbox layout for tablet/mobile */
    .nav-wrapper {
        display: flex;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    /* Reorder elements: logo (1), nav-menu hidden (2), nav-right (3), hamburger (4) */
    .logo {
        order: 1;
    }

    /* Hide nav-menu on tablet */
    .nav-menu {
        order: 2;
    }

    /* Show hamburger menu and position it in nav-right area */
    .mobile-menu-toggle {
        display: flex !important;
        order: 3; /* After nav-menu, before nav-right */
        margin-left: 0.5rem; /* Space from WhatsApp */
    }

    /* Position nav-right after hamburger */
    .nav-right {
        order: 4;
        gap: 0.5rem;
        margin-left: 0;
        flex-shrink: 0;
        display: flex; /* Ensure it's visible */
    }

    /* Hide overflow-causing right items */
    .nav-phone,
    .btn-appointment,
    .nav-divider {
        display: none !important;
    }

    /* Ensure WhatsApp icon has no left margin since hamburger is separate */
    .whatsapp-icon {
        margin-left: 0;
    }

    /* Force menu to be overlay (not inline) */
    .nav-menu {
        display: none !important;
        position: fixed !important;
        top: 84px;
        left: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-radius: 14px;
        border: 1px solid rgba(18, 41, 107, 0.08);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
        transform: translateX(-150%);
        transition: transform 0.3s ease;
        z-index: 1000;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        gap: 0.25rem;
    }

    .nav-menu.active {
        transform: translateX(0) !important;
        display: flex !important;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(18, 41, 107, 0.08);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: flex;
        align-items: center;
        padding: 1rem;
        min-height: 44px;
        border-radius: 10px;
        transition: background 0.3s ease;
        width: 100%;
    }

    .nav-menu a:hover {
        background: rgba(18, 41, 107, 0.06);
    }
}

/* Grid Layout - Desktop: 3 columns (Logo | Menu Center | Actions Right) */
.nav-wrapper{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    height: 84px;
    padding: 0;
    position: relative;
  }

/* Navigation Menu - Centered on Desktop */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    justify-self: center;
    grid-column: 2;
    height: fit-content;
}

.nav-menu li {
    margin: 0;
    display: flex;
    align-items: center;
    height: fit-content;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.125rem;
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 0.9375rem;
    font-family: 'DM Sans', sans-serif;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}

.nav-menu a:hover {
    color: var(--primary-navy);
    background: rgba(18, 41, 107, 0.05);
}

.nav-menu a.active {
    color: var(--dark-text);
    background: #E8EAED;
    font-weight: 500;
}

/* Logo - Left on Desktop */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    grid-column: 1;
    justify-self: start;
    transition: transform 0.3s ease;
    padding: 0;
    margin: 0;
    line-height: 0;
    height: fit-content;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

/* Right Side Actions */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: end;
    grid-column: 3;
    height: fit-content;
}

/* Phone Section */
.nav-phone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    background: #E8EAED;
}

.nav-phone:hover {
    background: #DFE2E9;
}

.phone-icon {
    width: 36px;
    height: 36px;
    padding: 8px;
    background: var(--primary-navy);
    border-radius: 8px;
    color: var(--white);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.phone-number {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 0.9375rem;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.phone-number:hover {
    color: var(--primary-navy);
}

/* WhatsApp Icon */
.whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: #25D366;
    border-radius: 8px;
    color: var(--white);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.25s ease;
    margin-left: 0.5rem;
}

.whatsapp-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.whatsapp-icon:hover {
    background: #20BA5A;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-icon:active {
    transform: scale(0.98);
}

/* Divider */
.nav-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, transparent, rgba(18, 41, 107, 0.15), transparent);
    opacity: 0.5;
}

/* Appointment Button */
.btn-appointment {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-navy);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-appointment:hover {
    background: var(--secondary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 41, 107, 0.2);
}

.btn-appointment svg {
    transition: transform 0.3s ease;
}

.btn-appointment:hover svg {
    transform: translate(2px, -2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(18, 41, 107, 0.05);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1001;
    position: relative;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(18, 41, 107, 0.1);
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--primary-navy);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    pointer-events: none;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Logo Text Styles */
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary-navy);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

