/*
Theme Name: GEP Theme
Theme URI:
Author: PJUX
Author URI:
Description: Custom FSE block theme for The George E. Peters Adventist School.
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: gep-theme
Tags: block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, full-site-editing, wide-blocks
*/

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

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* =======================================================
   Links & Transitions
======================================================= */
a,
button,
.wp-element-button {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out,
                border-color 0.2s ease-in-out, opacity 0.2s ease-in-out,
                box-shadow 0.2s ease-in-out;
}

a {
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
}

a:hover {
    color: var(--wp--preset--color--secondary);
}

/* =======================================================
   Site Header
======================================================= */
.site-header {
    background-color: var(--wp--preset--color--base);
}

.site-header-inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: clamp(1.5rem, 4vw, 2rem);
    padding-right: clamp(1.5rem, 4vw, 2rem);
}

/* =======================================================
   Site Footer
======================================================= */
.site-footer {
    background-color: #e2e2e2;
    color: var(--wp--preset--color--contrast);
}

.site-footer-inner .wp-block-group.is-vertical {
    --wp--style--block-gap: 0.5rem;
    row-gap: 0.5rem !important;
}

body .wp-site-blocks > .site-footer {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

@media (max-width: 781px) {
    .footer-brand,
    .footer-contact {
        padding-left: clamp(1.5rem, 4vw, 2rem);
    }
}

.site-footer a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

.site-footer-inner a,
.site-footer-inner a:visited {
    text-decoration: none !important;
}

.site-footer a:hover {
    color: var(--wp--preset--color--contrast);
    text-decoration: underline;
}

/* =======================================================
   Block Styles
======================================================= */
.is-style-shadow-light {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.is-style-shadow-solid {
    box-shadow: 5px 5px 0 var(--wp--preset--color--contrast);
}

.is-style-no-disc {
    list-style: none;
    padding-left: 0;
}

.is-style-accent-bar {
    border-left: 4px solid var(--wp--preset--color--accent);
    padding-left: 1rem;
}

/* =======================================================
   Utility
======================================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-break: normal;
}

.entry-header {
    margin-bottom: var(--wp--preset--spacing--small);
}

/* =======================================================
   Newsletter Form
======================================================= */
.gep-newsletter-form .gep-newsletter-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.gep-newsletter-form input[type="email"] {
    flex: 1 1 260px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--wp--preset--color--neutral);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--wp--preset--font-family--primary);
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
}

.gep-newsletter-form--dark input[type="email"] {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--wp--preset--color--base);
}

.gep-newsletter-form--dark input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.gep-newsletter-form .wp-element-button {
    flex-shrink: 0;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    border-radius: 4px;
}

.gep-newsletter-form .gep-newsletter-message {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

/* =======================================================
   Breadcrumbs
======================================================= */
.gep-breadcrumbs-bar {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    font-size: 0.75rem !important;
}

/* Hide bar on top-level pages (no parent page) */
body.is-top-level-page .gep-breadcrumbs-bar {
    display: none !important;
}

.gep-breadcrumbs-bar .wp-block-breadcrumbs ol {
    gap: 0.375rem;
}

.gep-breadcrumbs-bar .wp-block-breadcrumbs li {
    background-color: #e2e2e2 !important;
    border-radius: 9999px !important;
    padding: 0.15em 1.1em !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    transition: transform 0.2s ease;
}

.gep-breadcrumbs-bar .wp-block-breadcrumbs li:hover {
    transform: translateY(-2px);
}

.gep-breadcrumbs-bar .wp-block-breadcrumbs li:not(:last-child)::after {
    display: none !important;
}

/* Replace "Home" text with a home icon */
.gep-breadcrumbs-bar .wp-block-breadcrumbs li:first-child a {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 1.125rem;
}

.gep-breadcrumbs-bar .wp-block-breadcrumbs li:first-child a::before {
    content: "";
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* =======================================================
   Breakpoints
   sm  — max-width: 599px   (phones, portrait)
   md  — max-width: 782px   (tablets / WP mobile)
   lg  — max-width: 1024px  (small laptops, landscape tablets)
   xl  — min-width: 1280px  (large desktops)
======================================================= */

/* --- Small (≤ 599px) --------------------------------- */
@media (max-width: 599px) {
    /* Footer: stack columns left-aligned */
    .site-footer-inner .alignwide > .wp-block-group {
        justify-content: flex-start !important;
        width: 100%;
    }

    .footer-brand,
    .footer-contact {
        width: 100%;
        margin-right: 0 !important;
    }

    /* Stack logo above brand text so all text aligns at the left edge */
    .footer-brand {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .gep-reg-buttons {
        flex-direction: column;
    }

    .gep-reg-buttons .wp-block-button {
        width: 100%;
    }

    .gep-reg-buttons .wp-block-button__link {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* --- Medium (≤ 782px) -------------------------------- */
@media (max-width: 782px) {
    .site-header {
        position: static;
    }

    .site-utility-bar,
    .site-header-name {
        display: none;
    }

    .gep-newsletter-form .gep-newsletter-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .gep-newsletter-form input[type="email"],
    .gep-newsletter-form .wp-element-button {
        width: 100%;
    }
}

/* --- Large (≤ 1024px) -------------------------------- */
@media (max-width: 1024px) {
}

/* --- XL (≥ 1280px) ----------------------------------- */
@media (min-width: 1280px) {
}

