/* 1. Import Premium Persian Font */
/* @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;700;800&display=swap'); */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../Fonts/webfonts/Vazirmatn-Regular.woff2') format('woff'),
        url('../Fonts/ttf/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Main Premium Palette */
    --clr-bg: #f8f4ed;
    --clr-dark: #001b2E;
    --clr-accent: #f8e462;

    /* Mapping your exact card variables */
    --black-purple: var(--clr-dark);
    --dark-purple: rgba(0, 27, 46, 0.7);
    --mint-green: var(--clr-accent);
    --light-green: #faeb85;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 2. Apply Vazirmatn globally */
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Ensures the background stretches top-to-bottom even if the page is empty */
    min-height: 100vh;
    /* Kill any horizontal overflow globally */
    overflow-x: hidden;
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(248, 228, 98, 0.15), transparent 30%),
        radial-gradient(circle at 85% 20%, rgba(0, 27, 46, 0.08), transparent 30%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

p {
    text-align: justify;
}

a {
    text-decoration: none;
}

/* ========================================= */
/* Header & Navigation                       */
/* ========================================= */

.site-header {
    /* Added these two lines to force 100% width */
    width: 100%;
    left: 0;

    /* Your existing glassmorphism styles */
    background-color: rgba(248, 244, 237, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 27, 46, 0.08);
    position: fixed;
    top: 0;
    z-index: 1000;
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 0;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 80px;
}

.lang-switcher {
    position: relative;
    display: inline-block;
    margin-inline-start: 1rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    vertical-align: middle;
}

.arrow {
    font-size: 0.7rem;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    /* RTL context: dropdown opens to the right */
    margin-top: 0.6rem;
    min-width: 160px;
    padding: 0.4rem 0;
    list-style: none;
    border-radius: 24px;
    /* match your glass-panel radius */

    /* Glassmorphism matching your design: warm white, generous blur */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0, 27, 46, 0.08);

    /* Fast, snappy animation */
    visibility: hidden;
    opacity: 0;
    transform: scaleY(0.95) translateY(-4px);
    transform-origin: top;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s cubic-bezier(0.25, 1, 0.5, 1),
        visibility 0.25s ease;
}

.lang-dropdown.show {
    visibility: visible;
    opacity: 1;
    transform: scaleY(1) translateY(0);
    pointer-events: auto;
}

.lang-dropdown li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-dropdown li:hover {
    background: rgba(248, 228, 98, 0.2);
    /* soft yellow tint on hover */
    color: var(--clr-dark);
}

/* Active language highlight */
.lang-dropdown li.active {
    background: rgba(248, 228, 98, 0.35);
    font-weight: 700;
    border-radius: 12px;
    /* subtle inner curve on the active item */
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--clr-dark);
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.lang-btn:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    transform: translateY(-1px);
}


.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--clr-dark);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo img {
    width: 90px;
    height: auto;
    user-select: none;
    pointer-events: none;
    margin: 10px 0px 0px 0px;
}

.nav-menus {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sidebar-header {
    display: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--clr-dark);
    font-weight: 600;
    padding-bottom: 4px;
    transition: opacity 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background-color: var(--clr-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
}

.btn {
    position: relative;
    /* Required to center the spinner inside */
}

/* When loading, hide the text and disable clicks */
.btn.loading {
    color: transparent !important;
    pointer-events: none;
    /* Prevents spam clicking natively */
    opacity: 0.9;
}

/* The Spinner */
.btn.loading::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    /* Perfect centering using negative margins (half the width/height) */
    margin-top: -12px;
    margin-left: -12px;
    border-radius: 50%;

    /* Default Spinner Colors */
    border: 3px solid rgba(0, 27, 46, 0.2);
    border-top-color: var(--clr-dark);

    animation: buttonSpin 0.8s linear infinite;
}

/* Primary Button Spinner (Navy button gets a Yellow spinner) */
.primary-btn.loading::after {
    border: 3px solid rgba(248, 228, 98, 0.2);
    /* Muted yellow ring */
    border-top-color: var(--clr-accent);
    /* Bright yellow spinning edge */
}

@keyframes buttonSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.primary-btn {
    background-color: var(--clr-dark);
    color: var(--clr-bg);
}

.primary-btn:hover {
    background-color: var(--clr-accent);
    color: var(--clr-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 27, 46, 0.15);
}

