/* Certification accelerators page (aesthetic finding 10).
   Loaded after css/style.css. Before this file the page's own classes had no
   rules, and two shared rules fought it: .testimonial-content gave the student
   quotes white text (invisible on white cards) and .certification-info gave
   the details block a full-width gradient band. Cards follow the .service-card
   pattern (css/style.css 958 to 1114): radius, shadow, border, centred h3,
   tick lists, button pinned to the bottom. Prices keep every figure and the
   "Book 2+ weeks ahead" condition word for word; the early bird is a
   conditional offer, so nothing is struck through. No new orange text. */

/* ---------- Section rhythm ---------- */
.certification-hero,
.course-overview,
.course-formats,
.curriculum-overview,
.instructor-profile,
.student-testimonials,
.certification-details,
.upcoming-dates,
.final-cta {
    padding: 3rem 0;
}

.course-formats,
.instructor-profile,
.certification-details {
    background: var(--bg-secondary);
}

.course-overview h2,
.course-formats h2,
.curriculum-overview h2,
.instructor-profile h2,
.student-testimonials h2,
.certification-details h2,
.upcoming-dates h2 {
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--text-primary);
}

/* Reading width for running text. */
.overview-text p,
.instructor-bio p,
.certification-info p,
.custom-dates p {
    max-width: 70ch;
}

/* ---------- Shared card ---------- */
.stat-item,
.overview-benefits,
.format-card,
.module-card,
.testimonial-card,
.date-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    padding: 2rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

/* Cards on the grey sections are white. */
.format-card,
.instructor-content,
.certification-content {
    background: #ffffff;
}

.format-header h3,
.module-header h3,
.date-header h3,
.overview-benefits h3,
.instructor-details h3,
.certification-info h3 {
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.format-header h3,
.module-header h3,
.date-header h3 {
    font-size: 1.35rem;
    text-align: center;
}

.format-card h4,
.instructor-credentials h4,
.certification-benefits h4 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Small pills: duration, spaces, hours. */
.format-duration,
.module-duration,
.date-availability {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
}

.format-header,
.module-header,
.date-header {
    margin-bottom: 1rem;
    text-align: center;
}

/* ---------- Tick lists (the li::before pattern from .service-features) ---------- */
.overview-benefits ul,
.format-details ul,
.module-content ul,
.certification-benefits ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.overview-benefits li,
.format-details li,
.module-content li,
.certification-benefits li {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.6rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.overview-benefits li::before,
.format-details li::before,
.module-content li::before,
.certification-benefits li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-primary-dark);
    font-weight: var(--font-weight-bold);
}

.overview-benefits li strong,
.format-schedule li strong {
    color: var(--text-primary);
}

/* Emoji lists already carry their own marker. */
.instructor-credentials ul,
.certification-info > ul,
.format-schedule ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.instructor-credentials li,
.certification-info > ul li,
.format-schedule li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- Hero ---------- */
.certification-hero {
    background: var(--bg-secondary);
    padding-bottom: 3.5rem;
}

.certification-hero .hero-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.certification-hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 1.2rem + 3vw, 3rem);
    color: var(--text-primary);
    overflow-wrap: break-word;
    text-wrap: balance;
}

