/* ========================================
   MOBILE RESPONSIVENESS - MEDIA QUERIES
   ======================================== */

:root {
    --bar-width: 30px;
    --bar-height: 3px;
    --bar-gap: 6px;
    --btn-size: 48px;
    /* Large touch target */
    --anim-speed: 0.4s;
    --text-primary: #333;
    /* Default color fallback */
}

/* ========================================
   UNIVERSAL MOBILE FIXES - APPLY TO ALL BREAKPOINTS
   ======================================== */

/* Prevent horizontal scroll on mobile */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Remove blue tap highlight on all touch devices */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

a,
button,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

/* Ensure all containers respect viewport */
.container,
.hero,
.search-results-container,
.publish-container,
.settings-container,
.my-rides-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent text overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
div {
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Standardize all dropdowns and extracts for touch */
select,
.unified-input,
.floating-input,
#suggestions,
#bike-suggestions {
    min-height: 48px;
    font-size: 16px;
}

.floating-label {
    font-size: 14px;
}

/* Ensure autocomplete dropdowns don't overflow */
#suggestions,
#bike-suggestions,
#time-suggestions,
.pac-container,
.suggestion-item {
    max-width: 100vw !important;
    box-sizing: border-box;
}

/* Table overflow handling */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* Long URLs or emails */
a,
.email,
.url {
    word-break: normal;
    overflow-wrap: break-word;
}

/* Fix for sticky elements on mobile - moved to media query below */

/* ========================================
   END UNIVERSAL FIXES
   ======================================== */

/* Hamburger Menu Button (Hidden on Desktop) */
/* Hamburger Menu Button (Hidden on Desktop) */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    min-width: 32px;
    /* Prevent flexing/squashing */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10002;
    position: relative;
    flex-shrink: 0;
    /* Double check shrink prevention */
}

