/*
Theme Name: Astra Child — Redesign v5
Description: Child theme of Astra carrying the BEST centre redesign — version 5.
Template: astra
Author: Antigravity
Version: 5.0.0
Requires PHP: 7.4
Text Domain: astra-child-redesign-v5
*/

:root {
    --emerald-deep: #064635;
    --gold-muted: #D4AD60;
    --ivory-bg: #FBF8F1;
    --graphite-text: #2D2E2E;
    --accent-energy: #F0F4F0;
    --surface-sage: #EFF3EF; /* second neutral so sections read as distinct panels, not the same cream at 99% opacity */
    --gold-ink: #8C6A22; /* same gold hue, darkened for text/eyebrow use on light backgrounds — --gold-muted alone is too light to read on ivory */
    --serif-header: 'Cormorant Garamond', serif;
    --sans-body: 'Inter', sans-serif;
    --btn-radius: 0px;
    --card-radius: 20px;
    --hero-gradient: linear-gradient(135deg, #052c22 0%, #064635 50%, #0c2b21 100%);
}

/* ==========================================================================
   DESIGN VARIANT 2 — THE SHIPPED DESIGN

   History, because the docs and the code drifted apart: variant 2 started as
   one of several client-facing options behind a toggle, and was sketched in
   early notes as a separate "terracotta and sand" palette. That palette was
   never built. What the client picked and approved is the emerald/gold system
   in :root above, with variant 2's own work living in per-element overrides
   across the template stylesheets (about-us, books, courses, methodology,
   methods, psychosomatics) — not in a second set of tokens.

   The toggle is gone. functions.php stamps data-design="2" on <html> server
   side (astra_child_force_design_variant), so the attribute is always present
   and exists purely as the scope those overrides hang off. There is no
   variant 1 or 3 on the front end.

   Practical rule, unchanged: new redesign rules go under html[data-design="2"]
   unless they are base fixes that any variant would need.
   ========================================================================== */

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--ivory-bg);
    color: var(--graphite-text);
    font-family: var(--sans-body) !important;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

/* Safety net: content imported as pre-rendered HTML lacks the per-block
   responsive rules WP normally injects live, so any stray fixed-width
   element (native-size image, unbroken long word) can push the viewport
   wider than the screen instead of shrinking or wrapping. */
img, svg, video, iframe, table {
    max-width: 100%;
    height: auto;
}

h1, h2, h3 {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Typography Overhaul */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.site-title,
.widget-title {
    font-family: var(--serif-header) !important;
    font-weight: 600;
    color: var(--emerald-deep);
    letter-spacing: -0.02em;
}

/* Clamp to desktop 64-72px / tablet 48-56px / mobile 38-44px.
   !important beats any inline font-size the DB content carries per-heading
   (e.g. style="font-size:5rem") without touching that stored content.
   Scoped to bare h1/h2 only — NOT .wp-block-heading, which also lands on
   h3 card titles (premium-card, team-card) that intentionally stay smaller. */
h1,
h2 {
    font-size: clamp(2.4rem, 1.6rem + 3vw, 4.5rem) !important;
    line-height: 1.1;
}

/* Blog/archive card titles sit in a fixed-width grid column, not a
   full-bleed hero — sizing them off viewport width (like the rule above)
   blows them up huge on wide screens and wraps them across 6-8 lines
   inside a narrow card. Fixed, container-appropriate size instead. */
.ast-article-post .entry-title,
.ast-article-post .entry-title a {
    font-size: 1.5rem !important;
    line-height: 1.3;
}

h2 {
    margin-bottom: 2rem;
}

/* Force light text on cover block overlays */
.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3,
.wp-block-cover p,
.wp-block-cover .has-text-color {
    color: var(--ivory-bg) !important;
}

/* Abstract Elements */
.premium-gradient {
    background: radial-gradient(circle at top right, rgba(212, 173, 96, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(6, 70, 53, 0.03), transparent);
}

.overlapping-image {
    position: relative;
    z-index: 1;
    margin-bottom: -100px;
}

/* Section Dividers & Flourishes */
.section-divider-gold {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-muted), transparent);
    width: 60%;
    margin: 40px auto;
}

