/* ============================================
   AUTOELEKTRO HOFMANN - Moderní styl
   Barevné schéma: Modrá + Bílá
   ============================================ */

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

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

/* Proměnné */
:root {
    --primary:     #1a56db;
    --primary-dark:#1240a8;
    --accent:      #e8f0fe;
    --dark:        #1e293b;
    --gray:        #64748b;
    --light:       #f8fafc;
    --white:       #ffffff;
    --border:      #e2e8f0;
    --shadow:      0 4px 24px rgba(26,86,219,0.10);
    --radius:      12px;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--light);
    color: var(--dark);
}

h1, h2, h3 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   ZÁHLAVÍ
   ============================================ */
header {
    background: #ffffff;
    border-bottom: 3px solid #cc1a1a; /* červená z loga */
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;
}

/* Logo jako hlavní prvek */
.header-brand {
    display: flex;
    align-items: center;
}

.header-brand a {
    display: block;
    line-height: 0;
}

.header-brand img {
    height: 72px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Kontaktní info vpravo */
.header-contact {
    text-align: right;
    color: var(--gray);
    font-size: 0.88em;
    line-height: 1.7;
}

.header-contact a {
    color: #cc1a1a;
    font-size: 1.1em;
    font-weight: 700;
    display: block;
}

.header-contact a:hover {
    color: var(--primary);
}

/* ============================================
   NAVIGACE + HAMBURGER
   ============================================ */
nav {
    background: var(--primary);
    padding: 0 40px;
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2px;
    padding: 0;
    margin: 0;
}

nav ul li a {
    display: block;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.93em;
    font-weight: 500;
    padding: 13px 18px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

nav ul li a:hover,
nav ul li a.active {
    background: rgba(255,255,255,0.18);
    color: var(--white);
}

/* Hamburger tlačítko */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px 14px;
    background: none;
    border: none;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================
   RESPONZIVITA ZÁHLAVÍ
   ============================================ */
@media (max-width: 768px) {
    .header-top {
        padding: 10px 16px;
    }

    .header-brand img {
        height: 52px;
    }

    .header-contact {
        font-size: 0.8em;
    }

    .header-contact a {
        font-size: 1em;
    }

    nav {
        padding: 0;
    }

    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary-dark);
        gap: 0;
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        padding: 14px 20px;
        font-size: 1em;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
}

@media (max-width: 480px) {
    .header-brand img {
        height: 42px;
    }
}

/* ============================================
   HLAVNÍ OBSAH
   ============================================ */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

section {
    margin-bottom: 40px;
}

/* ============================================
   ÚVODNÍ STRÁNKA (#home)
   ============================================ */
#home {
    text-align: center;
}

#home h1 {
    font-size: 2.1em;
    color: var(--primary);
    margin-bottom: 14px;
}

#home .perex {
    font-size: 1.1em;
    color: var(--gray);
    max-width: 680px;
    margin: 0 auto 28px auto;
}

.info-boxes {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 28px 0;
}

.info-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    flex: 1;
    min-width: 180px;
    max-width: 240px;
    text-align: center;
    box-shadow: var(--shadow);
}

.info-box .icon {
    font-size: 1.9em;
    margin-bottom: 8px;
}

.info-box h3 {
    font-size: 0.97em;
    color: var(--primary);
    margin-bottom: 5px;
}

.info-box p {
    font-size: 0.87em;
    color: var(--gray);
}

/* Fotky na úvodní stránce */
.begin {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.begin img {
    width: calc(50% - 8px);
    max-width: 480px;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius);
    object-fit: contain;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 6px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.begin img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(26,86,219,0.16);
}

@media (max-width: 768px) {
    #home h1 { font-size: 1.5em; }

    .begin img {
        width: 100%;
        max-height: 260px;
    }

    .info-box {
        min-width: 140px;
        padding: 16px;
    }
}

/* ============================================
   SLUŽBY (#services)
   ============================================ */
#services h1 {
    font-size: 2em;
    color: var(--primary);
    text-align: center;
    margin-bottom: 28px;
}

#services ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

#services ul li {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(26,86,219,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-size: 0.96em;
    color: var(--dark);
}

#services ul li:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(26,86,219,0.13);
}

@media (max-width: 768px) {
    #services h1 { font-size: 1.5em; }
    #services ul { grid-template-columns: 1fr; }
}

/* ============================================
   KDE MĚ NAJDETE (#location)
   ============================================ */
#location {
    text-align: center;
}

#location h1 {
    font-size: 2em;
    color: var(--primary);
    margin-bottom: 14px;
}

#location address {
    font-style: normal;
    font-size: 1.1em;
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.8;
}

#location iframe {
    width: 100%;
    max-width: 720px;
    height: 420px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    #location h1 { font-size: 1.5em; }
    #location iframe { height: 270px; }
}

/* ============================================
   FOTOGALERIE (#gallery)
   ============================================ */
#gallery h1 {
    font-size: 2em;
    color: var(--primary);
    text-align: center;
    margin-bottom: 24px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.thumbnail {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.thumbnail:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(26,86,219,0.18);
    border-color: var(--primary);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(15,23,42,0.88);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal.open {
    display: flex;
}

.modal-inner {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.modal-content {
    max-width: 90vw;
    max-height: 76vh;
    border-radius: var(--radius);
    border: 3px solid var(--white);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    object-fit: contain;
}

.modal-navigation {
    display: flex;
    gap: 14px;
}

.modal-navigation button {
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 10px 22px;
    font-size: 0.97em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.modal-navigation button:hover {
    background: var(--primary);
    color: var(--white);
}

.close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: var(--white);
    color: var(--primary);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}

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

@media (max-width: 768px) {
    .gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .thumbnail { height: 130px; }
}

/* ============================================
   KONTAKT (#info)
   ============================================ */
#info {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.kontakt-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 46px;
    min-width: 300px;
    width: 100%;
    max-width: 520px;
}

.kontakt-card h1 {
    font-size: 1.9em;
    color: var(--primary);
    margin-bottom: 22px;
}

.kontakt-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.98em;
}

.kontakt-row:last-child {
    border-bottom: none;
}

.kontakt-row .label {
    color: var(--gray);
    font-size: 0.83em;
    min-width: 58px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kontakt-row a {
    color: var(--primary);
    font-weight: 500;
}

.kontakt-row a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .kontakt-card { padding: 22px 16px; }
}

/* ============================================
   ZÁPATÍ
   ============================================ */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.72);
    text-align: center;
    padding: 26px 20px;
    font-size: 0.9em;
    margin-top: 10px;
}

footer p {
    margin-bottom: 5px;
}

footer .logo img {
    max-width: 160px;
    margin-top: 12px;
    border-radius: 8px;
    background: white;
    padding: 6px 10px;
    opacity: 0.95;
}

footer a {
    color: #93c5fd;
}

footer a:hover {
    color: var(--white);
    text-decoration: underline;
}
