/* Site CSS */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Header Styles (AVIS-style two-bar layout) ===== */
.site-header-wrapper {
    z-index: 1050;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

/* -- Top Bar -- */
.header-top-bar {
    background: linear-gradient(135deg, #D4002A 0%, #a30020 100%);
    padding: 12px 0;
}

.header-brand:hover {
    opacity: 0.92;
}

.header-logo-icon {
    background-color: #fff;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Action buttons (top bar right side) */
.header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.header-action-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.header-action-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

.header-action-filled {
    background: #fff;
    color: #D4002A;
    border: 1.5px solid #fff;
}

.header-action-filled:hover {
    background: #f0f0f0;
    color: #a30020;
}

.header-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #D4002A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255,255,255,0.3);
}

.header-action-filled .header-avatar-sm {
    background: #D4002A;
    color: #fff;
}

/* Search toggle button */
.header-search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-search-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

/* -- Bottom Nav Bar -- */
.header-nav-bar {
    background: #8b001c;
    padding: 0;
}

.header-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.header-nav-item {
    display: block;
    padding: 13px 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.header-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #fbbf24;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.header-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.header-nav-item:hover::after {
    transform: scaleX(1);
}

/* Mobile toggle */
.header-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.header-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-mobile-nav {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.header-mobile-nav li a {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s;
}

.header-mobile-nav li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* -- Search Overlay -- */
.header-search-overlay {
    background: #fff;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    box-shadow: inset 0 -1px 6px rgba(0, 0, 0, 0.06);
}

.header-search-overlay.show {
    max-height: 500px;
    padding: 16px 0;
}

.header-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s;
}

.header-search-bar:focus-within {
    border-color: #D4002A;
}

.header-search-bar-icon {
    color: #9ca3af;
    font-size: 1rem;
    flex-shrink: 0;
}

.header-search-bar-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
}

.header-search-bar-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.header-search-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.header-search-close:hover {
    color: #D4002A;
}

/* Search results (dropdown in overlay) */
.header-search-results {
    max-height: 380px;
    overflow-y: auto;
}

.header-search-results::-webkit-scrollbar {
    width: 5px;
}

.header-search-results::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.header-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #1a1a2e;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
}

.header-search-item:hover,
.header-search-item.active {
    background-color: #fef2f4;
    color: #1a1a2e;
    text-decoration: none;
}

.header-search-item-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.header-search-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-search-item-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #D4002A, #ff4d6d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.header-search-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-search-item-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search-item-name mark {
    background: #ffd6dd;
    color: #D4002A;
    padding: 0 2px;
    border-radius: 3px;
}

.header-search-item-desc {
    font-size: 0.76rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search-item-arrow {
    font-size: 0.7rem;
    color: #ccc;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.header-search-item:hover .header-search-item-arrow,
.header-search-item.active .header-search-item-arrow {
    color: #D4002A;
    transform: translateX(2px);
}

.header-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: #999;
    gap: 8px;
}

.header-search-empty i {
    font-size: 1.8rem;
    color: #ddd;
}

.header-search-empty span {
    font-size: 0.88rem;
}

.header-search-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    color: #D4002A;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.header-search-footer:hover {
    background: #fef2f4;
    color: #a80022;
    text-decoration: none;
}

.header-search-footer i {
    font-size: 0.9rem;
}

/* -- User dropdown menu (shared) -- */
.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4002A;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* -- Responsive -- */
html, body {
    overflow-x: hidden;
}


