/* Jerusalem Hills Kids Zone - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile Performance Optimizations */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

* {
    -webkit-tap-highlight-color: rgba(255, 204, 0, 0.3);
    -webkit-touch-callout: none;
}

/* Optimize hardware acceleration for mobile */
.game-card.enhanced,
.game-icon,
.play-button,
.nav-button,
.contact-button,
.resource-link {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fffdf6 0%, #fff5e6 100%);
    color: #333;
    line-height: 1.6;
}

/* Header */
.kids-header {
    background: linear-gradient(135deg, #ffcc00 0%, #ffb700 100%);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-bottom: 4px solid #ff6f61;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.kids-logo {
    max-width: 60px;
    height: auto;
}

.kids-header h1 {
    color: #fff;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.kids-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-button {
    background: #fff;
    color: #ff6f61;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-button:hover {
    background: #ff6f61;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,111,97,0.4);
}

.parent-link {
    background: #e0e0e0;
    color: #666;
}

.parent-link:hover {
    background: #999;
    color: #fff;
}

/* Main Content */
.kids-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h2 {
    font-size: 2.5em;
    color: #ff6f61;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.3em;
    color: #666;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.game-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.math-game:hover {
    border-color: #4CAF50;
}

.words-game:hover {
    border-color: #2196F3;
}

.memory-game:hover {
    border-color: #9C27B0;
}

.game-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #ff6f61;
}

.game-card p {
    color: #666;
    font-size: 1.1em;
}

