/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #5b0000;
    --color-bg-cream: #fff5ed;
    --color-bg-light: #fff5ee;
    --color-text-dark: #141414;
    --color-text-gray: #3e3e3e;
    --color-white: #ffffff;
    --font-pretendard: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-serif: 'Cormorant', Georgia, serif;
    --font-eng-bold: 'Montserrat', Arial, sans-serif;
}

body {
    font-family: var(--font-pretendard);
    color: var(--color-text-dark);
    line-height: 1.5;
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Font display optimization */
@font-face {
    font-family: 'Pretendard';
    font-display: swap;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

/* Header */
header {
    width: 100%;
    padding: 30px 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-white);
    letter-spacing: 1.4px;
}

nav ul {
    display: flex;
    gap: 60px;
}

nav a {
    color: var(--color-white);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.7px;
}

.btn-contact {
    font-weight: 700;
}

.mobile-menu-toggle {
    display: none;
    color: var(--color-white);
    font-size: 24px;
}

.mobile-menu-close {
    display: none;
}



/* Header Variants */
header.header-transparent {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

header.header-light {
    background: #fff;
    position: relative;
    border-bottom: 1px solid #eee;
}

header.header-light .logo,
header.header-light nav a,
header.header-light .mobile-menu-toggle {
    color: var(--color-text-dark);
}

/* Sticky Header State (Must be after variants to override) */
header.header-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.header-scrolled .logo,
header.header-scrolled nav a,
header.header-scrolled .mobile-menu-toggle {
    color: var(--color-text-dark);
}

header.header-scrolled .btn-contact {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 7px 25px;
}

/* Hero Section */
#hero {
    position: relative;
    /* Height based on original mask-group height 936px */
    height: 936px;
    max-height: 100vh;
    min-height: 800px;
    width: 100%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure it covers like a background image */
}

/* Fallback for img inside video tag if needed */
.hero-video-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 15vh;
    text-align: left;
    color: var(--color-white);
}

.hero-brand-top {
    font-family: var(--font-pretendard);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 1.4px;
    margin-bottom: 20vh;
    /* Adjusted for visual balance */
    text-align: center;
}

.hero-text-group {
    position: relative;
    z-index: 2;
}

.hero-slogan {
    font-family: var(--font-serif);
    font-size: 64px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 32px;
    line-height: 1.4;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1.28px;
}

.hero-subtitle {
    font-size: 24px;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 0;
    opacity: 0.9;
    letter-spacing: -0.96px;
}

/* Intro & Stats Section */
#intro-stats {
    background-color: var(--color-bg-cream);
    padding: 100px 0 150px;
    position: relative;
    overflow: hidden;
    /* For large image handling */
}

#intro-stats .container {
    position: static;
}

.intro-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
}

.section-title-sm {
    font-size: 42px;
    font-weight: 800;
    color: #2d2d2d;
    line-height: 1.4;
    letter-spacing: -1.92px;
    flex: 0 0 40%;
    /* Approx width based on design */
}

.intro-desc-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-left: 50px;
    /* Spacing from title */
}

.intro-text-col p {
    font-size: 20px;
    line-height: 1.6;
    color: #141414;
    font-weight: 500;
    letter-spacing: -0.8px;
}

/* Intro Body: Image Left | Stats Right */
.intro-body {
    display: flex;
    align-items: center;
    /* or flex-start */
    position: static;
    /* Reset to static so image positions relative to section */
    min-height: 400px;
}

.intro-img-col {
    position: absolute;
    left: 0;
    bottom: 0;
    top: auto;
    width: 90vw;
    /* Base fluid sizing, adjusted to not be too overwhelming */
    max-width: 50vw;
    z-index: 1;
}

.intro-img-col img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Stats */
.stats-grid {
    margin-left: 50%;
    /* Start from center */
    width: 50%;
    display: flex;
    justify-content: space-around;
    /* Spread stats in right half */
    text-align: center;
    padding-left: 50px;
    z-index: 2;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-eng-bold);
    font-size: 94px;
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1.56px;
    display: flex;
    align-items: flex-start;
}

.stat-number span {
    font-size: 45px;
    /* Smaller plus/percent */
    margin-top: 10px;
}

.stat-label {
    font-size: 20px;
    color: #141414;
    font-weight: 700;
    margin-top: 10px;
}

/* Masterclass Section (Red) */
#masterclass {
    background-color: var(--color-primary);
    padding: 100px 0;
    color: var(--color-white);
    position: relative;
}

