/* Variables - Pastel Theme */
:root {
    --color-pink: #FFB7B2;
    --color-blue-alt: #B5EAD7;
    --color-yellow: #FFDAC1;
    --color-green: #C7CEEA;
    --color-dark: #4A4A4A;
    --color-gray: #7A7A7A;
    --color-light: #FAFAFA;
    --color-white: #FFFFFF;
    --shadow: 0 12px 24px rgba(0,0,0,0.06);
    --radius: 24px;
    --radius-playful: 30px 10px 30px 10px;
    --transition: all 0.3s ease;
}

/* Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: url('assets/images/bg-body.jpg') center/cover fixed no-repeat;
    background: -webkit-image-set(url('assets/images/bg-body.webp') type('image/webp'), url('assets/images/bg-body.jpg') type('image/jpeg')) center/cover fixed no-repeat;
    background: image-set(url('assets/images/bg-body.webp') type('image/webp'), url('assets/images/bg-body.jpg') type('image/jpeg')) center/cover fixed no-repeat;
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.82);
    z-index: -1;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}
.bg-pink { background-color: var(--color-pink); color: #fff;}
.bg-blue { background-color: var(--color-blue-alt); color: #fff;}
.bg-yellow { background-color: var(--color-yellow); color: #fff;}
.bg-green { background-color: var(--color-green); color: #fff;}
.bg-light { background: rgba(255, 255, 255, 0.6); }
.w-100 { width: 100%; }

/* Typography */
h1, h2, h3 { color: var(--color-dark); margin-bottom: 1rem; }
h1 span { color: #FF8BA7; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.2rem; position: relative; display: inline-block; }
.section-header h2::after {
    content: ''; position: absolute; width: 50%; height: 6px;
    background: var(--color-yellow); bottom: -10px; right: 25%;
    border-radius: 10px;
}
.section-header p { color: var(--color-gray); font-size: 1.1rem; margin-top: 15px;}

/* Buttons */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}
.btn-primary { background-color: #FF8BA7; color: white; box-shadow: 0 4px 15px rgba(255,139,167,0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(255,139,167,0.6); }
.btn-secondary { background-color: var(--color-blue-alt); color: #4A4A4A; }
.btn-secondary:hover { transform: translateY(-3px); }

/* Header & Nav */
.header {
    background-color: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.5rem; font-weight: bold; color: var(--color-dark); display: flex; align-items: center; gap: 8px; }
.logo-img { height: 80px; width: auto; }

.nav-list { display: flex; gap: 20px; }
.nav-link { font-weight: 500; transition: var(--transition); padding: 5px 10px; border-radius: 10px; cursor: pointer; position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: calc(100% - 20px);
    height: 3px;
    background: #FF8BA7;
    border-radius: 3px;
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.3s ease;
}
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}
.nav-link:hover, .nav-link.active { background-color: var(--color-yellow); color: var(--color-dark); }
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--color-dark); }

/* Main Content & SPA Logic */
.page-section {
    display: none;
    padding: 80px 0;
}
.page-section.active {
    display: block;
}
.page-section.exiting {
    display: block;
    animation: pageExit 0.35s ease forwards;
    pointer-events: none;
}
.page-section.active.entering {
    animation: pageEnter 0.5s ease forwards;
}

@keyframes pageEnter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pageExit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-12px); }
}

/* Hero Section */
.hero-wrap {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 0 40px 40px;
    padding: 40px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-wrap::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--color-pink);
    opacity: 0.15;
}
.hero-wrap::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--color-yellow);
    opacity: 0.15;
}
.hero { display: flex; align-items: center; gap: 50px; min-height: 70vh; position: relative; z-index: 1; }
.hero-text { flex: 1; }
.hero-badge {
    display: inline-block;
    background: var(--color-yellow);
    color: var(--color-dark);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero-text h1 { font-size: 2.8rem; line-height: 1.4; margin-bottom: 18px; }
.hero-text p { font-size: 1.1rem; margin-bottom: 2rem; color: var(--color-gray); line-height: 1.8; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-buttons .btn { margin: 0; }
.hero-image { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; }

/* Components (Cards, Grids) */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}
.card:hover { transform: translateY(-10px); border-color: var(--color-yellow); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; text-align: center; }
.icon-box {
    width: 70px; height: 70px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 20px auto;
    transform: rotate(-5deg); transition: var(--transition);
}
.card:hover .icon-box { transform: rotate(5deg) scale(1.1); }

/* Classes */
.class-card { padding: 0; overflow: hidden; }
.class-card img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 25px; }
.badge { display: inline-block; padding: 5px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; margin-bottom: 15px; }