.current-page-indicator {
    background-color: transparent;
    color: var(--clr-dark);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
    border: 2px solid var(--clr-accent);
}

/* ========================================= */
/* Glassmorphism Global Components           */
/* ========================================= */

.glass-panel {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 27, 46, 0.05);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: var(--clr-dark);
    text-decoration: none;
}

.glass-btn:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 228, 98, 0.4);
}

/* ========================================= */
/* Counters Section Update                   */
/* ========================================= */

.counters-section {
    padding: 3rem 1rem;
    display: flex;
    justify-content: center;
}

.counters-container {
    max-width: 1000px;
    width: 100%;
    padding: 2rem;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    direction: rtl;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.counter-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.counter-item:nth-child(1) {
    transition-delay: 0.1s;
}

.counter-item:nth-child(2) {
    transition-delay: 0.2s;
}

.counter-item:nth-child(3) {
    transition-delay: 0.3s;
}

.counter-item:nth-child(4) {
    transition-delay: 0.4s;
}

.counter-title {
    font-size: 1rem;
    /* Scaled down slightly to fit Persian text */
    font-weight: 600;
    color: var(--clr-dark);
    opacity: 0.75;
    margin-bottom: 0.8rem;
}

.counter-number {
    font-size: 3.5rem;
    /* Scaled down slightly */
    font-weight: 800;
    color: var(--clr-dark);
    line-height: 1;
    position: relative;
}

.counter-number::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background-color: var(--clr-accent);
    border-radius: 2px;
}


/* ========================================= */
/* Main Layout & Grid */
/* ========================================= */
.main-content-wrapper {
    padding-bottom: 80px; /* Space for bottom nav if you have one */
}

.ads-grid {
    display: grid;
    /* This creates columns that are at least 450px wide (or 100% on mobile), and stretches to fill the space */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 1.5rem; /* Increased the gap slightly to let the larger cards breathe */
    padding: 1rem;
    max-width: 1000px; /* Increased to comfortably fit two 450px cards */
    margin: 0 auto;
}

/* ========================================= */
/* Search Hero & Sticky Morphing */
/* ========================================= */
.search-spacer {
    height: 45vh; 
    width: 100%;
}

/* 2. The Search Container */
.search-hero-container {
    position: fixed;
    /* Adjust this value to match the exact height of your main top navbar! 
       (Looks like about 80px from your screenshots) */
    top: 80px; 
    left: 0;
    width: 100%;
    
    /* We subtract the 80px top offset so it still totals 45vh visually */
    height: calc(45vh - 80px); 
    
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90; /* Keep it slightly lower than your main navbar's z-index (usually 100) */
    
    /* CRITICAL FIX: Targeted transitions prevent the weird border flashing bug */
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.4s ease,
                box-shadow 0.4s ease;
                
    background: transparent;
    pointer-events: none;
}

.search-wrapper {
    pointer-events: auto; 
    width: 100%;
    max-width: 600px;
    padding: 0 1rem;
    position: relative;
    transition: all 0.4s ease;
}
.main-search-input-box {
    position: relative;
}

/* 3. The "Scrolled" State (Compact & Sticky under header) */
.search-hero-container.compact {
    height: 130px; /* Shrinks into a nice, slim search bar */
    background: rgba(248, 244, 237, 0.85); /* Slightly solid to hide cards sliding under it */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* FIX: A smooth shadow replaces the border-bottom to kill the flashing glitch */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    pointer-events: auto; 
}

