/* ===================================
   Khouribga.net - EMERALD PREMIUM (Masterpiece v10.0)
   Professional PWA with Marketing Excellence
   =================================== */

:root {
    /* --- Palette: Emerald & Gold --- */
    --bg-body: #F0FDF4;
    --bg-card: #FFFFFF;

    --primary: #047857;
    --primary-dark: #064E3B;
    --accent: #D97706;
    --accent-light: #FBBF24;

    --text-main: #064E3B;
    --text-muted: #64748B;

    --font-head: 'Tajawal', sans-serif;
    --font-body: 'Almarai', sans-serif;

    --radius-m: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Premium Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(4, 120, 87, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(4, 120, 87, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-gold: 0 10px 30px -5px rgba(217, 119, 6, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#059669 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--primary-dark);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- BREAKING NEWS TICKER (Premium Masterpiece Style) --- */
.news-ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #064E3B;
    background: linear-gradient(90deg, #064E3B 0%, #047857 50%, #064E3B 100%);
    color: white;
    display: flex;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border-bottom: 3px solid #D97706;
    /* Golden Accent */
}

.ticker-label {
    background: #D97706;
    /* Golden/Amber */
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 10px 0 25px rgba(0, 0, 0, 0.5);
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ticker-label::before {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0px #fff;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
        box-shadow: 0 0 10px #fff;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0px #fff;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    flex-shrink: 0;
    padding-right: 2rem;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }

    /* In dir="rtl", 100% moves items to the LEFT relative to their start position */
}

/* In RTL, positive is to the LEFT */


.ticker-item {
    font-size: 1.05rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticker-separator {
    color: #D97706;
    font-size: 2rem;
    opacity: 0.8;
}

/* Adjust body padding for new ticker height */
body {
    padding-top: 48px;
}

/* --- VIP Pagination --- */
.vip-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

/* --- VIP Pagination (Refined & Professional) --- */
.vip-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
    padding: 1rem;
}

.vip-page-btn {
    background: white;
    border: 2px solid #E2E8F0;
    color: var(--primary-dark);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.vip-page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.vip-page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.vip-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #F1F5F9;
}

/* --- Header (Modern App Bar) --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(4, 120, 87, 0.1);
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.8rem;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.search-wrapper {
    flex: 1;
    max-width: 450px;
}

.search-wrapper input {
    background: white;
    border: 2px solid #E2E8F0;
    padding: 0.8rem 1.5rem;
    border-radius: 16px;
    width: 100%;
    transition: 0.3s;
    font-family: var(--font-body);
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.1);
    outline: none;
}

/* Buttons */
.btn-primary,
#installPwaBtn,
#openAddListingBtn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.3);
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(4, 120, 87, 0.4);
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 1rem 0;
    overflow-x: auto;
    border-bottom: 1px solid #E2E8F0;
}

.filter-bar::-webkit-scrollbar {
    height: 4px;
}

.filter-bar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.category-scroll {
    display: flex;
    gap: 0.8rem;
    padding: 0 1.5rem;
}

.cat-chip {
    background: white;
    border: 1px solid #E2E8F0;
    color: var(--text-muted);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    white-space: nowrap;
}

.cat-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

/* --- VIP SECTION (Premium Card Strip) --- */
.vip-section {
    padding: 3rem 0;
    background: white;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-dark);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1rem;
}

.vip-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0 1.5rem 2rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.vip-carousel::-webkit-scrollbar {
    display: none;
}

.vip-card-premium {
    min-width: 320px;
    height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: 0.4s;
    cursor: pointer;
    scroll-snap-align: start;
}

.vip-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-gold);
}

.vip-img-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.vip-card-premium:hover .vip-img-bg {
    transform: scale(1.1);
}

.vip-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(6, 78, 59, 0.95), transparent);
    padding: 2rem 1.5rem;
    color: white;
}

.vip-badge-star {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
    z-index: 10;
}

/* --- NEWS SECTION --- */
.news-section {
    padding: 3rem 0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.list-header h2 {
    font-size: 1.8rem;
}

.badge-count {
    background: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
}

.news-grid-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}

.news-grid-scroll::-webkit-scrollbar {
    height: 6px;
}

.news-grid-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.news-card {
    min-width: 280px;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: 0.3s;
    scroll-snap-align: start;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-body {
    padding: 1.5rem;
}

.news-cat {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
    line-height: 1.4;
}

.news-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- MAIN LISTINGS (Modern Clean Cards) --- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.listings-section {
    padding: 3rem 0;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.listing-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-img-container {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.listing-card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* VIP in Grid - Distinct Style */
.listing-card.pack-vip {
    border: 2px solid var(--accent);
    background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 100%);
}

.listing-card.pack-vip::before {
    content: '⭐ VIP';
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.75rem;
    z-index: 5;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #E2E8F0;
    background: white;
    color: var(--text-main);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- SERVICES GRID (Interactive) --- */
.services-section {
    margin: 3rem 0;
    padding: 3rem 0;
    background: white;
}

.center-head {
    text-align: center;
    margin-bottom: 3rem;
}

.center-head h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.center-head p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
}

.util-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-m);
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #F1F5F9;
}

