/* ============================================== */
/* DEFINICE BAREV */
/* ============================================== */
:root {
    --primary-color: #0099ff; /* Kontrastní barva (modrá) */
    --secondary-color: #555;   /* Hlavní text */
    --light-contrast: #a8a8a8;    /* Sekundární text */
    --background-color: #fff;  /* Pozadí */
    --dark-color: #000;        /* Tmavý text/pozadí */
}

/* ============================================== */
/* ZÁKLADNÍ NASTAVENÍ A TYPOGRAFIE */
/* ============================================== */
body {
    font-family: 'Arial', sans-serif; /* Použití moderního bezpatkového písma */
    color: var(--secondary-color);
    background-color: var(--background-color);
    line-height: 1.7; /* Lepší čitelnost */
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Hladké scrollování pro kotvy */
html {
    scroll-behavior: smooth;
}

/* ============================================== */
/* HLAVNÍ SEKCE A NADPISY */
/* ============================================== */
.section-padding {
    padding: 6rem 0; /* Vzdušné bloky */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--light-contrast);
}

.bi {
    -webkit-text-stroke: 0.2px; /* Jemně zesílí linky ikon */
}

/* ============================================== */
/* NAVIGACE (NAVBAR) */
/* ============================================== */
.navbar {
    background-color: rgba(0, 0, 0, 0.8); /* Mírnì prùhledné tmavé pozadí pro minimalistický vzhled */
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: background-color 0.3s ease;
    backdrop-filter: blur(5px); /* Moderní efekt rozostøení */
}

.navbar-logo {
    height: 60px;
    width: auto;
    transition: filter 0.3s ease;
}

.nav-item {
    font-size: 0.8rem;
    font-weight: 600;
    padding-left: 20px;
}

.nav-link {
    color: #fff !important;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}


/* ============================================== */
/* HERO SEKCE */
/* ============================================== */
.hero-section {
    height: 100vh;
    height: 100dvh;
    min-height: 600px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)), url('images/hero.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax efekt */
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.hero-section h1 {
    font-size: 4.5rem;
}

.hero-section span {
    color: var(--primary-color);
}

.hero-section p.lead {
    font-size: 1.5rem;
    font-weight: 300;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px; /* Zaoblený tvar */
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0077cc; /* Tmavší odstín modré pøi hoveru */
    border-color: #0077cc;
    transform: translateY(-2px); /* Mírný 3D efekt */
}

.custom-btn-shadow {
    box-shadow: 0 8px 15px rgba(0, 153, 255, 0.4); /* Lehký stín pro vyniknutí */
}

/* Pozice šipky v Hero sekci */
.hero-section.position-relative {
    min-height: 100vh; /* Zajistí, že hero vyplní celou obrazovku */
}

/* Kontejner, který drží šipku */
.scroll-down-container {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%; /* Rozprostře se přes celou šířku */
    display: flex;
    justify-content: center; /* Horizontální střed */
    align-items: center;
    pointer-events: none; /* Aby kontejner neblokoval klikání na jiné věci */
    z-index: 10;
}

/* Samotná šipka */
.scroll-down {
    pointer-events: auto; /* Vrátíme klikatelnost samotné šipce */
    color: white;
    font-size: 2rem;
    text-decoration: none;
    animation: bounce 2s infinite;
    display: block;
}

.scroll-down:hover {
    color: var(--bs-primary); 
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ============================================== */
/* KARTY SLUŽEB */
/* ============================================== */
#sluzby {
    //padding: var(--section-padding) 0;
    overflow-x: hidden !important;
}

#sluzby span {
    color: var(--dark-color);
}

/* Kontejner pro plnì klikatelnou kartu */
.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
    border: none;
    height: 100%;
    min-height: 250px;
    background-color: #fff; /* Základní barva pod obrázkem */
    z-index: 1;
}

/* Optimalizace výkonu - říkáme prohlížeči, co se bude měnit */
.service-card::before, .service-card::after {
    will-change: opacity;
}

