/* ========================================================
   EcoBlog — Blog Listing  (pixel-exact v4)
   ======================================================== */

:root {
    --color-bg:            #F0EBE1;
    --color-surface:       #FFFFFF;
    --color-card-body:     #F5F1EA;
    --color-primary:       #5B8C5A;
    --color-primary-dark:  #3D6B3C;
    --color-primary-light: #A8C9A7;
    --color-accent:        #8B7355;
    --color-accent-dark:   #6B5337;
    --color-text:          #2C2218;
    --color-text-muted:    #6B6058;
    --color-text-light:    #A89E92;
    --color-border:        #E2DBD0;

    --font-heading: 'Plus Jakarta Sans';
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  16px;

    --shadow-card: 0 2px 12px rgba(50,38,28,0.09), 0 1px 3px rgba(50,38,28,0.05);
    --shadow-hover: 0 8px 28px rgba(50,38,28,0.14), 0 3px 8px rgba(50,38,28,0.07);
    --shadow-xl:  0 20px 50px rgba(50,38,28,0.12);

    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast:   0.2s;
    --dur-normal: 0.35s;
    --dur-slow:   0.55s;
}

/* ========================================================
   RESET
   ======================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img    { display: block; max-width: 100%; height: auto; }
a      { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input  { font-family: inherit; }



.hero {
  
      max-width: 1240px;
      height: 417px;
      margin: 16px auto;
      margin-left: clamp(16px, 7vw, 100px);
      margin-right: clamp(16px, 7vw, 100px);
      background-size: cover;
      background-position: center;
      display: flex;
      align-items: center;
      background-repeat: no-repeat;
      position: relative;
      border-radius: 16px;
      overflow: hidden;
}


/* ========================================================
   NAVBAR
   ======================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(240,235,225,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--dur-normal) ease;
}
.navbar.scrolled { box-shadow: 0 2px 12px rgba(50,38,28,0.09); }

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-accent-dark);
    transition: opacity var(--dur-fast) ease;
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo i { font-size: 1.2rem; color: var(--color-primary); }
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}
.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding: var(--space-xs) 0;
    transition: color var(--dur-fast) ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width var(--dur-normal) var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--color-accent-dark); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 100%; height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--dur-normal) var(--ease-out),
                opacity var(--dur-fast) ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================================
   LISTING PAGE
   ======================================================== */
.listing-page {
    padding: 36px 20px 60px;
    background: var(--color-bg);
    min-height: 100vh;
}
.listing-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ========================================================
   PAGE HEADER
   ======================================================== */
.listing-page-header {
    text-align: center;
    padding: 0 0 28px;
}
.listing-page-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--color-accent);
    background: rgba(139,115,85,0.12);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 10px;
    border: 1px solid rgba(139,115,85,0.20);
}
.listing-page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.22;
    color: var(--color-accent-dark);
    margin-bottom: 8px;
}
.listing-page-subtitle {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.68;
}

/* ========================================================
   FEATURED CARD
   — Full-bleed image top, beige body below (no border visible,
     blends into page background seamlessly like screenshot)
   ======================================================== */
/* ========================================================
   FEATURED HERO CARD — Exact Dimensions
   ======================================================== */
.listing-featured-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 1240px;     /* Exact width */
    height: 576px;         /* Exact height */
    margin: 0 auto 20px;   /* Center it */
    border-radius: 24px;   /* Exact radius */
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-normal) var(--ease-out),
                box-shadow var(--dur-normal) ease;
}
.listing-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.listing-featured-img-wrap {
    width: 100%;
    height: 100%;          /* Fill the 576px height */
    overflow: hidden;
}
.listing-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease-out);
}
.listing-featured-card:hover .listing-featured-img { transform: scale(1.025); }

.listing-featured-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 155px;         /* Exact glass height */
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center text in 155px */
    border-radius: 0 0 24px 24px; /* Match bottom corners */

    /* Darker Brown Figma Glass */
    background: rgba(125, 90, 60, 0.58);
    -webkit-backdrop-filter: blur(3px) saturate(1.15);
    backdrop-filter: blur(3px) saturate(1.15);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.10);
    border-top: 1px solid rgba(255, 220, 180, 0.12);
    padding: 0 30px;
}