.masterclass-header {
    text-align: center;
    margin-bottom: 60px;
}

.masterclass-header h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
}

.masterclass-header .sub-desc {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
}

/* Images Row */
.masterclass-images {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 80px;
}

.masterclass-images img {
    width: 32%;
    /* 3 images side by side */
    aspect-ratio: 16/10;
    object-fit: cover;
    /* border-radius: 4px; Optional based on image */
}

/* Bottom Content Split */
.masterclass-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
}

.mc-bottom-left {
    flex: 1;
}

.mc-bottom-left h3 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
}

.mc-bottom-right {
    flex: 1.5;
    /* Give more space to list */
}

.benefit-list {
    margin-bottom: 40px;
}

.benefit-list li {
    font-size: 16px;
    line-height: 28px;
    margin-bottom: 8px;
    font-weight: 400;
    padding-left: 0;
}

.benefit-list li::before {
    content: none;
    /* Removed bullets as numbers are in text */
}

.btn-detail-red {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    font-size: 16px;
    border: 1px solid #fff;
    /* Button outline style */
    border-bottom: 1px solid #fff;
    /* Reset overrides */
    background: transparent;
    color: #fff;
    transition: all 0.3s;
}

.btn-detail-red:hover {
    background: #fff;
    color: var(--color-primary);
}


/* Instructors Section */
#instructors {
    padding: 100px 0;
    background-color: var(--color-white);
    text-align: center;
}

.instructor-swiper {
    width: 100%;
    padding: 20px 0 50px;
    /* Add bottom padding for better spacing if needed */
}

.section-title-center {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #000;
}

.section-subtitle-center {
    font-size: 16px;
    color: #666;
    margin-bottom: 60px;
    line-height: 1.5;
}

/* Old grid removed, now using swiper-slide structure */
.instructor-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align text inside card if desired, or center */
    text-align: left;
    margin: 0 auto;
}

.instructor-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Square ratio as per image */
    background-color: #eee;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    /* Sharp edges */
}

.instructor-info h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #141414;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.instructor-info .role {
    font-size: 16px;
    font-weight: 400;
    color: #141414;
}

.instructor-info .desc {
    font-size: 15px;
    /* Title (e.g. CEO) */
    color: #666;
    font-weight: 400;
    margin-bottom: 5px;
}

/* Custom Swiper Arrows */
.swiper-button-next,
.swiper-button-prev {
    color: #000 !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 24px;
    font-weight: bold;
}


/* News Section */
#news {
    padding: 100px 0;
    background-color: var(--color-bg-light);
    /* #fff5ee */
}

.news-main-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
}

.news-intro {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

.news-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.3;
    color: #141414;
    margin-bottom: 30px;
}

.news-desc {
    font-size: 16px;
    line-height: 28px;
    font-weight: 500;
    color: #333;
    margin-bottom: 60px;
}

.btn-news-more {
    font-size: 16px;
    font-weight: 700;
    text-decoration: underline;
    color: #000;
    text-transform: uppercase;
}

.news-swiper {
    width: 100%;
    overflow: hidden;
    padding-bottom: 40px;
    /* Space for pagination */
}

/* .news-cards-wrapper removed/replaced by swiper */

.news-card {
    background: #fff;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s;
    height: auto;
    /* Ensure slides have height */
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #eee;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
}

.news-content .badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #141414;
}

.news-content h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 56px;
    /* 2 lines */
    color: #141414;
}

.news-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.news-content .date {
    font-size: 13px;
    color: #888;
}

/* Contact Section */
#contact {
    position: relative;
    padding: 120px 0;
    background-color: #111;
    color: var(--color-white);
    overflow: hidden;
}

.contact-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('img/contact_bg.jpg') no-repeat left center;
    background-size: cover;
    z-index: 0;
    /* opacity removed to ensure clear overlay */
}