/* Restores flex-justification for core Buttons/Columns blocks whose content was
   imported as already-rendered HTML — WP normally regenerates this per-block via
   an inline <style> at render time from the raw block JSON, which static HTML lacks.
   Same fix applies to any other justification value we run into later. */
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-buttons.is-content-justification-left { justify-content: flex-start; }
.wp-block-buttons.is-content-justification-right { justify-content: flex-end; }

/* Buttons */
.wp-block-button__link {
    background-color: var(--emerald-deep) !important;
    border: 1px solid var(--emerald-deep) !important;
    color: var(--ivory-bg) !important;
    padding: 15px 40px !important;
    font-family: var(--sans-body);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s ease;
    border-radius: var(--btn-radius) !important;
}
.wp-block-button__link:hover {
    background-color: var(--gold-muted) !important;
    border-color: var(--gold-muted) !important;
    color: var(--emerald-deep) !important;
}

/* Button hover for dark sections */
.bg-full-emerald .wp-block-button__link:hover {
    background-color: transparent !important;
    border-color: var(--gold-muted) !important;
    color: var(--gold-muted) !important;
}

/* Hero CTA: emerald-on-emerald had almost no contrast against the dark hero fill.
   Gold fill instead, a touch bigger, nudged down from the lead text. */
.home-hero .wp-block-buttons {
    margin-top: 14px;
}
.home-hero .wp-block-button__link {
    background-color: var(--gold-muted) !important;
    border-color: var(--gold-muted) !important;
    color: var(--emerald-deep) !important;
    padding: 17px 44px !important;
    font-size: 1rem;
}
.home-hero .wp-block-button__link:hover {
    background-color: transparent !important;
    border-color: var(--gold-muted) !important;
    color: var(--gold-muted) !important;
}

/* header and logo refinement */
.site-logo-img img,
.custom-logo,
.ast-logo-svg,
.custom-logo-link img {
    max-height: none !important;
    max-width: none !important;
    height: 68px !important;
    width: auto !important;
    object-fit: contain !important;
}

.main-header-bar {
    padding: 4px 0 !important;
    background-color: #f5f3e6 !important;
    border-bottom: 1px solid rgba(212, 173, 96, 0.15);
}

.ast-primary-header-bar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.ast-site-identity {
    display: flex;
    align-items: center;
}

.ast-site-title-wrap {
    display: none !important;
}

.premium-card {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 173, 96, 0.15) !important;
    padding: 40px !important;
    border-radius: var(--card-radius) !important;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.premium-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(6, 70, 53, 0.1);
    border-color: var(--gold-muted) !important;
}

.premium-card h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.premium-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Swaps the homepage direction-card renders without touching the page content
   (which lives in the DB) — src/alt/dimensions in the markup are untouched,
   only what paints changes. Points at the shared line-art set so the cards
   match the ethics/psychosomatics/books icons instead of the old 3D pieces. */
.home-direction-card img[src*="icon_manual.png"] {
    content: url("assets/icons/glass-gold/manual-correction.webp");
}
.home-direction-card img[src*="icon_psycho.png"] {
    content: url("assets/icons/glass-gold/psychosomatic.webp");
}
.home-direction-card img[src*="icon_energy.png"] {
    content: url("assets/icons/glass-gold/bioenergy.webp");
}

.premium-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Equal Height Alignment */
.wp-block-columns {
    display: flex !important;
}

.wp-block-column {
    display: flex !important;
    flex-direction: column !important;
}

.premium-card-wrapper {
    flex-grow: 1 !important;
    display: flex !important;
}

/* Layout Consistency & Full-Width Backgrounds */
.bg-full-emerald {
    background-color: var(--emerald-deep) !important;
    color: var(--ivory-bg) !important;
}

.bg-full-ivory {
    background-color: var(--ivory-bg) !important;
}

