/* Agility Specific Styles */
.agility-page-wrapper {
    --ag-orange: #E67E22;
    --ag-navy: #1a2a3a;
}

/* [공통] 컨테이너 및 헤더 스타일 보완 */
.kinder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.inquiry-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

/* Hero Section */
.agility-hero {
    position: relative;
    height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    filter: brightness(0.6);
    object-fit: cover;
}

.hero-content {
    text-align: center;
    color: #fff;
    z-index: 1;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-style: italic;
    margin-bottom: 20px;
}

/* Stats & Intro Section */
.agility-intro {
    padding: 100px 0;
    background: #fff;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 80px;
}

.stat-box {
    text-align: center;
    border-right: 1px solid #eee;
    padding: 20px;
}

.stat-box:last-child {
    border: none;
}

.stat-box h2 {
    font-size: 2.5rem;
    color: var(--ag-orange);
    font-weight: 800;
}

/* 🚨 [추가] Why Agility 3단 카드 그리드 (이게 빠져있었습니다!) */
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3단 가로 배치 */
    gap: 30px;
    margin-top: 50px;
}

.value-card {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
}

.value-img {
    height: 240px;
    background-size: cover;
    background-position: center;
}

.value-content {
    padding: 30px;
}

.value-content h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--ag-navy);
}

.value-content p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

/* Expert Section (Asymmetric) */
.agility-expert {
    padding: 120px 0;
    background: var(--ag-navy);
    color: #fff;
}

.expert-flex {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.expert-photo {
    flex: 1;
    align-self: flex-start;
    position: relative;
    /* 뱃지 배치를 위해 필요 */
    border-radius: 30px;
    overflow: hidden;
    transform: rotate(-2deg);
    box-shadow: 20px 20px 0 var(--ag-orange);
}

.expert-photo img {
    width: 100%;
    /* 🚨 사진이 꽉 차게 수정 */
    display: block;
}

.expert-text {
    flex: 1.2;
}

/* CTA */
.agility-cta {
    padding: 100px 0;
    text-align: center;
    background: var(--ag-navy);
    color: #fff;
}

.btn-primary {
    display: inline-block;
    background: var(--ag-orange);
    color: #fff;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

/* 뱃지 & 태그 */
.badge-korea {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #E67E22;
    color: #fff;
    padding: 8px 18px;
    font-weight: 800;
    border-radius: 5px;
    z-index: 10;
}

.career-tags {
    margin-top: 20px;
}

.career-tags span {
    display: inline-block;
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 8px;
    font-weight: 600;
}

.agility-profile-toggle {
    margin-top: 28px;
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    background: #fff;
    color: var(--ag-navy);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.agility-profile-toggle:hover {
    background: var(--ag-orange);
    color: #fff;
    transform: translateY(-2px);
}

.agility-profile-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
    transform: translateY(-8px);
    transition: max-height 0.45s ease, opacity 0.3s ease, transform 0.3s ease, margin-top 0.3s ease;
}

.expert-text.is-expanded .agility-profile-detail {
    max-height: 1400px;
    opacity: 1;
    margin-top: 24px;
    transform: translateY(0);
}

.agility-profile-detail div {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.agility-profile-detail h4 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
}

.agility-profile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.agility-profile-list li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: keep-all;
}

.agility-profile-list li:last-child {
    margin-bottom: 0;
}

.agility-profile-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ag-orange);
}

/* 애니메이션 */
.fade-in-up {
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@media (max-width: 1024px) {
    .expert-flex {
        flex-direction: column;
        text-align: center;
        width: min(100% - 40px, 720px);
        margin: 0 auto;
    }

    .agility-profile-detail {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .stats-container,
    .value-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .agility-profile-detail {
        width: calc(100% - 32px);
        margin-left: auto;
        margin-right: auto;
    }

    .expert-text.is-expanded .agility-profile-detail {
        margin-top: 22px;
    }

    .agility-profile-detail div {
        padding: 22px 18px;
    }
}

/* CTA v2: Full Width & Professional */
.agility-cta-v2 {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

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

.cta-v2-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-v2-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 42, 58, 0.8), rgba(26, 42, 58, 0.9));
}

.cta-v2-subtitle {
    color: var(--ag-orange);
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 20px;
}

.cta-v2-content h2 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 300;
}

.cta-v2-content h2 strong {
    font-weight: 800;
    color: var(--ag-orange);
}

.cta-v2-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 45px;
    line-height: 1.6;
}

.cta-v2-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-main-gold {
    background: var(--ag-orange);
    color: #fff;
    padding: 20px 45px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
}