.contact-content-wrapper {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.contact-left {
    flex: 0 0 30%;
    padding-right: 50px;
}

.contact-label {
    display: block;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-left h2 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 30px;
}

.contact-desc {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.contact-right {
    flex: 1;
    display: flex;
    gap: 30px;
}

.contact-form-area {
    flex: 1;
    min-width: 400px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row input:not([type="checkbox"]),
.form-row textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 0;
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

.form-row.full-width textarea {
    height: 150px;
    resize: none;
}

.contact-map {
    flex: 0 0 350px;
    height: auto;
    background: #eee;
}

.form-footer {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    align-items: flex-start;
    /* Align to the left */
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    gap: 15px;
    /* Space between agreement and button */
}

.agreement {
    display: flex;
    align-items: flex-start;
    /* Align checkbox with top of text if multilined */
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.view-terms {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    white-space: nowrap;
    margin-left: 5px;
}

.btn-contact-submit {
    width: 100%;
    /* Full width button looks better when stacked */
    background-color: #790000;
    /* Dark Red */
    color: #fff;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-contact-submit:hover {
    background-color: #900000;
}


/* Responsive Styles */
@media (max-width: 1024px) {

    /* Intro collapse */
    .intro-header {
        flex-direction: column;
        gap: 40px;
    }

    .intro-body {
        flex-direction: column;
        align-items: center;
    }

    .intro-img-col {
        position: relative;
        left: auto;
        width: 100%;
        margin-bottom: 40px;
        text-align: center;
    }

    .stats-grid {
        margin-left: 0;
        width: 100%;
        padding-left: 0;
        gap: 50px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .masterclass-body {
        flex-direction: column-reverse;
        gap: 60px;
    }

    .masterclass-images {
        flex-direction: column;
    }

    .masterclass-images img {
        width: 100%;
        margin-bottom: 20px;
    }

    .masterclass-bottom {
        flex-direction: column;
        gap: 40px;
    }

    /* News Responsive */
    .news-main-grid {
        grid-template-columns: 1fr;
    }

    .news-intro {
        margin-bottom: 40px;
    }

    .news-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact Responsive */
    .contact-content-wrapper {
        flex-direction: column;
    }

    .contact-left {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 40px;
        padding-right: 0;
    }

    .contact-right {
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }

    .contact-form-area {
        min-width: 0;
    }

    .contact-map {
        flex: 0 0 300px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .intro-desc-row {
        padding-left: 0px
    }

    #intro-stats {
        padding: 100px 0 0 0
    }

    .intro-img-col img {
        margin-top: 40px;
        margin-left: -20px;
    }

    .news-cards-wrapper {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    /* Mobile Header */
    nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Hero Text */
    .hero-slogan {
        font-size: 36px;
        line-height: 1.2;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-brand-top {
        margin-bottom: 10px;
    }

    #hero {
        height: auto;
        min-height: 600px;
        padding-bottom: 50px;
    }

    /* Stacking */
    /* Stacking */
    .intro-body {
        flex-direction: column-reverse;
        /* Stats Top, Image Bottom */
        gap: 20px;
    }

    .stats-grid {
        flex-direction: row;
        /* 3 Columns */
        margin-left: 0;
        width: 100%;
        padding: 0 10px;
        gap: 10px;
        justify-content: space-around;
        flex-wrap: nowrap;
        /* Ensure single line */
    }

    .stat-item h3 {
        font-size: 28px !important;
        margin-bottom: 5px;
    }

    .stat-item p {
        font-size: 13px !important;
        white-space: nowrap;
        /* Prevent wrapping if tight */
    }

    .intro-body {
        min-height: auto
    }

    .intro-img-col {
        width: 100%;
        /* Sizing for mobile image */
        max-width: 100%;
        margin-bottom: 0;
    }

    .contact-container {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
    }

    /* Instructor handled by Swiper */

    .contact-form-box {
        width: 100%;
    }

    .section-title-sm,
    .section-title-center,
    .masterclass-header h2,
    .news-title,
    .contact-text h2 {
        font-size: 32px;
        line-height: normal;
    }

    /* Mobile Menu Active State */
    nav.active {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        padding-top: 100px;
        animation: fadeIn 0.3s ease;
    }

    nav.active ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    nav.active li a {
        font-size: 24px;
        font-weight: 700;
        color: #141414;
    }

    .mobile-menu-close {
        display: none;
    }

    nav.active .mobile-menu-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Footer */
footer {
    background-color: #333;
    /* Dark Grey/Black */
    color: #fff;
    padding: 60px 0;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-info {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.footer-info .bold {
    font-weight: 700;
    color: #fff;
}

.footer-info p {
    margin-bottom: 10px;
}

.copyright {
    margin-top: 20px;
    color: #888;
    font-size: 12px;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    grid-column: 1 / -1;
    width: 100%;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5b0000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    padding: 30px;
    border-radius: 8px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    white-space: pre-line;
    /* text formatting */
}

/* Loading Spinner Styles */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    width: 100%;
    aspect-ratio: 1/1;
    margin-bottom: 20px;
}

.skeleton-text {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}