/* VRSTVA 1: Obrázek (Černobílý) */
.service-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%); /* Obrázek bude černobílý */
    z-index: -2; /* Úplně vespod */
    transition: transform 0.5s ease, opacity 0.5s ease-in-out;
}

/* VRSTVA 2: Šedobílý překryv */
.service-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 153, 255, 0.75);
    z-index: -1;
    transition: opacity 0.5s ease-in-out;
}

/* Zajištění hladkého přechodu textu */
.service-card .card-title, 
.service-card .card-text {
    position: relative;
    z-index: 3;
    transition: color 0.4s ease-in-out;
}

/* Zajištění, aby obsah (ikona a text) byl nad těmito vrstvami */
.service-card > * {
    position: relative;
    z-index: 3;
}

/* Definice CSS Sprite kontejneru */
.card-icon-sprite {
    display: block;
    width: 100px; /* Šíøka ikony (z tvé specifikace) */
    height: 100px; /* Výška ikony (horní polovina spritu) */
    margin: 0 auto; /* Centrování */
    background-repeat: no-repeat;
    background-position: 0 0; /* Výchozí pozice: 0 0 (zobrazí èernou ikonu) */
    transition: background-position 0.3s ease-in-out;
}

.card-bg-oploceni::before {
    background-image: url('images/oploceni.webp');
}

.card-bg-brany::before {
    background-image: url('images/brany.webp');
}

.card-bg-zakazka::before {
    background-image: url('images/zakazka.webp');
}

.card-bg-rekonstrukce::before {
    background-image: url('images/rekonstrukce.webp');
}

/* Přiřazení konkrétních obrázkù k ikonám */
.card-icon-sprite[data-icon="oploceni"] {
    background-image: url('images/ploty.png'); 
}
.card-icon-sprite[data-icon="brany"] {
    background-image: url('images/brany.png'); 
}
.card-icon-sprite[data-icon="zakazka"] {
    background-image: url('images/zakazka.png');
}
.card-icon-sprite[data-icon="rekonstrukce"] {
    background-image: url('images/rekonstrukce.png');
}

.service-card .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.service-card .card-text {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

/* EFEKTY POUZE PRO DESKTOP (Myš) */
@media (min-width: 992px) {
    .service-link-card:hover .service-card {
        background: var(--dark-color); 
        transform: translateY(-5px); 
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }

    .service-link-card:hover .service-card::before,
    .service-link-card:hover .service-card::after {
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
    }

    /* Přepnutí ikony na modrou */
    .service-link-card:hover .card-icon-sprite {
        background-position: 0 -100px; 
    }

    /* Změna barvy nadpisu a textu */
    .service-link-card:hover .card-title,
    .service-link-card:hover .card-text {
        color: var(--primary-color) !important;
        transition: color 0.5s ease-in-out; 
    }
}

/* Úprava karet pro mobily */
@media (max-width: 576px) {
    .service-card {
        min-height: 140px; /* Menší výška pro mobilní 2x2 grid */
        padding: 15px !important;
    }
    
    .card-icon-sprite {
        width: 60px;  /* Menší ikona na mobilu */
        height: 60px;
        background-size: 60px 120px; /* Přizpůsobení spritu menšímu rozměru */
    }

    .service-card .card-title {
        font-size: 0.9rem; /* Menší písmo pro nadpisy na mobilu */
        margin-bottom: 0;
    }
    
    .service-link-card:hover .service-card {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }
}


/* ============================================== */
/* KARUSEL (NAŠE PRÁCE) */
/* ============================================== */
.custom-carousel-inner {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.placeholder-img {
    height: 600px;
    background-size: cover;
    background-position: center;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    bottom: 20px;
    max-width: 60%; 
    left: 50%;
    transform: translateX(-50%);
}

.carousel-caption h5 {
    font-size: 1rem; 
    font-weight: 600;
}

.carousel-caption p {
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* ============================================== */
/* SEKCE PARTNER LOGA (HORIZONTÁLNÍ SCROLL) */
/* ============================================== */
#partner-logos {
    overflow-x: hidden !important; 
}

.logo-border-wrapper {
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    padding: 1.5rem 0;
    overflow: hidden !important;
    background-color: #fff;
}

/* Kontejner, který bude držet loga v jedné rovině */
.logo-carousel-track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 60px;
    animation: scroll 40s linear infinite;
    padding-left: 60px; /* Počáteční mezera */
}

/* Zastavení animace při najetí myší */
.logo-carousel-track:hover {
    animation-play-state: paused;
}

/* Styly pro jednotlivé slidy/názvy firem */
.logo-slide {
    flex-shrink: 0; /* Zabrání zmenšování slidu */
    padding: 0 4rem; /* Větší mezery mezi logy/názvy */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px; /* Minimální šířka pro název firmy */
}

.logo-slide a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    opacity: 0.6;
    transition: opacity 0.3s ease;
    white-space: nowrap; /* Zabrání zalomení názvu firmy */
}

