/*
Theme Name: Poyan Initiative
Theme URI: https://poyaninitiative.org
Author: Poyan Initiative
Author URI: https://poyaninitiative.org
Description: A custom Gutenberg block theme developed for Poyan Initiative.
Version: 1.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: poyan-initiative
Tags: block-patterns, full-site-editing, accessibility-ready, translation-ready
*/


/* =========================================================
   GLOBAL
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: #FAFAFA;
    color: #1F2937;
    line-height: 1.6;
}

a {
    transition: all 0.25s ease;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 30px;
    box-sizing: border-box;
}

.site-header .wp-block-navigation {
    gap: 18px;
}

.site-header .wp-block-navigation-item a {
    font-weight: 500;
    text-decoration: none;
}

.site-header .wp-block-navigation-item a:hover {
    color: #1B75BC;
}


/* =========================================================
   HEADER DONATE BUTTON
========================================================= */

.donate-button a {
    background-color: #D62828 !important;
    color: #FFFFFF !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.donate-button a:hover {
    background-color: #B91F1F !important;
}


/* =========================================================
   GENERAL SECTIONS
========================================================= */

.wp-block-group.alignfull {
    padding-top: 80px;
    padding-bottom: 80px;
}


/* =========================================================
   HEADINGS
========================================================= */

.wp-block-heading {
    color: #1F2937;
}

.wp-block-group h2 {
    font-size: 36px;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 40px;
}

.wp-block-column h3 {
    color: #1B75BC;
    font-size: 24px;
    line-height: 1.3;
}

.wp-block-group h3 {
    font-weight: 700;
}

.wp-block-group h3 + p {
    font-weight: 600;
}


/* =========================================================
   HOMEPAGE HERO
========================================================= */

.hero-section {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;

    padding: 120px 20px;

    text-align: center;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.48),
            rgba(0, 0, 0, 0.48)
        ),
        url("/wp-content/themes/poyan-initiative/assets/images/hero-image.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-section h1 {
    max-width: 900px;
    margin: 0 auto 25px;

    color: #FFFFFF;

    font-size: 52px;
    line-height: 1.15;
    font-weight: 700;
}

.hero-section p {
    max-width: 760px;
    margin: 0 auto 35px;

    color: #FFFFFF;

    font-size: 20px;
    line-height: 1.6;
}


/* =========================================================
   HOMEPAGE HERO BUTTONS
========================================================= */

.hero-section .wp-block-buttons {
    justify-content: center;
    gap: 14px;
}

.hero-section .wp-block-button__link {
    padding: 14px 32px;
    border-radius: 6px;

    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
}

.hero-section .wp-block-button:first-child .wp-block-button__link {
    background-color: #1B75BC;
    color: #FFFFFF;
}

.hero-section .wp-block-button:last-child .wp-block-button__link {
    background-color: #D62828;
    color: #FFFFFF;
}

.hero-section .wp-block-button__link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}


/* =========================================================
   CONTENT COLUMNS / CARDS
========================================================= */

.wp-block-columns {
    gap: 30px;
}

.wp-block-column {
    box-sizing: border-box;

    padding: 35px;

    background-color: #FFFFFF;

    border: 1px solid #E5E7EB;
    border-radius: 14px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.wp-block-column:hover {
    transform: translateY(-5px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.07);
}

.wp-block-column p {
    color: #2F2F2F;
    line-height: 1.7;
}


/* =========================================================
   COMMUNITY STORIES / QUOTES
========================================================= */

.wp-block-quote {
    margin: 0;
    padding: 30px;

    background-color: #FFFFFF;

    border-left: 5px solid #1B75BC;
    border-radius: 10px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.05);
}

.wp-block-quote p {
    font-size: 18px;
    line-height: 1.7;
}

.wp-block-quote cite {
    color: #1B75BC;
    font-weight: 600;
}


/* =========================================================
   INNER PAGE HERO
========================================================= */

.page-hero {
    width: 100%;
    box-sizing: border-box;

    padding: 80px 20px 60px;

    text-align: center;

    background-color: #F8F6F2;
}

