/* Methodology Page Styles */

.methodology-hero {
    min-height: 480px;
    background: var(--ivory-bg);
    text-align: right;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    padding: 0;
}

.methodology-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 45%, transparent 100%);
    z-index: 0;
}

/* Variant 2: use the same emerald, type-led hero language as Psychosomatics.
   The stored cover image stays in WordPress but is deliberately hidden. */
html[data-design="2"] .methodology-hero {
    isolation: isolate;
    align-items: center;
    justify-content: center;
    min-height: 440px !important;
    padding: clamp(58px, 5vw, 72px) 24px !important;
    aspect-ratio: auto !important;
    background:
        radial-gradient(circle at 50% 46%, rgba(212, 173, 96, 0.15), transparent 48%),
        linear-gradient(135deg, #04362a 0%, #064635 58%, #0b5944 100%) !important;
    text-align: center;
}

html[data-design="2"] .methodology-hero .wp-block-cover__image-background {
    display: none;
}

html[data-design="2"] .methodology-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto -120px -200px auto !important;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(212, 173, 96, 0.24);
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 0 46px rgba(212, 173, 96, 0.055), 0 0 0 92px rgba(212, 173, 96, 0.035);
    pointer-events: none;
}

html[data-design="2"] .methodology-hero .wp-block-cover__inner-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

html[data-design="2"] .methodology-hero .methodology-hero-content {
    align-items: center;
    width: min(920px, 100%);
    max-width: 920px !important;
    margin: 0 auto !important;
    padding: 0;
    text-align: center;
}

html[data-design="2"] .methodology-hero-content .subtitle {
    margin: 0 0 20px !important;
    color: var(--gold-muted) !important;
    font-size: clamp(0.82rem, 0.7rem + 0.28vw, 1rem) !important;
    font-weight: 600;
    font-style: normal;
    line-height: 1.2 !important;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

html[data-design="2"] .methodology-hero-content h2 {
    max-width: 880px;
    margin: 0 auto !important;
    color: var(--ivory-bg) !important;
    font-size: clamp(3rem, 5vw, 5rem) !important;
    font-weight: 500 !important;
    line-height: 0.95 !important;
    letter-spacing: -0.035em;
    text-shadow: 0 4px 28px rgba(0, 24, 17, 0.28);
}

html[data-design="2"] .methodology-hero__summary {
    max-width: 720px;
    margin: 26px auto 0 !important;
    color: #dce7df !important;
    font-size: clamp(1rem, 1.2vw, 1.15rem) !important;
    font-weight: 500;
    line-height: 1.62 !important;
}

html[data-design="2"] .methodology-hero .section-divider-gold {
    display: none !important;
}

@media (max-width: 900px) {
    html[data-design="2"] .methodology-hero {
        min-height: 420px !important;
        padding-block: 56px !important;
        padding-inline: 22px !important;
    }

    html[data-design="2"] .methodology-hero-content h2 {
        max-width: 11ch;
        font-size: clamp(2.8rem, 11vw, 4.4rem) !important;
        line-height: 0.98 !important;
    }

    html[data-design="2"] .methodology-hero__summary {
        max-width: 34ch;
        margin-top: 22px !important;
    }

    html[data-design="2"] .methodology-hero::before {
        right: -260px;
        bottom: -260px;
    }
}

.methodology-hero .ast-container {
    position: relative;
    z-index: 1;
    padding-top: 56px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.methodology-hero-content {
    max-width: 520px;
}

.methodology-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    line-height: 1.15;
}

.methodology-intro {
    padding: clamp(76px, 8vw, 112px) 24px;
    background: white;
}

.methodology-intro .ast-container {
    display: flex;
    flex-direction: column;
    gap: clamp(36px, 4vw, 52px);
    align-items: center;
    max-width: 1080px;
    padding-inline: 0;
}

.intro-text {
    text-align: center;
    max-width: 1040px;
}

.intro-text .lead-text {
    font-size: clamp(1.25rem, 1.05rem + 0.55vw, 1.55rem) !important;
    color: var(--emerald-deep);
    margin-bottom: 25px;
    line-height: 1.68 !important;
}

.intro-text p:not(.lead-text) {
    max-width: 940px;
    margin-inline: auto;
    font-size: clamp(1.1rem, 1.02rem + 0.25vw, 1.25rem) !important;
    color: #4a4a4a;
    line-height: 1.72 !important;
}

.intro-callout {
    isolation: isolate;
    overflow: hidden;
    width: min(960px, 100%);
    background: radial-gradient(circle at 8% 18%, rgba(212, 173, 96, 0.14), transparent 28%), rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(212, 173, 96, 0.34);
    border-left: 4px solid var(--gold-muted);
    padding: clamp(34px, 4vw, 46px) clamp(28px, 5vw, 56px) clamp(34px, 4vw, 46px) clamp(112px, 12vw, 142px);
    border-radius: 24px;
    text-align: left;
    position: relative;
    box-shadow: 0 20px 48px rgba(42, 19, 69, 0.08);
}

.intro-callout::before {
    content: '';
    position: absolute;
    top: 50%;
    left: clamp(26px, 4vw, 44px);
    width: clamp(70px, 8vw, 88px);
    height: clamp(70px, 8vw, 88px);
    background: url('assets/icons/glass-gold/timer-clock.webp') center / contain no-repeat;
    transform: translateY(-50%);
    filter: drop-shadow(0 8px 16px rgba(42, 19, 69, 0.12));
}

.intro-callout p {
    margin: 0;
    font-style: normal;
    color: var(--emerald-deep);
    font-size: clamp(1.12rem, 1.03rem + 0.28vw, 1.3rem) !important;
    line-height: 1.68 !important;
}

.intro-callout__lead {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--emerald-deep);
    font-weight: 700;
}