/* Dispersion 100 Fringe */
.listing-featured-body::before {
    content: '';
    position: absolute;
    top: -1px; left: 5%; right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 220, 180, 0.18) 25%, rgba(255, 240, 210, 0.28) 50%, rgba(255, 220, 180, 0.18) 75%, transparent);
    pointer-events: none;
    border-radius: 0 0 2px 2px;
}
.listing-featured-body::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 70, 40, 0.20) 50%, transparent);
    pointer-events: none;
}

/* Hero Text */
.listing-featured-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 6px;
}
.listing-featured-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    line-height: 1.25;
    color: #FFFFFF;
    margin-bottom: 6px;
}
.listing-featured-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Keep it to 1 line so it fits in 155px */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-featured-desc .read-more-inline {
    font-weight: 700;
    font-size: 0.75rem;
    color: #FFFFFF;
    margin-left: 4px;
    white-space: nowrap;
}


/* ========================================================
   BLOG GRID — 3 columns
   Each card: full-bleed image, warm beige gradient at bottom,
   dark brown text on top (NOT white — matches screenshot)
   ======================================================== */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
    margin-bottom: 20px;
}

.listing-card {
    position: relative;
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-normal) var(--ease-out),
                box-shadow var(--dur-normal) ease;
}
.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* image fills the card */
.listing-card-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}
.listing-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--dur-slow) var(--ease-out);
}
.listing-card:hover .listing-card-img { transform: scale(1.05); }
/* ========================================================
   BLOG GRID CARDS — Updated overlay
   ======================================================== */
/* ========================================================
   BLOG GRID CARDS — Exact Dimensions
   ======================================================== */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards × ~397px fits 1240px */
    gap: 13px;
    margin-bottom: 20px;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.listing-card {
    position: relative;
    display: block;
    height: 283px;         /* Exact height */
    border-radius: 24px;   /* Exact radius */
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-normal) var(--ease-out),
                box-shadow var(--dur-normal) ease;
}
.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.listing-card-img-wrap {
    width: 100%;
    height: 100%;          /* Fill the 283px height */
    overflow: hidden;
    position: relative;
}
.listing-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--dur-slow) var(--ease-out);
}
.listing-card:hover .listing-card-img { transform: scale(1.05); }

.listing-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;          /* Exact glass height */
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center text in 80px */
    border-radius: 0 0 24px 24px; /* Match bottom corners */

    /* Darker Brown Figma Glass */
    background: rgba(125, 90, 60, 0.58);
    -webkit-backdrop-filter: blur(3px) saturate(1.15);
    backdrop-filter: blur(3px) saturate(1.15);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.10);
    border-top: 1px solid rgba(255, 220, 180, 0.12);
    padding: 0 16px;
}

/* Dispersion 100 Fringe */
.listing-card-overlay::before {
    content: '';
    position: absolute;
    top: -1px; left: 5%; right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 220, 180, 0.18) 25%, rgba(255, 240, 210, 0.28) 50%, rgba(255, 220, 180, 0.18) 75%, transparent);
    pointer-events: none;
    border-radius: 0 0 2px 2px;
}
.listing-card-overlay::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 70, 40, 0.20) 50%, transparent);
    pointer-events: none;
}

/* Grid Text */
.listing-card-date {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 4px;
    line-height: 1;
}
.listing-card-title-row {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Keeps title to 2 lines to fit in 80px */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.read-more-inline {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-left: 4px;
    white-space: nowrap;
}


/* empty state */
.listing-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--color-text-light);
}
.listing-empty i {
    font-size: 2.8rem;
    color: var(--color-primary-light);
    display: block;
    margin-bottom: var(--space-md);
}

/* ========================================================
   PAGINATION
   ======================================================== */
