@import url('https://fonts.googleapis.com/css2?family=Mali:wght@400;600;700&display=swap');

:root {
    /* TGT Color Palette - Updated */
    --primary-color: #4997CB; /* tmavě modrá */
    --secondary-color: #54595F; /* Dark Grey - kept for text/ui */
    --text-color: #7A7A7A; /* Grey */
    
    /* Brand Colors */
    --brand-purple: #83579F; /* fialová */
    --brand-pink: #CA579C; /* fialovorůžová */
    --brand-dark-red: #D84545; /* tmavě červená */
    --brand-red: #F6454F; /* červená */
    --brand-wine: #CC3366; /* vínová */
    --brand-dark-beige: #DCB68F; /* tmavé hnědá */
    --brand-beige: #ECDFCD; /* pozadí hnědá */
    --brand-gold: #D29945; /* zlata */
    --brand-light-blue: #94D0F2; /* světle modrá */
    --brand-emerald: #5CBB9E; /* smaragdová */
    --brand-light-emerald: #27B2B9; /* světle smaragdová */
    --brand-green: #4DA167; /* zelená pro zeleninu */

    --bg-light: var(--brand-beige);
    --white: #ffffff;
    --gray: #f5f5f5;
    --spacing: 2rem;
    --border-radius: 20px;
}

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

body {
    font-family: 'Mali', cursive, sans-serif; /* Updated Font */
    line-height: 1.6;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap; /* Prevents text from wrapping to second line */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 30px; /* Slightly wider */
    height: 4px; /* Slightly thicker */
    margin: 6px auto;
    border-radius: 4px; /* Rounded edges */
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #333333; /* Hardcoded dark color */
}

/* Hero */
.hero {
    background-color: var(--bg-light);
    padding: 4rem 0;
    text-align: center;
    background-image: linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)), url('../assets/images/hero-bg.jpg'); /* Placeholder */
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: #666;
}

.bg-light {
    background-color: var(--gray);
}

/* Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Enforce 3 columns to prevent single items from stretching */
    gap: 2rem;
}

/* Mobile responsive grid */
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.card {
    position: relative;
    background: var(--white);
    padding: 2rem 1.5rem; /* Slightly reduced horizontal padding */
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    min-height: 3.4rem; /* Keeps titles aligned even if one is slightly longer */
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.gallery-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    padding-bottom: 1.5rem;
}

.gallery-thumb {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background-color: #eee;
}

.gallery-item h3 {
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* Footer - Soil Theme */
.footer {
    background: linear-gradient(180deg, #5C3D2E 0%, #4A3122 30%, #3B2518 60%, #2E1B10 100%);
    color: #E8D5C4;
    padding: 0 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Dirt texture overlay */
.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle 2px at 15% 25%, rgba(0,0,0,0.15) 50%, transparent 50%),
        radial-gradient(circle 3px at 45% 15%, rgba(0,0,0,0.1) 50%, transparent 50%),
        radial-gradient(circle 1.5px at 70% 40%, rgba(0,0,0,0.12) 50%, transparent 50%),
        radial-gradient(circle 2px at 25% 60%, rgba(0,0,0,0.1) 50%, transparent 50%),
        radial-gradient(circle 2.5px at 80% 70%, rgba(0,0,0,0.08) 50%, transparent 50%),
        radial-gradient(circle 1px at 55% 85%, rgba(0,0,0,0.12) 50%, transparent 50%),
        radial-gradient(circle 3px at 10% 80%, rgba(139,90,43,0.2) 50%, transparent 50%),
        radial-gradient(circle 2px at 90% 30%, rgba(139,90,43,0.15) 50%, transparent 50%),
        radial-gradient(circle 2px at 35% 45%, rgba(139,90,43,0.1) 50%, transparent 50%),
        radial-gradient(circle 1.5px at 60% 55%, rgba(0,0,0,0.1) 50%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-top: 3rem;
    position: relative;
    z-index: 1;
}

.footer h4 {
    margin-bottom: 1rem;
    color: var(--brand-gold);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.footer p {
    color: #D4BFA8;
    line-height: 1.6;
}

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

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #E8D5C4;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--brand-emerald);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    border-top: 2px dashed rgba(139,90,43,0.4);
    padding-top: 2rem;
    color: #9B8067;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* =========================================
   MOBILE OPTIMIZATION (Max-width 768px)
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Better Typography sizing */
    html {
        font-size: 14px; /* Base font size smaller */
    }
    
    h1 {
        font-size: 2.2rem !important; /* Override inline styles */
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    h2.section-title {
        font-size: 1.8rem;
    }

    /* 2. Layout Adjustments */
    .container {
        padding: 0 1.2rem; /* More space for content, less margins */
    }

    .section {
        padding: 3rem 0; /* Less vertical space between sections */
    }

    /* 3. Hero Section Fixes */
    .hero-grid {
        display: flex;
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-buttons {
        justify-content: center !important; /* Center buttons on mobile */
        flex-direction: column; /* Stack buttons */
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%; /* Full width buttons are easier to tap */
        text-align: center;
    }

    /* 4. Navigation & Touch Targets */
    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-top: 2px solid var(--primary-color);
        gap: 0; /* Reset flex gap from desktop styles */
    }

    .nav-links.nav-active {
        display: flex; /* Show when active */
    }
    
    .hamburger {
        display: block !important; /* Force show */
        z-index: 1001; /* Ensure on top */
        padding: 10px; /* Touchable area */
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee; /* Divider */
    }
    
    .nav-links a {
        display: block;
        padding: 15px 20px; /* Larger touch area, less margin */
        font-size: 1.1rem;
    }

    .nav-links a:hover {
        background-color: #f5f5f5;
        color: var(--primary-color);
    }

    /* 5. Cards & Grid */
    .grid-3, .grid-2 {
        grid-template-columns: 1fr; /* Force single column */
        gap: 1.5rem;
    }

    /* Fix for very small screens (iPhone SE etc) */
    .card {
        padding: 1.5rem;
    }
}

/* Guides Section */
.guide-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.guide-thumb {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    color: var(--white);
}

.guide-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.guide-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Comics Section */
.comics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.comic-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    cursor: pointer;
}

.comic-item:hover {
    transform: scale(1.02);
}

.comic-thumb {
    height: 250px; /* Taller for comics */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.comic-item h3 {
    padding: 1rem;
    text-align: center;
    color: var(--secondary-color);
}

/* Book Cover Images */
.book-cover-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid #333;
    margin-bottom: 1rem;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.book-cover-img:hover {
    transform: scale(1.05);
}

