/* Modern Header & Navigation Styles */
:root {
    --header-height: 60px;
    --dentist-blue: #2193b0;
    --dentist-light-blue: #6dd5ed;
    --dentist-orange: #ff7e5f;
    --gradient-blue: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

.header {
    background-color: #ffffff;
    padding: 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-normal);
    padding: 8px 0;
}

.logo img {
    height: 38px;
    transition: transform 0.3s ease;
}

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

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    height: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    height: 100%;
    padding: 0;
}

.nav-links li {
    height: 100%;
    margin: 0;
    position: relative;
}

.nav-link {
    height: 100%;
    color: #37474F;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
    padding: 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--dentist-blue);
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link.active::before {
    transform: scaleX(1);
}

/* Specialties Dropdown */
.specialties-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.specialties-dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.specialties-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dropdown-header h4 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.dropdown-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dropdown-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #37474F;
    text-decoration: none;
    transition: var(--transition-normal);
    font-size: 13px;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(33, 147, 176, 0.05);
    color: var(--dentist-blue);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--dentist-blue);
    font-size: 14px;
}

.dropdown-item span {
    flex: 1;
}

.dropdown-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dentist-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-normal);
}

.view-all-link:hover {
    color: #1a7a8f;
}

.view-all-link i {
    font-size: 12px;
}

/* Nav Actions - Right side buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Login Button - Higher specificity to override home.css */
button.login-btn,
.btn.login-btn,
.btn-outline.login-btn {
    padding: 6px 16px !important;
    border: 1.5px solid var(--dentist-blue) !important;
    color: var(--dentist-blue) !important;
    border-radius: 30px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    transition: var(--transition-normal) !important;
    font-size: 13px !important;
}

button.login-btn i,
.btn.login-btn i,
.btn-outline.login-btn i {
    font-size: 13px !important;
}

button.login-btn:hover,
.btn.login-btn:hover,
.btn-outline.login-btn:hover {
    background: var(--dentist-blue) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--dentist-blue) !important;
}

/* User Profile Button — styles in user-menu.css */

/* Mobile Menu Button */
.mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    background: transparent;
    position: relative;
    z-index: 200;
    -webkit-tap-highlight-color: transparent;
}

.menu-icon {
    display: block;
    position: relative;
    width: 20px;
    height: 2px;
    background-color: #334155;
    transition: var(--transition-normal);
    border-radius: 2px;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #334155;
    transition: var(--transition-normal);
    border-radius: 2px;
}

.menu-icon::before {
    transform: translateY(-6px);
}

.menu-icon::after {
    transform: translateY(6px);
}

.mobile-menu-btn.active .menu-icon {
    background-color: transparent;
}

.mobile-menu-btn.active .menu-icon::before {
    transform: translateY(0) rotate(45deg);
}

.mobile-menu-btn.active .menu-icon::after {
    transform: translateY(0) rotate(-45deg);
}


/* ===================================================================
   Mobile Navigation — Premium Slide-in Panel
   =================================================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 88vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Slide-in from right */
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);

    box-shadow:
        -4px 0 24px rgba(0, 0, 0, 0.06),
        -16px 0 48px rgba(0, 0, 0, 0.03);
}

.mobile-nav.active {
    transform: translateX(0);
}

/* Header */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.mobile-logo img {
    height: 32px;
}

.close-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.close-menu-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

/* Scrollable body */
.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-nav-body::-webkit-scrollbar {
    display: none;
}


/* ---- User Profile Card ---- */
.mobile-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f3ff 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 119, 182, 0.08);
}

.mobile-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.mobile-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-user-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 1px;
    line-height: 1.3;
}

.mobile-user-email {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ---- Quick Actions (3-column grid) ---- */
.mobile-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.mobile-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-quick-action i {
    font-size: 18px;
    color: var(--dentist-blue);
}

.mobile-quick-action:hover,
.mobile-quick-action:active {
    background: #f0f7ff;
    border-color: rgba(0, 119, 182, 0.15);
    color: var(--dentist-blue);
}


/* ---- Auth Section (not logged in) ---- */
.mobile-auth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-auth-primary {
    background: var(--gradient-blue);
    color: #ffffff;
    border: none;
}

.mobile-auth-primary:hover {
    box-shadow: 0 4px 12px rgba(33, 147, 176, 0.3);
}

.mobile-auth-secondary {
    background: transparent;
    color: var(--dentist-blue);
    border: 1.5px solid var(--dentist-blue);
}

.mobile-auth-secondary:hover {
    background: rgba(33, 147, 176, 0.05);
}

.mobile-auth-divider {
    text-align: center;
    position: relative;
    margin: 4px 0;
}

.mobile-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.mobile-auth-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 12px;
}

.mobile-auth-google {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.mobile-auth-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}


/* ---- Nav Sections ---- */
.mobile-nav-section {
    margin-bottom: 20px;
}

.mobile-nav-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 4px;
    margin-bottom: 8px;
}


/* ---- Nav Items (row links) ---- */
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background: #f8fafc;
    color: var(--dentist-blue);
}

.mobile-nav-item i:first-child {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: #64748b;
    transition: color 0.12s ease;
}

.mobile-nav-item:hover i:first-child {
    color: var(--dentist-blue);
}

.mobile-nav-item span {
    flex: 1;
}

.mobile-nav-arrow {
    font-size: 10px !important;
    color: #cbd5e1 !important;
    width: auto !important;
}


/* ---- Specialties Chips ---- */
.mobile-specialties-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    text-decoration: none;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-spec-chip i {
    font-size: 11px;
    color: var(--dentist-blue);
}

.mobile-spec-chip:hover,
.mobile-spec-chip:active {
    background: #f0f7ff;
    border-color: rgba(0, 119, 182, 0.2);
    color: var(--dentist-blue);
}

.mobile-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dentist-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 4px;
    transition: color 0.15s ease;
}

.mobile-view-all:hover {
    color: #1a7a8f;
}

.mobile-view-all i {
    font-size: 11px;
    transition: transform 0.15s ease;
}

.mobile-view-all:hover i {
    transform: translateX(3px);
}


/* ---- Footer (sign out, account) ---- */
.mobile-nav-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-footer-link i {
    font-size: 13px;
}

.mobile-footer-link:hover {
    background: #f8fafc;
    color: #334155;
}

.mobile-footer-logout:hover {
    background: #fef2f2;
    color: #ef4444;
}

.mobile-footer-logout:hover i {
    color: #ef4444;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ===== Responsive Navigation ===== */
@media (max-width: 1024px) {
    .desktop-nav, .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header {
        height: 56px;
    }

    .logo img {
        height: 30px;
    }
}

@media (max-width: 400px) {
    .mobile-nav {
        width: 100%;
        max-width: 100vw;
    }

    .mobile-quick-actions {
        gap: 6px;
    }

    .mobile-quick-action {
        padding: 12px 6px;
        font-size: 10px;
    }

    .mobile-quick-action i {
        font-size: 16px;
    }

    .mobile-spec-chip {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (min-width: 1025px) {
    .mobile-nav, .mobile-menu-btn {
        display: none;
    }
}