.logo-slide a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Definice animace pro nekonečný posun */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); 
    }
}

@media (max-width: 768px) {
    .logo-slide {
        min-width: 120px;
    }
    .logo-slide a {
        font-size: 1rem;
    }
    /* Zrychlení animace na menších zaøízeních, aby se obsah rychleji obmìòoval */
    .logo-carousel-track {
        animation: scroll 30s linear infinite;
        gap: 20px 
    }
}


/* ============================================== */
/* SEKCE JAK PRACUJEME (TIMELINE) */
/* ============================================== */
#jak-pracujeme {
    background-color: #1a1a1a;
    position: relative;
}

#jak-pracujeme .section-title {
    color: #ddd;
}

.timeline-wrapper {
    position: relative;
    padding: 40px 0;
}

/* Horizontální čára na desktopu */
.timeline-line {
    position: absolute;
    top: 50px; /* Zarovnání na střed teček */
    left: 12.5%;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    z-index: 1;
}

.timeline-item {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Pulzující body */
.step-dot {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    position: relative;
    box-shadow: 0 0 0 rgba(0, 153, 255, 0.4);
    animation: pulse-dot 2s infinite;
}

.step-content {
    padding-top: 10px;
}

/* Animace pulzování */
@keyframes pulse-dot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(0, 153, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 153, 255, 0); }
}

/* Šipka dolů */
.pulse-arrow {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* ============================================== */
/* RESPONZIVITA (MOBILNÍ VERZE) */
/* ============================================== */
@media (max-width: 991px) {
    .timeline-line {
        left: 20px; /* Pozice vertikální čáry */
        right: auto;
        top: 50px; /* Začátek u první tečky */
        bottom: 0px; /* Konec u poslední tečky */
        width: 2px;
        height: calc(100% - 50px);
    }

    .timeline-item {
        display: flex;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 40px;
    }

    .step-dot-wrapper {
        width: 60px;
        min-width: 60px;
    }

    .step-dot {
        margin: 5px 0 0 10px; /* Tečka lícující s čárou */
    }

    .step-content {
        padding-top: 0;
        padding-left: 10px;
    }
}


/* ============================================== */
/* SEKCE KONTAKT 1: FORMULÁŘ A PARALLAX */
/* ============================================== */
#kontakt-form {
    position: relative;
    overflow: hidden;
    background-color: #333;
}

#kontakt-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/dilna.webp'); 
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: grayscale(100%);
    z-index: 1;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 2;
}

#kontakt-form .container {
    position: relative;
    z-index: 3;
}

.contact-form-card {
    background: white;
    border-radius: 30px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 153, 255, 0.25);
    outline: 0;
}

.form-control {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Stylování checkboxu gdpr */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 153, 255, 0.25);
}

.form-check-label {
    cursor: pointer; /* Aby uživatel věděl, že může kliknout i na text */
}

/* Luxusní stylování pro zprávu formuláře */
#formMessage {
    display: none;
    padding: 20px;
    border-radius: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    border-left: 5px solid;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    margin-top: 25px;
    animation: fadeInUp 0.5s ease forwards;
}

