/* =========================================================
   EcoFeed Solutions – home page (index.php) – v2 layout
   Same palette: green #4CAF50, gold #FFD700, cream, ink
   Full-width bands, image-led panels, list rows (no card grid)
   ========================================================= */

.home {
    --green: #4CAF50;
    --green-deep: #2e7d32;
    --gold: #FFD700;
    --cream: #FBF4E4;
    --ink: #111;
    --muted: #4d4d4d;
    --line: #ddd5bf;
    --ease: cubic-bezier(.22, .8, .24, 1);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
}

.home *, .home *::before, .home *::after { box-sizing: border-box; }
.home h1, .home h2, .home h3, .home h4, .home p, .home ul { margin: 0; padding: 0; }
.home ul { list-style: none; }
.home a { text-decoration: none; color: inherit; }
.home img { max-width: 100%; display: block; }
.home :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.home .wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.home .sec { padding: clamp(64px, 9vw, 112px) 0; }
.home .sec-cream { background: var(--cream); }
.home .sec-green { background: var(--green); color: #fff; }

/* ---------- Buttons ---------- */
.home .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.home .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 10px;
    border: 2px solid transparent;
    font: 600 16px 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease);
}

.home .btn:hover { transform: translateY(-2px); }
.home .btn-green { background: var(--green); color: #fff; }
.home .btn-green:hover { background: var(--gold); color: var(--ink); }
.home .btn-outline { border-color: var(--ink); color: var(--ink); }
.home .btn-outline:hover { background: var(--ink); color: #fff; }
.home .btn-gold { background: var(--gold); color: var(--ink); }
.home .btn-gold:hover { background: #fff; }

/* ---------- Section heads: title left, intro right ---------- */
.home .sec-head {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px 64px;
    align-items: end;
    margin-bottom: 56px;
}

.home .sec-head h2,
.home .why-partner h2,
.home .cta h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(32px, 4.8vw, 58px);
    line-height: 1.02;
    letter-spacing: -.03em;
}

.home .sec-head p { color: var(--muted); font-size: 18px; max-width: 46ch; }

/* ---------- About ---------- */
.home .about {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 72px;
    align-items: center;
}

.home .about h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(38px, 5.6vw, 72px);
    line-height: .98;
    letter-spacing: -.035em;
    margin-bottom: 26px;
}

.home .about p { font-size: 19px; color: var(--muted); max-width: 52ch; }
.home .about p strong { color: var(--ink); }

.home .about-media img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    border-radius: 14px;
}

/* ---------- Key features: four columns split by hairlines ---------- */
.home .feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 2px solid var(--ink);
}

.home .feature { padding: 34px 30px 8px; border-left: 1px solid var(--line); }
.home .feature:first-child { border-left: 0; padding-left: 0; }

.home .feature i { font-size: 34px; color: var(--green); margin-bottom: 22px; display: block; }

.home .feature h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.home .feature p { color: var(--muted); }

/* ---------- Products: two image panels ---------- */
.home .product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.home .product-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 600px;
    overflow: hidden;
    border-radius: 14px;
    color: #fff;
    background: #0e0e0e;
}

.home .product-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.home .product-card:hover > img { transform: scale(1.05); }

.home .product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 45%, rgba(0, 0, 0, .25) 100%);
}

.home .product-body { position: relative; z-index: 2; padding: 40px; width: 100%; }

.home .product-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(32px, 3.8vw, 46px);
    line-height: 1;
    letter-spacing: -.03em;
}

.home .product-subtitle { margin: 8px 0 20px; font-weight: 600; color: var(--gold); font-size: 17px; }
.home .product-body > p { margin-bottom: 14px; color: rgba(255, 255, 255, .92); }

.home .product-card li { position: relative; padding-left: 28px; margin-bottom: 10px; font-weight: 500; }

.home .product-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 14px;
    height: 3px;
    border-radius: 3px;
    background: var(--gold);
}

.home .nutritional-value {
    margin-top: 24px;
    padding: 22px 24px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.home .nutritional-value h4 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
}

.home .nutritional-value li:last-child { margin-bottom: 0; }

/* ---------- Partnerships: list rows ---------- */
.home .partner-list { border-bottom: 1px solid var(--line); }

.home .partner-row {
    display: grid;
    grid-template-columns: 56px 1.1fr 1fr;
    gap: 28px;
    align-items: center;
    padding: 30px 20px;
    margin: 0 -20px;
    border-top: 1px solid var(--line);
    transition: background .3s ease;
}