.util-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.util-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.util-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.util-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- PROFESSIONAL POPUPS --- */
.glass-modal,
.news-modal-overlay,
.story-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 78, 59, 0.4);
    backdrop-filter: blur(12px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.glass-modal.active,
.news-modal-overlay.active,
.story-overlay.active {
    display: flex;
}

/* Popup Card (Center Desktop, Bottom Mobile) */
.modal-content,
.news-modal-card,
.modal-card {
    background: white;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close-modal,
.close-btn,
.news-modal-close {
    background: #F1F5F9;
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover,
.close-btn:hover,
.news-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

/* News Modal Specific */
.news-modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.news-modal-date {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.news-modal-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.news-modal-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

/* --- STORY MODAL (Full Screen Immersion) --- */
.story-wrapper {
    background: white;
    width: 95%;
    height: 90%;
    max-width: 1200px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.story-media-side {
    flex: 1.5;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-media-side img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.story-info-side {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    background: white;
    display: flex;
    flex-direction: column;
}

.story-info-side::-webkit-scrollbar {
    width: 6px;
}

.story-info-side::-webkit-scrollbar-thumb {
    background: #E2E8F0;
    border-radius: 4px;
}

.story-tags {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.vip-tag {
    background: var(--accent);
    color: white;
}

.cat-tag {
    background: #F1F5F9;
    color: var(--text-muted);
}

#storyTitle {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.story-meta {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E2E8F0;
}

/* === PROFESSIONAL LANDING PAGE SECTIONS === */

/* Header Section */
.story-header-section {
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
    border-bottom: 1px solid #E2E8F0;
}

.story-page-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--primary-dark);
}

.story-meta-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.meta-badge {
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Quick Contact Bar */
.story-quick-contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.2rem 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 3px solid var(--accent);
}

.quick-contact-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-contact-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Section Container */
.story-section {
    padding: 2rem;
    border-bottom: 1px solid #F1F5F9;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #E2E8F0;
}

.heading-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-radius: 10px;
}

/* Description Content */
.story-description-content {
    font-size: 1.08rem;
    line-height: 2;
    color: #334155;
    background: #FAFAFA;
    padding: 1.8rem;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-item {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: 0.3s;
}

.feature-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.1);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.story-map-box {
    height: 280px;
    background: #F8FAFC;
    border-radius: 16px;
    border: 3px solid #E2E8F0;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.story-map-box::after {
    content: 'اضغط للتكبير';
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--primary-dark);
    z-index: 400;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.story-actions-sticky {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.03);
    z-index: 100;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    border: none;
    cursor: pointer;
    flex: 1;
}

.action-btn:active {
    transform: scale(0.96);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 8px 20px -4px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    box-shadow: 0 12px 25px -4px rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
}

.btn-call {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
    box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4);
}

.btn-call:hover {
    box-shadow: 0 12px 25px -4px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.btn-map-action {
    background: white;
    border: 2px solid #E2E8F0;
    color: #475569;
}

.btn-map-action:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
    color: #1E293B;
}

.btn-close-action {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FEE2E2;
    max-width: 60px;
}

.btn-close-action:hover {
    background: #FEE2E2;
    border-color: #FECACA;
}



.story-close-fab {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: black;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.story-close-fab:hover {
    background: white;
    transform: scale(1.1);
}

/* --- MOBILE BOTTOM NAV (App Dock) --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    border-top: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    cursor: pointer;
    transition: 0.3s;
}

.nav-item.active {
    color: var(--primary);
    font-weight: bold;
}

.nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-item-center {
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    margin-top: -28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
    border: 4px solid white;
    cursor: pointer;
    transition: 0.3s;
}

.nav-item-center:hover {
    transform: scale(1.1);
}

/* --- FOOTER (Professional) --- */
.main-footer {
    background: linear-gradient(180deg, white 0%, #F9FAFB 100%);
    padding: 4rem 0 100px;
    border-top: 1px solid #E2E8F0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--accent);
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.footer-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.footer-wa-btn:hover {
    background: #1fb855;
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.legal-disclaimer {
    background: #FEF3C7;
    color: #92400E;
    padding: 1rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid #FDE68A;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
    color: var(--text-muted);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .story-wrapper {
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .story-media-side {
        flex: none;
        height: 40vh;
    }

    .story-info-side {
        flex: 1;
    }

    /* Mobile: Professional Sections */
    .story-header-section {
        padding: 1.5rem 1.2rem;
    }

    .story-page-title {
        font-size: 1.6rem;
    }

    .story-quick-contact {
        padding: 1rem;
        flex-direction: column;
    }

    .story-section {
        padding: 1.5rem 1.2rem;
    }

    .section-heading {
        font-size: 1.2rem;
    }

    .story-description-content {
        font-size: 1rem;
        padding: 1.2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-map-box {
        height: 200px;
    }

    .story-actions-sticky {
        padding: 1rem;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .action-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .btn-close-action {
        flex: 0 0 50px;
    }

    .modal-content,
    .news-modal-card,
    .modal-card {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        animation: slideUp 0.3s;
        max-height: 85vh;
    }

    .header-container {
        flex-wrap: wrap;
    }

    .search-wrapper {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 900px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.empty-state p {
    color: var(--text-muted);
}

/* --- COMMUNITY SECTION (Exclusive Social) --- */
.community-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.community-banner {
    background: linear-gradient(135deg, #1877F2 0%, #285498 100%);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px -10px rgba(24, 119, 242, 0.5);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.community-bg-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -50px;
    pointer-events: none;
    z-index: 1;
}

.community-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.fb-icon-large {
    font-size: 3.5rem;
    background: white;
    color: #1877F2;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    animation: floatIcon 3.5s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(3deg);
    }
}

.community-text h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.community-text p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

.community-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
}

.stat-number {
    font-size: 4rem;
    font-weight: 900;
    font-family: var(--font-head);
    line-height: 1;
    background: linear-gradient(to bottom, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.community-btn {
    background: white;
    color: #1877F2;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.community-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.4);
}

.community-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: 0.5s;
}

.community-btn:hover::after {
    left: 100%;
}