/* ============================================
   MILESTONES & RECOGNITION SECTION
   ============================================ */
.milestones-section {
    background: var(--background);
    position: relative;
    padding: 80px 0;
    z-index: 2;
}

.about-subsection-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--heading);
    font-weight: 700;
    margin: 4rem 0 0.5rem;
}

.milestones-section .about-subsection-title:first-child {
    margin-top: 0;
}

.about-subsection-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.about-subsection-subtitle strong {
    color: var(--heading);
}

/* Counter cards, restyled to match the Why Choose Astegni feature cards -
   same theme-aware colors and size, no separate wrapper panel. */
.milestones-section .counter-grid-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: none;
}

.milestones-section .counter-flip-card {
    height: 320px;
}

.milestones-section .counter-flip-front,
.milestones-section .counter-flip-back {
    background: var(--card-bg);
    border: 1px solid rgba(var(--border-rgb), 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 2rem;
}

.milestones-section .counter-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.milestones-section .counter-number,
.milestones-section .counter-number-back {
    color: var(--heading);
    text-shadow: none;
}

.milestones-section .counter-label {
    color: var(--text-muted);
    text-shadow: none;
}

/* The awards block's heading is the first thing in its own wrapper, so the
   rule above would pull it up against the counters; keep the gap while the
   counters are showing. */
.milestones-section .counters-block:not([hidden]) + .awards-block > .about-subsection-title:first-child {
    margin-top: 4rem;
}

.milestones-section .counters-block[hidden],
.milestones-section .awards-block[hidden] {
    display: none;
}

/* Featured counters are paired onto flip cards; an odd one out gets a card of
   its own, which must not flip onto an empty back. */
.milestones-section .counter-flip-card.counter-single .counter-flip-inner {
    animation: none;
    transform: none !important;
}

.milestones-section .counter-flip-card.counter-single {
    cursor: default;
}

/* Fewer than four cards: centred, at the width they have with four, rather
   than leaving empty columns on the right. */
.milestones-section .counter-grid.counter-grid--1 {
    grid-template-columns: minmax(0, 320px) !important;
    justify-content: center;
}

.milestones-section .counter-grid.counter-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 320px)) !important;
    justify-content: center;
}

@media (min-width: 1024px) {
    .milestones-section .counter-grid.counter-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 320px)) !important;
        justify-content: center;
    }
}

/* Featured milestones, under the counters: a row of dated items, each an icon
   and a line of what happened. Drawn by about-section.js from Site Content. */
.milestones-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 2.5rem auto 0;
}

.milestones-timeline[hidden],
.awards-grid[hidden] {
    display: none;
}

.milestone-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid rgba(var(--border-rgb), 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 16px;
}

.milestone-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.milestone-body h4 {
    margin: 0 0 0.25rem;
    color: var(--heading);
    font-weight: 700;
}

.milestone-body p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.milestone-body .milestone-date {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

/* Featured awards: cards in the placeholder's place. */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.award-card {
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid rgba(var(--border-rgb), 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.award-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* An award's picture, in place of the icon: a logo or a certificate, shown
   whole (contain), never cropped. */
.award-image {
    display: block;
    width: 100%;
    max-width: 200px;
    height: 120px;
    margin: 0 auto 1rem;
    object-fit: contain;
    border-radius: 12px;
}

.award-card h4 {
    margin: 0 0 0.35rem;
    color: var(--heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.award-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.award-card .award-byline {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