.home .partner-row:hover { background: #fff; }
.home .partner-row i { font-size: 28px; color: var(--green); }

.home .partner-row h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.2;
}

.home .partner-row p { color: var(--muted); }

/* ---------- Why partner: green band ---------- */
.home .why-partner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }

.home .why-partner li {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, .45);
    font-size: 19px;
    font-weight: 500;
}

.home .why-partner li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .45); }

.home .tick {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: var(--ink);
    font-size: 13px;
}

/* ---------- Blog: magazine layout ---------- */
.home .blog-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 28px;
}

.home .blog-item {
    position: relative;
    display: grid;
    grid-template-columns: 210px 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 24px;
    align-items: start;
}

.home .blog-item .image-container {
    position: relative;
    grid-row: 1 / span 3;
    grid-column: 1;
}

.home .blog-item .image-container img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

.home .blog-item h3,
.home .blog-item p,
.home .blog-item .read-more { grid-column: 2; }

.home .date-overlay {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--gold);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.home .blog-item h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 10px;
    transition: color .25s ease;
}

.home .blog-item:hover h3 { color: var(--green-deep); }
.home .blog-item p { color: var(--muted); margin-bottom: 14px; }

.home .read-more {
    align-self: end;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--green-deep);
    border-bottom: 2px solid var(--green);
    padding-bottom: 2px;
    transition: gap .25s var(--ease), color .25s ease;
}

.home .read-more:hover { gap: 16px; }

/* featured first post */
.home .blog-item:first-child {
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 560px;
    padding: 36px;
    border-radius: 14px;
    overflow: hidden;
    color: #fff;
    background: #0e0e0e;
}

.home .blog-item:first-child .image-container { position: absolute; inset: 0; }

.home .blog-item:first-child .image-container img {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 0;
}

.home .blog-item:first-child .image-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, .1) 100%);
}

.home .blog-item:first-child .date-overlay { left: 36px; top: 36px; bottom: auto; }
.home .blog-item:first-child h3,
.home .blog-item:first-child p,
.home .blog-item:first-child .read-more { position: relative; z-index: 2; }
.home .blog-item:first-child h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.08; color: #fff; }
.home .blog-item:first-child p { color: rgba(255, 255, 255, .9); max-width: 50ch; }
.home .blog-item:first-child .read-more { color: #fff; border-color: var(--gold); }

.home .no-posts { grid-column: 1 / -1; color: var(--muted); }

/* ---------- Testimonials ---------- */
.home .testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }

.home .testimonial-item { display: flex; flex-direction: column; border-top: 2px solid var(--ink); padding-top: 26px; }
.home .testimonial-item .quote-ico { color: var(--green); font-size: 28px; margin-bottom: 18px; }
.home .testimonial-item p { font-size: 20px; line-height: 1.5; margin-bottom: 28px; }

.home .person { margin-top: auto; display: flex; align-items: center; gap: 14px; }

.home .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 19px;
}

.home .person h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 18px; }

/* ---------- Benefits: numbered rows in two columns ---------- */
.home .benefit-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; }

.home .benefit-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    column-gap: 18px;
    padding: 32px 0;
    border-top: 1px solid var(--line);
}

.home .num {
    grid-row: 1 / span 2;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 56px;
    line-height: .9;
    letter-spacing: -.04em;
    color: var(--green);
}

.home .benefit-item h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.home .benefit-item p { color: var(--muted); }

/* ---------- Call to action: full-bleed image band ---------- */
.home .cta-band {
    padding: clamp(72px, 10vw, 128px) 0 clamp(190px, 22vw, 230px);
    background: linear-gradient(rgba(76, 175, 80, .9), rgba(76, 175, 80, .9)), url('../img/fish.jpg') center / cover no-repeat;
    color: #fff;
}

.home .cta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; }
.home .cta h2 { max-width: 14ch; }
.home .cta p { font-size: 19px; margin-bottom: 28px; max-width: 40ch; }

/* let the green band run behind the footer's rounded corners (needs footer-v3) */
body .site-footer { margin-top: -44px; }

/* ---------- Gallery popup ---------- */
.gallery-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
    font-family: 'DM Sans', system-ui, sans-serif;
}

.gallery-popup *, .gallery-popup *::before, .gallery-popup *::after { box-sizing: border-box; }
.gallery-popup.active { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }

