/* =========================================================
   TNFFI - Tonga National Farmers Federation Inc.
   Shared Stylesheet
   ---------------------------------------------------------
   To change the hero background image:
   - Upload your own photo to an "images" folder
   - Replace the Unsplash URL below in the .hero rule
   ========================================================= */

:root {
    --primary: #1b5e20;
    --primary-dark: #0d3b13;
    --accent: #f9a825;
    --bg-light: #f5f7f5;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Layout ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Header & Nav ===== */
.site-header {
    background: var(--primary-dark);
    color: var(--white);
}

.top-bar {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar span {
    opacity: 0.9;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0 0.8rem 0;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-text {
    line-height: 1.2;
}

.logo-text small {
    font-size: 0.75rem;
    opacity: 0.85;
}

.logo-text strong {
    font-size: 1rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    font-size: 0.95rem;
}

.main-nav a {
    color: var(--white);
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover {
    border-color: var(--accent);
    color: #fdfdfd;
}

.main-nav a.active {
    border-color: var(--accent);
}

/* Mobile nav placeholder */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero (Home) ===== */
/* To use your own hero image:
   1. Create an "images" folder in public_html
   2. Upload e.g. hero-farmers.jpg
   3. Replace the URL below with: url("../images/hero-farmers.jpg")
*/
.hero {
    background: linear-gradient(
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.65)
        ),
        url("https://images.unsplash.com/photo-1598514982745-15cbe8c61c41?auto=format&fit=crop&w=1600&q=80")
        center/cover no-repeat;
    color: var(--white);
    padding: 4rem 0 4.5rem;
}

.hero-inner {
    max-width: 650px;
}

.hero h1 {
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
}

.hero p {
    font-size: 1.02rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn-primary {
    background: var(--accent);
    color: #1b1b1b;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: #ffcc33;
    border-color: #ffcc33;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

/* ===== Reusable sections ===== */
.section {
    padding: 3rem 0;
}

.section-alt {
    background: var(--white);
}

.section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.section-heading p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ===== Cards & grids ===== */
.cards-grid {
    display: grid;
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.card p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--primary);
    background: #e6f3e8;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

/* ===== About page ===== */
.two-column {
    display: grid;
    gap: 2rem;
}

.two-column p {
    font-size: 0.95rem;
}

/* Simple image styling for content photos */
.content-image {
    width: 100%;
    border-radius: 12px;
    display: block;
    margin-bottom: 1rem;
}

/* ===== News page ===== */
.news-list {
    display: grid;
    gap: 1.5rem;
}

.news-item h3 {
    margin-bottom: 0.2rem;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ===== Programs page ===== */
.programs-grid {
    display: grid;
    gap: 1.5rem;
}

.programs-grid ul {
    margin-left: 1.1rem;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ===== Resources page ===== */
.resource-list {
    display: grid;
    gap: 1rem;
}

.resource-item a {
    color: var(--primary);
    font-weight: 600;
}

.resource-item a:hover {
    text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,0.9);
}

/* ===== Responsive ===== */
@media (min-width: 700px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .two-column {
        grid-template-columns: 2fr 1.2fr;
    }

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

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

@media (max-width: 800px) {
    .main-header {
        flex-wrap: wrap;
    }

    .main-nav {
        width: 100%;
        margin-top: 0.5rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.6rem 1.2rem;
    }
}
