/*
Theme Name: SOMO Theme
Theme URI: https://www.somomaarssen.nl/
Author: Antigravity
Author URI: https://google.com
Description: A custom theme for SOMO (Stichting Ontwikkelingsproject Maarssen - Outjo), designed to support children in Namibia.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: somo-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Outfit:wght@700;800&display=swap');

:root {
    /* Brand Colors */
    --color-primary: #d44206;
    /* Somo Red */
    --color-secondary: #000000;
    /* Black for contrast */
    --color-tertiary: #5F8C48;

    /* Neutrals */
    --color-text-main: #111111;
    --color-text-light: #555555;
    --color-background: #ffffff;
    --color-light-gray: #f7f7f7;
    --color-border: #e2e2e2;

    /* Typography */
    --font-family-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-family-headers: 'Outfit', sans-serif;
    --font-family-serif: 'Merriweather', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --content-width: 1280px;
    --header-height: 90px;
}

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

body {
    font-family: var(--font-family-sans);
    color: var(--color-text-main);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-headers);
    font-weight: 800;
    /* Extra bold */
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-main);
    letter-spacing: -0.01em;
    margin-top: 0;
}

h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
}

h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 700;
}

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

/* Tables */
table {
    width: 100%;
    margin-bottom: var(--spacing-md);
    border-collapse: collapse;
    font-size: 1rem;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    background-color: var(--color-light-gray);
    font-weight: 700;
    color: var(--color-text-main);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Utilities */
.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.container-readable {
    max-width: 800px;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn:hover {
    background-color: #b33604;
    /* Darker red */
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle - Hidden by default */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000;
}

.menu-toggle:focus {
    outline: none;
}

/* Hamburger Animation */
.menu-toggle .box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    position: absolute;
    left: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.menu-toggle .top {
    top: 0;
}

.menu-toggle .mid {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle .bot {
    bottom: 0;
}

/* Active Hamburger State */
.menu-toggle.is-active .top {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-toggle.is-active .mid {
    opacity: 0;
}

.menu-toggle.is-active .bot {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Header */
.site-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--color-text-main);
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    padding-bottom: 4px;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease-in-out;
}

.main-navigation a:hover {
    color: var(--color-primary);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item>a::after,
.main-navigation .current_page_item>a::after {
    width: 100%;
}

.main-navigation .current-menu-item>a,
.main-navigation .current_page_item>a {
    color: var(--color-primary);
}

.header-actions .btn {
    padding: 12px 28px;
    font-size: 0.9rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    background-color: #000;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 160px 0 120px;
    text-align: left;
    /* Aligned left for impact */
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-family-sans);
    /* Use sans for impact like Vluchteling */
    color: #ffffff;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
}

.hero-text {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.4;
    font-weight: 500;
    max-width: 600px;
}

.btn-hero {
    background-color: var(--color-primary);
    padding: 20px 48px;
    margin-right: var(--spacing-sm);
}

/* Impact Section - Blocky Design */
.impact-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-background);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    text-transform: uppercase;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
    /* Gaps for rounded blocks */
}

.impact-card {
    background: #ffffff;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    /* Overlap borders */
    position: relative;
    z-index: 1;
    border-radius: 12px;
}

.impact-card:hover {
    background-color: #ffffff;
    z-index: 2;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.impact-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto var(--spacing-md);
    color: #ffffff;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.impact-card:hover .impact-icon {
    transform: scale(1.1);
}

.impact-card h3 {
    text-transform: uppercase;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-main);
}

.impact-card p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.btn-link {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.btn-link:hover {
    text-decoration: underline;
}

/* News Section */
.news-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.news-card {
    background: #ffffff;
    border-bottom: 4px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.news-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-thumbnail {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumbnail img {
    transform: scale(1.05);
}

.news-thumbnail.placeholder {
    background-color: var(--color-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-thumbnail.placeholder::after {
    content: '📰';
    font-size: 3rem;
    opacity: 0.5;
}

.news-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.news-content h3 a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.news-content h3 a:hover {
    color: var(--color-primary);
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-top: auto;
    display: inline-block;
}

.read-more:hover {
    text-decoration: underline;
}

/* Footer - Vluchteling Style (Dark) */
.site-footer {
    background-color: #111111;
    color: #ffffff;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.site-footer .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.site-footer h3,
.site-footer h2 {
    color: #ffffff;
    font-size: 1.25rem;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--spacing-xs);
    display: inline-block;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.8;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 0.5rem;
}

.site-info {
    border-top: 1px solid #333;
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.project-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.project-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: transparent;
}

.project-thumbnail {
    height: 250px;
    overflow: hidden;
    position: relative;
    background-color: var(--color-light-gray);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-thumbnail.placeholder::after {
    content: '🏗️';
    font-size: 3rem;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.project-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    text-transform: none;
    /* Keep natural case for titles maybe? Or uppercase? Stylesheet generally uses uppercase headers. Let's stick to default H2 style but maybe adjust size */
}

.project-excerpt {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

/* Page CTA Bar */
.page-cta-bar {
    background-color: #fff5eb;
    padding: 3rem 0;
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.page-cta-bar .widget-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.page-cta-bar p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    /* Mobile Menu Logic */
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        z-index: 1500;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: all 0.4s ease-in-out;
    }

    .main-navigation.toggled {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .main-navigation a {
        font-size: 1.5rem;
        color: var(--color-text-main);
    }

    /* Prevent scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .wp-block-buttons>.wp-block-button.wp-block-button__width-25 {
        width: auto !important;
    }
}