/* ===============================
   Global Styles
=============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #fdfdfd;
    color: #333;
    line-height: 1.6;
}

/* ===============================
   Header
=============================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #C7EAEF;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #ffb3d9;
}

header .logo {
    font-size: 1.4rem;
    font-weight: bold;
}

header nav {
    margin-left: auto;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover {
    color: #2C2C2C;
}

/* ===============================
   Hero Section
=============================== */
.hero {
    height: 65vh;
    background: #f8fbfc;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: #333;
    border-bottom: 2px solid #e3f4f7;
    position: relative;
    overflow: hidden;
}

.hero-text {
    padding: 20px 35px;
    border-radius: 12px;
    max-width: 600px;
    z-index: 2;
}

.hero-text h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    color: #ff4da6;
}

.hero-text p {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: #444;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 8px;
    background: #ff4da6;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
}

.btn:hover {
    background: #e60073;
}

/* ===============================
   Section Base Styling
=============================== */
section {
    padding: 60px 20px;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* ===============================
   Programs Section
=============================== */
.program-list {
    display: grid;
    gap: 20px;
    padding: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.program-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.program-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.program-card h3 {
    margin-bottom: 10px;
    color: #ff4da6;
}

/* ===============================
   Gallery Section
=============================== */
.gallery-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    transition: 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* ===============================
   Contact Form
=============================== */
form {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input,
textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

button {
    padding: 12px;
    border: none;
    background: #2C2C2C;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

button:hover {
    background: #e60073;
}

/* ===============================
   Enrollment Form
=============================== */
.enrollment-form {
    background: #fff8f0;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 20px auto;
}

/* ===============================
   Details Dropdown
=============================== */
details {
    background: #fff3e6;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #ffd1b3;
}

details summary {
    font-weight: bold;
    font-size: 1.05rem;
    cursor: pointer;
    color: #ff6f61;
}

/* ===============================
   Footer Helpers
=============================== */
.footer-container {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
}

.footer-nav {
    margin-top: 2rem;
    display: flex;
    align-items: center;
}

.footer-nav.spread {
    justify-content: space-between;
}

.footer-nav.end {
    justify-content: flex-end;
}

/* ===============================
   HERO FOLDER (AUTO OPEN & CLOSE)
=============================== */
:root {
    --folder-color: #4c73e6;
    --folder-back-color: #2032ab;
    --paper-1: #ec62f1;
    --paper-2: #1e9a35;
    --paper-3: #e1ad5f;
}

.folder-container {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

/* Folder base */
.folder {
    width: 100px;
    height: 80px;
    position: relative;
    animation: folderBounce 4.5s infinite ease-in-out;
}

/* Folder back */
.folder__back {
    position: relative;
    width: 100px;
    height: 80px;
    background: var(--folder-back-color);
    border-radius: 0 12px 12px 12px;
}

.folder__back::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 34px;
    height: 12px;
    background: var(--folder-back-color);
    border-radius: 6px 6px 0 0;
}

/* Front flap */
.folder__front {
    position: absolute;
    inset: 0;
    background: var(--folder-color);
    border-radius: 6px 12px 12px 12px;
    transform-origin: top;
    animation: flapOpenClose 4.5s infinite ease-in-out;
    z-index: 4;
}

/* ===============================
   PAPERS (WIDER SPREAD)
=============================== */
.paper {
    position: absolute;
    bottom: 10%;
    left: 50%;
    width: 70%;
    height: 80%;
    border-radius: 10px;
    opacity: 0;
    transform: translate(-50%, 10%);
    animation: paperPop 4.5s infinite cubic-bezier(.34,1.56,.64,1);
    z-index: 2;
}

.paper:nth-child(2) {
    background: var(--paper-1);
    animation-delay: 0s;
}

.paper:nth-child(3) {
    background: var(--paper-2);
    animation-delay: .08s;
}

.paper:nth-child(4) {
    background: var(--paper-3);
    animation-delay: .16s;
}

/* ===============================
   PAPER ANIMATION (WIDE FAN)
=============================== */
@keyframes paperPop {
    /* CLOSED */
    0%, 25%, 100% {
        opacity: 0;
        transform: translate(-50%, 10%);
    }

    /* OPEN – WIDE SPREAD */
    45%, 60% {
        opacity: 1;
    }
}

/* Individual wide positions */
.paper:nth-child(2) {
    animation-name: paperLeft;
}

.paper:nth-child(3) {
    animation-name: paperCenter;
}

.paper:nth-child(4) {
    animation-name: paperRight;
}

@keyframes paperLeft {
    0%, 25%, 100% {
        opacity: 0;
        transform: translate(-50%, 10%);
    }
    45%, 60% {
        opacity: 1;
        transform: translate(-165%, -115%) rotate(-18deg);
    }
}

@keyframes paperCenter {
    0%, 25%, 100% {
        opacity: 0;
        transform: translate(-50%, 10%);
    }
    45%, 60% {
        opacity: 1;
        transform: translate(-50%, -145%) rotate(0deg);
    }
}

@keyframes paperRight {
    0%, 25%, 100% {
        opacity: 0;
        transform: translate(-50%, 10%);
    }
    45%, 60% {
        opacity: 1;
        transform: translate(65%, -115%) rotate(18deg);
    }
}


/* Hide on mobile */
@media (max-width: 767px) {
    .folder-container {
        display: none;
    }
}

/* Smooth folder tab opening/closing */
@keyframes folder-open-close {
  0%, 100% { transform: rotateX(0deg); }
  50% { transform: rotateX(-15deg); }
}
.animate-folder-open-close {
  animation: folder-open-close 3s ease-in-out infinite;
}

/* Icon fade in/out slightly delayed for friendly effect */
@keyframes icon-appear {
  0%, 40%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.animate-icon-appear {
  animation: icon-appear 3s ease-in-out infinite;
}