/* Varianta Úspěch (Zlatá/Zelená elegance) */
#formMessage.alert-success {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    border-left-color: var(--primary-color);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Varianta Chyba (Decentní červená) */
#formMessage.alert-danger {
    background: rgba(255, 235, 235, 0.95);
    color: #842029;
    border-left-color: #dc3545;
}

/* Ikony v hlášce */
#formMessage i {
    margin-right: 10px;
    font-size: 1.2rem;
    vertical-align: middle;
}

/* ============================================== */
/* SEKCE KONTAKT 2: MAPA A KARTA */
/* ============================================== */
#kontakt-mapa {
    overflow: hidden;
}

.map-container {
    width: 100%;
    height: 450px;
    z-index: 1;
}

/* Karta plovoucí nad mapou na desktopu */
.contact-info-wrapper {
    position: absolute;
    top: 50%;
    right: 10%;
    left: auto;
    transform: translateY(-50%);
    z-index: 2;
    width: 100%;
    max-width: 500px;
    pointer-events: none; /* Aby šlo pod kartou stále klikat na mapu (volitelné) */
}

.contact-info-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 30px;
    pointer-events: all;
    font-size: 0.95rem;
}

.contact-info-card h3{
    color:  var(--primary-color);
}

.contact-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.contact-item i {
    font-size: 1.1rem;
}

.border-start {
    border-left: 1px solid #eee !important;
}

.contact-info-card h3 {
    font-size: 1.25rem; /* Zmenšení nadpisu v kartì */
    margin-bottom: 1.5rem;
}

/* ============================================== */
/* RESPONZIVITA (Mobilní zařízení) */
/* ============================================== */
@media (max-width: 991px) {
    /* Sekce 1: Zrušení fixed backgroundu na mobilu (často zlobí výkon) */
    #kontakt-form {
        background-attachment: scroll;
    }

    /* Sekce 2: Karta se øadí nad mapu */
    .contact-info-wrapper {
        position: static;
        transform: none;
        max-width: 100%;
        pointer-events: all;
        padding: 0;
    }

    .contact-info-card {
        border-radius: 0; /* Na mobilu lépe vypadá pøes celou šíøku */
        box-shadow: none;
        padding: 2rem 1.5rem;
    }

    .map-container {
        height: 350px;
    }
    
    .border-start {
        border-left: none !important;
        padding-left: calc(var(--bs-gutter-x) * .5) !important;
    }
}


/* ============================================== */
/* FOOTER */
/* ============================================== */
.footer {
    background-color: var(--dark-color) !important; /* Èistì èerné pozadí */
    color: var(--light-contrast) !important;
}

.footer a {
    color: var(--light-contrast);
}

.footer a:hover {
    color: var(--primary-color);
}

.hover-opacity-100:hover {
        opacity: 1 !important;
        transition: opacity 0.3s ease;
    }
    .text-white-50:hover {
        color: var(--primary-color) !important; /* Pokud máš definovanou modrou */
    }


/* ============================================== */
/* STYL TABULEK */
/* ============================================== */
.custom-tech-table {
    font-size: 0.7rem;
}
.custom-tech-table th, .custom-tech-table td {
    padding: 0.5rem 0;
    background-color: transparent !important;
    border-bottom: 1px solid #f0f0f0;
}
.custom-tech-table th {
    font-weight: 600;
    width: 35%;
}


/* ============================================== */
/* STYLY PRO OPLOCENI.HTML */
/* ============================================== */
.hero-oploceni {
    height: 60vh;
    position: relative;
    background-color: #000;
}

.hero-oploceni::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url('images/oploceni.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax */
    /* EFEKT ROZMAZÁNÍ */
    filter: blur(4px);
    transform: scale(1.1); /* Mírné zvětšení, aby blur neudělal bílé okraje */
    z-index: 1;
}

/* Zajištění, že container je nad rozmazaným pozadím */
.hero-oploceni .container {
    position: relative;
    z-index: 2;
}

.hero-oploceni h1 {
    font-size: 4.5rem;
}