/* Coming Soon Section */
.coming-soon {
    text-align: center;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.coming-soon h3 {
    font-size: 2em;
    color: #ffb700;
    margin-bottom: 10px;
}

.coming-soon p {
    color: #666;
    font-size: 1.2em;
}

/* Footer */
.kids-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

.kids-footer a {
    color: #ffcc00;
    text-decoration: none;
}

.kids-footer a:hover {
    text-decoration: underline;
}

/* New Game Cards */
.subtraction-game:hover {
    border-color: #2196F3;
}

.multiplication-game:hover {
    border-color: #FF9800;
}

.history-game:hover {
    border-color: #8B4513;
}

/* Fun Facts Section */
.fun-facts {
    margin: 60px auto 40px;
    text-align: center;
    max-width: 1000px;
    padding: 0 20px;
}

.fun-facts h3 {
    font-size: 2em;
    color: #ff6f61;
    margin-bottom: 30px;
}

.fact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fact-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

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

.fact-card p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

/* Enhanced Game Categories */
.game-category {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.category-title {
    font-size: 1.8rem;
    color: #ff6f61;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.category-games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Enhanced Game Cards */
.game-card.enhanced {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.game-card.enhanced:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.game-card.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.game-icon-wrapper {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.game-card.enhanced:hover .game-icon {
    transform: scale(1.1) rotate(5deg);
}

.game-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.game-badge.new {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.game-badge.popular {
    background: linear-gradient(135deg, #FF6B6B, #ee5a52);
}

.game-badge.special {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.game-content {
    flex-grow: 1;
    text-align: center;
    margin-bottom: 15px;
}

.game-content h4 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
}

.game-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.game-features {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.feature {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #90caf9;
}

.play-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.play-button:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Specific Game Card Colors */
.math-game.enhanced:hover {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
}

.subtraction-game.enhanced:hover {
    border-color: #2196F3;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.multiplication-game.enhanced:hover {
    border-color: #FF9800;
    background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
}

.division-game.enhanced:hover {
    border-color: #9C27B0;
    background: linear-gradient(135deg, #ffffff 0%, #f3e5f5 100%);
}

.financial-game.enhanced:hover {
    border-color: #FFD700;
    background: linear-gradient(135deg, #ffffff 0%, #fffde7 100%);
}

.words-game.enhanced:hover {
    border-color: #607D8B;
    background: linear-gradient(135deg, #ffffff 0%, #eceff1 100%);
}

.hebrew-game.enhanced:hover {
    border-color: #3F51B5;
    background: linear-gradient(135deg, #ffffff 0%, #e8eaf6 100%);
}

.geography-game.enhanced:hover {
    border-color: #795548;
    background: linear-gradient(135deg, #ffffff 0%, #efebe9 100%);
}

.capitals-game.enhanced:hover {
    border-color: #009688;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2f1 100%);
}

.space-game.enhanced:hover {
    border-color: #673AB7;
    background: linear-gradient(135deg, #ffffff 0%, #ede7f6 100%);
}

.memory-game.enhanced:hover {
    border-color: #E91E63;
    background: linear-gradient(135deg, #ffffff 0%, #fce4ec 100%);
}

.history-game.enhanced:hover {
    border-color: #8B4513;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5dc 100%);
}

/* Special Curriculum Section */
.special-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.special-section .category-title {
    color: #FFD700;
}

.curriculum-showcase {
    display: flex;
    justify-content: center;
}

.curriculum-card.enhanced {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    max-width: 600px;
    min-height: 200px;
    text-align: center;
}

.curriculum-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.curriculum-content h4 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.curriculum-highlights {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.highlight {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.explore-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.explore-button:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Enhanced Fun Facts */
.fun-facts {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    padding: 40px 30px;
    margin: 40px auto;
}

.fun-facts h3 {
    color: #FFE66D;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.fact-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Parents & Teachers Section */
.parents-teachers-section {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    padding: 60px 20px;
    margin-top: 40px;
}

.parents-container {
    max-width: 1200px;
    margin: 0 auto;
}

.parents-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.parents-content {
    display: grid;
    gap: 40px;
}

/* Safety Features */
.safety-features h3 {
    font-size: 1.8rem;
    color: #4ECDC4;
    margin-bottom: 20px;
    text-align: center;
}

.safety-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.safety-list li {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.safety-list li:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
}

/* Educational Goals */
.educational-goals h3 {
    font-size: 1.8rem;
    color: #FF6B6B;
    margin-bottom: 25px;
    text-align: center;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.education-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Screen Time Guidance Styles */
.screen-time-guidance {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    border-left: 5px solid #FF6B6B;
}

.screen-time-guidance h3 {
    color: #FFD700;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.screen-time-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.recommendation-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.recommendation-card.important {
    border-color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.recommendation-card h4 {
    color: #FFD700;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.recommendation-card ul {
    list-style: none;
    padding: 0;
}

.recommendation-card li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.recommendation-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ECDC4;
    font-weight: bold;
}

.parental-note {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.parental-note p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.education-card h4 {
    font-size: 1.3rem;
    color: #FFD700;
    margin-bottom: 10px;
}

.education-card p {
    font-size: 1rem;
    line-height: 1.5;
    color: #E8E8E8;
}

/* Parent Resources */
.parent-resources h3 {
    font-size: 1.8rem;
    color: #95E1D3;
    margin-bottom: 25px;
    text-align: center;
}

.resource-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-link {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    text-decoration: none;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    gap: 15px;
}

.resource-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.resource-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.resource-info h4 {
    font-size: 1.2rem;
    color: #FFD700;
    margin-bottom: 5px;
}

.resource-info p {
    font-size: 0.95rem;
    color: #E8E8E8;
    margin: 0;
}

/* Contact Support */
.contact-support {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-support h3 {
    font-size: 1.8rem;
    color: #FFA726;
    margin-bottom: 15px;
}

.contact-support p {
    font-size: 1.1rem;
    color: #E8E8E8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #4ECDC4, #FF6B6B);
}

.external-link {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Touch-friendly mobile improvements */
@media (max-width: 768px) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .nav-button,
    .play-button,
    .contact-button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
    
    .game-card.enhanced {
        padding: 20px;
        min-height: 200px;
    }
    
    /* Reduce complex animations on mobile for performance */
    .game-card.enhanced:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    /* Optimize scroll performance */
    .kids-main {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        .game-card.enhanced,
        .game-icon,
        .play-button,
        .nav-button,
        .contact-button,
        .resource-link {
            transition: none;
            animation: none;
        }
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .kids-header h1 {
        font-size: 1.5em;
    }

    .hero h2 {
        font-size: 2em;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fact-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-games {
        grid-template-columns: 1fr;
    }

    .game-card.enhanced {
        min-height: auto;
    }

    .curriculum-highlights {
        flex-direction: column;
        align-items: center;
    }

    .parents-title {
        font-size: 2rem;
    }

    .safety-list {
        grid-template-columns: 1fr;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .resource-links {
        grid-template-columns: 1fr;
    }

    .resource-link {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .resource-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .game-category {
        padding: 20px 15px;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .game-icon {
        font-size: 3rem;
    }

    .game-content h4 {
        font-size: 1.2rem;
    }

    .game-features {
        flex-direction: column;
        align-items: center;
    }

    .parents-teachers-section {
        padding: 40px 15px;
    }

    .parents-title {
        font-size: 1.8rem;
    }

    .safety-features h3,
    .educational-goals h3,
    .screen-time-guidance h3,
    .parent-resources h3,
    .contact-support h3 {
        font-size: 1.5rem;
    }
    
    .screen-time-recommendations {
        grid-template-columns: 1fr;
    }
    
    .recommendation-card {
        padding: 20px;
    }

    .education-card,
    .safety-list li,
    .resource-link,
    .contact-support {
        padding: 20px 15px;
    }

    .contact-button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}
