/* ========================================
   PLAYFUL & COLORFUL DESIGN SYSTEM
   Animal Worksheets for Preschool
   ======================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Comic Sans MS', 'Segoe UI', 'Arial Rounded MT Bold', sans-serif;
    line-height: 1.7;
    color: #2C3E50;
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    background-attachment: fixed;
}

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

header .container {
    position: relative;
    z-index: 1;
}

/* ========================================
   HEADER - Playful & Colorful
   ======================================== */
header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 25%, #6BCB77 50%, #4ECDC4 75%, #A78BFA 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

/* Add semi-transparent overlay for better text contrast */
header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header::before {
    content: "🐾 🐄 🐷 🐔 🐴 🦁 🐘 🐠 🦒 🐻";
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: 2rem;
    opacity: 0.25;
    animation: floatAnimals 20s linear infinite;
    white-space: nowrap;
    z-index: 0;
}

@keyframes floatAnimals {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

header h1,
.site-title {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow:
        3px 3px 0px rgba(0,0,0,0.4),
        0px 0px 20px rgba(0,0,0,0.5),
        0px 2px 10px rgba(0,0,0,0.3);
    font-weight: 700;
    position: relative;
    z-index: 1;
    color: #ffffff;
    -webkit-text-stroke: 1px rgba(0,0,0,0.1);
}

.tagline {
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow:
        2px 2px 0px rgba(0,0,0,0.4),
        0px 0px 15px rgba(0,0,0,0.5),
        0px 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    color: #ffffff;
}

/* ========================================
   NAVIGATION - Colorful Tabs
   ======================================== */
nav {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 5px solid #FFD93D;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 1.2rem 2rem;
    text-decoration: none;
    color: #2C3E50;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.nav-menu a:hover {
    background: linear-gradient(135deg, #FFD93D, #FF6B6B);
    color: white;
    border-bottom-color: #FF6B6B;
    transform: translateY(-2px);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    padding: 3rem 0;
}

/* ========================================
   HERO SECTION - Fun & Engaging
   ======================================== */
.hero {
    background: white;
    padding: 4rem 3rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 4rem;
    text-align: center;
    border: 6px dashed #FFD93D;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "⭐";
    position: absolute;
    font-size: 4rem;
    opacity: 0.1;
    top: 20px;
    left: 20px;
    animation: spin 10s linear infinite;
}

.hero::after {
    content: "⭐";
    position: absolute;
    font-size: 4rem;
    opacity: 0.1;
    bottom: 20px;
    right: 20px;
    animation: spin 10s linear infinite reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero h2 {
    color: #FF6B6B;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px rgba(255,107,107,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #2C3E50;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    border-radius: 20px;
    border: 4px solid #FFD93D;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 10px 25px rgba(255,107,107,0.3);
    border-color: #FF6B6B;
}

.feature .icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature:nth-child(2) .icon {
    animation-delay: 0.3s;
}

.feature:nth-child(3) .icon {
    animation-delay: 0.6s;
}

.feature h3 {
    color: #FF6B6B;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.feature p {
    color: #2C3E50;
    font-size: 1.1rem;
}

/* ========================================
   WORKSHEET SECTIONS
   ======================================== */
.worksheet-section {
    margin-bottom: 5rem;
}

.worksheet-section h2 {
    color: #FF6B6B;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 10px solid #FFD93D;
    display: inline-block;
    min-width: 50%;
}

/* ========================================
   WORKSHEET GRID & CARDS - Colorful & Fun
   ======================================== */
.worksheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.worksheet-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 5px solid;
    position: relative;
}

.worksheet-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

/* Colorful Borders for Cards */
.worksheet-card:nth-child(6n+1) { border-color: #FF6B6B; }
.worksheet-card:nth-child(6n+2) { border-color: #FFD93D; }
.worksheet-card:nth-child(6n+3) { border-color: #6BCB77; }
.worksheet-card:nth-child(6n+4) { border-color: #4ECDC4; }
.worksheet-card:nth-child(6n+5) { border-color: #A78BFA; }
.worksheet-card:nth-child(6n+6) { border-color: #FDA7DF; }

/* Preview Image Section */
.card-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    border-bottom: 3px dashed #FFD93D;
    position: relative;
    overflow: hidden;
}

.card-preview::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.3) 10px, rgba(255,255,255,0.3) 20px);
}

.card-preview-emoji {
    position: relative;
    z-index: 1;
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.card-header {
    padding: 1.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.card-header h3 {
    font-size: 1.4rem;
    flex: 1;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

/* Vibrant Theme Colors for Card Headers */
.card-header.farm {
    background: linear-gradient(135deg, #6BCB77 0%, #56ab2f 100%);
}

.card-header.zoo {
    background: linear-gradient(135deg, #FF6B6B 0%, #C54B8C 100%);
}

.card-header.ocean {
    background: linear-gradient(135deg, #4ECDC4 0%, #1A535C 100%);
}

.card-header.baby {
    background: linear-gradient(135deg, #FDA7DF 0%, #FE7096 100%);
}

.card-header.wild {
    background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);
}

.card-header.habitat {
    background: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%);
}

.card-header.jungle {
    background: linear-gradient(135deg, #6BCB77 0%, #2D6A4F 100%);
}

.card-header.picture {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
}

.card-header.safari {
    background: linear-gradient(135deg, #FF9A56 0%, #E76F51 100%);
}

.card-header.pattern {
    background: linear-gradient(135deg, #C084FC 0%, #A855F7 100%);
}

.card-header.counting {
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
}

.card-header.sorting {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.card-header.tracing {
    background: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
}

.card-header.pack {
    background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);
}

.age-badge {
    background: white;
    color: #2C3E50;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.worksheet-card p {
    padding: 1.5rem;
    flex: 1;
    color: #2C3E50;
    font-size: 1.05rem;
    line-height: 1.7;
}

.worksheet-card .btn {
    display: block;
    margin: 0 1.5rem 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
    border: 3px solid white;
}

.worksheet-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255,107,107,0.6);
    background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
}

.worksheet-card.featured {
    border: 8px solid #A78BFA;
    box-shadow: 0 12px 30px rgba(167,139,250,0.4);
}

.btn-featured {
    background: linear-gradient(135deg, #A78BFA 0%, #6BCB77 100%);
    font-size: 1.2rem;
    padding: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   BENEFITS SECTION
   ======================================== */
.benefits {
    background: white;
    padding: 4rem 3rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 4rem;
    border: 6px solid #6BCB77;
}

.benefits h2 {
    text-align: center;
    color: #6BCB77;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 0px rgba(107,203,119,0.2);
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.benefit {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    border-radius: 20px;
    border: 4px solid #6BCB77;
    transition: all 0.3s ease;
}

.benefit:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(107,203,119,0.3);
}

.benefit h3 {
    color: #FF6B6B;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.benefit p {
    color: #2C3E50;
    font-size: 1.05rem;
}

/* ========================================
   FOOTER - Playful
   ======================================== */
footer {
    background: linear-gradient(135deg, #2C3E50 0%, #3498DB 100%);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    border-top: 8px solid #FFD93D;
}

footer p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

/* ========================================
   BREADCRUMB NAVIGATION
   ======================================== */
.breadcrumb {
    margin: 2rem 0 1.5rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #FFD93D;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.breadcrumb-item a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
    color: white;
    transform: translateY(-2px);
}

.breadcrumb-item a i {
    font-size: 0.9rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin: 0 0.3rem;
    color: #FFD93D;
    font-size: 0.75rem;
}

.breadcrumb-item.active {
    color: #2C3E50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    border-radius: 10px;
}

.breadcrumb-item.active i {
    color: #FF6B6B;
}

/* Mobile Breadcrumb Optimization */
@media (max-width: 768px) {
    .breadcrumb {
        margin: 1.5rem 0 1rem;
        padding: 0.8rem 1rem;
        border-left-width: 4px;
    }

    .breadcrumb-list {
        gap: 0.3rem;
    }

    .breadcrumb-item {
        font-size: 0.85rem;
    }

    .breadcrumb-item a,
    .breadcrumb-item.active {
        padding: 0.3rem 0.6rem;
    }

    .breadcrumb-item a i,
    .breadcrumb-item.active i {
        font-size: 0.8rem;
    }

    .breadcrumb-item:not(:last-child)::after {
        font-size: 0.7rem;
        margin: 0 0.2rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        margin: 1rem 0 0.8rem;
        padding: 0.6rem 0.8rem;
        border-left-width: 3px;
    }

    .breadcrumb-item {
        font-size: 0.8rem;
    }

    .breadcrumb-item a,
    .breadcrumb-item.active {
        padding: 0.25rem 0.5rem;
        gap: 0.3rem;
    }

    /* Stack breadcrumbs vertically on very small screens if needed */
    .breadcrumb-list {
        flex-wrap: wrap;
    }

    /* Hide breadcrumb text on very small screens, keep icons */
    .breadcrumb-item a span,
    .breadcrumb-item.active span {
        display: inline;
    }
}

/* ========================================
   WORKSHEET DETAIL PAGE STYLES
   ======================================== */
.worksheet-page {
    background: white;
    padding: 4rem 3rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin: 2rem auto;
    border: 6px solid #FFD93D;
}

.worksheet-header {
    text-align: center;
    margin-bottom: 3rem;
}

.worksheet-header h1 {
    color: #FF6B6B;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 0px rgba(255,107,107,0.2);
}

.worksheet-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.meta-item {
    background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(255,107,107,0.3);
    border: 3px solid white;
}

.worksheet-preview {
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    padding: 3rem;
    border-radius: 25px;
    text-align: center;
    margin: 3rem 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 5px dashed #FF6B6B;
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.1);
}

.preview-placeholder {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    animation: wiggle 3s ease-in-out infinite;
}

.worksheet-preview h3 {
    color: #FF6B6B;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.worksheet-preview p {
    color: #2C3E50;
    font-size: 1.2rem;
}

.download-section {
    text-align: center;
    margin: 3rem 0;
}

.download-btn {
    display: inline-block;
    padding: 1.5rem 4rem;
    background: linear-gradient(135deg, #6BCB77 0%, #4ECDC4 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(107,203,119,0.5);
    transition: all 0.3s ease;
    border: 5px solid white;
    animation: pulse 2s ease-in-out infinite;
}

.download-btn:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 12px 35px rgba(107,203,119,0.7);
}

.worksheet-content {
    margin: 3rem 0;
}

.content-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
    border-radius: 20px;
    border-left: 8px solid #6BCB77;
}

.content-section h2 {
    color: #FF6B6B;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-section ul {
    margin-left: 2rem;
    color: #2C3E50;
}

.content-section li {
    margin: 1rem 0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.related-worksheets {
    background: linear-gradient(135deg, #A78BFA 0%, #FDA7DF 100%);
    padding: 3rem;
    border-radius: 25px;
    margin-top: 4rem;
    box-shadow: 0 10px 30px rgba(167,139,250,0.4);
}

.related-worksheets h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 4px solid #FFD93D;
}

.related-card:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.related-card h3 {
    color: #FF6B6B;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.related-card p {
    color: #2C3E50;
    margin-bottom: 1rem;
}

.related-card a {
    color: #6BCB77;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.related-card a:hover {
    color: #FF6B6B;
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin: 2rem 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.5);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    /* Compact Header for Mobile */
    header {
        padding: 1.5rem 0 1rem;
    }

    header h1,
    .site-title {
        font-size: 2rem;
        margin-bottom: 0.3rem;
    }

    .tagline {
        font-size: 1rem;
    }

    header::before {
        font-size: 1.2rem;
        top: 5px;
    }

    /* Compact Mobile Navigation - Horizontal Scroll */
    nav {
        border-bottom: 3px solid #FFD93D;
    }

    .nav-menu {
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 0.4rem 0.5rem;
        gap: 0.4rem;
    }

    /* Hide scrollbar but keep functionality */
    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav-menu li {
        flex-shrink: 0;
    }

    .nav-menu a {
        padding: 0.7rem 1.2rem;
        text-align: center;
        font-size: 0.9rem;
        white-space: nowrap;
        background: linear-gradient(135deg, #FFF9E3 0%, #FFE5B4 100%);
        border-radius: 15px;
        margin: 0;
        border: 2px solid #FFD93D;
        color: #2C3E50;
    }

    .nav-menu a:hover,
    .nav-menu a:active {
        background: linear-gradient(135deg, #FFD93D, #FF6B6B);
        color: white;
        border-color: #FF6B6B;
        transform: translateY(0);
    }

    /* Scroll hint removed for cleaner mobile UI */
    nav::after {
        content: none;
        display: none;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

    .worksheet-section h2 {
        font-size: 2rem;
        min-width: 80%;
    }

    .worksheet-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

    .worksheet-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .worksheet-header h1 {
        font-size: 2rem;
    }

    .download-btn {
        padding: 1.2rem 2.5rem;
        font-size: 1.2rem;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* Very Compact Header for Small Mobile */
    header {
        padding: 1rem 0 0.8rem;
    }

    header h1,
    .site-title {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    header::before {
        font-size: 1rem;
        display: none; /* Hide floating animals on very small screens */
    }

    /* Very Compact Mobile Navigation */
    nav {
        border-bottom: 2px solid #FFD93D;
    }

    .nav-menu {
        padding: 0.3rem 0.4rem;
        gap: 0.3rem;
    }

    .nav-menu a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border: 2px solid #FFD93D;
        border-radius: 12px;
    }

    /* Swipe hint removed */

    /* Adjust main content spacing */
    main {
        padding: 2rem 0;
    }

    .hero {
        padding: 2rem 1.2rem;
        border-width: 4px;
        margin-bottom: 2.5rem;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .feature {
        padding: 1.5rem 1rem;
        border-width: 3px;
    }

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

    .feature h3 {
        font-size: 1.2rem;
    }

    .feature p {
        font-size: 1rem;
    }

    .worksheet-section h2 {
        font-size: 1.6rem;
        padding: 1rem;
        border-left-width: 6px;
        min-width: 90%;
    }

    .worksheet-card {
        border-width: 4px;
    }

    .card-preview {
        height: 150px;
        font-size: 3.5rem;
        border-bottom-width: 2px;
    }

    .card-header {
        padding: 1.2rem;
    }

    .card-header h3 {
        font-size: 1.2rem;
    }

    .age-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .worksheet-card p {
        padding: 1.2rem;
        font-size: 1rem;
    }

    .worksheet-card .btn {
        font-size: 1rem;
        padding: 0.9rem;
        margin: 0 1.2rem 1.2rem;
    }

    .worksheet-page {
        padding: 2rem 1.5rem;
        border-width: 4px;
    }

    .worksheet-header h1 {
        font-size: 1.7rem;
    }

    .meta-item {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
        border-width: 2px;
    }

    .download-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-width: 3px;
    }

    .content-section {
        padding: 1.5rem;
        border-left-width: 5px;
    }

    .content-section h2 {
        font-size: 1.6rem;
    }

    .content-section li {
        font-size: 1rem;
    }

    .benefits {
        padding: 2.5rem 1.5rem;
        border-width: 4px;
    }

    .benefits h2 {
        font-size: 2rem;
    }

    .benefit {
        padding: 1.5rem;
        border-width: 3px;
    }

    .benefit h3 {
        font-size: 1.2rem;
    }

    .benefit p {
        font-size: 1rem;
    }

    .related-worksheets {
        padding: 2rem;
    }

    .related-worksheets h2 {
        font-size: 2rem;
    }

    .related-card {
        padding: 1.5rem;
        border-width: 3px;
    }

    .related-card h3 {
        font-size: 1.2rem;
    }

    .back-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 100%);
    color: white;
    border: 4px solid white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255,107,107,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(255,107,107,0.7);
}

.back-to-top:active {
    transform: scale(0.95);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile adjustments for back to top */
@media (max-width: 768px) {
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================
   ICON ENHANCEMENTS
   ======================================== */
.btn i,
.download-btn i,
.back-link i {
    margin-right: 0.5rem;
}

.feature .icon i {
    display: block;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    body {
        background: white;
    }

    header, nav, footer, .download-btn, .back-link {
        display: none;
    }
}
