/* === ZÁKLAD === */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #fffef7;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* === HEADER === */
header {
    background-color: white;
    border-bottom: 1px solid #f0e68c;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-shadow: 0 2px 8px rgba(252, 222, 49, 0.15);
}
.logo img {
    max-height: 70px;
    width: auto;
    display: block;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-left { flex: 0 0 auto; }
.header-right { flex: 0 0 auto; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}
.main-nav li { margin: 0; }
.main-nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 4px;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
    color: #fcde31;
    border-bottom: 2px solid #fcde31;
}
html { scroll-behavior: smooth; }
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
    }
    .main-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    .main-nav a { font-size: 1rem; }
    .logo img { max-height: 60px; }
}

/* === NADPISY === */
h2 {
    font-family: 'Roboto Mono', monospace;
    text-align: center;
    color: #000000;
    margin: 0 auto 48px auto;
    text-transform: uppercase;
    font-size: 2.3em;
    letter-spacing: 1px;
    width: fit-content;
    position: relative;
}
h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 5px;
    background: #fcde31;
    border-radius: 3px;
}

/* === MAIN & SECTIONS === */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
section {
    padding: 60px 0;
    border-bottom: 1px solid #f0e68c;
}
section:last-of-type { border-bottom: none; }

/* === SLUŽBY === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 0 auto;
}
.service-item {
    background: white;
    padding: 28px 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.service-item h3 {
    color: #fcde31;
    margin-bottom: 16px;
    font-size: 1.35em;
}

/* === PORTFOLIO / GALERIE === */
#portfolio {
    padding-bottom: 20px !important; /* nebo 0px */
}

.portfolio-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.15rem;
    color: #444;
}

.before-after-grid {
    max-width: 1200px;
    margin: 0 auto 25px;
}

.before-after-grid h3 {
    text-align: center;
    color: #fcde31;
    font-size: 1.8rem;
    margin-bottom: 32px;
}

/* Symetrický rámeček kolem před/po bloku */
.before-after-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    padding: 3px; /* stejný padding nahoře i dole */
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* mezera mezi fotkami a případným popisem */
}

.ba-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 0;
}

.ba-images figure {
    margin: 0;
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s;
    overflow: hidden; /* zvětšení zůstane uvnitř */
    border-radius: 8px;
}

.ba-images figure:hover {
    opacity: 0.92;
}

/* Přesně pro tvůj poměr 570×359 */
.ba-images img {
    width: 100%;
    aspect-ratio: 570 / 359; /* přesný poměr tvých fotek – žádný ořez navíc */
    object-fit: contain; /* zachová celou fotku bez ořezu */
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.25s ease;
    cursor: pointer;
    display: block;
}

.ba-images img:hover {
    transform: scale(1.03);
}

.ba-images figcaption {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(252, 222, 49, 0.85);
    text-transform: uppercase;
    color: #000000;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    pointer-events: none;
}

.ba-desc {
    display: none; /* skryto */
}

/* responsive – na mobilu pod sebe */
@media (max-width: 768px) {
    .ba-images {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .before-after-item {
        padding: 16px;
    }
}

/* Galerie – další realizace */
.gallery-grid {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 3px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 5px;
}

.gallery-grid figure {
    margin: 0;
    padding: 0;
    overflow: hidden; /* zvětšení zůstane uvnitř rámečku */
    border-radius: 12px;
    cursor: pointer;
    transition: opacity 0.22s ease;
}

.gallery-grid figure:hover {
    opacity: 0.92;
}

.gallery-grid figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: block;
}

.gallery-grid figure:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    transform-origin: center center;
}

/* Aby boxy měly stejnou výšku i když fotky mají různé poměry */
.ba-images figure,
.gallery-grid figure {
    overflow: hidden;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(252, 222, 49, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}
.modal-content {
    max-width: 92%;
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}
.modal-caption {
    display: none;
}
.close-modal {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #1a1a1a;
    font-size: 52px;
    font-weight: bold;
    cursor: pointer;
}
.close-modal:hover { opacity: 0.7; }
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    color: #1a1a1a;
    border: none;
    font-size: 48px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
.nav-arrow:hover { background: rgba(255,255,255,0.9); }
.prev { left: 20px; }
.next { right: 20px; }
@media (max-width: 640px) {
    .nav-arrow { width: 48px; height: 48px; font-size: 36px; }
    .prev { left: 10px; }
    .next { right: 10px; }
    .close-modal { top: 15px; right: 20px; font-size: 42px; }
}

/* === REFERENCE ZÁKAZNÍKŮ === */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin: 40px auto 0;
}
.testimonial-item {
    background: white;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-align: center;
}
.stars {
    color: #fcde31;
    font-size: 1.8rem;
    margin-bottom: 16px;
    letter-spacing: 4px;
}
.author {
    margin-top: 16px;
    font-weight: 600;
    color: #555;
    font-style: italic;
}

/* === KONTAKT === */
#kontakt {
    background-color: #fcde31;
    padding: 60px 0 80px;
}
.contact-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.contact-column {
    flex: 1 1 380px;
    padding: 35px 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
}
.contact-column h3 {
    color: #fcde31;
    margin-bottom: 25px;
    font-size: 1.6em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.email {
    font-weight: bold;
    font-size: 1.15em;
    margin: 12px 0;
    color: #1a1a1a;
}
.contact-column.map iframe {
    width: 100% !important;
    min-height: 300px;
    border-radius: 12px;
}
@media (max-width: 820px) {
    .contact-columns {
        flex-direction: column;
        gap: 30px;
    }
    .contact-column { padding: 30px 20px; }
}
@media (max-width: 768px) {
    .contact-column.map iframe {
        height: 320px !important;
    }
}
.contact-column.map {
    max-width: 100%;
    overflow: hidden;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    font-size: 0.95em;
    color: #555;
    border-top: 1px solid #f0e68c;
    background: white;
}

/* === RESPONSIVE – obecné === */
@media (max-width: 900px) {
    .services-grid, .testimonials-grid { gap: 20px; }
}
@media (max-width: 680px) {
    h2 { font-size: 1.9em; }
    main { padding: 0 15px; }
}
@media (max-width: 480px) {
    h2 { font-size: 1.6em; }
}

/* Klikací logo */
.logo-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.logo-link:hover,
.logo-link:focus {
    opacity: 0.9;
    transform: scale(1.04);
    outline: none;
}
.logo img {
    max-height: 70px;
    width: auto;
    display: block;
}
@media (max-width: 768px) {
    .logo img {
        max-height: 60px;
    }
}

/* mravenec-animace */
.mravenec-deco {
    margin: 28px auto 0;
    width: 56px;
    height: 56px;
    transition: all 0.4s ease;
    opacity: 1;
}
.mravenec-deco:hover {
    opacity: 1;
    transform: scale(1.12) translateY(-6px);
    filter: drop-shadow(0 4px 8px rgba(252, 222, 49, 0.4));
}
@media (max-width: 768px) {
    .mravenec-deco {
        display: none;
    }
}
.ba-desc {
    display: none;           /* úplně skryje odstavec, ale zabírá stejný prostor */
    /* nebo visibility: hidden; */  /* zachová prostor, ale neviditelný */
}
/* Specifické úpravy jen pro nadpis v sekci Kontakt */
#kontakt h2::after {
    background: #1a1a1a;  /* černý proužek */
}