.page-hero h1.wp-block-heading,
.page-hero h1 {
    max-width: 900px;
    margin: 0 auto 15px !important;

    color: #1F2937 !important;

    font-size: 48px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.page-hero > p {
    max-width: 760px;
    margin: 0 auto !important;

    color: #1B75BC !important;

    font-size: 22px !important;
    line-height: 1.5 !important;
    text-align: center !important;
}


/* =========================================================
   INNER PAGE CONTENT
========================================================= */

main.wp-block-group.alignfull > .wp-block-group {
    padding-top: 45px;
    padding-bottom: 45px;
}

main .wp-block-heading {
    margin-top: 0;
    margin-bottom: 25px;
}

main h2.wp-block-heading {
    font-size: 34px;
    line-height: 1.2;
}

main h3.wp-block-heading {
    font-size: 24px;
    line-height: 1.3;
}

main p {
    line-height: 1.7;
    margin-bottom: 20px;
}


/* =========================================================
   LIGHT SECTIONS
========================================================= */

.light-section {
    background-color: #F8F6F2;
}


/* =========================================================
   CLOSING STATEMENT
========================================================= */

.closing-statement {
    padding-top: 65px !important;
    padding-bottom: 65px !important;

    text-align: center;

    background-color: #1B75BC;
    color: #FFFFFF;
}

.closing-statement h2,
.closing-statement p {
    color: #FFFFFF;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    margin-top: 60px;
    padding-top: 50px;
    padding-bottom: 50px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .site-header {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-section,
    .page-hero {
        padding-left: 24px;
        padding-right: 24px;
    }

    .wp-block-columns {
        flex-wrap: wrap;
    }

    .wp-block-columns > .wp-block-column {
        flex-basis: calc(50% - 16px) !important;
    }

    .site-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
}


/* =========================================================
   MOBILE / TABLET
========================================================= */

@media (max-width: 781px) {

    /* ---------- Header ---------- */

    .site-header {
        padding: 14px 20px;
        min-height: 64px;
    }

    .site-header img {
        width: 110px !important;
        height: auto;
        display: block;
    }


    /* ---------- General spacing ---------- */

    .wp-block-group.alignfull {
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }


    /* ---------- Hero ---------- */

    .hero-section {
        min-height: 480px;
        padding: 55px 20px 50px !important;
        text-align: center;
    }

    .hero-section h1 {
        font-size: clamp(32px, 8vw, 46px);
        line-height: 1.15;
        margin-bottom: 20px;
    }

    .hero-section p {
        font-size: 17px;
        line-height: 1.65;
    }


    /* ---------- Hero buttons ---------- */

    .hero-section .wp-block-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 25px;
    }

    .hero-section .wp-block-button {
        width: 100%;
    }

    .hero-section .wp-block-button__link {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 14px 20px;
    }


    /* ---------- Page hero ---------- */

    .page-hero {
        padding: 45px 20px 40px !important;
    }

    .page-hero h1.wp-block-heading,
    .page-hero h1 {
        font-size: 36px !important;
        line-height: 1.2 !important;
    }

    .page-hero > p {
        font-size: 19px !important;
    }


    /* ---------- Section headings ---------- */

    .wp-block-group h2,
    main h2.wp-block-heading {
        font-size: 28px;
        line-height: 1.2;
    }

    .wp-block-group h3,
    main h3.wp-block-heading {
        font-size: 22px;
        line-height: 1.3;
    }


    /* ---------- Paragraphs ---------- */

    .wp-block-group p,
    main p {
        font-size: 16px;
        line-height: 1.7;
    }


    /* ---------- Columns ---------- */

    .wp-block-columns {
        display: flex;
        flex-direction: column;
        gap: 25px;
        margin-bottom: 0;
    }

    .wp-block-columns > .wp-block-column {
        flex-basis: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 0;
    }

    .wp-block-column {
        padding: 30px;
    }


    /* ---------- Buttons ---------- */

    .wp-block-buttons {
        gap: 12px;
    }

    .wp-block-button {
        max-width: 100%;
    }


    /* ---------- Light sections ---------- */

    .light-section {
        padding-top: 45px;
        padding-bottom: 45px;
    }


    /* ---------- Closing statement ---------- */

    .closing-statement {
        padding-top: 45px !important;
        padding-bottom: 45px !important;
        text-align: center;
    }

    .closing-statement h2 {
        font-size: 28px;
        line-height: 1.2;
    }


    /* ---------- Quotes ---------- */

    .wp-block-quote {
        margin-left: 0;
        margin-right: 0;
        padding: 25px;
    }


    /* ---------- Footer ---------- */

    .site-footer {
        padding: 40px 20px 25px !important;
    }

    .site-footer > .wp-block-group > .wp-block-group {
        width: 100%;
        margin-bottom: 25px;
    }

    .site-footer h3 {
        margin-bottom: 10px;
    }

    .site-footer p {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .site-footer hr {
        margin-top: 20px;
        margin-bottom: 25px;
    }


    /* ---------- Mobile navigation ---------- */

    .wp-block-navigation__responsive-container.is-menu-open {
        padding: 90px 24px 30px;
    }

    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__container {
        width: 100%;
        gap: 0;
    }

    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item {
        width: 100%;
        border-bottom: 1px solid rgba(31, 41, 55, 0.12);
    }

    .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content {
        display: block;
        width: 100%;
        padding: 16px 4px;
        font-size: 18px;
        line-height: 1.3;
    }

    .wp-block-navigation__responsive-container-close {
        top: 20px;
        right: 20px;
    }

    .wp-block-navigation__responsive-container.is-menu-open
    .donate-button .wp-block-navigation-item__content {
        margin-top: 14px;
        padding: 14px 20px;
        text-align: center;
        border-radius: 6px;
        font-weight: 600;
    }


    /* ---------- Prevent overflow ---------- */

    .wp-site-blocks {
        overflow-x: hidden;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}
/* =========================================================
   CLOSING STATEMENT — CENTER BUTTONS
========================================================= */

.closing-statement .wp-block-buttons {
    justify-content: center;
    width: 100%;
}

.closing-statement .wp-block-button {
    margin-left: 0;
    margin-right: 0;
}
/* =========================================================
   FOOTER — COLUMN ALIGNMENT
========================================================= */

.site-footer > .wp-block-group {
    width: 100%;
}

.site-footer > .wp-block-group > .wp-block-group {
    flex: 1 1 0;
}

.site-footer > .wp-block-group > .wp-block-group:first-child {
    flex: 1.2 1 0;
}