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

:root {
    --primary: #0057a8;
    --secondary: #0085ff;
    --light-bg: #f9f9f9;
    --dark-text: #111;
    --gray-text: #666;
    --border-radius: 12px;
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
}

.desktop-nav a {
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 6px;
}

.desktop-nav a:hover {
    background-color: #eef4fb;
}

/* Mobile menu */


.menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: #fff;
    padding: 2rem;
    position: absolute;
    top: 70px;
    right: 0;
    width: 80%;
    max-width: 300px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-menu a {
    padding: 1rem 0;
    font-weight: 500;
    color: var(--dark-text);
}


.close-menu {
    align-self: flex-end;
    cursor: pointer;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Section base */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}



.section-uvod h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-uvod p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background-color: #fff;
    color: var(--primary);
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn:hover {
    background-color: #f1f1f1;
}

/* O nás */
.section-onas h2,
.section-prace h2,
.sluzby_section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-onas p {
    max-width: 800px;
    margin: 1rem auto;
    color: var(--gray-text);
}

/* Služby */
.sluzby_section {
    background-color: #fff;
}

.sluzby_popis {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--gray-text);
}

.sluzby_grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.sluzba {
    flex: 1 1 300px;
    background-color: #f4f7fc;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.03);
    transition: transform var(--transition), box-shadow var(--transition);
}

.sluzba:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.sluzba img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    filter: grayscale(1);
}

.sluzba h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.sluzba p {
    font-size: 0.95rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    font-size: 1.2rem;
}

/* Responsivita */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .menu-icon {
        display: block;
    }
    .mobile-menu.show {
        display: flex;
    }

    section {
        padding: 2rem 1rem;
    }

    .sluzby_grid {
        flex-direction: column;
        align-items: center;
    }
}

/**

GALERIE

 */


.galerie-popis {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--gray-text);
}
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.galerie-grid img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.galerie-grid img:hover {
    transform: scale(1.03);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1rem;
}

.lightbox.show {
    display: flex;
}

.lightbox-img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 70vh;
    border-radius: var(--border-radius);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    object-fit: contain;
}

/* Mobilní úprava */
@media (max-width: 600px) {
    .lightbox-img {
        max-width: 95vw;
        max-height: 60vh;
    }

    .lightbox-nav {
        gap: 2rem;
        font-size: 1.5rem;
        margin-top: 0.5rem;
    }

    .lightbox .close {
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
    }
}


.lightbox-nav {
    display: flex;
    gap: 3rem;
    font-size: 2rem;
    color: #fff;
    margin-top: 1rem;
    cursor: pointer;
}

.lightbox .close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}


.galerie-grid {
    display: grid;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.galerie-grid {
    display: grid;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Výchozí: 2 sloupce na malém displeji */
.galerie-grid {
    grid-template-columns: repeat(2, 1fr);
}


.galerie-grid img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.3s ease;
    object-fit: cover;
}

/* Hover efekt pro desktop */
@media (hover: hover) {
    .galerie-grid img:hover {
        transform: scale(1.03);
    }

}

/* Tablet: 3 sloupce */
@media (min-width: 600px) {
    .galerie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop: 4 sloupce */
@media (min-width: 1024px) {
    .galerie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Na mobilu zobrazíme jen prvních 4 fotky z galerie napevno */
@media (max-width: 600px) {
    .galerie-grid img:nth-child(n+5) {
        display: none;
    }
}

/* Na větších displejích zobrazíme všechny (např. 8) */
@media (min-width: 601px) {
    .galerie-grid img {
        display: block;
    }
}


/*

 ČÁRA MEZI SEKCEMI

 */

section {
    border-bottom: 1px solid #ddd; /* jemná šedá linka */
    padding-bottom: 4rem;
    margin-bottom: 4rem;
}

/* U poslední sekce odstraníme spodní okraj */
section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}


/**

 O nás

 */


.onas-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: left;
}

/* Obrázek */
.onas-img img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

/* Desktop layout: text vlevo, obrázek vpravo */
@media (min-width: 768px) {
    .onas-wrapper {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .onas-text {
        flex: 1;
        padding-right: 2rem;
    }

    .onas-img {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .onas-img img {
        max-width: 100%;
        height: auto;
    }
}

/*
Kontakt
 */


.kontakt-section {
    background-color: #fff;
    color: var(--dark-text);
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #eee;
}

.kontakt-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: left;
}

.kontakt-item h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.kontakt-item p {
    font-size: 1rem;
    color: var(--gray-text);
}

.kontakt-item a {
    color: var(--dark-text);
    text-decoration: none;
}

.kontakt-item a:hover {
    color: var(--secondary);
}

.kontakt-note {
    font-size: 1rem;
    color: var(--gray-text);
    margin-top: 2rem;
}

/* Desktop rozložení do 2 nebo 4 sloupců */
@media (min-width: 768px) {
    .kontakt-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kontakt-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/*

Úvod

 */

.section-uvod {
    position: relative;
    background-color: #dce4f4; /* světle modrá jako obloha */
    color: #111; /* tmavý text pro dobrou čitelnost před načtením */
    padding: 6rem 2rem;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    transition:
            background-image 0.6s ease-in-out,
            color 0.6s ease-in-out,
            background-color 0.6s ease-in-out;
}

.section-uvod.loaded {
    background-image: url('images/IzolaceStrechyRodinehoDomu.webp');
    color: #fff;
}

.uvod-content {
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Na mobilu: zarovnání na střed */
@media (max-width: 768px) {
    .uvod-content {
        text-align: left;
        align-items: center;
    }
}

/* Na desktopu: zarovnání doleva, mírné rozhození */
@media (min-width: 769px) {
    .uvod-content {
        text-align: left;
        align-items: flex-start;
        padding: 2rem 4rem;
    }

    .uvod-content h1 {
        font-size: 3rem;
        max-width: 600px;
    }

    .uvod-content p {
        font-size: 1.2rem;
        max-width: none;
        text-align: left;
    }

    .uvod-content .btn {
        margin-top: 1rem;
        align-self: flex-start;
    }
}

/*

MAPA

 */

.kontakt-mapa {
    margin-top: 2rem;
    text-align: left;
}

.kontakt-mapa h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.mapa-embed iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
