/**
 * IB Math Master — Homepage
 * Page-specific CSS (sections unique to homepage)
 *
 * Requires: tokens.css, shared.css
 * Astra owns: body, headings, links, primary buttons, container
 */

/* =========================================
   HERO
========================================= */
.ib-hero {
    padding: 100px 0 120px;
    background: linear-gradient(180deg, var(--ib-accent-bg) 0%, var(--ib-light) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--ib-border);
}

.ib-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 65%);
    border-radius: 50%;
}

.ib-hero::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -60px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(15, 42, 92, 0.03) 0%, transparent 65%);
    border-radius: 50%;
}

.ib-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ib-navy);
    background: var(--ib-accent-softer);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 24px;
}

.ib-hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--ib-accent);
    border-radius: 50%;
}

.ib-hero h1 {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--ib-navy);
    margin-bottom: 24px;
}

.ib-hero h1 .ib-highlight {
    color: var(--ib-accent);
}

.ib-hero-tagline {
    font-size: 24px;
    font-weight: 600;
    color: var(--ib-navy-light);
    margin-bottom: 20px;
    line-height: 1.4;
}

.ib-hero-text {
    font-size: 17px;
    color: var(--ib-text-secondary);
    margin-bottom: 32px;
    max-width: 480px;
    line-height: 1.7;
    font-weight: 500;
}

.ib-hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    background: var(--ib-white);
    padding: 20px 28px;
    border-radius: 16px;
    border: 1px solid var(--ib-border);
    width: fit-content;
}

.ib-hero-stat {
    position: relative;
    padding-right: 32px;
}

.ib-hero-stat::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36px;
    background: var(--ib-border);
}

.ib-hero-stat:last-child::after {
    display: none;
}

.ib-hero-stat:last-child {
    padding-right: 0;
}

.ib-hero-stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--ib-navy);
    line-height: 1;
}

.ib-hero-stat-label {
    font-size: 13px;
    color: var(--ib-text-muted);
    margin-top: 6px;
    font-weight: 600;
}

.ib-hero-buttons {
    display: flex;
    gap: 16px;
}

/* Hero Photo Card */
.ib-hero-photo-wrapper {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
}

/* Hero Photo Card */
.ib-hero-photo-card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(15, 42, 92, 0.12);
}

.ib-hero-photo {
    overflow: hidden;
    position: relative;
    height: 280px;
}

.ib-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.ib-hero-card-body {
    padding: 16px 24px;
    background: linear-gradient(135deg, #0b2250 0%, #162f5e 50%, var(--ib-navy-light) 100%);
    border-top: none;
}

.ib-hero-card-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.ib-hero-tutor-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ib-white);
}

.ib-hero-tutor-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.ib-hero-courses {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* =========================================
   VIDEO
========================================= */
.ib-video {
    padding: 80px 0;
    background: var(--ib-accent-bg);
}

.ib-video-container {
    max-width: 720px;
    margin: 0 auto;
}

.ib-video-header {
    text-align: center;
    margin-bottom: 32px;
}

.ib-video-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.ib-video-header p {
    font-size: 17px;
    color: var(--ib-text-muted);
    font-weight: 500;
}

.ib-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(15, 42, 92, 0.15);
    background: var(--ib-navy);
}

.ib-video-wrapper.ib-playing .ib-video-thumbnail,
.ib-video-wrapper.ib-playing .ib-video-overlay {
    display: none;
}

.ib-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 16px;
}

@media (prefers-reduced-motion: no-preference) {
    .ib-video-wrapper:hover .ib-video-thumbnail {
        transform: scale(1.02);
    }
}

.ib-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 42, 92, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    border-radius: 16px;
}

.ib-video-wrapper:hover .ib-video-overlay {
    background: rgba(15, 42, 92, 0.2);
}

.ib-video-play-btn {
    width: 72px;
    height: 72px;
    background: var(--ib-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
    .ib-video-play-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
    }
}

.ib-video-play-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--ib-navy);
    margin-left: 3px;
}

.ib-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

.ib-video-fallback {
    text-align: center;
    margin-top: 12px;
}

.ib-video-fallback a {
    font-size: 14px;
    color: var(--ib-navy);
    text-decoration: none;
    font-weight: 500;
}

.ib-video-fallback a:hover {
    color: var(--ib-accent-hover);
    text-decoration: underline;
}

/* =========================================
   WHY + PROOF
========================================= */
.ib-why {
    padding: 80px 0;
    background: var(--ib-white);
}

.ib-why-container {
    max-width: 900px;
    margin: 0 auto;
}

.ib-why h2 {
    text-align: center;
    margin-bottom: 40px;
}

.ib-why-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

.ib-why-paragraph {
    font-size: 17px;
    color: var(--ib-text-secondary);
    line-height: 1.8;
}

.ib-why-paragraph strong {
    color: var(--ib-navy);
}