/* Teachers */
.teacher-card { text-align: center; }
.teacher-img-wrap {
    width: 150px; height: 150px; margin: 0 auto 20px;
    border-radius: 50%; padding: 5px; border: 4px dashed;
}
.teacher-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.teacher-img-wrap.border-pink { border-color: var(--color-pink); }
.teacher-img-wrap.border-blue { border-color: var(--color-blue-alt); }
.teacher-img-wrap.border-yellow { border-color: var(--color-yellow); }
.role { color: #FF8BA7; font-weight: 500; }

/* Facilities */
.facility-item { display: flex; gap: 20px; align-items: flex-start; background: white; padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); }
.facility-item .icon-box { margin: 0; flex-shrink: 0; }

/* Gallery */
.gallery-subtitle {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--color-dark);
    position: relative;
    display: inline-block;
}
.gallery-subtitle::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 3px;
    background: var(--color-pink);
    border-radius: 3px;
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.rounded-img { border-radius: 20px; object-fit: cover; height: 250px; width: 100%; transition: var(--transition); cursor: pointer; }
.rounded-img:hover { transform: scale(1.03); box-shadow: var(--shadow); }
.gallery-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.gallery-video-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.gallery-video-card:hover { transform: scale(1.02); }
.gallery-video-card video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.gallery-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    border: 2px solid rgba(255,255,255,0.3);
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.gallery-video-card.g-playing .gallery-video-play { opacity: 0; }
.gallery-video-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 10px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: white;
    font-size: 0.8rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    .gallery-video-grid {
        grid-template-columns: 1fr;
    }
    .gallery-video-card video { height: 200px; }
}

/* Kindergarten Tour */
.tour-grid {
    column-count: 3;
    column-gap: 20px;
}
.tour-grid img {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 20px;
    cursor: pointer;
    display: block;
    box-shadow: var(--shadow);
    transition: var(--transition);
    break-inside: avoid;
}
.tour-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 14px 28px rgba(0,0,0,0.15);
}

