/*
Theme Name: Zamseed
Theme URI: https://zamseed.co.zm
Author: BongoHive Consult
Author URI: https://bongohive.co.zm
Description: Custom WordPress theme for Zamseed - Zambia's trusted seed company since 1975. Features Elementor integration, custom widgets, and responsive design optimized for the agricultural sector.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zamseed
Tags: custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready, elementor

Zamseed Theme - Climate Smart Seed for Zambian farmers.
*/

/* ==========================================================================
   CSS Variables - Design Tokens from React/Figma
   ========================================================================== */

:root {
    /* Primary Colors */
    --zs-primary: #2d5a27;
    --zs-primary-light: #4c8c44;
    --zs-primary-dark: #1e3d1a;
    --zs-secondary: #d35400;
    --zs-accent: #f39c12;
    --zs-earth: #5d4037;

    /* Background Colors */
    --zs-bg: #faf9f6;
    --zs-warm: #fdfcf9;
    --zs-warm-deep: #f1ede5;
    --zs-green-soft: #eef4df;
    --zs-earth-soft: #ebe7df;
    --zs-dark-green: #0f2418;

    /* Text Colors */
    --zs-text: #1c1c1c;
    --zs-muted: #555555;
    --zs-border: rgba(0, 0, 0, 0.08);

    /* Card & UI */
    --zs-card: #ffffff;
    --zs-shadow: 0 18px 50px rgba(45, 90, 39, 0.12);
    --zs-shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.04);

    /* Typography */
    --zs-font-serif: 'Cormorant Garamond', serif;
    --zs-font-sans: 'Inter', sans-serif;

    /* Spacing */
    --zs-container-max: 1200px;
    --zs-container-padding: 20px;
    --zs-section-padding: 92px;
    --zs-section-padding-mobile: 68px;

    /* Transitions */
    --zs-transition: all 0.2s ease;
    --zs-transition-card: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--zs-font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--zs-text);
    background-color: var(--zs-bg);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--zs-font-serif);
    font-weight: 700;
    line-height: 1.1;
    margin-top: 0;
    color: var(--zs-text);
}

h1 {
    font-size: clamp(2.85rem, 5.25vw, 4.45rem);
    line-height: 1.05;
}

h2 {
    font-size: clamp(2.3rem, 4.5vw, 3.4rem);
    line-height: 1.08;
}

h3 {
    font-size: clamp(1.5rem, 2vw, 1.625rem);
    line-height: 1.15;
}

h4 {
    font-size: clamp(1.19rem, 1.5vw, 1.3rem);
    line-height: 1.2;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    line-height: 1.65;
}

.eyebrow {
    font-family: var(--zs-font-sans);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zs-primary);
}

a {
    color: var(--zs-primary);
    text-decoration: none;
    transition: var(--zs-transition);
}

a:hover {
    color: var(--zs-primary-light);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: min(var(--zs-container-max), calc(100% - var(--zs-container-padding) * 2));
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: var(--zs-section-padding) 0;
}

.section--warm {
    background-color: var(--zs-warm);
}

.section--warm-deep {
    background-color: var(--zs-warm-deep);
}

.section--dark {
    background-color: var(--zs-dark-green);
    color: #ffffff;
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
    color: #ffffff;
}

/* Grid Patterns */
.grid {
    display: grid;
    gap: 28px;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 30px;
    font-family: var(--zs-font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--zs-transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    background-color: var(--zs-primary);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(45, 90, 39, 0.18);
}

.btn--primary:hover {
    background-color: var(--zs-primary-light);
    color: #ffffff;
}

.btn--secondary {
    background-color: transparent;
    border-color: var(--zs-primary);
    color: var(--zs-primary);
}

.btn--secondary:hover {
    background-color: var(--zs-primary);
    color: #ffffff;
}

.btn--light {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--zs-primary);
}

.btn--light:hover {
    background-color: var(--zs-green-soft);
}

.btn--sm {
    height: 42px;
    padding: 0 20px;
    font-size: 0.8125rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background-color: var(--zs-card);
    border: 1px solid var(--zs-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--zs-transition-card);
}

