/* style.css — Nápověda a Poradna EET Prodejka (Mobile-First) */
:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Navigace */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-link {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.brand-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Tlačítka */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none !important;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #15803d;
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background: #f1f5f9;
}
.btn-block {
    width: 100%;
}

/* Hero & Hledání */
.hero-section {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    padding: 40px 0 50px 0;
    text-align: center;
}
.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 28px auto;
}
.search-box {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
}
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 18px;
    color: #94a3b8;
    pointer-events: none;
    width: 22px;
    height: 22px;
}
.search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    font-size: 1.15rem;
    border-radius: 14px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    outline: none;
}
.search-input:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.4), 0 10px 25px rgba(0,0,0,0.18);
}
.search-quick-tags {
    margin-top: 14px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.quick-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
}
.quick-tag:hover {
    background: rgba(255,255,255,0.35);
    text-decoration: none;
}

/* Kategorie Grid */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 32px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.cat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    color: var(--text-main);
}
.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    border-color: #cbd5e1;
}
.cat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 4px;
}
.cat-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Návody Krok za Krokem */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}
.step-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.step-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.step-card p, .step-card ul {
    font-size: 1.05rem;
    margin-bottom: 12px;
}
.step-card ul {
    padding-left: 24px;
}
.step-card li {
    margin-bottom: 6px;
}

/* Boxíky s tipy a úspěchem */
.tip-box, .success-box, .warn-box {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    margin: 14px 0;
}
.tip-box {
    background: #f0f9ff;
    border-left: 4px solid var(--primary);
    color: #0c4a6e;
}
.success-box {
    background: var(--success-light);
    border-left: 4px solid var(--success);
    color: #14532d;
}
.warn-box {
    background: var(--warning-light);
    border-left: 4px solid var(--warning);
    color: #78350f;
}

/* Poradna / Vlákna */
.threads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}
.thread-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}
.thread-card:hover {
    border-color: #94a3b8;
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.thread-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.thread-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.badge-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-status.vyreseno {
    background: var(--success-light);
    color: var(--success);
}
.badge-status.odpovezeno {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.badge-status.nove {
    background: var(--warning-light);
    color: #b45309;
}

/* Formuláře */
.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-md);
    max-width: 700px;
    margin: 20px auto 40px auto;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Upload fotek s náhledem */
.photo-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 2px dashed var(--primary);
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    background: #f0f9ff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-decoration: none !important;
}
.photo-uploader:hover {
    border-color: var(--primary-dark);
    background: #e0f2fe;
}
.photo-uploader-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
}
.photo-uploader-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: block;
}
.photo-preview-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.photo-preview-item {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Diskuze / Vlákno odpovědí */
.reply-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.reply-card.is-admin {
    border-left: 4px solid var(--primary);
    background: #f8fcff;
}
.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.author-name {
    font-weight: 700;
}
.badge-admin {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}
.reply-content {
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Obrázky a tabulky v návodech (vždy responzivní) */
.clanek-obsah img, .guide-image, .attachment-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin: 12px 0;
    box-shadow: var(--shadow-sm);
    display: block;
}
.clanek-obsah table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    display: block;
    overflow-x: auto;
}
.clanek-obsah pre, .clanek-obsah code {
    max-width: 100%;
    overflow-x: auto;
    font-size: 0.9em;
}

/* Responsivita pro mobily (100% Mobile-Ready) */
@media (max-width: 640px) {
    .container {
        padding: 0 12px;
    }
    .navbar {
        padding: 10px 0;
    }
    .nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .brand-link {
        font-size: 1.15rem;
        justify-content: space-between;
    }
    .nav-links {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .nav-links .nav-link {
        font-size: 0.85rem;
    }
    .hero-section {
        padding: 24px 0 32px 0;
    }
    .hero-title {
        font-size: 1.45rem;
    }
    .hero-subtitle {
        font-size: 0.92rem;
        margin-bottom: 18px;
    }
    .search-input {
        font-size: 16px; /* Zabraňuje nechtěnému přiblížení v iOS Safari */
        padding: 13px 14px 13px 44px;
        border-radius: 12px;
    }
    .search-icon {
        left: 14px;
        width: 18px;
        height: 18px;
    }
    .search-quick-tags {
        gap: 6px;
    }
    .quick-tag {
        font-size: 0.78rem;
        padding: 3px 8px;
    }
    .cat-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .cat-card {
        padding: 16px;
    }
    .step-card {
        padding: 16px;
    }
    .step-card h3 {
        font-size: 1.15rem;
    }
    .thread-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        gap: 10px;
    }
    .form-card {
        padding: 16px;
        margin: 12px auto 30px auto;
        border-radius: 10px;
    }
    .form-control {
        font-size: 16px; /* Zabraňuje auto-zoomu na iPhonech */
        padding: 11px 12px;
    }
    .photo-preview-item {
        width: 80px;
        height: 80px;
    }
    .reply-card {
        padding: 14px;
    }
}