/* Contact */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }.contact-info ul li { margin-bottom: 20px; display: flex; align-items: center; gap: 15px; font-size: 1.1rem; }
.contact-info i { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.form-group { margin-bottom: 20px; }
input, textarea {
    width: 100%; padding: 15px; border: 2px solid #eee; border-radius: 15px;
    font-family: inherit; font-size: 1rem; transition: var(--transition);
}
input:focus, textarea:focus { outline: none; border-color: var(--color-pink); }
.response-msg {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    display: none;
}
.response-msg.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
.response-msg.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

/* Footer */
.footer { background-color: var(--color-white); padding: 60px 0 20px; margin-top: 50px; border-top: 2px dashed var(--color-yellow); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a { width: 40px; height: 40px; background: var(--color-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #FF8BA7; transition: var(--transition); }
.social-links a:hover { background: #FF8BA7; color: white; transform: translateY(-3px); }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a:hover { color: #FF8BA7; padding-right: 5px; }
.newsletter-form { display: flex; margin-top: 15px; }
.newsletter-form input { border-radius: 0 15px 15px 0; border: 2px solid #eee; border-left: none; }
.newsletter-form button { background: var(--color-yellow); border: none; padding: 0 20px; border-radius: 15px 0 0 15px; cursor: pointer; color: var(--color-dark); font-size: 1.2rem; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #eee; color: var(--color-gray); }

/* Gallery — Videos & Pictures */
/* TV Frame Design */
.tv-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tv-antenna {
    position: relative;
    width: 80px;
    height: 35px;
    margin-bottom: -2px;
    z-index: 1;
}
.tv-antenna::before, .tv-antenna::after {
    content: '';
    position: absolute;
    top: 0;
    width: 3px;
    height: 35px;
    background: var(--color-gray);
    border-radius: 3px;
}
.tv-antenna::before {
    left: 8px;
    transform: rotate(-25deg);
    transform-origin: bottom center;
}
.tv-antenna::after {
    right: 8px;
    transform: rotate(25deg);
    transform-origin: bottom center;
}
.tv-antenna-tip {
    position: absolute;
    top: -8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.tv-antenna-tip.left {
    left: 2px;
    background: var(--color-pink);
}
.tv-antenna-tip.right {
    right: 2px;
    background: var(--color-blue-alt);
}
.tv-body {
    background: linear-gradient(145deg, #ffe8e8, #ffd4d4);
    border-radius: 24px 24px 18px 18px;
    padding: 12px 12px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), inset 0 2px 4px rgba(255,255,255,0.6);
    width: 100%;
    border: 3px solid #f5baba;
    position: relative;
}
.tv-body::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 8px;
    background: #f5baba;
    border-radius: 4px 4px 0 0;
}
.tv-screen-wrap {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 6px;
    position: relative;
    overflow: hidden;
}
.tv-screen-wrap video, .tv-screen-wrap img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
.tv-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 3;
}
.tv-card.playing .tv-play-btn {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.tv-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 8px;
    gap: 10px;
}
.tv-brand {
    font-size: 0.7rem;
    color: #d48989;
    font-weight: 700;
    letter-spacing: 1px;
}
.tv-knobs {
    display: flex;
    gap: 10px;
    align-items: center;
}
.tv-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffb7b2, #e8948e);
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid #d48989;
    position: relative;
}
.tv-knob::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 5px;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}
.tv-knob.small {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 35% 35%, #b5ead7, #8dc4a8);
    border-color: #8dc4a8;
}
.tv-legs {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: -1px;
}
.tv-leg {
    width: 22px;
    height: 18px;
    background: #e8b0b0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.hero-tv {
    width: 100%;
    max-width: 620px;
}
.hero-tv .tv-screen-wrap video,
.hero-tv .tv-screen-wrap img,
.hero-tv .tv-slide img,
.hero-tv .tv-slide video,
.hero-tv .tv-slides-container {
    height: 400px;
    min-height: 400px;
}

/* TV Slideshow (hero) */
.tv-slides-container {
    position: relative;
    width: 100%;
    min-height: 260px;
}
.tv-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: 12px;
    overflow: hidden;
}
.tv-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}
.tv-slide img, .tv-slide video {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
.tv-slide video {
    cursor: pointer;
}
.tv-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}
.tv-screen-wrap:hover .tv-arrow { opacity: 1; }
.tv-arrow:hover { background: rgba(255,255,255,0.4); }
.tv-prev { right: 10px; }
.tv-next { left: 10px; }
.tv-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 5px;
}
.tv-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    padding: 0;
}
.tv-dot.active { background: white; transform: scale(1.3); }
.tv-dot:hover { background: rgba(255,255,255,0.8); }
.tv-fullscreen-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    background: rgba(0,0,0,0.25);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(4px);
}
.tv-screen-wrap:hover .tv-fullscreen-btn { opacity: 1; }
.tv-fullscreen-btn:hover { background: rgba(0,0,0,0.4); }

/* Fullscreen Overlay */
.fs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.fs-overlay.open { display: flex; }
.fs-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}
.fs-close:hover { background: rgba(255,255,255,0.15); }
.fs-media {
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fs-media img, .fs-media video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}
.fs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}
.fs-arrow:hover { background: rgba(255,255,255,0.25); }
.fs-prev { right: 20px; }
.fs-next { left: 20px; }
.fs-counter {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    z-index: 10;
}

@media (max-width: 992px) {
    .hero { flex-direction: column; text-align: center; min-height: auto; }
    .hero-buttons { justify-content: center; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-tv { max-width: 520px; }
    .hero-tv .tv-screen-wrap video,
    .hero-tv .tv-screen-wrap img,
    .hero-tv .tv-slide img,
    .hero-tv .tv-slide video,
    .hero-tv .tv-slides-container { height: 340px; min-height: 340px; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .tv-screen-wrap video, .tv-screen-wrap img {
        height: 200px;
    }
    .hero-tv { max-width: 100%; }
    .hero-tv .tv-screen-wrap video,
    .hero-tv .tv-screen-wrap img,
    .hero-tv .tv-slide img,
    .hero-tv .tv-slide video,
    .hero-tv .tv-slides-container { height: 280px; min-height: 280px; }
    .mobile-toggle { display: block; }
    .nav-list {
        position: absolute; top: 100%; right: 0; width: 100%;
        background: var(--color-white); flex-direction: column;
        padding: 20px; box-shadow: var(--shadow); gap: 10px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }
    .nav-list.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .hero-text h1 { font-size: 1.8rem; }
    .section-header h2 { font-size: 1.8rem; }
    .tour-grid { column-count: 1; }
}

@media (max-width: 992px) {
    .tour-grid { column-count: 2; }
}