.gallery-popup .popup-content {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 100%;
    overflow-y: auto;
    border-radius: 16px;
    background: #FBF4E4;
    color: #111;
    text-align: center;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6);
    transform: translateY(30px);
    transition: transform .45s cubic-bezier(.22, .8, .24, 1);
}

.gallery-popup.active .popup-content { transform: none; }
.gallery-popup .popup-image { display: block; width: 100%; height: 220px; object-fit: cover; }
.gallery-popup .popup-body { padding: 26px 26px 24px; }

.gallery-popup .popup-title {
    margin: 0 0 20px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.gallery-popup .popup-buttons { display: flex; gap: 10px; }

.gallery-popup .popup-btn {
    flex: 1;
    padding: 14px 18px;
    border-radius: 10px;
    border: 2px solid transparent;
    font: 600 16px 'DM Sans', sans-serif;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.gallery-popup .popup-btn:hover { transform: translateY(-2px); }
.gallery-popup .btn-primary { background: #4CAF50; color: #fff; }
.gallery-popup .btn-primary:hover { background: #FFD700; color: #111; }
.gallery-popup .btn-secondary { background: transparent; border-color: #111; color: #111; }
.gallery-popup .btn-secondary:hover { background: #111; color: #fff; }

.gallery-popup .popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease;
}

.gallery-popup .popup-close:hover { background: #FFD700; }

.gallery-popup .dont-show-again {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.gallery-popup .dont-show-again input { width: 17px; height: 17px; accent-color: #4CAF50; }
.gallery-popup :focus-visible { outline: 3px solid #4CAF50; outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .home .sec-head { grid-template-columns: 1fr; margin-bottom: 40px; }
    .home .about { grid-template-columns: 1fr; gap: 44px; }
    .home .about-media { order: -1; }

    .home .feature-grid { grid-template-columns: 1fr 1fr; }
    .home .feature { border-left: 0; border-top: 1px solid var(--line); padding: 30px 24px 18px 0; }
    .home .feature:nth-child(-n+2) { border-top: 0; }
    .home .feature:first-child { padding-left: 0; }

    .home .product-grid { grid-template-columns: 1fr; }
    .home .why-partner { grid-template-columns: 1fr; gap: 32px; }

    .home .blog-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .home .blog-item:first-child { grid-row: auto; min-height: 460px; }

    .home .testimonial-grid { grid-template-columns: 1fr; gap: 36px; }
    .home .benefit-grid { grid-template-columns: 1fr; }
    .home .cta { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
    .home .wrap { padding: 0 18px; }
    .home .sec-head p, .home .about p { font-size: 16px; }

    .home .feature-grid { grid-template-columns: 1fr; }
    .home .feature { border-top: 1px solid var(--line); padding: 28px 0 12px; }
    .home .feature:first-child { border-top: 0; }
    .home .feature:nth-child(2) { border-top: 1px solid var(--line); }

    .home .product-card { min-height: 0; padding-top: 220px; }
    .home .product-body { padding: 26px 22px; }
    .home .product-card::after { background: linear-gradient(0deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .8) 60%, rgba(0, 0, 0, .3) 100%); }

    .home .partner-row { grid-template-columns: 40px 1fr; gap: 6px 16px; padding: 24px 12px; margin: 0 -12px; }
    .home .partner-row p { grid-column: 2; }

    .home .blog-item { grid-template-columns: 1fr; }
    .home .blog-item .image-container { grid-row: auto; margin-bottom: 16px; }
    .home .blog-item .image-container img { aspect-ratio: 16 / 10; min-height: 0; height: auto; }
    .home .blog-item h3, .home .blog-item p, .home .blog-item .read-more { grid-column: 1; }
    .home .blog-item:first-child { padding: 24px; min-height: 420px; }
    .home .blog-item:first-child .image-container { margin-bottom: 0; }
    .home .blog-item:first-child .image-container img { aspect-ratio: auto; height: 100%; }
    .home .blog-item:first-child .date-overlay { left: 24px; top: 24px; }

    .home .benefit-item { grid-template-columns: 56px 1fr; padding: 26px 0; }
    .home .num { font-size: 42px; }
    .home .testimonial-item p { font-size: 18px; }

    .home .cta .btn { width: 100%; justify-content: center; }
    .gallery-popup .popup-buttons { flex-direction: column; }
    .gallery-popup .popup-image { height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
    .home *, .gallery-popup, .gallery-popup * { transition-duration: .01ms !important; }
}

/* heading with no intro text spans the full row */
.home .sec-head h2:only-child { grid-column: 1 / -1; max-width: 20ch; }