/* ======== الأساسيات ======== */
:root {
    --primary-color: #4e92df;
    --secondary-color: #ff9e6d;
    --nursery-color: #ff7aa2;
    --kindergarten-color: #5fb878;
    --light-color: #ffffff;
    --dark-color: #333333;
    --cloud-color: #f9f9f9;
    --star-color: #ffde59;
    --butterfly-color1: #ff9ebf;
    --butterfly-color2: #badfff;
    --butterfly-color3: #ffd56a;
    --butterfly-color4: #c8ffbb;
    --flower-color1: #ff9ebf;
    --flower-color2: #ffd56a;
    --flower-color3: #badfff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #e8f4ff 0%, #f5e8ff 100%);
    color: var(--dark-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ======== الحاوية الرئيسية ======== */
.intro-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
}

/* ======== الهيدر ======== */
.intro-header {
    text-align: center;
    padding: 30px 0;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.8s ease;
}

.intro-header.show {
    opacity: 1;
    transform: translateY(0);
}

/* ======== الشعارات ======== */
.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
}

.logo {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.nursery-logo {
    animation-delay: 0.5s;
}

.kindergarten-logo {
    animation-delay: 1s;
}

.logo-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1);
}

.main-title {
    font-size: 3.2rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--nursery-color), var(--kindergarten-color));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--dark-color);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ======== بطاقات الاختيار ======== */