.hamburger-btn span {
    display: block;
    width: 32px;
    /* Fixed width instead of 100% */
    height: 3px;
    transition: all 0.3s ease;
    background-color: var(--text-primary);
    opacity: 1;
    visibility: visible;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Ensure Search Icon is visible in Light Mode */
.mobile-action-btn svg {
    fill: currentColor;
    color: var(--text-primary);
}

/* Logic for Tab Content Toggling on Mobile */
.rides-section-wrapper {
    display: block;
    /* Default for Desktop */
}

@media (max-width: 1024px) {

    /* Hide wrappers by default on mobile, show only active */
    .rides-section-wrapper {
        display: none;
    }

    .rides-section-wrapper.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    /* Fix horizontal tabs vertical movement & styling strictly for mobile */
    .tabs-container {
        display: flex !important;
        justify-content: center;
        /* Centered tabs */
        overflow-x: auto !important;
        overflow-y: hidden !important;
        /* Prevent vertical jiggle */
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 5px 20px !important;
        margin-bottom: 0px !important;
        /* Gap Gone */
        border-bottom: 1px solid var(--border-color) !important;
        touch-action: pan-x !important;
        /* Force horizontal pan only */
        background: var(--bg-primary) !important;
        /* Use Primary BG (usually lighter) or explicit white */
        min-height: 50px !important;
        /* Fixed height to prevent collapse */
    }

    .tabs-container::-webkit-scrollbar {
        display: none !important;
    }

    .tab-btn {
        flex: 0 0 auto !important;
        padding: 10px 16px !important;
        font-size: 15px !important;
        white-space: nowrap !important;
    }

    .tab-btn.active::after {
        bottom: -2px !important;
        /* Better alignment on mobile */
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Menu Overlay - Transformed to Popup Container */
.mobile-menu-overlay {
    position: fixed;
    top: 80px;
    /* Below navbar */
    right: 10px;
    width: 300px;
    height: auto;
    max-height: 80vh;
    background: var(--bg-secondary);
    z-index: 10002;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    overflow-y: auto;

    /* Animation State: Hidden */
    display: none;
    /* Bulletproof hiding */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    /* KEY FIX: Prevent blocking clicks when hidden */
}

/* Ensure menu is visible when active */
.mobile-menu-overlay.active {
    display: block !important;
    /* Bulletproof showing */
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    /* Enable clicks when visible */
}

.mobile-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-close {
    position: absolute;
    top: 0px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 36px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10001;
}

.mobile-menu-close:hover {
    background: var(--hover-bg);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-links a {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s;
}

.mobile-nav-links a:hover {
    background: var(--hover-bg);
}

.mobile-auth-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.mobile-auth-btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.mobile-auth-btn.primary {
    background: var(--accent-teal);
    color: white;
    border-color: var(--accent-teal);
}

.mobile-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-user-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-user-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.mobile-user-info span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-user-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.mobile-user-links a {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
    background: rgba(15, 118, 110, 0.03);
}

.mobile-user-links a:hover {
    background: rgba(15, 118, 110, 0.08);
    color: var(--accent-teal);
    padding-left: 25px;
}

.mobile-logout-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    background: #fee;
    color: #c00;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-logout-btn:hover {
    background: #fdd;
}

/* ========================================
   TABLET & MOBILE BREAKPOINTS
   ======================================== */

/* Mobile Nav Actions Container */
.mobile-nav-actions {
    display: none;
}

.mobile-action-btn {
    display: none;
}

@media (max-width: 1024px) {

    /* Mobile Header Layout - Consistent across all pages */
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 16px;
        /* Increased padding preventing edge clip */
        gap: 10px;
        width: 100%;
        /* Fix 100vw scrollbar clip issue */
        left: 0;
        box-sizing: border-box;
    }

    /* Logo stays on left */
    .logo {
        order: 1;
        flex-shrink: 0;
    }

    /* Hide the loose mobile action buttons */
    .mobile-nav-actions {
        display: none !important;
    }

    .mobile-action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        background: var(--accent-teal);
        color: white !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
        /* Add border for visibility in light mode */
        border-radius: 8px;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-action-btn:hover {
        background: #0d6b63;
        transform: translateY(-1px);
    }

    .mobile-action-btn.publish-btn {
        background: var(--accent-lime);
        color: #064E44 !important;
    }

    .mobile-action-btn.publish-btn:hover {
        background: var(--accent-lime-dark);
    }

    .navbar {
        height: 60px !important;
        padding: 0 24px 0 20px;
        /* More right padding to prevent clipping */
        position: sticky;
        top: 0;
        z-index: 999;
    }

    /* Hamburger button on right - ALWAYS VISIBLE */
    .hamburger-btn {
        display: flex !important;
        order: 3;
        flex-shrink: 0;
        flex-shrink: 0;
        /* Reset right margin to prevent clipping */
        margin-right: 0 !important;
        width: auto !important;
        height: auto !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0;
        justify-content: center;
        align-items: center;
    }

    /* Activate and style the centered capsule for mobile */
    .nav-center-group {
        display: flex !important;
        order: 2;
        flex: 1;
        justify-content: center;
        position: relative !important;
        /* Override absolute desktop positioning */
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 0 auto;
        pointer-events: none;
        /* Prevent blocking clicks on hamburger/logo */
    }

    .nav-capsule {
        pointer-events: auto;
        padding: 4px !important;
        background: rgba(15, 118, 110, 0.05) !important;
        border: 1px solid rgba(15, 118, 110, 0.1) !important;
        gap: 0 !important;
        border-radius: 25px !important;
        display: flex !important;
        align-items: center !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    }

    .dark-theme .nav-capsule {
        background: rgba(255, 255, 255, 0.05) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }

    .nav-capsule a {
        padding: 8px 16px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        border-radius: 20px !important;
        color: #64748B !important;
        transition: all 0.3s ease !important;
    }

    .dark-theme .nav-capsule a {
        color: #94A3B8;
    }

    .nav-capsule a.active {
        background: var(--accent-lime) !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(180, 221, 75, 0.3) !important;
    }

    /* Hide desktop auth container on mobile - hamburger menu handles auth state */
    .nav-auth-container {
        display: none !important;
    }

    .mobile-my-rides-tabs {
        display: flex;
        gap: 20px;
        margin-bottom: 0px;
        /* Gap Gone - User request */
        background: transparent;
        padding: 0;
        border-radius: 0;
    }

    .mobile-tab-btn {
        flex: 0 0 auto;
        padding: 8px 0;
        border: none;
        background: transparent;
        border-radius: 0;
        font-weight: 600;
        font-size: 18px;
        /* Look like Header */
        color: #94A3B8;
        cursor: pointer;
        transition: all 0.2s;
        border-bottom: 2px solid transparent;
        box-shadow: none !important;
    }

    /* nav-auth-container is hidden on mobile, handled by hamburger menu */

    /* On mobile, shrink the buttons heavily to fit next to logo */
    @media (max-width: 768px) {
        .nav-capsule {
            gap: 2px;
            padding: 2px;
        }

        .nav-capsule a {
            padding: 6px 10px;
            font-size: 12px;
        }


        .footer-brand {
            align-items: center !important;
            text-align: center !important;
        }

        .footer-logo {
            margin-left: 0 !important;
            width: auto !important;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .logo {
            margin: 0 auto !important; /* Centering without hacks */
        }

        .logo img {
            height: 40px !important; /* Optimized mobile height per user request */
            width: auto !important;
        }

        .footer-logo img {
            height: 36px !important;
            width: auto !important;
            object-fit: contain !important;
        }
    }

    .user-menu-container {
        margin-right: 0;
        padding-right: 0;
    }

    /* Hide Home Safety/Scam section on Mobile */
    #home-safety-section {
        display: none;
    }

    /* Limit Help Centre to 2 boxes on Home Page Mobile */
    .help-centre .help-card:nth-child(n+3) {
        display: none;
    }

    .mobile-tab-btn.active {
        background: transparent;
        color: #0F172A;
        /* Dark Text */
        box-shadow: none;
        border-bottom: 2px solid #0F766E;
        /* Teal Underline */
    }

    /* Hide the redundant H2 headers inside tabs on mobile */
    .rides-section-wrapper .section-header {
        display: none;
    }

    /* Forced High Contrast for Search Icon */
    .mobile-action-btn svg {
        fill: #0F172A;
        /* Dark Slate to appear on white/light/dark */
        color: #0F172A !important;
    }

    /* Ultra Small Mobile (320px) */
    @media (max-width: 330px) {
        .navbar {
            padding: 0 8px 0 6px;
            /* gap: 2px; */
        }


        .hamburger-btn {
            transform: scale(0.85);
            margin-right: 0 !important;
        }
    }

    /* Small Mobile (375px - 400px) */
    /* Small/Medium Mobile (331px - 480px) */
    @media (min-width: 300px) and (max-width: 480px) {
        .navbar {
            /* padding: 0 12px 0 10px; */
            padding: 0;
            /* Slightly revert padding to give space for bigger elements if possible, try to fit */
            gap: 1px;
        }

        .logo {
            width: 70px !important;
            height: 45px !important;
            left: 1rem !important;
            /* Brought closer to center/left nicely on small screens */
        }

        .logo img {
            height: 1.5rem !important;
            /* Adjusted visual scale to look balanced */
            margin-left: 0 !important;
        }

        .nav-capsule {
            transform: scale(0.95);
            /* Almost full size */
            gap: 4px !important;
        }

        .nav-capsule a {
            padding: 6px 12px !important;
            font-size: 13px !important;
        }

        .hamburger-btn {
            transform: scale(0.95);
            margin-right: -2px !important;
            /* Slight cheating to fit */
        }
    }
}

@media (max-width: 768px) {

    /* ===== HERO SECTION ===== */
    .hero,
    .publish-hero {
        padding: 0 20px 30px;
        /* Breathing space below fixed navbar */
        margin-top: 0 !important;
        padding-top: 20px !important;
        position: relative;
        z-index: 10;
        min-height: auto;
    }

    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 24px;
        margin-top: 0 !important;
        padding-top: 0 !important;
        line-height: 1.2;
    }

    .hero-content,
    #search-view,
    #publish-view {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }



    /* ===== SEARCH BAR - VERTICAL STACK ===== */
    .search-bar {
        flex-direction: column;
        gap: 8px;
        padding: 16px;
        max-width: 100%;
    }

    /* ===== SEARCH FILTERS - 2x2 GRID ===== */
    .search-filters#searchFilters {
        display: none; /* Hidden by default, script toggles .active */
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
        width: 100%;
        margin-top: 15px;
    }

    .search-filters.active {
        display: grid !important;
    }

    .search-filters .filter-group {
        width: 100%;
    }

    .search-filters .filter-dropdown-trigger {
        min-width: 0 !important;
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
    }


    .search-input-wrapper,
    .date-field,
    .time-field {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }

    .date-placeholder,
    .time-placeholder,
    .parcel-placeholder,
    .freq-placeholder,
    .bike-placeholder,
    .helmet-placeholder,
    .booking-placeholder {
        position: relative;
        top: 5px;
    }

    /* FIX: Date and Parcel segments same height as input fields */
    .date-segment-trigger {
        height: 48px !important;
        /* Matched to min-height of inputs */
        padding: 0 14px !important;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        width: 100%;
    }

    /* Stack Publish Ride Location Inputs Vertically */
    .publish-form-grid .form-group-full {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .publish-form-grid .location-arrow {
        display: none !important;
    }

    .date-segment-trigger {
        height: 48px !important;
        /* Matched to min-height of inputs */
        padding: 0 14px !important;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .parcel-filter-segment {
        height: 48px !important;
        /* Matched to min-height */
        padding: 0 14px !important;
        box-sizing: border-box;
        display: flex;
        align-items: center;
    }

    .search-input-wrapper input,
    .search-input-wrapper select {
        height: 48px !important;
        font-size: 15px !important;
        padding: 10px 14px !important;
        padding-right: 52px !important;
        /* Prevent text burial under detect icon */
    }

    /* FIX: Unified Inputs (Date, Time, Parcel, etc.) alignment on mobile */
    /* FIX: Unified Inputs (Date, Time, Parcel, etc.) alignment on mobile */
    .floating-input {
        padding: 18px 14px 4px !important;
        /* Matches location input padding */
        font-size: 15px !important;
        height: 52px !important;
    }

    /* Dropdowns need more top padding because text sits higher */
    .unified-input {
        padding: 24px 14px 2px;
        /* Increased top padding for breathable space */
        padding-right: 40px;
        /* Reserve space for absolute arrow */
        font-size: 15px;
        height: 52px;
        display: flex;
        align-items: center;
        position: relative;
    }

    /* FIX: Absolute position arrow to center it vertically despite top padding */
    .unified-input .dropdown-arrow,
    .unified-input .filter-dropdown-arrow {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

    .unified-input {
        display: flex;
        justify-content: center;
        align-self: center;
        align-content: center;
        align-items: center;
    }

    .icon-placeholder {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

    /* Ensure placeholders align correctly */
    .unified-input span:not(.dropdown-arrow) {
        transform: translateY(0);
        margin: 0;
    }

    #rideDate,
    #publish-date,
    #publish-time {
        height: 48px !important;
        font-size: 15px !important;
        padding: 10px 14px !important;
    }

    /* Search Button */
    .search-bar button {
        width: 100%;
        height: 52px;
        font-size: 18px;
        border-radius: 12px;
        /* Unified border-radius for consistency */
    }

    /* FIX: Prevent location detect buttons from becoming full-width on mobile search */
    .search-bar .location-detect-btn {
        width: 40px !important;
        height: 40px !important;
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: transparent !important;
    }

    .parcel-segment-content {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Parcel Checkbox - Mobile Optimized */
    .parcel-filter-minimal {
        margin: 12px 0 !important;
        justify-content: flex-start;
        padding: 12px 16px !important;
        background: rgba(15, 118, 110, 0.05);
        border-radius: 12px;
        /* Unified border-radius to match search button */
        -webkit-tap-highlight-color: transparent !important;
    }

    .parcel-filter-minimal input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }

    .parcel-filter-minimal span {
        font-size: 14px !important;
        user-select: none;
    }

    /* Offer Badges - HIDDEN on Mobile */
    .offer-badge {
        display: none !important;
    }

    /* ===== SEARCH RESULTS ===== */
    .search-results-container {
        padding: 0 16px;
    }

    .search-result-card {
        padding: 16px !important;
        margin-bottom: 20px !important;
        border-radius: 16px !important;
    }

    .card-main-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .card-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .card-rider-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        padding-top: 16px !important;
        border-top: 1px solid var(--border-color) !important;
    }

    .card-header-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .route-timeline {
        border-right: none !important;
        padding-right: 0 !important;
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .timeline-visual {
        flex-direction: column !important;
        height: auto !important;
        width: auto !important;
        gap: 4px !important;
        justify-content: flex-start !important;
        padding-top: 5px !important;
        /* Align 1st dot with 1st line of text */
    }

    .timeline-line {
        width: 2px !important;
        height: 20px !important;
        background: var(--border-color) !important;
    }

    .card-price {
        align-self: flex-start !important;
        margin-top: 5px !important;
        text-align: right !important;
    }

    .card-price .price-main {
        font-size: 20px !important;
    }

    .card-price .price-sub {
        font-size: 9px !important;
    }

    .action-book-btn {
        grid-area: button !important;
        justify-self: stretch !important;
        width: 100% !important;
        padding: 14px !important;
        font-size: 18px !important;
        border-radius: 12px !important;
    }

    /* My Rides - Detailed Card Mobile Fix */
    .my-rides-container {
        padding-top: 15px !important;
        /* Reduced from 74px to fix whitespace */
    }

    .ride-card-detailed {
        padding: 16px !important;
        margin-bottom: 8px !important;
        /* Halved from 16px */
    }

    /* Remove grid margin on mobile to close the gap */
    .rides-grid {
        margin-top: 0px !important;
        gap: 12px !important;
        /* Halved from 24px */
    }



    .no-rides p {
        color: #94A3B8 !important;
    }

    .ride-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .ride-price-badge {
        font-size: 16px !important;
        padding: 6px 12px !important;
    }

    .ride-details {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        padding-top: 12px !important;
        /* Slightly reduced padding */
    }

    .detail-item {
        font-size: 13px !important;
        /* Slightly smaller for mobile line fit */
    }

    /* Request Cards Mobile Fix */
    .request-card {
        padding: 16px !important;
    }

    /* FIX: Ensure "Leaving From" doesn't overlap with GPS icon on mobile */
    .form-group-full .floating-group .floating-input {
        padding-right: 36px !important;
        /* Adjusted for tighter icon */
        text-overflow: ellipsis;
    }

    /* Move GPS icon further right as requested (almost touching edge) */
    .form-group-full .location-detect-btn {
        right: 1px !important;
        padding: 4px !important;
        width: 32px !important;
        height: 32px !important;
    }

    .form-group-full .location-detect-btn svg {
        width: 16px !important;
        height: 16px !important;
        opacity: 0.8;
    }



    .request-card {
        padding: 16px !important;
        gap: 16px !important;
    }

    .pillion-profile {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
    }

    .request-actions {
        flex-direction: column !important;
    }

    /* Force stacking for Profile Settings specifically to override main stylesheet row-layout */
    .page-profile-settings .settings-container {
        flex-direction: column !important;
        margin-top: 0 !important;
        /* Remove huge top margin from style.css */
        padding-top: 5px !important;
        /* Minimized to connect with navbar */
        gap: 0 !important;
    }

    .settings-container {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .settings-sidebar,
    .settings-content {
        width: 100% !important;
        margin: 0 !important;
        display: block !important;
    }

    .settings-sidebar {
        padding: 15px 20px !important;
        /* Slightly tighter sidebar */
        border-radius: 16px 16px 0 0 !important;
        /* Top rounded only to connect with content */
        border-bottom: none !important;
    }

    .settings-sidebar h2 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }

    .settings-tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 4px 0 !important;
        gap: 8px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .tab-item {
        flex: 0 0 auto !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
        margin-bottom: 0 !important;
    }

    .settings-content {
        padding: 20px !important;
        border-radius: 0 0 16px 16px !important;
        /* Bottom rounded ONLY */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        margin-top: -1px !important;
        /* Overlap border to look connected */
        display: block !important;
        /* Force visibility */
        min-height: auto !important;
    }

    /* Ensure form fields are visible on dark theme mobile */
    .dark-theme .settings-content {
        background: #111827 !important;
        /* Clear dark gray instead of pure black */
        border-color: #374151 !important;
    }

    .profile-header-edit {
        flex-direction: column !important;
        text-align: center !important;
        gap: 16px !important;
    }

    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .form-group {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    .form-group label {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .unified-input,
    .bio-display-box,
    textarea#prof-bio {
        font-size: 15px !important;
        padding: 14px !important;
    }

    /* ===== REDESIGNED MODAL RESPONSIVENESS ===== */
    .modal-content {
        max-width: 90%;
        border-radius: 20px;
    }

    .modal-content-inner {
        padding: 20px;
    }

    .modal-details-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-header {
        align-items: flex-start;
        gap: 15px;
    }

    .modal-price {
        font-size: 20px;
        text-align: left;
    }

    /* ===== FEATURES SECTION ===== */
    .features {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
    }

    /* ===== WHY CHOOSE SECTION ===== */
    .why-choose-section {
        padding: 60px 20px;
    }

    .why-choose-section h2 {
        font-size: 32px;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .why-card {
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 0 16px !important;
        padding: 24px !important;
        align-items: center !important;
        border-radius: 20px !important;
        text-align: left !important;
    }

    .why-card .icon-wrapper {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
        margin-bottom: 0 !important;
        border-radius: 12px !important;
    }

    .why-card h3 {
        grid-column: 2 !important;
        grid-row: 1 !important;
        margin-bottom: 0 !important;
        font-size: 18px !important;
    }

    .why-card p {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        margin-top: 10px !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .read-more-btn {
        padding: 12px 24px !important;
        font-size: 15px !important;
        white-space: nowrap !important;
        width: fit-content !important;
        /* Prevent awkward wrapping of the word 'mission' */
        margin: 20px auto 0 !important;
        display: inline-flex !important;
    }

    /* ===== SHARE RIDE CTA SECTION ===== */
    .share-ride-section {
        margin: 40px 16px !important;
        padding: 40px 24px !important;
        background: #142422 !important;
        /* Matches Desktop var(--card-bg) */
        border-radius: 32px !important;
        text-align: center !important;
        width: auto !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    }

    .share-ride-section h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
        margin-bottom: 24px !important;
        letter-spacing: -0.5px !important;
        color: #F1F5F9 !important;
        /* Matches var(--text-primary) */
    }

    .share-ride-section p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 30px !important;
        max-width: 100% !important;
        color: #A1B5B2 !important;
        /* Matches var(--text-secondary) */
        padding: 0 10px !important;
    }

    .share-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        color: #0F766E !important;
        /* Brand Teal for text */
        padding: 12px 28px !important;
        border-radius: 50px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        min-width: 200px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    .share-btn span {
        margin-right: 10px !important;
        font-size: 20px !important;
        order: -1 !important;
        color: #0F766E !important;
    }

    /* ===== FOOTER ACCORDION REDESIGN ===== */
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        text-align: left;
    }

    .footer-brand {
        text-align: center;
        margin-bottom: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dark-theme .footer-brand {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-column {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 16px 0 !important;
    }

    .dark-theme .footer-column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-column h3 {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        cursor: pointer;
        margin-bottom: 0 !important;
        font-size: 16px !important;
        padding: 0 4px !important;
    }

    .footer-column h3::after {
        content: "";
        width: 10px;
        height: 10px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.3s ease;
        margin-right: 8px;
        opacity: 0.7;
    }

    .footer-column.active h3::after {
        transform: rotate(-135deg);
    }

    .footer-column .footer-links {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out, padding 0.4s ease, opacity 0.4s ease;
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        opacity: 0;
        pointer-events: none;
    }

    .footer-column.active .footer-links {
        max-height: 500px;
        padding-top: 20px !important;
        padding-bottom: 10px !important;
        opacity: 1;
        pointer-events: auto;
    }

    /* Specifically handle the app download section */
    .footer-column.active .footer-links.footer-app-download {
        max-height: 500px;
        padding-top: 15px !important;
    }

    /* Ensure h3 is clickable and above any invisible overlays */
    .footer-column h3 {
        position: relative;
        z-index: 10;
        pointer-events: auto !important;
    }

    .footer-column .footer-links a {
        font-size: 15px !important;
        opacity: 0.8;
    }

    .footer-brand .footer-tagline {
        margin: 0 auto;
        max-width: 100%;
    }

    .footer-column {
        text-align: left;
    }

    .footer-column h3 {
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 16px;
        color: var(--accent-lime);
    }

    .footer-links a {
        font-size: 14px;
        padding: 4px 0;
    }

    .footer-bottom {
        margin-top: 40px;
    }

    /* ===== PRICE CONTROL ===== */
    .price-control {
        width: 100%;
    }

    .price-control input {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #0F172A !important;
        /* Force dark color */
        opacity: 1 !important;
        /* Fix Safari/iOS visibility */
        -webkit-text-fill-color: #0F172A !important;
        background: transparent !important;
        text-align: center !important;
        padding-top: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        line-height: 1.2 !important;
    }

    /* Change "Price (₹)" to just "₹" on mobile - REMOVED TO FIX OVERLAP */
    .price-control .floating-label {
        color: var(--text-secondary) !important;
    }

    .price-control .floating-label::after {
        content: none !important;
    }

    /* Active State for the Pseudo-Label */
    .price-control .floating-input:focus~.floating-label::after,
    .price-control .floating-input:not(:placeholder-shown)~.floating-label::after,
    .floating-group.has-value .price-control .floating-label::after {
        content: none !important;
    }

    .price-btn {
        width: 42px;
        /* Optimize space on small screens */
        font-size: 22px;
    }

    /* ===== PARCEL TOGGLES ===== */
    .parcel-toggle-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    /* Production-level Picker Optimizations for Mobile */
    @media (max-width: 768px) {

        .custom-calendar-popup,
        .custom-frequency-popup,
        .custom-time-popup,
        .filter-dropdown-popup {
            width: 90% !important;
            max-width: 350px !important;
            position: fixed !important;
            top: 50% !important;
            left: 50% !important;
            transform: translate(-50%, -50%) scale(0.95) !important;
            margin: 0 !important;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
            z-index: 100002 !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
            max-height: 80vh !important;
            overflow-y: auto !important;
            opacity: 0;
            visibility: hidden;
        }

        .custom-calendar-popup.show,
        .custom-frequency-popup.show,
        .custom-time-popup.show,
        .custom-calendar-popup.show,
        .filter-dropdown-popup.show {
            transform: translate(-50%, -50%) scale(1) !important;
            opacity: 1 !important;
            visibility: visible !important;
            z-index: 100002 !important;
        }
    }

    /* Backdrop for pickers on mobile */
    @media (max-width: 768px) {
        .mobile-picker-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(15, 23, 42, 0.5);
            /* Removed blur as per user request */
            z-index: 9999;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .mobile-picker-backdrop.show {
            display: block;
            opacity: 1;
        }
    }

    /* Touch targets and standard elements */
    button,
    .btn,
    .auth-btn,
    .btn-save,
    .submit-ride-btn,
    input[type="submit"] {
        padding: 12px 16px !important;
    }

    /* Stack price and button vertically on very small screens */
    .card-right {
        flex-direction: column !important;
        gap: 12px;
        align-items: stretch !important;
    }
}

/* FIX: Desktop Calendar Width Override */
@media (min-width: 769px) {

    /* Exclude profile calendar from fixed width if it causes issues, or ensure it fits */
    .custom-calendar-popup:not(#calendar-prof-dob) {
        width: 340px !important;
        max-width: 340px !important;
    }
}

/* FIX: Ensure content sits below the updated fixed navbar */
/* This is now handled more specifically in media queries for mobile */
@media (min-width: 1025px) {
    .settings-container:not(.page-profile-settings .settings-container) {
        padding-top: 85px;
    }
}

/* FIX: Profile Calendar - use same 340px width as search/publish but ensure days fit */
@media (min-width: 769px) {
    #calendar-prof-dob {
        width: 340px !important;
        max-width: 340px !important;
        padding: 20px !important;
    }

    #calendar-prof-dob .calendar-day {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 14px !important;
    }

    #calendar-prof-dob .calendar-grid {
        column-gap: 6px !important;
        row-gap: 8px !important;
    }
}

/* Enhanced Responsiveness for Publish Page Sections */
@media (max-width: 768px) {

    /* Value Props */
    .value-props {
        padding: 50px 15px;
    }

    .value-props h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .props-grid {
        gap: 16px;
    }

    .prop-item {
        min-width: 100%;
        max-width: 100%;
        padding: 25px 20px;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    /* Stats Banner */
    .stats-banner {
        padding: 40px 15px;
        gap: 30px;
    }

    .stat h3 {
        font-size: 26px;
    }

    .stat p {
        font-size: 12px;
    }

    /* Testimonials */
    .testimonial-section {
        padding: 40px 15px;
    }

    .testimonial-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .testimonial-content::before {
        display: none;
    }

    .testimonial-content blockquote {
        font-size: 16px;
    }

    /* How It Works */
    .how-it-works {
        padding: 40px 15px;
    }

    .how-it-works h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .steps-container {
        flex-direction: column;
        gap: 30px;
    }

    .how-it-works-visual {
        order: -1;
        margin-bottom: 20px;
        padding: 0;
    }

    .visual-img {
        max-width: 260px;
    }

    .visual-blob {
        width: 220px;
        height: 220px;
    }

    .steps-list::before {
        left: 32px;
        top: 30px;
        bottom: 30px;
    }

    .step {
        padding: 12px;
        align-items: center;
        gap: 16px;
    }

    .step:hover {
        transform: none;
        background: rgba(15, 118, 110, 0.05);
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* FAQ Improved Responsiveness */
    .help-centre-faq {
        padding: 40px 16px;
        margin: 20px 10px;
        border-radius: 24px;
    }

    .help-centre-faq h2 {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .faq-item {
        padding: 24px;
        border-radius: 20px;
    }

    .faq-item h3 {
        font-size: 16px;
    }

    .faq-icon {
        font-size: 20px;
    }

    .faq-answer p {
        font-size: 14px;
    }

    .faq-extra p {
        padding: 12px;
        font-size: 13px;
    }
}


@media (max-width: 768px) {
    .mobile-only-block {
        display: block !important;
    }

    /* FIX: Ensure popular rides are 2x2 on mobile */
    .routes-list {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .route-card {
        flex: 1 1 calc(50% - 12px);
        min-width: 140px;
        padding: 16px;
        font-size: 14px;
    }

    .route-card .arrow {
        font-size: 20px;
    }

    /* Mobile Dropdown Fixes */
    .user-dropdown {
        width: 200px !important;
        right: 10px !important;
        top: 72px !important;
        border-radius: 12px !important;
    }

    .notification-dropdown {
        width: 280px !important;
        right: 10px !important;
        top: 72px !important;
        border-radius: 12px !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
}

/* FIX FOR DROPDOWN ARROW OVERLAP ON SMALL MOBILES */
@media (max-width: 480px) {
    .unified-input {
        font-size: 13.5px !important;
        /* Reduced from 15px */
        padding-right: 25px !important;
        /* Reduced padding to move arrow closer to edge */
    }

    /* Ensure arrow is flush right */
    .unified-input .dropdown-arrow {
        position: absolute;
        right: 10px;
    }

    .floating-group.has-value .unified-input {
        font-weight: 500 !important;
    }
}

/* ========================================
   Ride Card Improvements (Mobile)
   ======================================== */
@media (max-width: 768px) {

    /* 1. Vertical Location Line */
    .ride-card .card-header-row {
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .ride-card .route-timeline {
        flex-direction: row !important;
        align-items: stretch !important;
        width: auto !important;
        flex: 1;
    }

    .ride-card .timeline-visual {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-right: 12px;
        padding-top: 4px;
    }

    .ride-card .timeline-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .ride-card .timeline-dot.start {
        background: #10B981;
    }

    .ride-card .timeline-dot.end {
        background: #EF4444;
    }

    .ride-card .timeline-line {
        width: 2px;
        background: #E2E8F0;
        flex-grow: 1;
        min-height: 24px;
        margin: 4px 0;
    }

    .ride-card .timeline-details {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 20px;
        padding-bottom: 2px;
    }

    .ride-card .route-loc {
        font-size: 15px;
        font-weight: 600;
        color: #0F172A;
        line-height: 1.2;
    }

    /* 2. Price Visibility */
    .ride-card .card-price {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #0F172A !important;
        white-space: nowrap;
        background: #F1F5F9;
        padding: 6px 10px;
        border-radius: 8px;
        align-self: flex-start;
    }

    .dark-theme .ride-card .card-price {
        color: #F1F5F9 !important;
        background: #334155;
    }

    /* Fix to ensure buttons don't stretch weirdly */
    .ride-card .card-actions-row {
        flex-wrap: wrap;
    }

    /* 4. Request Ride / Publish Ride Alignment Fix */
    /* Target form groups in both Request and Publish pages */
    .publish-card .form-group-full {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .publish-card .location-arrow {
        display: none !important;
    }
}


/* ========================================
   Ride Card Improvements (Mobile)
   ======================================== */
@media (max-width: 768px) {

    /* 1. Vertical Location Line */
    .ride-card .card-header-row {
        flex-direction: row !important;
        /* Put Price and Route side-by-side */
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .ride-card .route-timeline {
        flex-direction: row !important;
        /* Visual | Details */
        align-items: stretch !important;
        width: auto !important;
        flex: 1;
    }

    .ride-card .timeline-visual {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-right: 12px;
        padding-top: 4px;
        /* Align with text */
    }

    .ride-card .timeline-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .ride-card .timeline-dot.start {
        background: #10B981;
    }

    .ride-card .timeline-dot.end {
        background: #EF4444;
    }

    .ride-card .timeline-line {
        width: 2px;
        background: #E2E8F0;
        flex-grow: 1;
        min-height: 24px;
        margin: 4px 0;
    }

    .ride-card .timeline-details {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 20px;
        /* Push To address down */
        padding-bottom: 2px;
    }

    .ride-card .route-loc {
        font-size: 15px;
        font-weight: 600;
        color: #0F172A;
        line-height: 1.2;
    }

    /* 2. Price Visibility */
    .ride-card .card-price {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #0F172A !important;
        /* Ensure dark color */
        white-space: nowrap;
        background: #F1F5F9;
        padding: 6px 10px;
        border-radius: 8px;
        align-self: flex-start;
        /* Align top right */
    }

    .dark-theme .ride-card .card-price {
        color: #F1F5F9 !important;
        background: #334155;
    }

    /* Fix to ensure buttons don't stretch weirdly */
    .ride-card .card-actions-row {
        flex-wrap: wrap;
    }

    /* Helmet SVG specific tweak for mobile */
    .freq-icon svg {
        position: relative;
        top: 2px !important;
    }
}

/* Footer Socials Centering on Mobile */
@media (max-width: 768px) {
    .footer-socials {
        justify-content: center;
        margin-top: 20px;
        gap: 14px;
    }

    .social-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-app-download {
        justify-content: center;
    }
}

@media (max-width: 1080px) {
    .notification-bell-container {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .footer-app-download {
        flex-direction: column;
        width: 100%;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }

    .app-badge-btn {
        width: 100%;
        justify-content: center;
    }

    .app-coming-soon-modal {
        padding: 30px 20px;
    }

    .coming-soon-icon {
        font-size: 50px;
    }

    .coming-soon-title {
        font-size: 22px;
    }
}

.modal-details-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
}


/* ========================================
   Mobile Notification Modal Overlay
   ======================================== */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 20000;
    /* display is toggled by JS (flex/none) */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.notification-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: zoomIn 0.2s ease-out;
    position: relative;
}

/* Ensure prevent click propagation */
.notification-modal-content {
    pointer-events: auto;
}

.dark-theme .notification-modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.notification-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.dark-theme .notification-dropdown-header {
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.notification-dropdown-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

/* Overrides for text color in dark mode */
.dark-theme .notification-dropdown-header h3 {
    color: #f1f5f9;
}

.notification-list {
    overflow-y: auto;
    flex: 1;
    padding: 0;
}

.close-btn {
    cursor: pointer;
    font-size: 20px;
    color: #64748b;
    padding: 4px;
    margin-left: 10px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ef4444;
}

.mark-all-read {
    font-size: 13px;
    color: white;
    background: #0D9488;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-left: auto;
    /* Push to right, close button next to it */
    margin-right: 12px;
    transition: all 0.2s;
    user-select: none;
}

.mark-all-read:active {
    transform: scale(0.95);
    background: #0F766E;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (min-width: 200px) and (max-width: 1024px) {
    .logo {
        width: 70px !important;
        height: 45px !important;
        margin-left: 0.5rem !important;
        /* Brought closer to center/left nicely on small screens */
    }

    .logo img {
        height: 1.5rem !important;
        /* Adjusted visual scale to look balanced */
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {

    .gender-placeholder,
    .date-placeholder {
        top: 0;
    }
}


@media (max-width: 768px) {
    .footer-links .app-badge-btn {
        padding: 8px 16px;
    }

    /* ABOUT PAGE MOBILE FIXES */
    .about-hero {
        padding: 100px 20px 40px !important;
    }
    .about-hero-content h1 {
        font-size: 32px !important;
    }
    .hero-tagline {
        font-size: 16px !important;
    }
    .about-section h2 {
        font-size: 26px !important;
    }
    .lead-text, .emphasis-text {
        font-size: 16px !important;
    }
    .solution-text {
        font-size: 15px !important;
    }
    .capability-card h3 {
        font-size: 18px !important;
    }
    .step-number {
        font-size: 20px !important;
        width: 44px !important;
        height: 44px !important;
    }
    .premium-section-header h2 {
        font-size: 26px !important;
    }
    .vision-content-v2 h2 {
        font-size: 28px !important;
    }
    .vision-quote-v2 {
        font-size: 20px !important;
    }
    .cta-section h2 {
        font-size: 28px !important;
    }
    .cta-section p {
        font-size: 16px !important;
    }
    .about-container {
        padding: 30px 16px !important;
    }
    .about-section {
        margin-bottom: 50px !important;
    }
}