/* Card for Testimonials */
.testimonial-card {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 30px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

/* Layering & Asymmetry */
.has-overlap {
    margin-top: -120px;
    z-index: 10;
    position: relative;
}

.energy-texture {
    opacity: 0.4;
    filter: contrast(110%);
}

/* Background Utilities */
.bg-subtle-ivory {
    background-color: #fdfaf5 !important;
}

.wp-block-group__inner-container {
    position: relative;
    z-index: 1;
}

/* Navigation Menu Polish */
.ast-header-break-point .main-header-bar {
    padding-left: 0;
    padding-right: 0;
}

/* Desktop header layout only.
   These used to be unscoped, so they also hit #ast-hf-mobile-menu: the
   off-canvas menu inherited row-flex + nowrap and rendered as one clipped
   horizontal strip instead of a stacked list. Astra flags the mobile header
   with .ast-header-break-point on <body>, so that is the scope. */
body:not(.ast-header-break-point) .main-navigation {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
}

body:not(.ast-header-break-point) .main-header-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
}

.main-header-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

body:not(.ast-header-break-point) .main-header-menu .menu-item a {
    white-space: nowrap !important;
    padding: 0 1.2em !important;
}

.main-header-menu .menu-item a {
    font-family: var(--sans-body);
    font-weight: 500;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    color: var(--emerald-deep);
    transition: opacity 0.3s ease;
    border-right: none !important;
}

.main-header-menu > .menu-item > a::before {
    content: none !important;
    display: none !important;
}

.main-header-menu .menu-item a:hover {
    opacity: 0.7;
}

/* Brand color unification: Astra's default blue (links, active nav item,
   scroll-to-top button) never got themed — swap it for the site's own
   emerald/gold instead of leaving the default accent showing through. */
.main-header-menu .current-menu-item > a,
.main-header-menu .current_page_item > a,
.main-header-menu .current-menu-ancestor > a,
.main-header-menu .current_page_ancestor > a,
.main-header-menu .current_page_parent > a,
.main-header-menu .current-menu-parent > a,
.main-header-menu .menu-item a[aria-current="page"],
.main-header-menu .menu-item:hover > a,
.main-header-menu .menu-item.focus > a,
.main-header-menu .menu-item.sfHover > a,
.main-header-menu .menu-link:hover,
.main-header-menu .menu-link:focus {
    color: var(--gold-ink) !important;
    border-color: var(--gold-ink) !important;
    opacity: 1 !important;
}

/* Dropdown submenu: Astra's default top accent border is blue too */
.main-header-menu .sub-menu {
    border-top-color: var(--gold-ink) !important;
}

#ast-scroll-top .ast-scroll-top-icon,
.ast-scroll-top-icon {
    background-color: var(--emerald-deep) !important;
}
#ast-scroll-top .ast-scroll-top-icon:hover,
.ast-scroll-top-icon:hover {
    background-color: var(--gold-muted) !important;
}

a,
a:visited {
    color: var(--emerald-deep);
}
a:hover {
    color: var(--gold-ink);
}

.ast-container {
    max-width: 1400px !important;
}

/* ==========================================================================
   HOMEPAGE PREMIUM REDESIGN STYLES & OVERRIDES
   ========================================================================== */

/* Break out of parent Astra containers and eliminate header gaps on homepage */
.home #content,
.home .site-content,
.home #content .ast-container,
.home #primary,
.home #main,
.home .site-main,
.home .entry-content {
    max-width: 100% !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Explicitly override Astra dynamic 1200px breakpoint margins on #primary */
@media (min-width: 1200px) {
    .home.ast-plain-container.ast-no-sidebar #primary,
    .home.ast-plain-container #primary,
    .home #primary,
    .home.ast-no-sidebar #primary,
    .page-template-template-about #primary,
    .page-template-template-methodology #primary,
    .page-template-template-courses #primary,
    .page-template-template-books #primary,
    .page-template-template-reviews #primary,
    .page-template-template-certificates #primary,
    .page-template-template-noncontact #primary,
    .page-template-template-manual-therapy #primary,
    .page-template-template-stretching #primary,
    .page-template-template-psychosomatics #primary {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
    }
}

