/* Modern Stylesheet for Sierra Safety Training */

:root {
    /* Brand Colors - Matching Reference but modernized */
    --color-primary: #1a1a1a;
    /* Black/Dark Gray */
    --color-primary-light: #f5f5f5;
    --color-accent: #2e7d32;
    /* Safety Green */
    --color-accent-dark: #1b5e20;
    --color-secondary: #0d47a1;
    /* Deep Blue */

    /* Neutrals */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg-light: #f8f9fa;
    --color-white: #ffffff;
    --color-border: #e0e0e0;

    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Shadows & Radius */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-secondary);
    color: white;
    border: 2px solid var(--color-secondary);
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid currentColor;
    background: transparent;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: var(--color-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 197px;
    /* Matches logo height */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    /* Ensure full height */
    max-width: 300px;
}

.logo-img {
    width: 230px;
    height: auto;
    max-height: 197px;
    /* Matched to header height */
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: #000;
    font-weight: 700;
}

.nav-link.active::after {
    display: none;
}

.nav-cta-btn {
    background: var(--color-secondary);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-cta-btn:hover {
    background: #000;
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: white;
    padding-top: 197px;
    /* Adjusted for taller header */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 0.7) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    /* Increased max-width to allow content to stretch */
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    /* Centered as requested */
}

.badg-hero {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #e0e0e0;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: white;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 100%;
    /* Stretch full width */
    margin-left: auto;
    margin-right: auto;
    padding: 0 5%;
    /* Less side padding/margin than normal */
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 800px;
    /* Constrained width */
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    /* Centered */
    flex-wrap: wrap;
}

/* Stats Section */
.stats-section {
    position: relative;
    z-index: 10;
    margin-top: -60px;
    padding-bottom: var(--spacing-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    gap: 24px;
}

.stat-card {
    text-align: center;
    position: relative;
}

.stat-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--color-border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sections General */
.section {
    padding: var(--spacing-lg) 0;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-tag {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services */
.services-section {
    background-color: var(--color-bg-light);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.service-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    width: 100%;
    /* Default mobile */
}

@media (min-width: 768px) {
    .service-card {
        width: calc(50% - 16px);
        /* 2 columns */
    }
}

@media (min-width: 1024px) {
    .service-card {
        width: calc(33.333% - 22px);
        /* 3 columns */
    }
}

/* Resources Section */
.resources-section {
    background-color: white;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    justify-content: center;
}

.resource-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.resource-image-wrapper {
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.resource-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.resource-card:hover .resource-image-wrapper img {
    transform: scale(1.05);
}

.resource-content {
    padding: 24px;
    flex-grow: 1;
}

.resource-content h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-weight: 700;
}

.resource-content p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.5;
}



.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-image-wrapper {
    height: 240px;
    overflow: hidden;
}

.service-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-image-wrapper img {
    transform: scale(1.05);
}

.service-content {
    padding: 32px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.service-content p {
    color: var(--color-text-light);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.link-arrow {
    font-weight: 600;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-arrow:hover .arrow {
    transform: translateX(4px);
}

.arrow {
    transition: var(--transition);
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text-column .lead-text {
    font-size: 1.2rem;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 24px;
}

.check-list {
    margin-top: 32px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 500;
    color: var(--color-primary);
}

.check-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}

.about-image-column .image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.feature-box {
    position: absolute;
    bottom: 32px;
    left: 32px;
    background: white;
    padding: 20px 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.feature-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.feature-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-light);
}

/* Training List - Compact Grid */
.bg-light {
    background-color: #fafafa;
}

.program-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1400px;
    /* Ensure 4 items fit on large screens */
    margin: 0 auto;
}

.program-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    width: calc(25% - 24px);
    /* Target 4 across */
    min-width: 280px;
    /* Fallback size */
    flex-grow: 0;
    /* detailed control */
}

@media (max-width: 1200px) {
    .program-card {
        width: calc(33.33% - 24px);
        /* 3 across */
    }
}

@media (max-width: 900px) {
    .program-card {
        width: calc(50% - 24px);
        /* 2 across */
    }
}

@media (max-width: 600px) {
    .program-card {
        width: 100%;
        /* 1 across */
    }
}

.program-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 16px;
}

.program-info h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.program-info p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    flex-grow: 1;
    /* Pushes button down */
}

.program-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
}

/* CTA Section */
.cta-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-secondary);
    z-index: -1;
}

.cta-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
}

