/* ============================================================
   AutoServis Horák — Frontend CSS
   ============================================================ */

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

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

:root {
    --color-primary:      #1a365d;
    --color-secondary:    #2d4a7a;
    --color-accent:       #e53e3e;
    --color-accent-hover: #c53030;
    --color-bg:           #ffffff;
    --color-bg-alt:       #f7fafc;
    --color-text:         #2d3748;
    --color-text-light:   #718096;
    --color-border:       #e2e8f0;
    --color-success:      #38a169;
    --color-error:        #e53e3e;
    --font-primary:       'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --max-width:          1200px;
    --section-padding:    100px;
    --border-radius:      12px;
    --border-radius-sm:   8px;
    --shadow-sm:          0 2px 8px rgba(0,0,0,.08);
    --shadow-md:          0 4px 20px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-primary); color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--color-secondary); }

/* === SKIP LINK === */
.skip-link {
    position: absolute; top: -40px; left: 16px;
    background: var(--color-primary); color: #fff;
    padding: 8px 16px; border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    font-size: .9rem; z-index: 9999; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* === HONEYPOT === */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* === CONTAINER === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--border-radius-sm);
    font-family: var(--font-primary); font-size: .95rem; font-weight: 600;
    cursor: pointer; border: 2px solid transparent;
    text-decoration: none; transition: all .2s;
    min-height: 48px; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.btn-primary   { background: var(--color-accent);   color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); text-decoration: none; color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-secondary:hover { background: rgba(255,255,255,.1); border-color: #fff; text-decoration: none; color: #fff; }
.btn-outline   { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: .85rem; min-height: 38px; }

/* === FLASH MESSAGES === */
.flash-messages { position: fixed; top: 80px; right: 16px; z-index: 5000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.flash-msg { padding: 12px 16px; border-radius: var(--border-radius-sm); font-size: .9rem; box-shadow: var(--shadow-md); }
.flash-success { background: #c6f6d5; color: #276749; border: 1px solid #9ae6b4; }
.flash-error   { background: #fed7d7; color: #822727; border: 1px solid #fc8181; }

/* === HEADER / NAV === */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--color-primary);
    transition: height .3s, box-shadow .3s;
    height: 72px;
}
.site-header.scrolled { height: 60px; box-shadow: 0 2px 20px rgba(0,0,0,.2); }
.nav-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-logo { font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.nav-logo:hover { text-decoration: none; opacity: .9; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; font-weight: 500; padding: 8px 12px; border-radius: var(--border-radius-sm); transition: color .2s, background .2s; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-links a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nav-cta { margin-left: 8px; }
.nav-cta a { background: var(--color-accent); color: #fff !important; padding: 8px 20px !important; border-radius: 24px !important; }
.nav-cta a:hover { background: var(--color-accent-hover) !important; }

/* Hamburger */
.nav-hamburger {
    display: none; background: none; border: none; cursor: pointer;
    color: #fff; font-size: 1.5rem; padding: 8px;
    min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
}
.nav-hamburger:focus-visible { outline: 2px solid #fff; }

/* Mobile nav panel */
.nav-panel {
    position: fixed; top: 0; right: -320px; width: 300px; height: 100vh;
    background: var(--color-primary); z-index: 2000;
    padding: 72px 0 24px;
    transition: right .3s ease;
    overflow-y: auto;
}
.nav-panel.open { right: 0; }
.nav-panel ul { list-style: none; }
.nav-panel ul li a { display: block; padding: 14px 24px; color: rgba(255,255,255,.9); text-decoration: none; font-size: 1rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-panel ul li a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-panel .panel-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }
.nav-panel .panel-cta { padding: 16px 24px; }
.nav-panel .panel-cta a { display: block; background: var(--color-accent); color: #fff; text-align: center; padding: 12px; border-radius: var(--border-radius-sm); font-weight: 600; text-decoration: none; }

/* Overlay */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1999; }
.nav-overlay.open { display: block; }

/* Sticky mobile CTA */
.sticky-cta-mobile {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
    background: var(--color-accent); padding: 12px 24px; text-align: center;
}
.sticky-cta-mobile a { color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Page body padding for fixed header */
.page-offset { padding-top: 72px; }

/* === HERO === */
.hero-section {
    background: linear-gradient(135deg, rgba(10,26,51,.75) 0%, rgba(26,58,93,.65) 100%),
                url('../images/autoservis-demo-image.webp') center/cover no-repeat;
    padding: 100px 0 80px;
    text-align: center;
    color: #fff;
}
.hero-section h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; letter-spacing: -.02em; }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 600px; margin: 0 auto 36px; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.hero-note { font-size: .9rem; color: rgba(255,255,255,.6); }

/* === SECTION BASE === */
.section { padding: var(--section-padding) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-primary); color: #fff; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; color: var(--color-primary); margin-bottom: 12px; }
.section-header p { color: var(--color-text-light); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.section-dark .section-header h2 { color: #fff; }

/* === BENEFITS (#vyhody) === */
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.benefit-card { background: var(--color-bg); border-radius: var(--border-radius); padding: 32px 24px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }
.benefit-icon { font-size: 2.5rem; margin-bottom: 16px; }
.benefit-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--color-primary); }
.benefit-card p { font-size: .9rem; color: var(--color-text-light); }

/* === SERVICES (#sluzby) === */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.service-card { background: var(--color-bg); border-radius: var(--border-radius); padding: 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); transition: box-shadow .2s, transform .2s; }
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-icon { font-size: 2rem; margin-bottom: 14px; }
.service-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--color-primary); }
.service-card p { font-size: .9rem; color: var(--color-text-light); margin-bottom: 14px; flex: 1; }
.service-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .82rem; }
.service-price { font-weight: 700; color: var(--color-accent); }
.service-duration { color: var(--color-text-light); }
.services-cta { text-align: center; }

/* === ABOUT (#o-mne) === */
.about-grid { display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: center; }
.about-text p { margin-bottom: 18px; font-size: 1rem; line-height: 1.7; }
.about-text ul, .about-text ol { margin-bottom: 25px; margin-left: 1.5rem; }
.about-text li { margin-bottom: .4em; }
.about-stats { display: flex; gap: 20px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.about-stat { text-align: center; background: var(--color-bg-alt); border-radius: var(--border-radius-sm); padding: 16px 20px; }
.about-stat__number { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.about-stat__label  { font-size: .8rem; color: var(--color-text-light); margin-top: 4px; }
.about-photo { background: var(--color-bg-alt); border-radius: var(--border-radius); aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; color: var(--color-text-light); font-size: .9rem; border: 2px dashed var(--color-border); }

/* === FAQ (#faq) === */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--border-radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-item summary { list-style: none; padding: 18px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; user-select: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--color-accent); flex-shrink: 0; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--color-border); }
.faq-item summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.faq-answer { padding: 18px 20px; color: var(--color-text-light); }

/* === CONTACT (#kontakt) === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.contact-item { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-item__icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.contact-item__text a { color: var(--color-text); }
.contact-item__text a:hover { color: var(--color-accent); }
.contact-map { margin-top: 24px; border-radius: var(--border-radius); overflow: hidden; }
.contact-map iframe { width: 100%; height: 300px; border: 0; display: block; }

/* === FORM === */
.contact-form h3, .booking-form h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; color: var(--color-text); }
.form-group label .req { color: var(--color-accent); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--color-border); border-radius: var(--border-radius-sm);
    font-family: var(--font-primary); font-size: .95rem; color: var(--color-text);
    background: var(--color-bg); transition: border-color .2s, box-shadow .2s;
    min-height: 48px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(45,74,122,.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group.checkbox-group { display: flex; align-items: flex-start; gap: 10px; }
.form-group.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.form-group.checkbox-group label { margin-bottom: 0; font-weight: 400; }
.form-submit { margin-top: 8px; }
.form-response { padding: 16px; border-radius: var(--border-radius-sm); margin-top: 16px; display: none; }
.form-response.success { background: #c6f6d5; color: #276749; border: 1px solid #9ae6b4; }
.form-response.error   { background: #fed7d7; color: #822727; border: 1px solid #fc8181; }
.form-response.show    { display: block; }

/* === BOOKING PAGE === */
.booking-page { padding: 80px 0; min-height: calc(100vh - 72px); }
.booking-container { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.booking-container h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.booking-subhead { color: var(--color-text-light); margin-bottom: 36px; }
.booking-confirmation { background: #c6f6d5; border: 1px solid #9ae6b4; border-radius: var(--border-radius); padding: 24px; text-align: center; }
.booking-confirmation h2 { color: #276749; margin-bottom: 10px; }
.booking-confirmation p { color: #276749; }

/* === STATIC PAGE === */
.page-content { padding: 80px 0; min-height: 60vh; }
.page-body { max-width: 800px; }
.page-body h1, .page-body h2, .page-body h3 { color: var(--color-primary); margin-bottom: .75em; margin-top: 1.5em; }
.page-body h1:first-child, .page-body h2:first-child { margin-top: 0; }
.page-body p { margin-bottom: 1em; }
.page-body ul, .page-body ol { margin-left: 1.5rem; margin-bottom: 1em; }
.page-body li { margin-bottom: .4em; }
.page-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.page-body table th, .page-body table td { padding: 8px 12px; border: 1px solid var(--color-border); }
.page-body table th { background: var(--color-bg-alt); font-weight: 600; }
.page-body a { color: var(--color-accent); }

/* === 404 PAGE === */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.error-page__content { text-align: center; }
.error-code { font-size: 7rem; font-weight: 800; color: var(--color-border); line-height: 1; margin-bottom: 16px; }
.error-page h1 { font-size: 1.8rem; margin-bottom: 12px; }
.error-page p { color: var(--color-text-light); margin-bottom: 28px; }

/* === FOOTER === */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.85); }
.footer-top { padding: 60px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-logo { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 14px; }
.footer-about { font-size: .9rem; color: rgba(255,255,255,.65); margin-bottom: 16px; line-height: 1.6; }
.footer-contact-list { list-style: none; font-size: .9rem; }
.footer-contact-list li { display: flex; gap: 8px; margin-bottom: 8px; color: rgba(255,255,255,.75); }
.footer-contact-list a { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-contact-list a:hover { color: #fff; }
.footer-col h4 { color: #fff; font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
.footer-hours { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-hours dt { font-weight: 600; color: rgba(255,255,255,.85); }
.footer-hours dd { margin-left: 0; margin-bottom: 6px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.8); }

/* === COOKIE CONSENT === */
.cookie-consent {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 4000;
    background: var(--color-primary); color: #fff;
    padding: 16px 24px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.2);
    margin-bottom: 60px; /* above sticky CTA on mobile */
}
.cookie-consent__inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-consent__text { flex: 1; font-size: .9rem; color: rgba(255,255,255,.85); min-width: 200px; }
.cookie-consent__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    :root { --section-padding: 80px; }
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > *:last-child { grid-column: span 2; }
}

@media (max-width: 768px) {
    :root { --section-padding: 60px; }
    .nav-links, .nav-cta { display: none; }
    .nav-hamburger { display: flex; }
    .sticky-cta-mobile { display: block; }
    .cookie-consent { margin-bottom: 56px; }

    .hero-section { padding: 80px 0 60px; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .hero-ctas .btn { width: 100%; max-width: 280px; }

    .benefits-grid  { grid-template-columns: 1fr; }
    .services-grid  { grid-template-columns: 1fr; }
    .about-grid     { grid-template-columns: 1fr; }
    .about-photo    { display: none; }
    .contact-grid   { grid-template-columns: 1fr; flex-direction: column-reverse; }
    .contact-grid > *:first-child { order: 2; }
    .contact-grid > *:last-child  { order: 1; }
    .footer-grid    { grid-template-columns: 1fr; }
    .footer-grid > *:last-child { grid-column: auto; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .section-header h2 { font-size: 1.5rem; }
    .hero-section h1 { font-size: 1.8rem; }
    .booking-container h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