.hero-oploceni p.lead {
    font-size: 1.5rem;
    font-weight: 300;
}

.section-subtitle span {
    color: var(--dark-color);
}

.product-row p.lead, ul, table {
    font-size: 0.8rem;
}

/* Obrázek k okraji, stejné i pro stránku KN_brany.html */
.image-wrapper-flush {
    width: 100%;
    height: 100%;
    padding-bottom: 60%; /* Poměr 4:3 nebo 100% pro čtverec */
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image-interactive {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.6s ease;
}

.image-wrapper-flush:hover .product-image-interactive {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.product-divider {
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #eee, transparent);
    margin: 4rem auto;
}

@media (min-width: 992px) {
    :root {
        /* Toto číslo (1320px) musí odpovídat max-width tvého kontejneru v Bootstrapu */
        --site-container-width: 1320px; 
        --container-margin: calc((100vw - var(--site-container-width)) / 2);
        --edge-image-radius: 30px;
    }

    /* Odsazení textu zleva (pro obrázek vlevo) */
    .ps-lg-container {
        padding-left: var(--container-margin) !important;
    }
    
    /* Odsazení textu zprava (pro obrázek vpravo) */
    .pe-lg-container {
        padding-right: var(--container-margin) !important;
    }
    
    .product-row:not(.flex-row-reverse) .image-wrapper-flush {
        /* Zaoblíme jen pravý horní a pravý dolní roh */
        border-top-right-radius: var(--edge-image-radius);
        border-bottom-right-radius: var(--edge-image-radius);
    }

    .product-row.flex-row-reverse .image-wrapper-flush {
        /* Zaoblíme jen levý horní a levý dolní roh (směrem k textu) */
        border-top-left-radius: var(--edge-image-radius);
        border-bottom-left-radius: var(--edge-image-radius);
    }
}


/* ============================================== */
/* STYLY PRO OPLOCENI1 - NEW.HTML */
/* ============================================== */
.oploceni-nabidka {
    padding-top: 12rem;
    padding-bottom: 6rem;
}

.karta {
    background: #fff;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 2px solid rgba(0,0,0,0.06);
    transition: all 0.4s ease;
}

.karta:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.karta.active-card {
    border-color: var(--primary-color);
    transform: translateY(-5px); /* Karta zůstane mírně nadzvednutá */
}

.karta-img {
    border-radius: 30px 30px 0 0;
    height: 200px;
    overflow: hidden;
}

.karta-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.karta:hover .karta-img img {
    transform: scale(1.1);
}

.detail-box .lead {
    font-size: 0.8rem;
}

#detail-popis strong {
    font-weight: 800 !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-foto-wrapper {
    width: 100%;
    height: 450px; /* Pevná výška pro desktop */
    overflow: hidden;
    border-radius: 20px;
    background-color: #f8f9fa; /* Světlé pozadí, než se načte fotka */
}

.detail-foto {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center; /* Vycentruje ořez na střed */
    transition: transform 0.3s ease;
}

/* Zajistí, že detail vždy skočí na nový řádek v Bootstrap gridu */
#dynamic-detail-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
    display: block !important;
    clear: both;
}

.detail-box {
    display: block !important; /* Aby se neschovala vnitřní krabice */
    opacity: 1 !important;
    visibility: visible !important;
}


/* ============================================== */
/* STYLY PRO BRANY1 - NEW.HTML */
/* ============================================== */
.brany-nabidka {
    padding-top: 12rem;
    padding-bottom: 6rem;
}


/* ============================================== */
/* STYLY PRO BRANY.HTML */
/* ============================================== */
.hero-brany {
    height: 60vh;
    position: relative;
    background-color: #000;
}

.hero-brany::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url('images/brany.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax */
    /* EFEKT ROZMAZÁNÍ */
    filter: blur(4px);
    transform: scale(1.1); /* Mírné zvětšení, aby blur neudělal bílé okraje */
    z-index: 1;
}

/* Zajištění, že container je nad rozmazaným pozadím */
.hero-brany .container {
    position: relative;
    z-index: 2;
}

.hero-brany h1 {
    font-size: 4.5rem;
}

.hero-brany p.lead {
    font-size: 1.5rem;
    font-weight: 300;
}


/* ============================================== */
/* STYLY PRO ZAKAZKA.HTML */
/* ============================================== */
.hero-zakazka {
    height: 60vh;
    position: relative;
    background-color: #000;
}

.hero-zakazka::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url('images/zakazka.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax */
    /* EFEKT ROZMAZÁNÍ */
    filter: blur(4px);
    transform: scale(1.1); /* Mírné zvětšení, aby blur neudělal bílé okraje */
    z-index: 1;
}

/* Zajištění, že container je nad rozmazaným pozadím */
.hero-zakazka .container {
    position: relative;
    z-index: 2;
}

.hero-zakazka h1 {
    font-size: 4.5rem;
}

.hero-zakazka p.lead {
    font-size: 1.5rem;
    font-weight: 300;
}

/* Bento Grid & Karty */
.product-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 35px;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.4s ease;
}

