/*
Theme Name: Friends' Friends Foundation
Theme URI: https://friendsfriends.org
Author: Friends' Friends Foundation
Author URI: https://friendsfriends.org
Description: A simple, clean theme for the Friends' Friends Foundation nonprofit. Features a hero image homepage, custom navigation menu supporting external links, and lightweight page templates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fff
Tags: nonprofit, simple, custom-menu, custom-logo, featured-image-header, threaded-comments, translation-ready
*/

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #2c2c2c;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: #2a6f4e;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover, a:focus { color: #1a4a33; text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, "Times New Roman", serif;
    color: #1d1d1d;
    line-height: 1.25;
    margin: 0 0 0.6em 0;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em 0; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ---------- Header ---------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e6e6;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    max-width: 1100px;
    margin: 0 auto;
    gap: 24px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding .custom-logo-link img { max-height: 56px; width: auto; }
.site-title {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    margin: 0;
    color: #1d1d1d;
}
.site-title a { color: inherit; text-decoration: none; }
.site-description {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

/* ---------- Navigation ---------- */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    align-items: center;
}
.main-nav a {
    color: #333;
    font-weight: 500;
    font-size: 0.98rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #2a6f4e;
    border-bottom-color: #2a6f4e;
}
.main-nav .menu-item-has-children { position: relative; }
.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 200px;
    padding: 8px 0;
    flex-direction: column;
    gap: 0;
}
.main-nav li:hover > ul,
.main-nav li:focus-within > ul { display: flex; }
.main-nav ul ul a {
    padding: 8px 18px;
    display: block;
    border: none;
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e6e6e6;
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    }
    .main-nav.is-open { display: block; }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px;
    }
    .main-nav a { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
    .main-nav ul ul {
        position: static;
        display: flex;
        border: none;
        box-shadow: none;
        padding-left: 16px;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: #2a6f4e;
    color: #fff;
    text-align: center;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}
.hero-inner {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
    max-width: 800px;
}
.hero h1 {
    color: #fff;
    font-size: 2.75rem;
    margin-bottom: 0.5em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: #2a6f4e;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
    border: 2px solid #2a6f4e;
}
.btn:hover { background: #1a4a33; border-color: #1a4a33; color: #fff; text-decoration: none; }
.btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}
.btn-outline:hover { background: #fff; color: #2a6f4e; border-color: #fff; }

@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.05rem; }
    .hero-inner { padding: 60px 20px; }
}

/* ---------- Main content ---------- */
.site-main {
    padding: 60px 0;
}
.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}
.page-content h1 { margin-bottom: 0.4em; }
.page-content img { margin: 1.5em 0; border-radius: 4px; }

/* Homepage intro section under hero */
.home-intro {
    background: #f7f7f4;
    padding: 60px 0;
    text-align: center;
}
.home-intro h2 { margin-bottom: 0.5em; }
.home-intro p {
    max-width: 680px;
    margin: 0 auto 1em;
    font-size: 1.05rem;
    color: #444;
}

/* ---------- Footer ---------- */
.site-footer {
    background: #1d1d1d;
    color: #c9c9c9;
    padding: 40px 0 24px;
    margin-top: 60px;
}
.site-footer .container {
    text-align: center;
}
.site-footer a { color: #e8e8e8; }
.site-footer a:hover { color: #fff; }
.footer-nav {
    margin-bottom: 18px;
}
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}
.footer-nav a { font-size: 0.95rem; }
.site-info {
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #333;
    padding-top: 18px;
    margin-top: 18px;
}

/* ---------- Forms (contact page) ---------- */
.contact-form {
    max-width: 600px;
    margin: 2em auto;
}
.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 16px;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2a6f4e;
    box-shadow: 0 0 0 3px rgba(42,111,78,0.15);
}
.form-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.form-message.success { background: #e6f4ec; color: #1a4a33; border: 1px solid #2a6f4e; }
.form-message.error { background: #fde8e8; color: #7a1f1f; border: 1px solid #c44; }