.listing-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding-top: 20px;
}
.listing-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 7px 14px;
    border-radius: 100px;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    transition: all var(--dur-fast) ease;
}
.listing-page-btn:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: rgba(139,115,85,0.06);
}
.listing-page-numbers { display: flex; gap: 5px; }
.listing-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 50%;
    color: var(--color-text-muted);
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    transition: all var(--dur-fast) ease;
}
a.listing-page-num:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: rgba(139,115,85,0.06);
}
.listing-page-num.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    font-weight: 700;
    cursor: default;
}

/* ========================================================
   SCROLL REVEAL
   ======================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--dur-slow) var(--ease-out),
                transform var(--dur-slow) var(--ease-out);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

.listing-grid > [data-reveal]:nth-child(1) { transition-delay: 0ms;   }
.listing-grid > [data-reveal]:nth-child(2) { transition-delay: 65ms;  }
.listing-grid > [data-reveal]:nth-child(3) { transition-delay: 130ms; }
.listing-grid > [data-reveal]:nth-child(4) { transition-delay: 0ms;   }
.listing-grid > [data-reveal]:nth-child(5) { transition-delay: 65ms;  }
.listing-grid > [data-reveal]:nth-child(6) { transition-delay: 130ms; }
.listing-grid > [data-reveal]:nth-child(7) { transition-delay: 0ms;   }
.listing-grid > [data-reveal]:nth-child(8) { transition-delay: 65ms;  }
.listing-grid > [data-reveal]:nth-child(9) { transition-delay: 130ms; }

/* ========================================================
   FOOTER
   ======================================================== */
.footer {
    background: #3A2E24;
    color: rgba(255,255,255,0.7);
    padding: var(--space-4xl) 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--space-3xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-3xl);
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: var(--space-lg);
}
.footer-logo i { color: var(--color-primary-light); }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-bottom: var(--space-lg); }
.footer-socials { display: flex; gap: var(--space-md); }
.footer-socials a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    transition: all var(--dur-fast) ease;
}
.footer-socials a:hover { background: var(--color-primary); color: #fff; }
.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: var(--space-lg);
}
.footer-col ul li { margin-bottom: var(--space-sm); }
.footer-col ul a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    transition: color var(--dur-fast) ease, padding-left var(--dur-fast) ease;
}
.footer-col ul a:hover { color: var(--color-primary-light); padding-left: 4px; }
.footer-form {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    margin-top: var(--space-md);
}
.footer-form input {
    flex: 1; padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: none; color: #fff; font-size: 0.85rem; outline: none;
}
.footer-form input::placeholder { color: rgba(255,255,255,0.35); }
.footer-form button {
    padding: 10px 16px;
    background: var(--color-primary); color: #fff; font-size: 0.85rem;
    transition: background var(--dur-fast) ease;
}
.footer-form button:hover { background: var(--color-primary-dark); }
.footer-bottom {
    text-align: center;
    padding: var(--space-xl) 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 1024px) {
    .listing-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid  { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
}

@media (max-width: 768px) {
    :root { --space-3xl: 2.5rem; --space-4xl: 3.5rem; }
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px var(--space-2xl) var(--space-2xl);
        background: var(--color-surface);
        box-shadow: var(--shadow-xl);
        transition: right var(--dur-normal) var(--ease-out);
        z-index: 999;
        gap: var(--space-lg);
    }
    .nav-links.open { right: 0; }
    .nav-links a    { font-size: 1.05rem; }
    .listing-page              { padding: 16px 12px 40px; }
    .listing-featured-img-wrap { aspect-ratio: 16 / 9; }
    .listing-grid              { grid-template-columns: 1fr; gap: 10px; }
    .listing-pagination        { flex-wrap: wrap; gap: var(--space-sm); }
    .listing-page-btn span     { display: none; }
    .listing-page-btn          { padding: 7px 11px; }
    .footer-grid               { grid-template-columns: 1fr; gap: var(--space-2xl); }
}

@media (max-width: 480px) {
    .listing-featured-title  { font-size: 1rem; }
    .listing-featured-body   { padding: 12px 14px 15px; }
    .listing-card-title-row  { font-size: 0.76rem; }
    .listing-card-overlay    { padding: 30px 10px 10px; }
}