/* Custom central container for centered sections on homepage */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.home-hero {
    position: relative;
    background: var(--hero-gradient);
    overflow: hidden;
    padding: 160px 0;
    text-align: center;
    color: var(--ivory-bg);
    width: 100%;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 173, 96, 0.12) 0%, transparent 60%);
    animation: rotate-aura 25s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes rotate-aura {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero::before { animation: none; }
}

.home-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.home-hero-content .subtitle {
    font-family: var(--sans-body);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.9rem;
    color: var(--gold-muted);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease both;
}

.home-hero-content h1,
.home-hero-content h2 {
    font-family: var(--serif-header) !important;
    font-size: clamp(2.4rem, 1.6rem + 3vw, 4.5rem);
    line-height: 1.1;
    color: var(--ivory-bg) !important;
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0,0,0,0.25);
    animation: fadeInUp 1.2s ease 0.2s both;
}

.home-hero-content .lead {
    font-family: var(--sans-body);
    font-size: 1.4rem;
    font-style: italic;
    color: #e2e8f0;
    margin-bottom: 40px;
    font-weight: 300;
    animation: fadeInUp 1.2s ease 0.4s both;
}

.home-hero-content .wp-block-button__link {
    animation: fadeInUp 1.2s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphism Section */
.home-intro-section {
    padding: 100px 0;
    background-color: var(--ivory-bg);
}

.home-intro-grid {
    display: flex;
    align-items: stretch;
    gap: 50px;
    width: 100%;
}

.home-intro-image-col {
    flex: 1;
    max-width: 50%;
    display: flex;
}

.hero-candidate-static {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    background: var(--ivory-bg);
}

.home-intro-image-col img {
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    display: block;
}

.home-intro-text-col {
    flex: 1;
    max-width: 50%;
    display: flex;
}

@media (max-width: 991px) {
    .home-intro-grid {
        flex-direction: column;
        gap: 40px;
    }
    .home-intro-image-col,
    .home-intro-text-col {
        max-width: 100%;
    }
    .home-intro-image-col img {
        height: auto;
    }
    .hero-candidate-static {
        height: auto;
    }
    .home-glass-card {
        height: auto !important;
    }
}

.home-glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 173, 96, 0.15) !important;
    padding: 50px !important;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) !important;

    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.home-glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(6, 70, 53, 0.08);
    border-color: var(--gold-muted) !important;
}

.home-glass-card h2 {
    font-size: 2.8rem;
    margin-bottom: 25px;
    color: var(--emerald-deep);
}

.home-glass-card p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--graphite-text);
    margin-bottom: 20px;
}

.home-glass-card p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--emerald-deep);
}

/* Directions Section */
.home-directions-section {
    padding: 120px 0;
    background: radial-gradient(circle at top right, rgba(212, 173, 96, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(6, 70, 53, 0.03), transparent);
    background-color: var(--surface-sage);
}

.home-directions-section h2 {
    text-align: center;
    font-size: 3.2rem;
    color: var(--emerald-deep);
    margin-bottom: 80px;
}

/* !important + two-class selector: content was imported as rendered HTML, so the
   per-column flex-basis WP normally generates from raw block width attributes is
   missing, and the theme's own blanket ".wp-block-columns{display:flex!important}"
   rule (below) otherwise wins over a plain grid rule and collapses these to 1 column. */
.wp-block-columns.home-directions-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px;
}

@media (max-width: 991px) {
    .wp-block-columns.home-directions-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Premium Card Overrides for Homepage */
.home-direction-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 173, 96, 0.15) !important;
    border-radius: var(--card-radius) !important;
    padding: 40px !important;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-direction-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(6, 70, 53, 0.08);
    border-color: var(--gold-muted) !important;
}