.card:hover {
    box-shadow: var(--zs-shadow);
    transform: translateY(-4px);
}

.card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card__content {
    padding: 24px;
}

.card__title {
    margin-bottom: 8px;
}

.card__meta {
    font-size: 0.875rem;
    color: var(--zs-muted);
}

/* Chip/Tag */
.chip {
    display: inline-flex;
    align-items: center;
    height: 29px;
    padding: 0 14px;
    font-family: var(--zs-font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background-color: var(--zs-green-soft);
    color: var(--zs-primary);
    border-radius: 999px;
}

.chip--active {
    background-color: var(--zs-primary);
    color: #ffffff;
}

.chip--secondary {
    background-color: var(--zs-secondary);
    color: #ffffff;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--zs-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    height: 40px;
    padding: 11px 14px;
    font-family: var(--zs-font-sans);
    font-size: 1.125rem;
    color: var(--zs-text);
    background-color: var(--zs-warm);
    border: 2px solid var(--zs-border);
    border-radius: 12px;
    transition: var(--zs-transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--zs-primary);
}

.form-textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 120px;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 56px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav__link {
    font-family: var(--zs-font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--zs-text);
}

.main-nav__link:hover {
    color: var(--zs-primary);
}

.header-ctas {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Text logo fallback (no custom logo and no logo.svg present) */
.site-logo__text {
    font-family: var(--zs-font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--zs-primary);
    text-decoration: none;
}

.site-logo .custom-logo {
    height: 56px;
    width: auto;
    display: block;
}

/* Desktop navigation list */
.main-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
}

.main-nav__list li {
    margin: 0;
}

.main-nav__link:focus-visible,
.mobile-nav__list a:focus-visible,
.menu-toggle:focus-visible {
    outline: 2px solid var(--zs-primary);
    outline-offset: 3px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--zs-text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle__bar + .menu-toggle__bar {
    margin-top: 5px;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile navigation panel (hidden by default; opened via .is-active from JS) */
.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background-color: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-active {
    display: block;
}

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 32px;
}

.mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mobile-nav__list li {
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav__list a {
    display: block;
    padding: 14px 0;
    font-family: var(--zs-font-sans);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--zs-text);
    text-decoration: none;
}

.mobile-nav__list a:hover {
    color: var(--zs-primary);
}

.mobile-nav__ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #111111;
    color: #ffffff;
    padding: 64px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 478px 187px 187px 226px;
    gap: 80px;
    padding-bottom: 50px;
}

.footer__brand {
    max-width: 478px;
}

.footer__logo {
    width: 160px;
    height: 160px;
    margin-bottom: 20px;
    overflow: hidden;
}

.footer__logo a,
.footer__logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.footer__description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.footer__social {
    display: flex;
    gap: 10px;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    transition: var(--zs-transition);
}

.footer__social-link:hover {
    background-color: var(--zs-primary);
}

.footer__heading {
    font-family: var(--zs-font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__links li {
    margin-bottom: 12px;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer__links a:hover {
    color: #ffffff;
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer__contact-icon {
    flex-shrink: 0;
    width: 20px;
    color: var(--zs-primary-light);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer__legal a {
    color: rgba(255, 255, 255, 0.5);
    margin-left: 24px;
}

.footer__legal a:hover {
    color: #ffffff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    position: relative;
    min-height: 600px;
    padding-top: 80px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.85), rgba(15, 36, 24, 0.9));
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    color: #ffffff;
}

.hero__eyebrow {
    margin-bottom: 16px;
    color: var(--zs-accent);
}

.hero__title {
    color: #ffffff;
    margin-bottom: 24px;
}

.hero__description {
    font-size: 1.125rem;
    line-height: 1.65;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.9);
}

.hero__ctas {
    display: flex;
    gap: 16px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Above the mobile breakpoint, keep the mobile panel/toggle hidden even if
   the menu was left open before a resize. */
@media (min-width: 761px) {
    .menu-toggle,
    .mobile-nav,
    .mobile-nav.is-active {
        display: none;
    }
}

@media (max-width: 1080px) {
    .site-header__inner {
        padding: 0 40px;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    :root {
        --zs-section-padding: var(--zs-section-padding-mobile);
        --zs-container-padding: 14px;
    }

    .site-header__inner {
        padding: 0 20px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .header-ctas {
        display: none;
    }

    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .hero {
        min-height: 500px;
    }

    .hero__ctas {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-hero {
    animation: heroTextIn 0.65s ease both;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* 404 Page */
.error-404 {
    background: linear-gradient(134deg, #fdfcf9 0%, #f1ede5 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.error-404__bg-image {
    position: absolute;
    top: -236px;
    left: 50%;
    transform: translateX(-40%);
    width: 1685px;
    height: 1288px;
    opacity: 0.14;
    pointer-events: none;
}

.error-404__bg-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.error-404__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 876px;
    background: linear-gradient(149deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 237, 229, 0.9) 100%);
    pointer-events: none;
}

.error-404__glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

.error-404__glow--green {
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at center, rgba(45, 90, 39, 0.06) 0%, transparent 70%);
}

.error-404__glow--gold {
    top: 456px;
    right: 0;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at center, rgba(196, 140, 51, 0.09) 0%, transparent 70%);
}

.error-404__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 680px;
    width: 100%;
    padding: 80px 24px;
}

.error-404__hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    height: 224px;
}

.error-404__number {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 200px;
    line-height: 1;
    letter-spacing: -8px;
    color: rgba(45, 90, 39, 0.07);
    user-select: none;
}

.error-404__logo {
    position: absolute;
    width: 64px;
    height: 64px;
    opacity: 0.9;
}

.error-404__logo img,
.error-404__logo a {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.error-404__subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 11px;
    line-height: 16.5px;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #c48c33;
    text-align: center;
    margin: 0 0 16px;
}

.error-404__heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(32px, 4.5vw, 54px);
    line-height: 1.05;
    color: #2d5a27;
    text-align: center;
    margin: 0 0 16px;
}

.error-404__divider {
    width: 48px;
    height: 3px;
    border-radius: 9999px;
    background-image: linear-gradient(to right, #c48c33, rgba(196, 140, 51, 0.2));
    margin-bottom: 24px;
}

.error-404__description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.625;
    color: #555;
    text-align: center;
    max-width: 440px;
    margin: 0 0 40px;
}

.error-404__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 56px;
}

.error-404__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 28px;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.error-404__btn:hover,
.error-404__btn:focus-visible {
    transform: translateY(-2px);
}

.error-404__btn--primary {
    background-color: #2d5a27;
    color: #fff;
    box-shadow: 0 12px 14px rgba(45, 90, 39, 0.18);
}

.error-404__btn--secondary {
    background-color: transparent;
    color: #2d5a27;
    border: 2px solid #2d5a27;
}

.error-404__explore-label {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #c48c33;
    text-align: center;
    margin: 0 0 16px;
}

.error-404__explore {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.error-404__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 9999px;
    background-color: #eef4df;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 13px;
    line-height: 19.5px;
    color: #2d5a27;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.error-404__pill:hover,
.error-404__pill:focus-visible {
    background-color: #ddeab8;
}

@media (max-width: 767px) {
    .error-404__bg-image {
        width: 900px;
        height: 700px;
        top: -100px;
        transform: translateX(-50%);
    }

    .error-404__overlay {
        height: 600px;
    }

    .error-404__glow--green {
        width: 300px;
        height: 300px;
    }

    .error-404__glow--gold {
        width: 250px;
        height: 250px;
        top: 350px;
    }

    .error-404__number {
        font-size: 120px;
        letter-spacing: -4px;
    }

    .error-404__hero {
        height: 150px;
    }

    .error-404__logo {
        width: 48px;
        height: 48px;
    }

    .error-404__description {
        font-size: 16px;
    }

    .error-404__actions {
        margin-bottom: 40px;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