.cta-container {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.cta-wrapper h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-wrapper p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.white-bg {
    background: white;
    color: var(--color-primary);
    border: none;
}

.white-bg:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.white-text {
    color: white;
    border-color: white;
}

.white-text:hover {
    background: white;
    color: var(--color-secondary);
}

/* Footer */
.footer {
    background: #111;
    color: #888;
    padding: 80px 0 24px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer a {
    color: #888;
}

.footer a:hover {
    color: white;
}

.contact-col li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-col .icon {
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 24px;
    text-align: center;
}

/* Animations Helpers */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Team Section */
.team-section {
    background-color: var(--color-bg-light);
}

/* Team Section */
.team-section {
    background-color: var(--color-bg-light);
}

/* Leadership (Stacked) */
.team-leadership {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto 60px;
}

.leadership-card {
    display: flex;
    flex-direction: column;
    text-align: left;
}

@media (min-width: 768px) {
    .leadership-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .leadership-card .team-image-wrapper {
        width: 300px;
        flex-shrink: 0;
        height: 300px;
    }
}

/* Instructors (Grid) */
.team-instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    justify-content: center;
}

.team-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.team-image-wrapper {
    height: 300px;
    /* Default height */
    overflow: hidden;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-image-wrapper.small {
    height: 200px;
}

.team-placeholder {
    color: #888;
    font-weight: 500;
}

.team-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.team-content {
    padding: 24px;
    flex-grow: 1;
}

.team-content h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: var(--color-primary);
}

.team-role {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.team-content p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
}

.team-content p.small-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Resources Section */
.resources-section {
    background-color: var(--color-bg-light);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    justify-content: center;
}

.resource-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    /* Ensure full height for alignment */
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.resource-image-wrapper {
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.resource-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.resource-card:hover .resource-image-wrapper img {
    transform: scale(1.05);
}

.resource-content {
    padding: 24px;
    flex-grow: 1;
    /* Pushes content to fill space */
}

.resource-content h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-weight: 700;
}

.resource-content p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 30px;
    }

    .stat-card:not(:last-child)::after {
        display: none;
        /* Remove dividers for simpler mobile grid */
    }

    .nav-list {
        display: none;
    }

    /* Handled by JS mobile toggle logic usually, simplified here */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-container {
        position: relative;
    }

    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-bottom-right-radius: var(--radius-md);
        border-bottom-left-radius: var(--radius-md);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image-column {
        order: -1;
    }

    /* Image on top mobile */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons-row {
        flex-direction: column;
    }

    /* Center text on mobile for better flow */
    .about-text-column {
        text-align: center;
    }

    .check-list li {
        justify-content: center;
    }
}

/* Training Page Specifics */
.training-nav {
    position: sticky;
    top: 70px;
    /* Below header */
    background: white;
    z-index: 99;
    padding: 16px 0;
    margin-bottom: 40px;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.training-nav::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.train-nav-link {
    padding: 8px 16px;
    background: var(--color-bg-light);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-light);
    transition: var(--transition);
}

.train-nav-link:hover,
.train-nav-link:target {
    background: var(--color-secondary);
    color: white;
}

.training-category {
    padding-top: 80px;
    /* Offset for sticky nav/header scroll */
    margin-top: -60px;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 60px;
}

.training-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 20px;
}

.category-header {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
    align-items: center;
}

@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
    }
}

.category-text {
    flex: 1;
}

.category-image {
    flex: 1;
    max-width: 500px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.category-image img {
    height: 300px;
    width: 100%;
    object-fit: cover;
}

.category-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    max-width: 600px;
}

.category-gallery img {
    height: 150px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Sub-categories (Custom) */
.sub-category {
    margin-top: 40px;
    padding-left: 20px;
    border-left: 4px solid var(--color-bg-light);
}

.sub-cat-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.sub-cat-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

/* Class List */
.class-list {
    display: grid;
    gap: 16px;
}

.class-item {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.class-item:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
}

.class-details h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.class-meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 500;
}

@media (max-width: 600px) {
    .class-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-desc-btn {
        width: 100%;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 16px;
    right: 24px;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#modalTitle {
    margin-bottom: 16px;
    padding-right: 20px;
}

#modalBody {
    line-height: 1.6;
    color: var(--color-text);
}

/* Custom Programs Grid */
.custom-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.custom-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.custom-card:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.custom-card h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--color-primary);
    min-height: 2.2em;
    /* Align lines */
}

.custom-card-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.custom-meta {
    margin-bottom: 20px;
    justify-content: center;
    font-size: 0.85rem;
}

.view-desc-btn.full-width {
    width: 100%;
    margin-top: auto;
}

@media (max-width: 1200px) {
    .custom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .custom-grid {
        grid-template-columns: 1fr;
    }
}