.hero-subtitle {
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* style.css makes the highlight pills translucent white for an orange hero; here they sit on light grey. */
/* Three pills side by side on desktop. */
.certification-hero .hero-highlights {
    gap: 1rem;
}

.certification-hero .highlight-item {
    padding: 0.65rem 1.1rem;
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.certification-hero .highlight-item strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.certification-hero .hero-actions {
    margin-top: 0.5rem;
}

/* Image at container width: it was 1200px wide inside a 1168px content box. */
.hero-image {
    margin-top: 2.5rem;
}

.hero-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center 35%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* ---------- Overview and stats ---------- */
.overview-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

.overview-text p {
    margin-bottom: 1rem;
}

.overview-stats {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-item {
    align-items: center;
    padding: 1.5rem 1rem;
    text-align: center;
}

/* The figure: a big ink number. */
.stat-item h3 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-item p {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.overview-benefits h3 {
    font-size: 1.35rem;
}

/* ---------- Formats ---------- */
.formats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}

.format-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.format-content > p {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.format-details {
    margin-bottom: 1.5rem;
}

/* Pricing block pinned above the button. */
.format-pricing {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--neutral-200);
    text-align: center;
}

.price-main {
    font-size: 2.25rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    color: var(--text-primary);
}

.price-unit {
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    color: var(--text-light);
}

/* Secondary lines: labelled, ink text, a tint behind them. */
.price-early,
.price-education {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.price-early {
    background: rgba(248, 149, 33, 0.16);
}

.price-education {
    background: var(--bg-tertiary);
}

.price-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.format-card > .btn-primary {
    align-self: stretch;
    margin-top: 1.5rem;
}

/* Featured card and its badge (ink on light orange, never white on orange). */
.format-card.featured {
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
}

/* ---------- Curriculum ---------- */
.curriculum-modules {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.module-card.certification-module {
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
}

/* ---------- Instructor ---------- */
.instructor-content,
.certification-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 2rem 1.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.instructor-image {
    max-width: 320px;
    margin: 0 auto;
}

.instructor-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-lg);
}

.instructor-title {
    margin-bottom: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
}

.instructor-bio {
    margin-bottom: 0.5rem;
}

.instructor-quote {
    margin-top: 1.5rem;
}

.instructor-quote blockquote {
    margin: 0;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.6;
}

/* ---------- Testimonials ---------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.testimonial-content {
    flex: 1;
}

/* style.css 2152 writes these for a dark band: white text, invisible on a light card. */
.testimonial-card .testimonial-content blockquote {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.testimonial-card .testimonial-content cite {
    color: var(--text-secondary);
    font-style: normal;
}

.testimonial-details {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--neutral-200);
}

.testimonial-details p {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.testimonial-details strong {
    color: var(--text-primary);
}

/* ---------- Certification details ---------- */
.certification-content {
    align-items: center;
}

/* style.css 1155 turns .certification-info into a full-width gradient band. */
.certification-details .certification-info {
    padding: 0;
    background: none;
    text-align: left;
}

.certification-info p {
    margin-bottom: 1rem;
}

.certification-benefits {
    margin-top: 1.5rem;
}

/* The file is 2048 x 2048. A fixed ratio gives the box a height before the lazy image loads. */
.certification-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

/* ---------- Upcoming dates ---------- */
.dates-calendar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.date-details {
    flex: 1;
    margin-bottom: 1.5rem;
}

.date-details p {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.date-details strong {
    color: var(--text-primary);
}

.date-card > .btn-primary {
    align-self: stretch;
}

.custom-dates {
    max-width: 640px;
    margin: 2.5rem auto 0;
    padding: 2rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    text-align: center;
}

.custom-dates h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.custom-dates p {
    margin: 0 auto 1.25rem;
}

/* ---------- Final call to action ---------- */
/* The container becomes the dark panel; width matches the other sections' content. */
.final-cta .container {
    width: calc(100% - 2rem);
    max-width: calc(var(--container-max-width) - 2rem);
    padding: 3rem 1.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-xl);
    text-align: center;
}

.final-cta h2 {
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.final-cta p {
    max-width: 60ch;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
}

.final-cta .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* The shared secondary button is orange text on white; on the dark panel make it a ghost. */
.final-cta .btn-secondary {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}

.final-cta .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: #ffffff !important;
}

.cta-guarantee {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-guarantee p strong {
    color: #ffffff;
}

/* ---------- Phones ---------- */
@media (max-width: 479px) {
    .final-cta .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .final-cta .cta-buttons .btn-primary,
    .final-cta .cta-buttons .btn-secondary {
        width: 100%;
    }

    .final-cta .container {
        padding: 2.25rem 1.25rem;
    }
}

/* ---------- 600px: stats in a row, two-up grids ---------- */
@media (min-width: 600px) {
    .overview-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .curriculum-modules,
    .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Room for two title lines so the duration pills line up across a row. */
    .module-header h3 {
        min-height: 2.6em;
    }
}

@media (min-width: 768px) {
    .certification-hero,
    .course-overview,
    .course-formats,
    .curriculum-overview,
    .instructor-profile,
    .student-testimonials,
    .certification-details,
    .upcoming-dates,
    .final-cta {
        padding: 4rem 0;
    }

    .certification-hero {
        padding-bottom: 4.5rem;
    }

    .instructor-content,
    .certification-content {
        padding: 2.5rem;
    }
}

/* ---------- 900px: three formats and three dates across, instructor beside the text ---------- */
@media (min-width: 900px) {
    .formats-grid,
    .dates-calendar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
    }

    /* Same height for every price block so the three figures line up. */
    .format-pricing {
        min-height: 10.5rem;
    }

    .instructor-content {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 3rem;
        align-items: start;
    }

    .instructor-image {
        max-width: none;
        margin: 0;
    }

    .certification-content {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 3rem;
    }
}

/* ---------- 1000px: overview text beside the benefits card, modules three across ---------- */
@media (min-width: 1000px) {
    .overview-content {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 3rem;
        align-items: start;
    }

    .curriculum-modules {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .stat-item h3 {
        font-size: 3rem;
    }
}