.home-direction-card .icon-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(6, 70, 53, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.home-direction-card:hover .icon-wrapper {
    background: rgba(214, 173, 96, 0.15);
}

.home-direction-card h3 {
    font-size: 1.8rem;
    color: var(--emerald-deep);
    margin-bottom: 15px;
}

.home-direction-card p {
    font-size: 1.05rem;
    color: var(--graphite-text);
    line-height: 1.65;
}

/* Spaces of Transformation (Testimonials) */
.home-spaces-section {
    position: relative;
    overflow: hidden;
    padding: clamp(88px, 9vw, 132px) 24px;
    background:
        radial-gradient(circle at 82% 22%, rgba(212, 173, 96, 0.11), transparent 26%),
        linear-gradient(115deg, rgba(6, 70, 53, 0.025), transparent 52%),
        var(--ivory-bg);
}

.home-spaces-section h2 {
    width: min(1160px, 100%);
    margin: 0 auto clamp(48px, 6vw, 72px);
    text-align: left;
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 0.98;
    color: var(--emerald-deep);
}

.wp-block-columns.home-spaces-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr) !important;
    grid-template-rows: repeat(2, minmax(170px, auto));
    gap: 0 !important;
    width: min(1160px, 100%);
    margin-inline: auto !important;
    border-top: 1px solid rgba(6, 70, 53, 0.14);
    border-bottom: 1px solid rgba(6, 70, 53, 0.14);
}

.home-spaces-grid > .wp-block-column {
    display: flex;
    margin: 0 !important;
}

.home-spaces-grid > .wp-block-column:first-child {
    grid-row: 1 / 3;
}

.home-testimonial-card {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: clamp(30px, 4vw, 52px) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: relative;
    transition: none !important;
    width: 100%;
    height: 100%;
}

.home-spaces-grid > .wp-block-column:first-child .home-testimonial-card {
    min-height: 410px;
    padding: clamp(42px, 5vw, 72px) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 48%),
        var(--emerald-deep) !important;
}

.home-spaces-grid > .wp-block-column:nth-child(2) .home-testimonial-card,
.home-spaces-grid > .wp-block-column:nth-child(3) .home-testimonial-card {
    border-left: 1px solid rgba(6, 70, 53, 0.14) !important;
}

.home-spaces-grid > .wp-block-column:nth-child(2) .home-testimonial-card {
    border-bottom: 1px solid rgba(6, 70, 53, 0.14) !important;
}

.home-testimonial-card .quote-icon {
    /* the quoted text already carries its own "…" — this decorative mark on top
       of it was doubling up and reading as misaligned/broken quotes. */
    display: none;
}

.home-testimonial-card p {
    max-width: 32ch;
    margin: 0 !important;
    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
    font-style: italic;
    line-height: 1.65;
    color: var(--graphite-text);
    position: relative;
    z-index: 2;
}

.home-spaces-grid > .wp-block-column:first-child .home-testimonial-card p {
    max-width: 24ch;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2rem, 3.2vw, 3.25rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1.12;
    color: var(--ivory-bg);
}

@media (max-width: 991px) {
    .wp-block-columns.home-spaces-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }

    .home-spaces-grid > .wp-block-column:first-child {
        grid-row: auto;
    }

    .home-spaces-grid > .wp-block-column:first-child .home-testimonial-card {
        min-height: 330px;
    }

    .home-spaces-grid > .wp-block-column:nth-child(2) .home-testimonial-card,
    .home-spaces-grid > .wp-block-column:nth-child(3) .home-testimonial-card {
        min-height: 180px;
        border-left: 0 !important;
        border-top: 1px solid rgba(6, 70, 53, 0.14) !important;
    }

    .home-spaces-grid > .wp-block-column:nth-child(2) .home-testimonial-card {
        border-bottom: 0 !important;
    }
}

/* Hide Post Author completely in posts & archives */
.entry-meta .posted-by,
.entry-meta .author,
.entry-meta .author-name,
.ast-author-avatar,
.author-box,
.ast-author-box,
.ast-single-author-box {
    display: none !important;
}

/* ==========================================================================
   BLOG ARCHIVE & POST LIST FEATURED IMAGE PROPORTIONS
   ========================================================================== */