.ib-why-highlight {
    background: var(--ib-accent-bg);
    border-left: 4px solid var(--ib-accent);
    padding: 24px 28px;
    border-radius: 0 12px 12px 0;
}

.ib-why-highlight p {
    font-size: 17px;
    color: var(--ib-navy);
    line-height: 1.7;
    font-weight: 500;
    margin: 0;
}

.ib-why-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 40px 0;
    border-top: 1px solid var(--ib-border);
    border-bottom: 1px solid var(--ib-border);
    max-width: 600px;
    margin: 0 auto;
}

.ib-why-stat {
    text-align: center;
}

.ib-why-stat-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--ib-navy);
    line-height: 1;
}

.ib-why-stat-value span {
    color: var(--ib-accent);
}

.ib-why-stat-label {
    font-size: 15px;
    color: var(--ib-text-muted);
    margin-top: 8px;
}

/* =========================================
   HOW IT WORKS
========================================= */
.ib-process {
    padding: 80px 0;
    background: var(--ib-light);
}

.ib-process-header {
    text-align: center;
    margin-bottom: 56px;
}

.ib-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.ib-process-card {
    background: var(--ib-white);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    position: relative;
}

.ib-process-step {
    width: 52px;
    height: 52px;
    background: var(--ib-navy);
    color: var(--ib-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin: 0 auto 20px;
}

.ib-process-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.ib-process-card p {
    font-size: 15px;
    color: var(--ib-text-muted);
    line-height: 1.5;
}

.ib-process-card:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ib-accent);
    font-size: 20px;
    font-weight: 600;
    z-index: 1;
}

.ib-process-link {
    text-align: center;
    margin-top: 40px;
}
.ib-process-link a {
    font-size: 17px;
    font-weight: 700;
    color: var(--ib-accent-hover);
    text-decoration: none;
    letter-spacing: 0.2px;
    border-bottom: 2px solid var(--ib-accent);
    padding-bottom: 4px;
    transition: color 0.2s, border-color 0.2s;
}
.ib-process-link a:hover {
    color: var(--ib-navy);
    border-color: var(--ib-navy);
}

/* =========================================
   THREE PATHS
========================================= */
.ib-paths {
    padding: 80px 0;
    background: var(--ib-white);
}

.ib-paths-header {
    text-align: center;
    margin-bottom: 48px;
}

.ib-paths-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.ib-path-card {
    background: var(--ib-white);
    border-radius: 20px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ib-border);
    transition: all 0.3s ease;
}

.ib-path-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ib-shadow-md);
}

.ib-path-card.ib-primary {
    background: var(--ib-accent-bg);
    border-color: var(--ib-accent-soft);
}

.ib-path-card h3 {
    font-size: 22px;
    margin-bottom: 16px;
}

.ib-path-desc {
    font-size: 15px;
    color: var(--ib-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.ib-path-detail {
    font-size: 14px;
    color: var(--ib-text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--ib-border);
    margin-bottom: 20px;
}

.ib-path-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.ib-path-card.ib-primary .ib-path-link {
    background: var(--ib-navy);
    color: var(--ib-white);
}

.ib-path-card.ib-primary .ib-path-link:hover {
    background: var(--ib-navy-light);
    transform: translateY(-2px);
}

.ib-path-card:not(.ib-primary) .ib-path-link {
    color: var(--ib-navy);
    border: 1px solid var(--ib-border);
    background: var(--ib-white);
}

.ib-path-card:not(.ib-primary) .ib-path-link:hover {
    border-color: var(--ib-navy);
    transform: translateY(-2px);
}

.ib-paths-cta {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--ib-border);
}

.ib-paths-cta p {
    font-size: 16px;
    color: var(--ib-text-muted);
}

.ib-paths-cta a {
    color: var(--ib-navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ib-paths-cta a:hover {
    color: var(--ib-accent-hover);
}

/* =========================================
   TESTIMONIALS
========================================= */
.ib-testimonials {
    padding: 80px 0;
    background: var(--ib-accent-bg);
}

.ib-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ib-testimonial-card {
    background: var(--ib-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--ib-shadow-sm);
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--ib-navy);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ib-testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ib-shadow-md);
}

.ib-testimonial-result {
    display: inline-block;
    background: var(--ib-navy);
    color: var(--ib-white);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}

.ib-testimonial-stars {
    color: #fbbf24;
    font-size: 14px;
    letter-spacing: 2px;
    margin-left: 10px;
}

blockquote.ib-testimonial-quote {
    margin: 0;
    padding: 0;
}

.ib-testimonial-quote {
    font-size: 15px;
    color: var(--ib-text-secondary);
    line-height: 1.8;
    flex-grow: 1;
    margin-bottom: 24px;
}

.ib-testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--ib-border);
}

.ib-testimonial-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ib-navy);
}

.ib-testimonial-meta {
    font-size: 12px;
    color: var(--ib-text-muted);
    font-weight: 500;
}

.ib-testimonials-link {
    text-align: center;
    margin-top: 48px;
}