.intro-choice {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.choice-card {
    width: 350px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.choice-card.show {
    opacity: 1;
    transform: translateY(0);
}

.choice-card.hover {
    transform: translateY(-10px);
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.choice-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.card-front {
    background-color: var(--light-color);
}

.card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nursery .card-front, .nursery .card-back {
    background: linear-gradient(135deg, var(--nursery-color) 0%, #ffb6c1 100%);
}

.kindergarten .card-front, .kindergarten .card-back {
    background: linear-gradient(135deg, var(--kindergarten-color) 0%, #a6e6b8 100%);
}

.choice-card i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--light-color);
}

.choice-card h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--light-color);
    font-weight: 700;
}

.choice-card p {
    color: var(--light-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.enter-btn {
    display: inline-block;
    background-color: var(--light-color);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    color: var(--dark-color);
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nursery .enter-btn {
    color: var(--nursery-color);
}

.kindergarten .enter-btn {
    color: var(--kindergarten-color);
}

.enter-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* ======== الفوتر ======== */
.intro-footer {
    text-align: center;
    padding: 30px 0;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.intro-footer.show {
    opacity: 1;
    transform: translateY(0);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--light-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: var(--light-color);
}

.copyright {
    color: var(--dark-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ======== الخلفية المتحركة ======== */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.cloud {
    position: absolute;
    background-color: var(--cloud-color);
    border-radius: 50%;
    opacity: 0.8;
}

.cloud-1 {
    width: 300px;
    height: 100px;
    top: 15%;
    right: 5%;
    animation: float 20s linear infinite;
}

.cloud-2 {
    width: 200px;
    height: 70px;
    top: 40%;
    left: 10%;
    animation: float 25s linear infinite reverse;
}

.cloud-3 {
    width: 150px;
    height: 50px;
    bottom: 30%;
    right: 15%;
    animation: float 15s linear infinite;
}

.sun {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #ffde59 0%, rgba(255, 222, 89, 0) 70%);
    border-radius: 50%;
    position: absolute;
    top: 10%;
    left: 10%;
    animation: pulse 5s infinite alternate;
}

.star {
    position: absolute;
    background-color: var(--star-color);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star-1 {
    width: 30px;
    height: 30px;
    top: 20%;
    left: 30%;
    animation: twinkle 3s infinite alternate;
}

.star-2 {
    width: 20px;
    height: 20px;
    top: 15%;
    right: 40%;
    animation: twinkle 4s infinite alternate 1s;
}

.star-3 {
    width: 25px;
    height: 25px;
    bottom: 30%;
    left: 20%;
    animation: twinkle 5s infinite alternate 2s;
}

.star-4 {
    width: 15px;
    height: 15px;
    bottom: 20%;
    right: 30%;
    animation: twinkle 3.5s infinite alternate 1.5s;
}

.star-5 {
    width: 20px;
    height: 20px;
    top: 40%;
    right: 15%;
    animation: twinkle 4.5s infinite alternate 0.5s;
}

/* ======== الفراشات ======== */
.butterfly {
    position: absolute;
    z-index: 1;
}

.butterfly-wings {
    position: relative;
    width: 40px;
    height: 40px;
    transform-origin: center;
    animation: butterflyFly 15s linear infinite;
}

.wing {
    position: absolute;
    width: 20px;
    height: 30px;
    top: 5px;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    animation: wingFlap 0.2s ease-in-out infinite alternate;
}

.wing-left {
    left: 0;
    transform-origin: right center;
}

.wing-right {
    right: 0;
    transform-origin: left center;
}

.butterfly-1 {
    top: 20%;
    left: 15%;
}

.butterfly-1 .wing {
    background-color: var(--butterfly-color1);
}

.butterfly-2 {
    top: 35%;
    right: 20%;
    transform: scale(0.8);
}

.butterfly-2 .wing {
    background-color: var(--butterfly-color2);
}

.butterfly-3 {
    bottom: 25%;
    left: 25%;
    transform: scale(1.2);
}

.butterfly-3 .wing {
    background-color: var(--butterfly-color3);
}

.butterfly-4 {
    bottom: 40%;
    right: 10%;
    transform: scale(0.7);
}

.butterfly-4 .wing {
    background-color: var(--butterfly-color4);
}

/* ======== الورود والنباتات ======== */
.flower {
    position: absolute;
    z-index: 1;
}

.flower-center {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ffde59;
    border-radius: 50%;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.petals {
    position: absolute;
    width: 50px;
    height: 50px;
    animation: flowerSway 5s ease-in-out infinite;
}

.petal {
    position: absolute;
    width: 20px;
    height: 30px;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    left: 50%;
    top: 50%;
    transform-origin: center bottom;
}

.flower-1 {
    bottom: 10%;
    left: 5%;
    transform: scale(0.8);
}

.flower-1 .petal {
    background-color: var(--flower-color1);
}

.flower-1 .petal:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-15px); }
.flower-1 .petal:nth-child(2) { transform: translate(-50%, -50%) rotate(72deg) translateY(-15px); }
.flower-1 .petal:nth-child(3) { transform: translate(-50%, -50%) rotate(144deg) translateY(-15px); }
.flower-1 .petal:nth-child(4) { transform: translate(-50%, -50%) rotate(216deg) translateY(-15px); }
.flower-1 .petal:nth-child(5) { transform: translate(-50%, -50%) rotate(288deg) translateY(-15px); }

.flower-2 {
    bottom: 20%;
    right: 5%;
}

.flower-2 .petal {
    background-color: var(--flower-color2);
}

.flower-2 .petal:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-15px); }
.flower-2 .petal:nth-child(2) { transform: translate(-50%, -50%) rotate(72deg) translateY(-15px); }
.flower-2 .petal:nth-child(3) { transform: translate(-50%, -50%) rotate(144deg) translateY(-15px); }
.flower-2 .petal:nth-child(4) { transform: translate(-50%, -50%) rotate(216deg) translateY(-15px); }
.flower-2 .petal:nth-child(5) { transform: translate(-50%, -50%) rotate(288deg) translateY(-15px); }

.flower-3 {
    bottom: 15%;
    left: 50%;
    transform: scale(1.2);
}

.flower-3 .petal {
    background-color: var(--flower-color3);
}

.flower-3 .petal:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-15px); }
.flower-3 .petal:nth-child(2) { transform: translate(-50%, -50%) rotate(72deg) translateY(-15px); }
.flower-3 .petal:nth-child(3) { transform: translate(-50%, -50%) rotate(144deg) translateY(-15px); }
.flower-3 .petal:nth-child(4) { transform: translate(-50%, -50%) rotate(216deg) translateY(-15px); }
.flower-3 .petal:nth-child(5) { transform: translate(-50%, -50%) rotate(288deg) translateY(-15px); }

/* ======== الحيوانات المرحة ======== */
.animal {
    position: absolute;
    z-index: 1;
}

.rabbit {
    bottom: 5%;
    right: 20%;
    width: 60px;
    height: 80px;
}

.rabbit-body {
    position: absolute;
    width: 40px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    bottom: 0;
    left: 10px;
}

.rabbit-head {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: white;
    border-radius: 50%;
    bottom: 20px;
    left: 5px;
}

.rabbit-ear {
    position: absolute;
    width: 10px;
    height: 30px;
    background-color: white;
    border-radius: 50% 50% 0 0;
    bottom: 40px;
}

.rabbit-ear-left {
    left: 8px;
    transform: rotate(-10deg);
    animation: earWiggle 3s ease-in-out infinite alternate;
}

.rabbit-ear-right {
    left: 18px;
    transform: rotate(10deg);
    animation: earWiggle 3s ease-in-out infinite alternate 1.5s;
}

.bird {
    animation: birdFly 30s linear infinite;
}

.bird-body {
    position: absolute;
    width: 30px;
    height: 15px;
    background-color: #5fb878;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.bird-wing-left, .bird-wing-right {
    position: absolute;
    width: 20px;
    height: 12px;
    background-color: #4ca766;
    border-radius: 50% 50% 50% 50% / 80% 80% 20% 20%;
    top: -5px;
    animation: wingFlap 0.5s ease-in-out infinite alternate;
}

.bird-wing-left {
    left: -5px;
    transform-origin: right center;
}

.bird-wing-right {
    right: -5px;
    transform-origin: left center;
}

.bird-1 {
    top: 20%;
    right: -50px;
    transform: scale(0.8);
}

.bird-2 {
    top: 30%;
    left: -50px;
    transform: scale(1.2) rotateY(180deg);
}

/* ======== العشب والنباتات ======== */
.grass {
    position: absolute;
    bottom: 0;
    width: 150px;
    height: 30px;
    overflow: hidden;
}

.grass::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    bottom: 0;
    background: 
        radial-gradient(circle at 0% 100%, transparent 45%, var(--kindergarten-color) 45%, var(--kindergarten-color) 55%, transparent 55%),
        radial-gradient(circle at 20% 100%, transparent 45%, var(--kindergarten-color) 45%, var(--kindergarten-color) 55%, transparent 55%),
        radial-gradient(circle at 40% 100%, transparent 45%, var(--kindergarten-color) 45%, var(--kindergarten-color) 55%, transparent 55%),
        radial-gradient(circle at 60% 100%, transparent 45%, var(--kindergarten-color) 45%, var(--kindergarten-color) 55%, transparent 55%),
        radial-gradient(circle at 80% 100%, transparent 45%, var(--kindergarten-color) 45%, var(--kindergarten-color) 55%, transparent 55%),
        radial-gradient(circle at 100% 100%, transparent 45%, var(--kindergarten-color) 45%, var(--kindergarten-color) 55%, transparent 55%);
    background-size: 40px 40px;
    background-repeat: repeat-x;
    animation: grassSway 5s ease-in-out infinite alternate;
}

.grass-1 {
    left: 0;
}

.grass-2 {
    left: calc(50% - 75px);
}

.grass-3 {
    right: 0;
}

/* ======== رسوم متحركة إضافية ======== */
@keyframes butterflyFly {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, -30px) rotate(15deg);
    }
    50% {
        transform: translate(100px, 0) rotate(0deg);
    }
    75% {
        transform: translate(50px, 30px) rotate(-15deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes wingFlap {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(80deg);
    }
}

@keyframes flowerSway {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes earWiggle {
    0% {
        transform: rotate(-10deg);
    }
    100% {
        transform: rotate(-20deg);
    }
}

@keyframes birdFly {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(100vw) translateY(-50px);
    }
    51% {
        transform: translateX(100vw) translateY(-50px) rotateY(180deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotateY(180deg);
    }
}

@keyframes grassSway {
    0% {
        transform: skewX(0deg);
    }
    100% {
        transform: skewX(5deg);
    }
}

/* ======== الرسوم المتحركة الأساسية ======== */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ======== وسائط متعددة للتجاوب ======== */
@media (max-width: 768px) {
    .intro-choice {
        flex-direction: column;
        align-items: center;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .choice-card {
        width: 100%;
        max-width: 350px;
    }
    
    .logos-container {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .choice-card {
        height: 350px;
    }
    
    .choice-card h2 {
        font-size: 1.8rem;
    }
    
    .choice-card p {
        font-size: 1rem;
    }
    
    .logo-image {
        max-width: 120px;
        max-height: 120px;
    }
} 