/* ===============================================
   MUJSUD.CZ - Dřevěné sudy a sauny
   Moderní responzivní design s přírodními tóny
   =============================================== */

:root {
    /* Barevná paleta */
    --color-primary: #8B4513;        /* Dřevěná hnědá */
    --color-primary-dark: #5D2E0F;   /* Tmavší hnědá */
    --color-accent: #2F855A;         /* Zelená */
    --color-accent-light: #48BB78;   /* Světlejší zelená */
    --color-white: #FFFFFF;
    --color-light: #F7FAFC;
    --color-gray: #718096;
    --color-dark: #2D3748;
    
    /* Typografie */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Breakpoints */
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
}

/* ===============================================
   RESET & BASE STYLES
   =============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape on iOS */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-dark);
}

h1 { font-size: 2.5rem; margin-bottom: var(--spacing-md); }
h2 { font-size: 2rem; margin-bottom: var(--spacing-md); }
h3 { font-size: 1.5rem; margin-bottom: var(--spacing-sm); }
h4 { font-size: 1.25rem; margin-bottom: var(--spacing-sm); }

p {
    margin-bottom: var(--spacing-sm);
}

/* ===============================================
   LAYOUT & CONTAINERS
   =============================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-light {
    background-color: var(--color-light);
}

/* ===============================================
   HEADER & NAVIGATION
   =============================================== */

header {
    background-color: #F5F0E8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.logo-image {
    height: 80px;
    width: auto;
    object-fit: contain;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

nav a {
    color: var(--color-dark);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 44px; /* Touch-friendly */
    display: inline-flex;
    align-items: center;
}

nav a:hover,
nav a.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: var(--spacing-xs) 0;
    margin-top: var(--spacing-xs);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 0;
}

.dropdown-content a:hover {
    background-color: var(--color-light);
    color: var(--color-primary);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-primary);
}

/* ===============================================
   HERO SECTION
   =============================================== */

.hero {
    background: linear-gradient(135deg, #8B4513 0%, #5D2E0F 100%);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.2) 100%);
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--color-white);
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.9);
}

/* ===============================================
   BUTTONS
   =============================================== */

.btn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 44px; /* Better touch target for mobile */
    -webkit-user-select: none;
    user-select: none;
    font-size: 0.85rem;
    white-space: nowrap;
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 133, 90, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* ===============================================
   CARDS & PRODUCT GRID
   =============================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.cards-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
    background-color: var(--color-light);
}

.card-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.05rem;
    font-weight: 600;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content h3 {
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.card-content ul {
    list-style: none;
    padding-left: 0;
}

.card-text {
    color: var(--color-gray);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.35;
    flex: 1;
}

.card-content .btn {
    margin-top: auto;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

/* ===============================================
   GALLERY
   =============================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--color-white);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: var(--color-white);
    cursor: pointer;
    background: none;
    border: none;
}

/* ===============================================
   FORMS
   =============================================== */

.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid #E2E8F0;
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===============================================
   FOOTER
   =============================================== */

footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-section h3 {
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

@media (max-width: 768px) {
    /* Mobile menu */
    .menu-toggle {
        display: block;
        min-height: 44px;
        min-width: 44px;
        font-size: 1.5rem;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #F5F0E8;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav a {
        display: block;
        padding: var(--spacing-sm);
        border-radius: 0;
        border-bottom: 1px solid var(--color-light);
        min-height: 48px; /* Larger touch target */
        display: flex;
        align-items: center;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: var(--color-light);
        display: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    /* Typography - Better readability on mobile */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    
    /* Spacing */
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    /* Cards */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .card {
        margin-bottom: var(--spacing-sm);
    }
    
    /* Buttons - Larger for touch */
    .btn {
        padding: 0.875rem 1.5rem;
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    /* Header container */
    .header-container {
        padding: 0.75rem var(--spacing-sm);
    }
    
    /* Logo */
    .logo-image {
        height: 50px;
    }
    
    .logo span {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Product boxes grid */
.product-boxes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Contact page grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

@media (max-width: 768px) {
    .cards-grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Povolit zalamování textu v mobilním zobrazení */
    .card-title {
        white-space: normal;
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .card-content {
        padding: var(--spacing-sm);
    }
    
    .btn {
        white-space: normal;
        min-height: 50px;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    /* Klikatelná celá karta na mobilu */
    .card {
        cursor: pointer;
        position: relative;
    }
    
    .card .btn {
        pointer-events: none;
    }
    
    /* Kontaktní stránka - formulář a info pod sebou */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Formulářové prvky */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* Zabrání zoomu na iOS */
    }
    
    textarea {
        min-height: 120px;
    }
}

@media (max-width: 600px) {
    .product-boxes-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

.text-center { text-align: center; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