.ib-testimonials-link a {
    font-size: 16px;
    font-weight: 700;
    color: var(--ib-navy);
    text-decoration: none;
    padding: 12px 24px;
    background: var(--ib-white);
    border-radius: 50px;
    box-shadow: var(--ib-shadow-sm);
    transition: all 0.2s;
}

.ib-testimonials-link a:hover {
    color: var(--ib-accent-hover);
    box-shadow: var(--ib-shadow-md);
    transform: translateY(-2px);
}

/* =========================================
   WHO THIS IS FOR
========================================= */
.ib-who {
    padding: 80px 0;
    background: var(--ib-white);
}

.ib-who-header {
    text-align: center;
    margin-bottom: 48px;
}

.ib-who-header p {
    font-size: 17px;
    color: var(--ib-text-muted);
    margin-top: 12px;
}

.ib-who-grid {
    max-width: 600px;
    margin: 0 auto;
}

.ib-who-card {
    border-radius: 20px;
    padding: 36px;
}

.ib-who-card.ib-positive {
    background: var(--ib-accent-bg);
    border: 2px solid var(--ib-accent-soft);
}

.ib-who-card h3 {
    font-size: 18px;
    color: var(--ib-navy);
    margin-bottom: 24px;
}

.ib-who-card ul {
    list-style: none;
}

.ib-who-card li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    font-size: 15px;
    color: var(--ib-text-secondary);
    line-height: 1.5;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ib-who-card li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ib-who-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    margin-top: 1px;
}

.ib-positive .ib-who-icon {
    background: var(--ib-accent);
    color: var(--ib-navy);
}

/* =========================================
   FAQ - Accessible accordion with hidden attribute
========================================= */

/* =========================================
   FINAL CTA
========================================= */

/* =========================================
   SUBJECTS I TEACH
========================================= */
.ib-subjects-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 48px;
    align-items: start;
}

.ib-subjects-sidebar h2 {
    margin-bottom: 14px;
}

.ib-subjects-sidebar p {
    font-size: 15px;
    color: var(--ib-text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.ib-subjects-compare {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ib-navy);
    text-decoration: none;
    padding: 12px 0;
    border-top: 2px solid var(--ib-navy);
    transition: color 0.2s;
}

.ib-subjects-compare:hover {
    color: var(--ib-accent-hover);
}

.ib-subjects-compare span {
    display: inline-block;
    transition: transform 0.2s;
}

.ib-subjects-compare:hover span {
    transform: translateX(3px);
}

.ib-subjects-rows {
    display: flex;
    flex-direction: column;
}

.ib-subjects-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--ib-border);
}

.ib-subjects-row:first-child {
    padding-top: 0;
}

.ib-subjects-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ib-subjects-identity {
    display: flex;
    flex-direction: column;
}

.ib-subjects-level {
    font-size: 10px;
    font-weight: 700;
    color: var(--ib-accent-hover);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.ib-subjects-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ib-navy);
}

.ib-subjects-desc {
    font-size: 14px;
    color: var(--ib-text-muted);
    line-height: 1.5;
}

.ib-subjects-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--ib-navy);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
}

.ib-subjects-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--ib-accent-hover);
    transition: width 0.25s ease;
}

.ib-subjects-link:hover {
    color: var(--ib-accent-hover);
}

.ib-subjects-link:hover::after {
    width: 100%;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1024px) {

    .ib-hero-photo-wrapper { grid-column: 1; grid-row: 2; max-width: 340px; margin: 0 auto; }
    .ib-hero-stats { justify-content: center; flex-wrap: wrap; margin-left: auto; margin-right: auto; }
    .ib-process-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .ib-process-card:not(:last-child)::after { display: none; }
    .ib-paths-grid { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; }
    .ib-testimonials-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
    .ib-why-content { grid-template-columns: 1fr; }
    .ib-subjects-layout { grid-template-columns: 1fr; gap: 32px; }
    .ib-subjects-sidebar { text-align: center; }
    .ib-subjects-compare { margin: 0 auto; }
}

@media (max-width: 768px) {
    .ib-hero h1 { font-size: 44px; }
    .ib-hero-tagline { font-size: 20px; }
    .ib-hero-stats { flex-direction: column; gap: 16px; align-items: center; width: 100%; padding: 20px 24px; }
    .ib-hero-stat { padding-right: 0; padding-bottom: 16px; border-bottom: 1px solid var(--ib-border); width: 100%; text-align: center; }
    .ib-hero-stat:last-child { border-bottom: none; padding-bottom: 0; }
    .ib-hero-stat::after { display: none; }
    .ib-process-grid { grid-template-columns: 1fr; }
    .ib-why-stats { grid-template-columns: 1fr; gap: 24px; }
    .ib-why-stat-value { font-size: 40px; }
    .ib-hero-photo { height: 220px; }
    .ib-subjects-row { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
    .ib-subjects-link { margin-top: 4px; }
}