/*
Theme Name: La Bergerie 72
Theme URI: https://labergerie72.fr/
Author: Your Name
Author URI: https://example.com/
Description: Minimal WordPress theme for La Bergerie 72 to manage editable sections and a photo gallery.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bergerie
*/

/* Moved from functions.php: base tokens and fonts */
@font-face {
    font-family: 'Albra';
    src: url('fonts/albra-semi.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: 'Better Yesterday';
    src: url('fonts/better-yesterday.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

:root {
    --fgreen: rgb(7, 62, 47);
    --mbrown: #694f3a;
    --beige: #f7f3ee
}

/* Basic reset and typography */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #222;
    background: #fff;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* Sticky top navbar similar to original */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    color: var(--fgreen);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 4rem;
}

@media (max-width: 1224px) {
    .header-inner {
        padding: 1rem 1.25rem;
    }
}

.brand-logo {
    height: 2.5rem;
    width: auto;
    display: block;
}

@media (min-width: 1224px) {
    .brand-logo {
        height: 2.75rem;
    }
}

.site-nav {
    display: none;
    gap: 2rem;
    font-weight: 700;
}

@media (min-width: 1224px) {
    .site-nav {
        display: flex;
    }
}

.nav-link {
    position: relative;
    color: var(--fgreen);
    text-decoration: none;
    transition: color .2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 2px;
    width: 100%;
    background: var(--fgreen);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Sections: full-width bands with inner container */
.section {
    padding: 6rem 12rem;
}

.section h2 {
    margin: 0;
    font-family: 'Albra', serif;
}

.section--beige {
    background: var(--beige);
    color: var(--fgreen);
}

.section--green {
    background: var(--fgreen);
    color: #fff;
}

.section--green a {
    color: #fff;
}

.section--green .gallery a {
    color: inherit;
}

/* Make section inner container full-width */
.section > .container {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Hero and sections anchor offset for sticky header */
.hero, .section {
    scroll-margin-top: 88px;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    text-align: center;
    background: #f7f7f7;
}

/* Typography adjustments */
h1 {
    font-family: 'Albra', serif;
    font-size: 3rem;
    line-height: 1.2;
    margin: 0 0 1rem;
}

/* Gutenberg columns gap inside sections */
.section .wp-block-columns {
    gap: 9rem;
    column-gap: 9rem;
    row-gap: 9rem;
}

@media (max-width: 781px) {
    .section .wp-block-columns {
        gap: 3rem;
    }

    /* mobile sanity */
}

/* Hero rich text */
.hero .hero-rich {
    margin-top: 1rem;
    max-width: 60ch;
}

/* Contact form (Contact Form 7) styling to match original */
/* Ensure the contact section keeps the 12rem horizontal padding via .section rules above */
.wp-block-contact-form-7-contact-form-selector {
    width: 100%;
    padding-left: 12rem;
    padding-right: 12rem;
}

.wpcf7 {
    width: 100%;
}

/* Stack fields nicely */
.wpcf7 form p {
    margin: 0 0 1rem;
}

/* Inputs and textarea */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wp-block-contact-form-7-contact-form-selector input[type="text"],
.wp-block-contact-form-7-contact-form-selector input[type="email"],
.wp-block-contact-form-7-contact-form-selector textarea {
    width: 100%;
    padding: 0.625rem; /* 10px */
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem; /* 8px */
    background: #fff;
    color: #073e2f;
}

.wpcf7 textarea {
    min-height: 10rem;
}

/* Submit button */
.wpcf7 input[type="submit"],
.wp-block-contact-form-7-contact-form-selector .wpcf7-submit {
    display: inline-block;
    padding: .75rem 1.25rem;
    border-radius: .5rem;
    background: #fff;
    color: var(--fgreen);
    border: 2px solid var(--fgreen);
    font-weight: 700;
    cursor: pointer;
}

.wpcf7 input[type="submit"]:hover,
.wp-block-contact-form-7-contact-form-selector .wpcf7-submit:hover {
    filter: brightness(0.98);
}

/* Spinner alignment tweak */
.wpcf7 .wpcf7-spinner {
    margin-left: .5rem;
}

/* ==== Custom responsive adjustments per issue ==== */

/* Hero layout and images */
.hero {
    padding: 6rem 12rem;
    background: linear-gradient(to right, var(--beige) 0 85%, #b58c3d 85% 100%);
    color: var(--fgreen);
}

.hero > .container {
    width: 100%;
    max-width: none;
    margin: 0
}

.hero-wrap {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.hero-title-col {
    flex: 1;
}

.hero-title {
    font-family: 'Albra', serif;
    margin-top: 10rem;
    line-height: 1;
}

.hero-title-line1 {
    font-family: 'Better Yesterday', cursive;
    font-size: clamp(3rem, 4vw, 4rem);
    display: inline-block;
    transform: translateY(0.5rem);
}

.hero-title-line2 {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    display: inline-block;
}

/* Images block: mobile-first column with 1rem gap */
.hero-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.hero-images img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 32rem;
    border-radius: 6px;
}

/* Apply image translations only from 1540px and up; row layout at ≥1540px */
@media (min-width: 1700px) {
    .hero-images {
        gap: 1.25rem;
    }

    .hero-images img:first-child {
        translate: -10rem 0;
    }

    .hero-images img:last-child {
        translate: 0 -4rem;
    }
}

/* Stack hero columns on narrow screens, side-by-side on larger */
@media (min-width: 1224px) {
    .hero-wrap {
        flex-direction: row;
    }
}

@media (max-width: 1223.98px) {
    .hero-wrap {
        flex-direction: column;
        align-items: center;
    }
}

/* Under 1280px: paddings for sections, hero, and contact form */
@media (max-width: 1279.98px) {
    .section {
        padding: 4rem 1.25rem;
    }

    .hero {
        padding: 4rem 1rem;
        background: var(--beige);
    }

    /* Override CF7 wrapper added padding */
    .wp-block-contact-form-7-contact-form-selector {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Hero title centered with no top margin */
    .hero-title {
        margin-top: 0;
        text-align: center;
    }
}

/* Under 1280px: Gutenberg columns stack; reverse order for green sections */
@media (max-width: 1279.98px) {
    .section .wp-block-columns {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        column-gap: 1rem;
        row-gap: 1rem;
    }

    .section--green .wp-block-columns {
        flex-direction: column-reverse;
    }
}

.stats_block {
    display: none !important;
}