/* Magic Tree Club - Main Stylesheet */

/* Lucide Icons Styling */
.lucide {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    display: inline-block;
}

.logo-icon .lucide {
    width: 2rem;
    height: 2rem;
}

.feature-icon .lucide {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

.fact-icon .lucide {
    width: 4rem;
    height: 4rem;
    color: var(--primary-color);
}

.card-image .lucide {
    width: 4rem;
    height: 4rem;
    color: white;
}

.social-links .lucide {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.footer-section h3 .lucide {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

.page-header h1 .lucide {
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 0.5rem;
}

.card-content h2 .lucide,
.card-content h3 .lucide {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

ul li .lucide {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.values-grid .lucide {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* CSS Variables for theming */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #81C784;
    --accent-color: #FFC107;
    --background-color: #F8F9FA;
    --card-background: #FFFFFF;
    --text-color: #2E7D32;
    --text-light: #7F8C8D;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.2s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #FFFFFF;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka One', cursive;
    font-weight: 400;
    line-height: 1.2;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
}

.logo-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.magic-text {
    display: block;
    color: var(--text-color);
}

.magic-text.highlight {
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); }
    to { text-shadow: 2px 2px 20px rgba(76, 175, 80, 0.3); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.magic-tree {
    position: relative;
    width: 300px;
    height: 400px;
}

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 150px;
    background: linear-gradient(90deg, #8B4513, #A0522D, #8B4513);
    border-radius: 5px;
}

.tree-leaves {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
}

.leaf {
    position: absolute;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.leaf-1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.leaf-2 { top: 30%; left: 20%; animation-delay: 0.5s; }
.leaf-3 { top: 30%; right: 20%; animation-delay: 1s; }
.leaf-4 { top: 60%; left: 10%; animation-delay: 1.5s; }
.leaf-5 { top: 60%; right: 10%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.4s; }
.sparkle:nth-child(3) { top: 40%; left: 5%; animation-delay: 0.8s; }
.sparkle:nth-child(4) { top: 50%; right: 10%; animation-delay: 1.2s; }
.sparkle:nth-child(5) { top: 70%; left: 20%; animation-delay: 1.6s; }

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Features Section */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.feature-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.feature-link:hover {
    color: var(--accent-color);
}

/* Fun Facts Section */
.fun-facts {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.facts-container {
    max-width: 600px;
    margin: 0 auto;
}

.fact-card {
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.fact-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.fact-text {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Call to Action */
.cta {
    padding: 4rem 2rem;
    background: var(--background-color);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta .btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cta .btn-primary:hover {
    background: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Page Header (for other pages) */
.page-header {
    background: var(--card-background);
    color: var(--text-color);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Content Section */
.content-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.card-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Quiz Styles */
.quiz-container {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.quiz-question {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.quiz-options {
    display: grid;
    gap: 1rem;
}

.quiz-option {
    background: var(--background-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.quiz-option:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.quiz-option.correct {
    background: #4CAF50;
    color: white;
    border-color: #2E7D32;
}

.quiz-option.incorrect {
    background: #F44336;
    color: white;
    border-color: #C62828;
}

.quiz-result {
    text-align: center;
    padding: 2rem;
}

.quiz-score {
    font-size: 3rem;
    color: var(--primary-color);
    font-family: 'Fredoka One', cursive;
    margin-bottom: 1rem;
}

.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--text-color);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--background-color);
    border-radius: 4px;
    margin: 0 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quiz-feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.quiz-intro {
    text-align: center;
    padding: 2rem 0;
}

/* Game Styles */
.game-container {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 2rem auto;
}

.game-cell {
    aspect-ratio: 1;
    background: var(--background-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.game-cell:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.game-cell.x {
    color: var(--primary-color);
}

.game-cell.o {
    color: var(--secondary-color);
}

.game-status {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Fredoka One', cursive;
}

/* Memory Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 2rem auto;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.memory-card.flipped {
    background: white;
    color: var(--text-color);
    transform: rotateY(180deg);
}

.memory-card.matched {
    background: var(--secondary-color);
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        gap: 1rem;
        transition: var(--transition);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .magic-tree {
        width: 200px;
        height: 300px;
    }

    .tree-trunk {
        width: 40px;
        height: 100px;
    }

    .tree-leaves {
        width: 180px;
        height: 180px;
        bottom: 80px;
    }

    .leaf {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features {
        padding: 3rem 1rem;
    }

    .fun-facts {
        padding: 3rem 1rem;
    }

    .cta {
        padding: 3rem 1rem;
    }

    .cta h2 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .memory-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .game-board {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .fact-card {
        padding: 1.5rem;
    }

    .quiz-container,
    .game-container {
        padding: 1.5rem;
    }

    .quiz-question {
        font-size: 1.25rem;
    }

    .memory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .memory-card {
        font-size: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.quiz-option:focus,
.game-cell:focus,
.memory-card:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #006400;
        --secondary-color: #FF8C00;
        --accent-color: #DC143C;
    }
}