/* Fixed 16:9 crop instead of letterboxing each source image at its native
   ratio — the covers come from unrelated sources (poster, diagram, photo)
   so a shared aspect ratio + cover-crop is what makes the row read as one
   set instead of three different shapes. */
.ast-article-post .ast-blog-featured-section,
.ast-article-post .post-thumb-img-content {
    display: block !important;
    aspect-ratio: 16 / 9;
    width: 100%;
    background: rgba(6, 70, 53, 0.04);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5em;
    position: relative;
}

.ast-article-post .post-thumb-img-content a {
    display: block !important;
    width: 100%;
    height: 100%;
}

.ast-article-post .post-thumb-img-content img,
.ast-article-post .ast-blog-featured-section img,
.blog .ast-article-post .wp-post-image,
.archive .ast-article-post .wp-post-image,
.search .ast-article-post .wp-post-image {
    aspect-ratio: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0;
    transition: transform 0.4s ease;
}

.ast-article-post:hover .post-thumb-img-content img {
    transform: scale(1.05);
}

/* Category badge + date: Astra's defaults render as plain gray-blue text,
   out of step with the rest of the brand palette. */
.ast-article-post .ast-taxonomy-container,
.ast-article-post .ast-taxonomy-container a {
    color: var(--gold-ink) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 600;
}

.ast-article-post .posted-on,
.ast-article-post .posted-on .published {
    color: var(--emerald-deep) !important;
    opacity: 0.75;
    font-size: 0.9rem;
}

/* Equal-height cards in the blog grid */
.blog .ast-article-post,
.archive .ast-article-post {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
}

@media (max-width: 768px) {
    .ast-article-post .ast-blog-featured-section,
    .ast-article-post .post-thumb-img-content {
        aspect-ratio: 16 / 9;
    }
}


/* ==========================================================================
   FOOTER CONTACT ROW
   Rendered by astra_child_render_custom_footer_copyright() in functions.php.
   Lives here, not in contacts.css, because the footer is sitewide while that
   stylesheet only loads on /kontakty/.
   ========================================================================== */

.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 26px;
    margin-bottom: 18px;
}

.footer-contacts a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--emerald-deep);
    text-decoration: none;
    /* Mail address must wrap inside the row on narrow screens, not widen it. */
    overflow-wrap: anywhere;
}

.footer-contacts-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.85;
}

.footer-contacts a:hover,
.footer-contacts a:focus-visible {
    color: var(--gold-ink);
}

.footer-contacts a:hover .footer-contacts-icon,
.footer-contacts a:focus-visible .footer-contacts-icon {
    opacity: 1;
}

/* ==========================================================================
   MOBILE OFF-CANVAS MENU
   Astra stacks the mobile menu itself; this only restores what the desktop
   header rules above were overriding, and gives the items a usable tap area.
   ========================================================================== */

.ast-header-break-point #ast-hf-mobile-menu .main-header-menu {
    display: block;
    width: 100%;
}

.ast-header-break-point #ast-hf-mobile-menu .main-header-menu > li {
    display: block;
    width: 100%;
}

.ast-header-break-point #ast-hf-mobile-menu .main-header-menu .menu-item a {
    display: block;
    white-space: normal;
    padding: 14px 20px;
    /* 0.95rem is a desktop nav size; the off-canvas list is the primary
       navigation on a phone and reads too small at that scale. */
    font-size: 1.05rem;
}

.ast-header-break-point #ast-hf-mobile-menu .main-header-menu .sub-menu .menu-item a {
    padding-left: 36px;
    font-size: 1rem;
    opacity: 0.85;
}

/* ==========================================================================
   REDUCED MOTION
   The rotating hero aura was already guarded, but the entrance animations on
   the hero heading, subtitle, lead and button were not — those are exactly
   the large-area movement prefers-reduced-motion is meant to suppress. The
   elements must be pinned to their end state, otherwise dropping the
   animation leaves the "both" fill's start values applied.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .home-hero-content .subtitle,
    .home-hero-content h1,
    .home-hero-content h2,
    .home-hero-content .lead,
    .home-hero-content .wp-block-button__link {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