@media (max-width: 991.98px) {
    .header-top-bar {
        padding: 8px 0;
    }

    .header-action-btn {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .header-logo-icon {
        width: 36px;
        height: 36px;
    }

    .header-brand .d-flex.flex-column span {
        font-size: 0.95rem !important;
    }

    .header-search-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .header-top-bar .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .header-brand .ms-2 {
        margin-left: 0.35rem !important;
    }

    .header-brand .d-flex.flex-column span {
        font-size: 0.85rem !important;
    }

    .header-logo-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .header-logo-icon .fw-bold {
        font-size: 1rem !important;
    }

    .header-search-toggle {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .header-nav-bar .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

.text-purple {
    color: #D4002A;
}

.btn-custom-purple {
    background-color: #D4002A;
    color: white;
    transition: all 0.3s ease;
    border: none;
}

.btn-custom-purple:hover {
    background-color: #b30023;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-link {
    font-size: 0.95rem;
    transition: color 0.2s;
}

/* Hero & Search Styles */
.hero-tabs .form-check-input:checked {
    background-color: #D4002A;
    border-color: #D4002A;
}

.custom-radio .form-check-input {
    width: 1.3em;
    height: 1.3em;
    cursor: pointer;
}

.custom-radio .form-check-label {
    font-size: 0.95rem;
}

.hero-input-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px !important;
}

.hero-input {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px !important;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.25s ease;
    height: auto;
}

.hero-input:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

.hero-input:focus {
    border-color: #D4002A;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(212, 0, 42, 0.08);
    outline: none;
}

.hero-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.hero-swap-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-swap-btn:hover {
    background-color: #D4002A;
    border-color: #D4002A;
    color: #fff;
    transform: rotate(180deg);
}

.hero-search-btn {
    background: linear-gradient(135deg, #D4002A 0%, #b00024 100%);
    color: #fff;
    border: none;
    border-radius: 12px !important;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 0, 42, 0.25);
}

.hero-search-btn:hover {
    background: linear-gradient(135deg, #b00024 0%, #8b001c 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 0, 42, 0.35);
}

.hero-search-btn:active {
    transform: translateY(0);
}

.search-bar {
    border: 1px solid #f1f5f9;
}

/* FAQ Styles */
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem !important;
    overflow: hidden;
    margin-bottom: 1rem;
}

.accordion-button {
    font-weight: 500;
    color: #1e293b;
    background-color: #fff;
    box-shadow: none !important;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    color: #D4002A;
    background-color: #f8fafc;
}

.accordion-button:focus {
    border-color: #e2e8f0;
    box-shadow: none;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23D4002A'%3e%3cpath fill-rule='evenodd' d='M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2Z'/%3e%3c/svg%3e");
    transition: transform 0.2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23D4002A'%3e%3cpath fill-rule='evenodd' d='M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8Z'/%3e%3c/svg%3e");
    transform: rotate(0deg);
}

/* CTA Section */
.cta-section {
    background-color: #D4002A;
    /* Brand Red */
    color: #fff;
    margin-bottom: 0px !important;
    /* Ensure no margin below to connect with footer if needed */
}

/* Footer Styles */
.footer-section {
    background-color: #D4002A;
    color: #fff;
    margin-top: 0 !important;
}

.footer-section h6 {
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer-links a {
    opacity: 0.85;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: #fbbf24 !important;
}

.footer-bottom {
    background-color: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* User Profile Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.user-dropdown-toggle:hover {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-color: #D4002A;
    box-shadow: 0 2px 8px rgba(212, 0, 42, 0.15);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4002A 0%, #a30021 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}

.user-role {
    font-size: 11px;
    color: #64748b;
}

.dropdown-arrow {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.user-dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    min-width: 280px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-top: 8px !important;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
    z-index: 1060;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.dropdown-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4002A 0%, #a30021 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-menu .dropdown-divider {
    margin: 0;
    border-color: #e2e8f0;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #334155;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-dropdown-menu .dropdown-item:hover {
    background-color: #f8fafc;
}

.user-dropdown-menu .dropdown-item:active {
    background-color: #f1f5f9;
}

.dropdown-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.dropdown-item:hover .dropdown-item-icon {
    background-color: #e2e8f0;
}

.dropdown-item-icon.admin-icon {
    background-color: #fef3c7;
    color: #d97706;
}

.dropdown-item:hover .dropdown-item-icon.admin-icon {
    background-color: #fde68a;
}

.dropdown-item-icon.provider-icon {
    background-color: #dbeafe;
    color: #2563eb;
}

.dropdown-item:hover .dropdown-item-icon.provider-icon {
    background-color: #bfdbfe;
}

.dropdown-item-icon.logout-icon {
    background-color: #fee2e2;
    color: #dc2626;
}

.dropdown-item:hover .dropdown-item-icon.logout-icon {
    background-color: #fecaca;
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dropdown-item-title {
    font-weight: 500;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.3;
}

.dropdown-item-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}

.logout-item {
    cursor: pointer;
}

.logout-item:hover .dropdown-item-title {
    color: #dc2626;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}