/* Optional UX touch: Shrink the actual input field slightly when scrolled */
.search-hero-container.compact .big-search {
    padding: 0.8rem 3rem 0.8rem 1.5rem; 
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.big-search {
    width: 100%;
    padding: 1.2rem 3rem 1.2rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

/* Update your existing search button just to ensure perfect centering */
.search-icon-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* New styles for your custom image */
.custom-search-img {
    width: 45px;  /* Adjust this based on how large you want the icon */
    height: 45px;
    object-fit: contain; /* Prevents the image from stretching or squishing */
    opacity: 0.6; /* Matches the slightly faded look of placeholder text */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Optional UX touch: Make the icon light up or pop slightly when hovered */
.search-icon-btn:hover .custom-search-img {
    opacity: 1;
    transform: scale(1.05);
}


.search-hero-container.compact .big-search {
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.main-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hide filters when the header shrinks on scroll to save space */
/* .search-hero-container.compact .main-filter-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    position: absolute;
} */

/* Base style for all filter items */
.filter-pill {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    height: 42px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 0.85rem;
    white-space: nowrap; /* Prevents text from wrapping on small screens */
}

/* 1. Toggle Group (همه / گمشده / پیدا شده) */
.type-toggle-group {
    padding: 4px;
    gap: 2px;
}

.type-toggle-group input[type="radio"] {
    display: none;
}

.type-toggle-group label {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s ease;
}

/* The active state (Matches your dark blue from the screenshot) */
.type-toggle-group input[type="radio"]:checked + label {
    background-color: #0b1c2d; 
    color: #fff;
}

/* 2. Category Select */
.category-dropdown {
    position: relative;
    padding: 0 1rem;
}

.clean-select {
    appearance: none;
    background: transparent;
    border: none;
    padding-right: 0;
    padding-left: 1.5rem; /* Space for the chevron */
    font-family: inherit;
    font-size: inherit;
    color: #333;
    cursor: pointer;
    outline: none;
}

.dropdown-chevron {
    position: absolute;
    left: 1rem;
    width: 14px;
    height: 14px;
    pointer-events: none;
    color: #666;
}

/* 3. Location Button */
.location-pill-btn {
    padding: 0 1.25rem;
    cursor: pointer;
    gap: 0.5rem;
    background: #fde047; /* The nice yellow from your design */
    border-color: #facc15;
    color: #000;
    font-weight: 500;
    transition: filter 0.2s;
}

.location-pill-btn:hover {
    filter: brightness(0.95);
}

.location-pill-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================= */
/* Mobile Responsiveness */
/* ========================================= */
@media (max-width: 768px) {
    .main-filter-bar {
        justify-content: flex-start;
        overflow-x: auto; /* Allows horizontal scrolling */
        padding-bottom: 0.5rem;
        
        /* Hides the scrollbar for a cleaner look */
        scrollbar-width: none; 
        -ms-overflow-style: none; 
    }
    .main-filter-bar::-webkit-scrollbar {
        display: none;
    }
    
    .filter-pill {
        flex-shrink: 0; /* Prevents pills from squishing */
    }
}

/* ========================================= */
/* Ad Card Animations */
/* ========================================= */
.ad-card {
    display: flex;
    flex-direction: row; /* Image first, text second */
    align-items: stretch;
    gap: 1rem;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    text-decoration: none; /* Removes the default blue underline from the anchor tag */
    color: inherit;
    opacity: 0; 
    transform: translateY(20px); 
    animation: fadeUpIn 0.5s ease forwards;
    transition: background-color 0.2s, transform 0.2s;
}

.ad-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px); /* Slight lift effect on hover */
}

/* Image Wrapper */
.ad-card-image {
    width: 100px;
    min-width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.2);
}

.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The Status Badge inside the image */
.ad-badge {
    position: absolute;
    top: 6px;
    right: 6px; /* Stays top-right over the image */
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

/* Text Content Wrapper */
.ad-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers the text vertically */
    flex-grow: 1;
    overflow: hidden; /* Prevents text from breaking out */
}

.ad-card-title {
    margin: 0.25rem 0 0.5rem 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if title is too long */
}

.ad-card-category {
    font-size: 0.8rem;
    color: #34b7f1;
}

.ad-card-date {
    font-size: 0.75rem;
    color: #888;
    margin-top: auto; /* Pushes the date to the bottom if the box is tall */
}

/* Cascade Animation Delay */
.ad-card:nth-child(even) { animation-delay: 0.1s; }

@keyframes fadeUpIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sentinel Spinner */
.loading-spinner-container {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.loading-spinner-container.active {
    opacity: 1;
}

/* ========================================= */
/* Recent Items Layout Wrapper               */
/* ========================================= */

.recent-items-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    width: 100%;
}

.section-header {
    width: 80%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    direction: rtl;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--clr-dark);
}

/* 4. This container is exactly yours, just added flex-wrap and margin: 0 auto */
.lost-items-container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}


/* ========================================= */
/* Hero Landing Slider Styles                */
/* ========================================= */