.product-card:hover {
    //transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.main-card {
    background: #1a1a1a; /* Tmavé pozadí pro hlavní kartu */
    position: relative; /* Nutné pro absolutní pozicování obrázku uvnitř */
    overflow: hidden;
    color: white;
    min-height: 350px;
    display: flex;
    align-items: flex-end; /* Text bude dole na kartě */
    border: none;
}

.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Obrázek se ořízne, aby vyplnil prostor, ale nedeformoval se */
    z-index: 1;
}

.card-img-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    z-index: 2;
}

.card-content {
    position: relative;
    z-index: 3; /* Text musí být nad obrázkem i overlayem */
    padding: 20px;
}

.icon-blue {
    color: var(--primary-color);
    font-size: 2.2rem;
}

/* Responzivita */
@media (max-width: 991px) {
    .full-width-cta {
        padding: 40px 0;
    }
}

/* ============================================== */
/* STYLY PRO ZAKAZKA1 - NEW.HTML */
/* ============================================== */
.zakazka {
    padding-top: 12rem;
    padding-bottom: 6rem;
}

/* Základ pro všechny karty v sekci zakázka */
.zakazka .product-card.main-card {
    position: relative;
    //border: solid 5px var(--primary-color);
    border-radius: 30px;
    overflow: hidden;
    min-height: 280px; /* Minimální výška pro menší karty */
    transition: all 0.4s ease;
}

.sm-card {
    height: 320px; /* Pevná výška pro spodní řadu */
}

/* Efekt při najetí myší */
.product-card.main-card:hover .card-bg-img {
    transform: scale(1.1);
}

/* Obrázek na pozadí */
.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

/* Obsah karty */
.card-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Text dole */
    color: white;
}


/* ============================================== */
/* STYLY PRO REKONSTRUKCE.HTML */
/* ============================================== */
.rekonstrukce {
    padding-top: 12rem;
    padding-bottom: 6rem;
}

/* Mezery mezi bloky */
.mb-100 { margin-bottom: 100px; }


.comparison-container {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10; /* Přesný obdélníkový tvar roku 2026 */
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
}

.comparison-container:hover .img-wrapper img {
    filter: grayscale(0%);
    transform: scale(1.1); 
}

/* Badge přes obrázek */
.badge-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: black;
    padding: 8px 20px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.8rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.badge-overlay.left { right: auto; left: 20px; }

/* Vychytávky pro kroky rekonstrukce */
.reconstruction-step {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.step-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 20px;
    font-family: 'Arial Black', sans-serif;
    opacity: 0.5;
}

.text-gold { color: var(--primary-color); }


/* ============================================== */
/* STYLY PRO OCHRANA_UDAJU.HTML */
/* ============================================== */
.hero-ochrana {
    height: 15vh;
}

.platnost {
    border-left: 4px solid var(--primary-color);
}

