/**
 * page-home.css — i-Study Home Page Design System
 * Inspired by IDP Education's clean, professional aesthetic.
 * Color system built around brand red (#FF5757) with connected
 * secondary tones for a cohesive, trustworthy feel.
 *
 * HOW TO USE: enqueue this file for the home page template.
 */

/* ─────────────────────────────────────────
   1. DESIGN TOKENS (CSS Custom Properties)
   ───────────────────────────────────────── */
:root {
    /* Brand */
    --brand-red: #FF5757;
    --brand-red-dark: #E04545;
    --brand-red-deeper: #C0392B;
    --brand-red-light: #FFF0F0;
    --brand-red-muted: #FFD5D5;

    /* Neutrals */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Accent palette — complementary to brand red */
    --accent-blue: #3B82F6;
    /* High School */
    --accent-green: #10B981;
    /* English */
    --accent-amber: #F59E0B;
    /* VET */
    --accent-violet: #8B5CF6;
    /* University */

    /* Typography scale */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */

    /* Spacing */
    --section-py: 5rem;
    /* 80px vertical section padding */
    --section-py-lg: 8rem;
    /* 128px on desktop */

    /* Radius */
    --radius-card: 1.5rem;
    /* 24px card corners */
    --radius-btn: 0.75rem;
    /* 12px button corners */

    /* Shadows */
    --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.08), 0 1px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 16px 40px -8px rgba(255, 87, 87, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
    --shadow-btn: 0 4px 12px rgba(255, 87, 87, 0.35);
}

/* ─────────────────────────────────────────
   2. BASE & TYPOGRAPHY
   ───────────────────────────────────────── */
.home-page-root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    background-color: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Section headings — unified style */
.is-section-title {
    font-size: var(--text-4xl);
    font-weight: 900;
    color: var(--gray-900);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .is-section-title {
        font-size: var(--text-5xl);
    }
}

.is-section-title--brand {
    color: var(--brand-red);
}

.is-section-title--dark {
    color: var(--gray-900);
}

/* Section eyebrow label (small uppercase label above heading) */
.is-eyebrow {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 0.75rem;
}

/* Subtitle / lead text */
.is-lead {
    font-size: var(--text-lg);
    color: var(--gray-500);
    line-height: 1.7;
    max-width: 42rem;
}

/* ─────────────────────────────────────────
   3. SECTION WRAPPERS
   ───────────────────────────────────────── */
.is-section {
    padding-top: var(--section-py);
    padding-bottom: var(--section-py);
}

@media (min-width: 1024px) {
    .is-section {
        padding-top: var(--section-py-lg);
        padding-bottom: var(--section-py-lg);
    }
}

.is-section--white {
    background-color: #fff;
}

.is-section--light {
    background-color: var(--gray-50);
}

.is-section--dark {
    background-color: var(--gray-900);
    color: #fff;
}

/* ─────────────────────────────────────────
   4. CTA BUTTONS
   ───────────────────────────────────────── */