@media (max-width: 620px) {
    .methodology-intro {
        padding-inline: 18px;
    }

    .intro-callout {
        padding: 98px 26px 30px;
        border-left-width: 1px;
        border-top: 4px solid var(--gold-muted);
        border-radius: 20px;
    }

    .intro-callout::before {
        top: 22px;
        left: 24px;
        width: 62px;
        height: 62px;
        transform: none;
    }
}

.directions-section {
    position: relative;
    overflow: hidden;
    padding: clamp(88px, 8vw, 124px) 24px;
    background:
        radial-gradient(circle at 8% 14%, rgba(212, 173, 96, 0.1), transparent 25%),
        linear-gradient(rgba(6, 70, 53, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 70, 53, 0.035) 1px, transparent 1px),
        var(--ivory-bg);
    background-size: auto, 64px 64px, 64px 64px, auto;
    color: #30433d;
    border-block: 1px solid rgba(212, 173, 96, 0.2);
}

/* Override Astra's flex container so elements stack vertically */
.directions-section .ast-container {
    display: block;
    position: relative;
    z-index: 1;
    max-width: 1220px;
}

.directions-section h2 {
    color: var(--emerald-deep);
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    line-height: 0.98;
}

.directions-section .ast-container > p {
    color: #52635d;
    font-size: 1.08rem;
    line-height: 1.7;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    counter-reset: direction-card;
}

.direction-card {
    counter-increment: direction-card;
    min-height: 224px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(6, 70, 53, 0.12);
    padding: 28px 26px 30px;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(6, 70, 53, 0.055);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.direction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold-muted), rgba(212, 173, 96, 0.12));
}

.direction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(6, 70, 53, 0.1);
    border-color: rgba(212, 173, 96, 0.55);
}

.direction-icon {
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    width: 100%;
    min-height: 32px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(212, 173, 96, 0.35);
}

.direction-icon img {
    display: none !important;
}

.direction-icon::before {
    content: counter(direction-card, decimal-leading-zero);
    color: var(--gold-muted);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.05em;
}

.direction-card p {
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0;
    color: #30433d;
}

@media (max-width: 1100px) {
    .directions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .direction-card {
        min-height: 200px;
    }
}

@media (max-width: 620px) {
    .directions-section {
        padding-inline: 18px;
    }

    .directions-grid {
        grid-template-columns: 1fr;
    }

    .direction-card {
        min-height: 0;
    }
}

.founders-section {
    padding: clamp(84px, 8vw, 120px) 24px;
    background: var(--ivory-bg);
}