/* ============================================== */
/* RESPONZIVNÍ ÚPRAVY */
/* ============================================== */
@media (max-width: 992px) {
    .nav-item {
        padding-left: 0px;
    }
    
    .hero-section {
        background-attachment: scroll !important;
        height: 100vh; 
        background-size: cover;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
    .hero-section h1 {
        font-size: 3.5rem;
    }
    .placeholder-img {
        height: 300px;
    }
    
    .hero-oploceni h1 {
        font-size: 3.5rem;
    }
    
    .hero-brany h1 {
        font-size: 3.5rem;
    }
    
    .hero-zakazka h1 {
        font-size: 3.5rem;
    }
    
    .hero-rekonstrukce h1 {
        font-size: 3.5rem;
    }

}

@media (max-width: 768px) {
    .hero-oploceni {
        height: 400px; 
    }
    .hero-oploceni h1 {
        font-size: 3.5rem;
    }
    .hero-oploceni .lead {
        font-size: 1.2rem;
    }
    .hero-oploceni::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    
    .hero-brany {
        height: 400px; 
    }
    .hero-brany h1 {
        font-size: 3.5rem;
    }
    .hero-brany .lead {
        font-size: 1.2rem;
    }
    .hero-brany::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    
    .hero-zakazka {
        height: 400px; 
    }
    .hero-zakazka h1 {
        font-size: 3.5rem;
    }
    .hero-zakazka .lead {
        font-size: 1.2rem;
    }
    .hero-zakazka::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    
    .hero-rekonstrukce {
        height: 400px; 
    }
    .hero-rekonstrukce h1 {
        font-size: 3.5rem;
    }
    .hero-rekonstrukce .lead {
        font-size: 1.2rem;
    }
    .hero-rekonstrukce::before {
        background-attachment: scroll;
        filter: blur(2px);
    }

}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section p.lead {
        font-size: 1.2rem;
    }
    
    .hero-oploceni h1 {
        font-size: 2.5rem;
    }
    .hero-oploceni p.lead {
        font-size: 1.2rem;
    }
    .hero-oploceni::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    
    .hero-brany h1 {
        font-size: 2.5rem;
    }
    .hero-brany p.lead {
        font-size: 1.2rem;
    }
    .hero-brany::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    
    .hero-zakazka h1 {
        font-size: 2.5rem;
    }
    .hero-zakazka p.lead {
        font-size: 1.2rem;
    }
    .hero-zakazka::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    .product-row {
        /* Na mobilu je pořadí vždy Obrázek nahore, Text dole */
        flex-direction: column !important; 
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero-rekonstrukce h1 {
        font-size: 2.5rem;
    }
    .hero-rekonstrukce p.lead {
        font-size: 1.2rem;
    }
    .hero-rekonstrukce::before {
        background-attachment: scroll;
        filter: blur(2px);
    }
    
    #kontakt-form {
        background-attachment: scroll;
    }
    
    /* 1. Přidáme odsazení celému kontejneru na mobilu */
    #detaily-oploceni .container-fluid {
        padding: 0 0.8rem !important;
    }
    #detaily-brany .container-fluid {
        padding: 0 0.8rem !important;
    }

    /* 2. Úprava obrázku na mobilu */
    .image-wrapper-flush {
        height: 40px !important; /* VÝRAZNĚ NIŽŠÍ VÝŠKA */
        min-height: auto !important; /* Zrušíme minimální výšku z desktopu */
        margin-bottom: 1.5rem; /* Mezera mezi obrázkem a textem pod ním */
        
        /* Na mobilu zaoblíme VŠECHNY rohy, vypadá to lépe v prostoru */
        border-radius: 30px !important; 
    }

    /* 3. Reset odsazení u textové části */
    .content-side {
        padding: 0 !important; /* Zrušíme složité výpočty paddingů z desktopu */
    }

    /* 4. Úprava mezer mezi řádky (produkty) */
    .product-row {
        margin-bottom: 3rem !important;
    }

    /* Skryjeme divider na mobilu, pokud tam máš marginy, působilo by to moc rozbitě */
    .product-divider {
        margin: 2rem auto;
    }
}