.is-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.is-btn--primary {
    background-color: var(--brand-red);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.is-btn--primary:hover {
    background-color: var(--brand-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 87, 87, 0.45);
    color: #fff;
}

.is-btn--outline {
    background-color: transparent;
    color: var(--brand-red);
    border: 2px solid var(--brand-red);
}

.is-btn--outline:hover {
    background-color: var(--brand-red);
    color: #fff;
    transform: translateY(-2px);
}

.is-btn--ghost {
    background-color: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.is-btn--ghost:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

/* ─────────────────────────────────────────
   5. CARDS
   ───────────────────────────────────────── */
.is-card {
    background-color: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

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

/* Course icon card variant */
.is-course-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: #fff;
    border-radius: var(--radius-card);
    border: 2px solid transparent;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.is-course-card:hover {
    border-color: var(--brand-red-muted);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.is-course-card__icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.is-course-card:hover .is-course-card__icon {
    transform: scale(1.1);
}

.is-course-card__accent {
    width: 2rem;
    height: 3px;
    border-radius: 9999px;
    margin: 0 auto 1rem;
    transition: width 0.3s ease;
}

.is-course-card:hover .is-course-card__accent {
    width: 3.5rem;
}

.is-course-card__title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.is-course-card:hover .is-course-card__title {
    color: var(--brand-red);
}

.is-course-card__desc {
    font-size: var(--text-sm);
    color: var(--gray-500);
    line-height: 1.65;
}

/* ─────────────────────────────────────────
   6. EVENT CARDS
   ───────────────────────────────────────── */
.is-event-card {
    border-radius: var(--radius-card);
    background-color: #fff;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.is-event-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.is-event-card__img {
    width: 100%;
    display: block;
}

.is-event-card__body {
    padding: 1.25rem;
}

.is-event-card__title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.is-event-card__title a:hover {
    color: var(--brand-red);
}

.is-event-card__meta {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.is-event-card__meta i {
    color: var(--brand-red);
    margin-top: 2px;
}

.is-event-card__cta {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    background-color: var(--brand-red);
    color: #fff !important;
    font-weight: 700;
    font-size: var(--text-xs);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.is-event-card__cta:hover {
    background-color: var(--brand-red-dark);
}

/* ─────────────────────────────────────────
   7. PROMO SLIDER
   ───────────────────────────────────────── */
#hero-slider {
    /* Full viewport width — rendered outside .site-content */
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
}

/* Prevent horizontal scrollbar that causes slider gap */
body {
    overflow-x: hidden;
}

/* Dot indicators */
.full-slider-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.45);
    transition: background-color 0.25s, transform 0.25s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.full-slider-dot.bg-white,
.full-slider-dot.scale-125 {
    background-color: #fff;
    transform: scale(1.35);
}

/* ─────────────────────────────────────────
   8. COURSES SECTION
   ───────────────────────────────────────── */
#courses {
    background-color: var(--gray-50);
}

/* ─────────────────────────────────────────
   9. SOCIAL HUB TABS
   ───────────────────────────────────────── */
.social-tab-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.25rem;
    background-color: rgba(229, 231, 235, 0.5);
    border-radius: 9999px;
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(4px);
}

/* Shorts scroll container */
.yt-shorts-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.yt-shorts-row::-webkit-scrollbar {
    display: none;
}

.yt-short-card {
    flex-shrink: 0;
    width: 190px;
    scroll-snap-align: start;
    border-radius: 1rem;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.yt-short-card__frame {
    position: relative;
    aspect-ratio: 9/16;
}

.yt-short-card__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.yt-short-card__label {
    padding: 0.5rem 0.75rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─────────────────────────────────────────
   10. UPCOMING EVENTS SECTION
   ───────────────────────────────────────── */
#section-upcoming-events .is-section-title {
    color: var(--brand-red);
}

/* ─────────────────────────────────────────
   11. UTILITIES
   ───────────────────────────────────────── */

/* Scrollbar hiding */
.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Fade-in-up animation */
@keyframes is-fade-up {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.is-animate-fade-up {
    animation: is-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.is-animate-delay-1 {
    animation-delay: 0.1s;
}

.is-animate-delay-2 {
    animation-delay: 0.2s;
}

.is-animate-delay-3 {
    animation-delay: 0.3s;
}

.is-animate-delay-4 {
    animation-delay: 0.4s;
}

/* ─────────────────────────────────────────
   12. IDP-INSPIRED HERO LAYOUT HELPERS
   ─────────────────────────────────────────
   Large bold heading on left, visual on right.
   Clean white background, generous whitespace.
   ───────────────────────────────────────── */
.is-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .is-hero {
        grid-template-columns: 1fr 1fr;
        padding-top: 8rem;
        padding-bottom: 6rem;
        gap: 5rem;
    }
}

.is-hero__heading {
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--gray-900);
}

.is-hero__heading mark {
    background: none;
    color: var(--brand-red);
}

.is-hero__sub {
    font-size: var(--text-lg);
    color: var(--gray-500);
    line-height: 1.7;
    margin-top: 1.25rem;
    max-width: 36rem;
}

.is-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* Stats row (IDP-style trust indicators) */
.is-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.is-stat__number {
    font-size: var(--text-3xl);
    font-weight: 900;
    color: var(--brand-red);
    line-height: 1;
}

.is-stat__label {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: 0.25rem;
    font-weight: 500;
}