/* Override Astra's flex container so founders stack vertically */
.founders-section .ast-container {
    display: block;
    max-width: 1240px;
    padding-inline: 0;
}

.founder-block {
    background: white;
    border-radius: 20px;
    padding: clamp(34px, 4vw, 54px);
    margin-bottom: 60px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.08);
    display: flex;
    gap: clamp(38px, 5vw, 64px);
    align-items: flex-start;
    border: 1px solid rgba(212, 173, 96, 0.1);
}

.founder-block:nth-child(even) {
    flex-direction: row-reverse;
}

.founder-image-container {
    flex: 0 0 clamp(280px, 25vw, 320px);
    max-width: 320px;
    position: relative;
}

.founder-image-container::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--gold-muted);
    border-radius: 15px;
    z-index: 0;
}

.founder-image {
    width: 100%;
    border-radius: 15px;
    position: relative;
    z-index: 1;
    filter: sepia(0.2) contrast(1.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.founder-image[alt*="Березовський"] {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 36%;
}

.founder-content {
    flex: 1;
    min-width: 0;
}

.founder-block h3 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--emerald-deep);
}

.founder-dates {
    color: var(--gold-muted);
    font-style: italic;
    margin-bottom: 30px;
    display: block;
    font-size: 1.1rem;
}

.founder-content p {
    margin-bottom: 1.2em;
    color: #31473f;
    font-size: clamp(1.08rem, 1.01rem + 0.24vw, 1.22rem) !important;
    line-height: 1.78 !important;
    text-wrap: pretty;
}

.publications-list, .scientific-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 20px;
}

.publications-list li, .scientific-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    color: #31473f;
    font-size: clamp(1.04rem, 1rem + 0.18vw, 1.15rem) !important;
    line-height: 1.68 !important;
}

.publications-list li::before, .scientific-list li::before {
    content: '▪';
    color: var(--gold-muted);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
}

.poem-block {
    position: relative;
    overflow: hidden;
    max-width: 760px;
    background: var(--ivory-bg);
    padding: clamp(38px, 5vw, 58px);
    border-radius: 22px;
    border: 1px solid rgba(212, 173, 96, 0.28);
    border-left: 4px solid var(--gold-muted);
    margin: 46px auto 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.2rem, 1.08rem + 0.38vw, 1.42rem) !important;
    font-style: normal;
    line-height: 1.62;
    box-shadow: 0 18px 44px rgba(42, 19, 69, 0.08);
}

.poem-block::before {
    content: "“";
    position: absolute;
    top: -26px;
    right: 24px;
    color: rgba(212, 173, 96, 0.2);
    font-family: Georgia, serif;
    font-size: 9rem;
    line-height: 1;
    pointer-events: none;
}

.poem-title {
    display: block;
    margin-bottom: 8px;
    color: var(--emerald-deep);
    font-family: var(--sans-body);
    font-size: clamp(1.35rem, 1.12rem + 0.58vw, 1.72rem);
    font-weight: 700;
    line-height: 1.35;
}

.founder-content p:has(.poem-title) {
    max-width: 760px;
    margin: 46px auto 18px;
    text-align: center;
}

.poem-dedication {
    display: block;
    margin-bottom: 28px;
    color: #745792;
    font-family: var(--sans-body);
    font-size: clamp(0.95rem, 0.9rem + 0.18vw, 1.05rem);
    font-style: italic;
    font-weight: 600;
    line-height: 1.5;
}

.poem-line {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    display: block;
    text-wrap: pretty;
}

.intro-callout__notice {
    display: block;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(212, 173, 96, 0.45);
    color: #4b5d57;
    font-size: 0.88em;
    line-height: 1.62;
}

@media (max-width: 1100px) {
    .founder-image-container {
        flex: 0 0 220px;
        max-width: 220px;
    }
    .founder-block {
        gap: 30px;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .methodology-hero {
        min-height: 340px;
    }
    .methodology-hero h1 {
        font-size: 2.2rem;
    }
    .founder-block {
        flex-direction: column !important;
        padding: 30px;
        gap: 30px;
    }
    .founder-image-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .founder-block h3 {
        font-size: 1.8rem;
    }
}
