/* ==========================================================================
   Histoire Page – Grid-based magazine layout
   Adapted from temp/histoire design, using landing.css variables
   ========================================================================== */

/* ---------- Page wrapper ---------- */
.hist {
    padding: clamp(40px, 5vw, 80px) 0;
}

.hist__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Intro ---------- */
.hist__intro {
    text-align: center;
    margin-bottom: clamp(40px, 5vw, 60px);
}

.hist__intro-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.hist__intro-label i {
    font-size: 16px;
}

.hist__intro-title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 2.5vw, 40px);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 16px;
}

.hist__intro-title span {
    color: var(--orange);
}

.hist__intro-text {
    font-size: clamp(14px, 1vw, 17px);
    color: var(--body-text);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ---------- Sections ---------- */
.hist__section {
    margin-bottom: clamp(36px, 4vw, 56px);
}

.hist__section:last-child {
    margin-bottom: 0;
}

/* ---------- Date heading ---------- */
.hist__date {
    font-family: var(--font-heading);
    font-size: clamp(18px, 1.4vw, 24px);
    font-weight: 700;
    color: var(--orange);
    margin-bottom: clamp(18px, 2vw, 28px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--orange-light);
}

.hist__date i {
    font-size: 0.85em;
    color: var(--teal);
}

/* ---------- Grid base ---------- */
.hist__grid {
    display: grid;
    gap: 1.25rem;
}

/* Grid: media (image + text side by side) */
.hist__grid--media {
    grid-template-columns: 1fr;
}

@media screen and (min-width: 700px) {
    .hist__grid--media {
        grid-template-columns: 2fr 3fr;
        align-items: start;
    }
}

/* Grid: single card full width */
.hist__grid--single {
    grid-template-columns: 1fr;
}

/* Grid: objectives (2x2 on desktop) */
.hist__grid--objectives {
    grid-template-columns: 1fr;
}

@media screen and (min-width: 600px) {
    .hist__grid--objectives {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Cards ---------- */
.hist__card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: clamp(20px, 2.5vw, 32px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hist__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.hist__card-title {
    font-family: var(--font-heading);
    font-size: clamp(17px, 1.2vw, 21px);
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 14px;
}

.hist__card-text {
    font-size: clamp(14px, 0.92vw, 16px);
    color: var(--body-text);
    line-height: 1.8;
    margin: 0 0 10px;
}

.hist__card-text:last-child {
    margin-bottom: 0;
}

/* Featured card (image only) */
.hist__card--featured {
    padding: 0;
    overflow: hidden;
}

.hist__card--featured img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
}

/* Highlight card (accented) */
.hist__card--highlight {
    border-left: 4px solid var(--orange);
    background: linear-gradient(135deg, var(--white) 0%, rgba(235, 83, 16, 0.03) 100%);
}

.hist__card--highlight .hist__card-title {
    color: var(--orange);
}

/* ---------- Objective cards ---------- */
.hist__card--objective {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: clamp(18px, 2vw, 26px);
    border-left: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hist__card--objective:hover {
    border-left-color: var(--teal);
}

.hist__obj-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    background: var(--teal-light);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hist__card--objective .hist__card-text {
    margin: 0;
}

/* ---------- Scroll reveal (uses base.html.twig IntersectionObserver) ---------- */
.hist__section.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hist__section.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the sections */
.hist__section:nth-child(2).animate-on-scroll { transition-delay: 0s; }
.hist__section:nth-child(3).animate-on-scroll { transition-delay: 0.1s; }
.hist__section:nth-child(4).animate-on-scroll { transition-delay: 0.15s; }
.hist__section:nth-child(5).animate-on-scroll { transition-delay: 0.2s; }
.hist__section:nth-child(6).animate-on-scroll { transition-delay: 0.25s; }

/* ---------- Mobile ---------- */
@media screen and (max-width: 599px) {
    .hist__card--featured img {
        min-height: 200px;
    }

    .hist__card--objective {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