.btn-sub-white {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 20px 45px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.btn-main-gold:hover {
    transform: translateY(-5px);
    background: #f39c12;
}

.btn-sub-white:hover {
    background: #fff;
    color: var(--ag-navy);
}

@media (max-width: 768px) {
    .cta-v2-content h2 {
        font-size: 2.2rem;
    }

    .cta-v2-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn-main-gold,
    .btn-sub-white {
        width: 80%;
    }
}

/* --- 어질리티 프로그램 전용 스타일 (유치원 스타일 계승) --- */
.agility-program {
    padding: 120px 0;
    background: #fff;
    overflow: hidden;
}

.agility-program .kinder-container {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.program-slider {
    width: 100%;
    max-width: calc(100vw - 80px);
    margin: 0 auto;
    padding: 60px 72px 100px !important;
    overflow: hidden !important;
    position: relative;
}

.program-slider .swiper-wrapper {
    align-items: stretch;
}

.program-slider.swiper-lock .swiper-wrapper {
    justify-content: center;
    transform: none !important;
}

.program-slider:has(.swiper-button-lock) .swiper-wrapper {
    justify-content: center;
    transform: none !important;
}

.program-slider .swiper-slide {
    width: 306px;
    height: auto;
    flex-shrink: 0;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.program-slider .swiper-slide-active {
    z-index: 10;
}

.program-card {
    position: relative;
    background: #fff;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
    height: 100%;
    cursor: pointer;
    transition: transform 0.3s;
}

.program-card:hover {
    transform: translateY(-8px);
}

.prog-img-box {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.prog-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.program-card:hover .prog-img-box img {
    transform: scale(1.05);
}

.prog-info {
    padding: 35px 30px;
    text-align: center;
}

.prog-info h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ag-navy);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.program-slider .sub-copy {
    font-size: 14px;
    color: #86868b;
}

.program-slider .detail-text {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: 0.4s;
}

.program-slider .swiper-slide-active .detail-text,
.program-card:hover .detail-text {
    max-height: 120px;
    opacity: 1;
    margin-top: 15px;
}

.program-slider .detail-text p {
    font-size: 14px !important;
    color: #636366 !important;
    line-height: 1.6;
    margin: 0;
}

.program-slider .swiper-slide-active h3,
.program-card:hover h3 {
    color: var(--ag-orange);
}

/* Swiper 페이지네이션 색상 변경 */
.program-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #e0e0e0;
    opacity: 1;
    transition: 0.3s;
}

.program-slider .swiper-pagination-bullet-active {
    width: 24px !important;
    height: 10px !important;
    border-radius: 5px !important;
    background: var(--ag-orange) !important;
}

.program-slider .swiper-button-next,
.program-slider .swiper-button-prev {
    color: var(--ag-orange) !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 20;
}

.program-slider .swiper-button-prev {
    left: 14px;
}

.program-slider .swiper-button-next {
    right: 14px;
}

.program-slider .swiper-button-next::after,
.program-slider .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 800;
}

.program-slider .swiper-button-lock,
.program-slider .swiper-pagination-lock {
    display: none !important;
}

@media (min-width: 769px) and (max-width: 1759px) {
    .program-slider::before,
    .program-slider::after {
        content: "";
        position: absolute;
        top: 60px;
        bottom: 100px;
        width: 72px;
        background: #fff;
        pointer-events: none;
        z-index: 11;
    }

    .program-slider::before {
        left: 0;
    }

    .program-slider::after {
        right: 0;
    }
}

@media (max-width: 768px) {
    .program-slider {
        padding: 40px 18px 80px !important;
    }

    .program-slider .swiper-slide {
        width: min(290px, calc(100vw - 76px));
    }

    .program-slider .swiper-slide-active {
        transform: scale(1);
    }

    .prog-img-box {
        height: 300px;
    }

    .program-slider .swiper-button-next,
    .program-slider .swiper-button-prev {
        display: none;
    }
}

@media (min-width: 1760px) {
    .program-slider {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (hover: hover) and (min-width: 769px) {
    .program-card {
        height: 560px;
        isolation: isolate;
    }

    .prog-img-box {
        height: 100%;
    }

    .prog-info {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        padding: 90px 30px 34px;
        color: #fff;
        background: linear-gradient(to top, rgba(29, 29, 31, 0.78) 0%, rgba(29, 29, 31, 0.42) 46%, rgba(29, 29, 31, 0) 100%);
        transform: translateY(34px);
        transition: transform 0.35s ease, background 0.35s ease;
    }

    .prog-info h3 {
        color: #fff;
    }

    .program-slider .sub-copy {
        color: rgba(255, 255, 255, 0.78);
    }

    .program-slider .detail-text {
        max-height: none;
        opacity: 0;
        overflow: visible;
        transform: translateY(12px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .program-slider .swiper-slide-active .detail-text,
    .program-card:hover .detail-text {
        max-height: none;
        opacity: 1;
        margin-top: 15px;
        transform: translateY(0);
    }

    .program-slider .detail-text p {
        color: rgba(255, 255, 255, 0.86) !important;
    }

    .program-slider .swiper-slide-active .prog-info,
    .program-card:hover .prog-info {
        background: linear-gradient(to top, rgba(230, 126, 34, 0.9) 0%, rgba(230, 126, 34, 0.58) 54%, rgba(230, 126, 34, 0) 100%);
        transform: translateY(0);
    }

    .program-slider .swiper-slide-active h3,
    .program-card:hover h3 {
        color: #fff;
    }
}