.hero-slider-section {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 6rem 0;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
    /* Prevents animation from causing horizontal scroll */
}

/* 80% width, max 1400px as requested */
.hero-container {
    width: 80%;
    max-width: 1400px;
    position: relative;
    height: 75vh;
    min-height: 550px;
    direction: rtl;
    /* Enforces Right-to-Left context */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;

    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* --- The Right Side: Text Container --- */
.hero-text {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;

    /* Animation: Exits to the Right (+50px) */
    transform: translateX(50px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

/* --- The Left Side: Banner Container --- */
.hero-banner {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;

    /* Animation: Exits to the Left (-50px) */
    transform: translateX(-50px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

/* --- Active State Animations --- */
/* When slide is active, both pull into their natural 0 position */
.hero-slide.active .hero-text,
.hero-slide.active .hero-banner {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0.1s;
    /* Slight delay feels more organic */
}

/* Hero Typography & Elements */
.hero-badge {
    background-color: rgba(248, 228, 98, 0.2);
    color: var(--clr-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--clr-accent);
}

.hero-text h1 {
    font-size: 3rem;
    color: var(--clr-dark);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-text h1 .highlight {
    color: var(--clr-accent);
    text-shadow: 0 2px 10px rgba(248, 228, 98, 0.4);
}

.hero-text p {
    font-size: 1.1rem;
    color: rgba(0, 27, 46, 0.8);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    text-align: justify;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Banner Image & Decor */
.hero-img {
    width: 90%;
    height: 400px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 27, 46, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.floating-glass-card {
    position: absolute;
    bottom: 100px;
    left: 10%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    color: var(--clr-dark);
    box-shadow: 0 10px 25px rgba(0, 27, 46, 0.1);
    animation: float 4s ease-in-out infinite;
}

.floating-glass-card svg {
    width: 24px;
    height: 24px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 27, 46, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: var(--clr-accent);
    width: 30px;
    /* Expands into a pill shape */
    border-radius: 10px;
}

/* ========================================= */
/* YOUR EXACT CARD CSS                       */
/* ========================================= */

.glass-card {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none; /* For the anchor tag */
    color: inherit;
    position: relative;
    overflow: hidden; /* Ensures the image doesn't break the rounded corners */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpIn 0.5s ease forwards;
    transition: transform 0.2s, background 0.2s;
}

.glass-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

/* Corner Ribbon/Badge */
.ribbon {
    position: absolute;
    top: 0;
    left: 0; /* Sticks to the top-left corner */
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #000;
    /* Top-Left matches card, Bottom-Right is smooth */
    border-radius: 12px 0 12px 0; 
    z-index: 10;
}
.ribbon-icon { width: 14px; height: 14px; }

/* Image Container */
.card-img-wrapper {
    width: 140px; /* Width of the image section */
    min-width: 140px;
    background: rgba(0,0,0,0.2);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Area */
.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.card-title {
    margin: 15px 0 0.5rem 0;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-summary {
    font-size: 0.85rem;
    color: #ccc;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limits text to exactly 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reward Banner */
.reward-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 215, 0, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    align-self: flex-start;
}
.reward-icon { width: 18px; height: 18px; stroke: currentColor; }

/* Meta Info (Location & Time) */
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto; /* Pushes meta info to the very bottom */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #888;
}
.meta-icon { width: 14px; height: 14px; stroke: currentColor; }

/* Animation Cascade */
.glass-card:nth-child(even) { animation-delay: 0.1s; }

.call-btn {
    background: var(--mint-green);
    color: var(--black-purple);
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.call-btn:disabled {
    background: rgba(0, 27, 46, 0.05);
    /* Very faint navy background */
    color: rgba(0, 27, 46, 0.4);
    /* Muted navy text */
    cursor: not-allowed;
    border: 1px solid rgba(0, 27, 46, 0.1);
    box-shadow: none;
    transform: none;
}

.call-btn:disabled .btn-icon {
    stroke: rgba(0, 27, 46, 0.4);
    /* Muted navy icon */
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke: var(--black-purple);
}

.call-btn:hover:not(:disabled) {
    background: var(--light-green);
}

.call-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.call-btn:disabled {
    background: rgba(64, 57, 74, 0.1);
    color: rgba(64, 57, 74, 0.5);
    cursor: not-allowed;
    border: 1px solid rgba(64, 57, 74, 0.1);
}

.call-btn:disabled .btn-icon {
    stroke: rgba(64, 57, 74, 0.5);
}

/* ========================================= */
/* Responsive Mobile Design                  */
/* ========================================= */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--clr-dark);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 27, 46, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}


@media (max-width: 960px) {
    .hero-container {
        height: auto;
        min-height: 700px;
        width: 90%;
    }

    .lang-dropdown {
        left: 200px;
        right: auto;
    }

    .hero-slide {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        align-items: center;
        padding: 2rem;
    }

    .hero-banner {
        justify-content: center;
        height: 300px;
    }

    .hero-img {
        width: 100%;
        height: 100%;
    }

    .floating-glass-card {
        left: 50%;
        transform: translateX(-50%);
        bottom: -20px;
        animation: none;
        /* Disable float on mobile to prevent overlapping issues */
    }
}

@media (max-width: 960px) {
    .hamburger {
        display: flex;
        z-index: 1000;
    }

    .counters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.5rem;
        /* Added a bit more vertical gap so the rows don't look crowded */
    }

    .sidebar-overlay {
        z-index: 1001;
    }

    .nav-menus {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        background-color: var(--clr-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 2rem;
        padding: 0rem 1rem 1rem 1rem;
        box-shadow: 4px 0 20px rgba(0, 27, 46, 0.15);
        transition: left 0.4s cubic-bezier(0.86, 0, 0.07, 1);
        z-index: 1002;
    }

    .nav-container {
        padding: 1rem;
    }

    .nav-menus.active {
        left: 0;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid rgba(0, 27, 46, 0.1);
    }

    .sidebar-header-logo {
        width: 80px;
        height: auto;
        user-select: none;
        pointer-events: none;
        margin: 5px 0px 0px 0px;
    }

    .close-btn {
        font-size: 2.5rem;
        line-height: 1;
        background: none;
        border: none;
        color: var(--clr-dark);
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .close-btn:hover {
        color: var(--clr-accent);
    }

    .header-left,
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }


    .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.1rem;
        display: block;
        width: max-content;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        width: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .counters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .counters-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Limit the container width so it has room to shift side-to-side */
    .counter-item {
        width: 65%;
        /* Adjust this to make the zigzag more or less extreme */
        /* Text stays centered because of your existing align-items: center */
    }

    /* 1st, 3rd items (Odd) shift to the Right */
    .counter-item:nth-child(odd) {
        justify-self: start;
        /* 'start' is the Right side in your RTL layout */
    }

    /* 2nd, 4th items (Even) shift to the Left */
    .counter-item:nth-child(even) {
        justify-self: end;
        /* 'end' is the Left side in your RTL layout */
    }

    .section-header,
    .lost-items-container {
        width: 95%;
    }
}


@media (max-width: 768px) {

    /* body, p, h1, h2, h3, h4, h5, h6 {
        text-align: center;
    } */

    /* Override the previously right-aligned cards */
    .glass-card {
        text-align: center;
    }

    /* Center flexbox elements */
    .reward-banner {
        justify-content: center;
        text-align: center;
    }

    /* Centers the section headers (e.g., "Recent Lost Items") */
    .section-header {
        justify-content: center;
        text-align: center;
    }
    /* Logo */
    .logo {
        font-size: 1.4rem;
        /* Down from 1.8rem */
    }

    /* Hero Section */
    .hero-text h1 {
        font-size: 2rem;
        /* Down from 3rem */
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 0.95rem;
        /* Down from 1.1rem */
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .hero-badge {
        font-size: 0.8rem;
    }

    /* Counters */
    .counter-number {
        font-size: 2.2rem;
        /* Down from 3.5rem */
    }

    .counter-title {
        font-size: 0.9rem;
        /* Down from 1rem */
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 1.4rem;
        /* Down from 1.8rem */
    }

    /* Cards */
    .reward-banner {
        font-size: 0.95rem;
        /* Down from 1.1rem */
        padding: 0.6rem 0.8rem;
    }

    .card-title {
        font-size: 1.1rem;
        /* Down from 1.25rem */
    }

    .card-summary {
        font-size: 0.85rem;
        /* Down from 0.95rem */
    }

    .call-btn {
        font-size: 0.9rem;
        /* Down from 1rem */
    }
}