/* ============================================
   IVET - Výživové poradenství
   Moderní responzivní CSS
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --accent: #FF9800;
    --accent-dark: #F57C00;
    --text: #333333;
    --text-light: #666666;
    --bg: #FAFAFA;
    --bg-white: #FFFFFF;
    --border: #E0E0E0;
    --error: #E53935;
    --success: #43A047;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Layout ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.site-logo span {
    color: var(--primary-light);
    font-weight: 300;
}

.header-nav a {
    color: rgba(255,255,255,0.9);
    margin-left: 24px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.header-nav a:hover {
    color: #fff;
}

/* ---------- Hero Section ---------- */
.hero {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #fff8e1 100%);
    padding: 80px 0 60px;
}

.hero-wrap {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero-text {
    flex: 1 1 55%;
}

.hero-photo {
    flex: 0 0 317px;
}

.hero-photo img {
    width: 317px;
    height: 317px;
    object-fit: cover;
    object-position: center 85%;
    border-radius: 50%;
    box-shadow: 0 12px 40px rgba(46,125,50,0.18);
    border: 5px solid #fff;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(76,175,80,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.45);
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,152,0,0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,152,0,0.45);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-lg {
    padding: 18px 48px;
    font-size: 1.1rem;
}

/* ---------- Cards / Sections ---------- */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-align: center;
    padding: 60px 0;
    border-radius: 0;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 28px;
}

.cta-section .btn {
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
}

.cta-section .btn:hover {
    background: var(--primary-light);
}

/* ---------- Footer ---------- */
.site-footer {
    background: #2E2E2E;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 32px 0;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--primary-light);
}

/* ---------- Form Styles ---------- */
.form-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 36px 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.form-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.form-section-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--error);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
    background: #fff;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Checkbox & Radio Groups */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
}

.checkbox-item:hover,
.radio-item:hover {
    border-color: var(--primary-light);
    background: #f1f8e9;
}

.checkbox-item input,
.radio-item input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-item.checked,
.radio-item.checked {
    border-color: var(--primary);
    background: #e8f5e9;
}

/* Rating Scale */
.rating-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
    flex-wrap: wrap;
}

.rating-row:last-child {
    border-bottom: none;
}

.rating-label {
    flex: 1;
    min-width: 200px;
    font-weight: 500;
    font-size: 0.9rem;
}

.rating-options {
    display: flex;
    gap: 6px;
}

.rating-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.rating-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.rating-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.rating-btn input {
    display: none;
}

.rating-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 8px 0 16px;
    max-width: 330px;
    margin-left: auto;
}

/* Radio inline */
.radio-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Progress Bar ---------- */
.progress-bar-wrapper {
    position: sticky;
    top: 60px;
    z-index: 50;
    background: var(--bg-white);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* ---------- Alert Messages ---------- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* ---------- Thank You Page ---------- */
.thankyou-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.thankyou-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 550px;
    width: 100%;
}

.thankyou-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.thankyou-card h1 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.thankyou-card p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ---------- GDPR Section ---------- */
.gdpr-text {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    background: #f5f5f5;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    max-height: 180px;
    overflow-y: auto;
}

/* ---------- Form Submit ---------- */
.form-submit {
    text-align: center;
    padding: 20px 0;
}

/* ---------- Mobile Hamburger Menu ---------- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 200;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .header-inner {
        position: relative;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 8px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        z-index: 150;
    }

    .header-nav.open {
        display: flex;
    }

    .header-nav a {
        margin-left: 0;
        padding: 14px 24px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .header-nav a:last-child {
        border-bottom: none;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .hero-wrap {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .hero-photo {
        flex: 0 0 auto;
        order: -1;
    }

    .hero-photo img {
        width: 230px;
        height: 230px;
        border-radius: 50%;
        object-fit: cover;
        object-position: center 85%;
        box-shadow: 0 12px 40px rgba(46,125,50,0.18);
        border: 5px solid #fff;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 8px;
        margin-left: auto;
        margin-right: auto;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        padding: 0 8px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card {
        padding: 24px 20px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
        max-width: 320px;
    }

    .cta-section {
        padding: 40px 0;
    }

    .cta-section h2 {
        font-size: 1.4rem;
    }

    .cta-section p {
        font-size: 0.95rem;
        padding: 0 8px;
    }

    /* Contact photo center on mobile */
    #kontakt .container > div {
        justify-content: center;
    }
    #kontakt .container > div > div:last-child {
        flex: 0 0 auto;
        width: 280px;
        margin: 0 auto;
    }

    /* Form mobile */
    .container-narrow {
        padding: 0 12px;
    }

    .form-section {
        padding: 20px 16px;
        margin-bottom: 16px;
        border-radius: var(--radius-sm);
    }

    .form-section-title {
        font-size: 1.15rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row[style*="repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-item,
    .radio-item {
        padding: 12px 14px;
        font-size: 0.92rem;
    }

    .radio-inline {
        flex-direction: column;
        gap: 8px;
    }

    .form-control {
        padding: 14px 16px;
        font-size: 16px; /* prevents iOS zoom */
    }

    select.form-control {
        font-size: 16px;
    }

    /* Rating mobile */
    .rating-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 14px 0;
    }

    .rating-label {
        min-width: auto;
        font-size: 0.88rem;
    }

    .rating-options {
        justify-content: space-between;
    }

    .rating-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .rating-legend {
        flex-wrap: wrap;
        gap: 4px;
        max-width: 100%;
        justify-content: center;
        font-size: 0.7rem;
    }

    /* Progress bar */
    .progress-bar-wrapper {
        top: 56px;
        padding: 8px 0;
    }

    /* Thank you */
    .thankyou-card {
        padding: 32px 20px;
    }

    .thankyou-card h1 {
        font-size: 1.4rem;
    }

    /* GDPR */
    .gdpr-text {
        font-size: 0.78rem;
        padding: 12px 14px;
        max-height: 150px;
    }

    /* Submit button full width */
    .form-submit .btn {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 1.35rem;
    }

    .card-icon {
        font-size: 2rem;
    }

    .form-section {
        padding: 16px 12px;
    }

    .rating-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .site-logo {
        font-size: 1.2rem;
    }

    .site-logo span {
        display: none;
    }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* ---------- Print styles ---------- */
@media print {
    .site-header,
    .site-footer,
    .progress-bar-wrapper,
    .btn,
    .form-submit {
        display: none;
    }

    .form-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}
