/* =========================================
   1. GLOBÁLNÍ NASTAVENÍ A PROMĚNNÉ
   ========================================= */
:root {
    --primary: #f4cb08;
    --primary-dark: #dcb707;
    --dark: #333333;
    --black: #111111;
    --white: #ffffff;
    --light-grey: #f2f2f2;
    --container-width: 1140px;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 { 
    font-family: 'Roboto', sans-serif; 
    font-weight: 700; 
    text-transform: uppercase; 
}

/* =========================================
   2. POMOCNÉ TŘÍDY (UTILITIES)
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.text-white { color: var(--white); }
.bg-dark { background-color: var(--dark); }
.bg-off-black { background-color: #151515; }
.bg-light { background-color: var(--light-grey); }

.sub-title { 
    color: var(--primary); 
    font-weight: 700; 
    letter-spacing: 2px; 
    display: block; 
    margin-bottom: 5px; 
}
.line { 
    width: 80px; 
    height: 3px; 
    background: var(--primary); 
    margin: 20px 0; 
}
.line.center { margin: 20px auto; }

/* =========================================
   3. JEDNOTLIVÉ SEKCE
   ========================================= */

/* Header */
.header { 
    padding: 20px 0; 
    background: var(--white); 
    text-align: center; 
}

/* Hero sekce */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/title.jpeg') center/cover no-repeat;
    color: var(--white);
    padding-top: 120px; 
}
.hero-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 1fr; 
    align-items: flex-end; 
    gap: 40px; 
}
.hero-content { padding-bottom: 120px; }
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; }
.hero h1 strong { color: var(--primary); }
.hero-img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* O Nás */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.intro-text { font-style: italic; font-size: 1.4rem; color: #666; }

/* Služby - mozaika */
.grid-services { display: grid; grid-template-columns: repeat(4, 1fr); min-height: 350px; }
.service-item { 
    height: 400px; 
    display: flex; 
    align-items: flex-end; 
    background-size: cover; 
    background-position: center;
    position: relative;
    color: white;
}
.item-1 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/construction.jpg'); }
.item-2 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/renovation.jpeg'); }
.item-3 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/consulting.png'); }
.item-4 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/assembly.png'); }
.service-content { padding: 30px; width: 100%; }
.service-content h3 { font-size: 1.3rem; }

/* Speciální nabídka - Ikony */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 40px; 
    margin-top: 60px;
}
.feature-item { display: flex; align-items: flex-start; gap: 20px; }
.feature-icon {
    flex: 0 0 64px; 
    width: 64px; height: 64px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--black);
}
.feature-icon svg { width: 32px; height: 32px; fill: currentColor; }
.feature-text h3 { font-size: 1.1rem; margin-bottom: 10px; line-height: 1.2; }
.feature-text p { font-size: 1rem; color: var(--black); margin: 0; }

/* Portfolio - Slider / Carousel */
.carousel-container {
    position: relative;
    max-width: 900px; 
    margin: 40px auto 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: #222222;
}
.carousel-track { position: relative; width: 100%; height: 500px; }
.carousel-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.6s ease-in-out; pointer-events: none; 
}
.carousel-slide.active { opacity: 1; pointer-events: auto; cursor: zoom-in; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-prev, .carousel-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4); color: var(--white);
    border: none; padding: 15px 20px; font-size: 24px;
    cursor: pointer; z-index: 10; transition: background 0.3s, transform 0.2s;
    border-radius: 4px;
}
.carousel-prev:hover, .carousel-next:hover { background: var(--primary); color: var(--black); }
.carousel-prev:active, .carousel-next:active { transform: translateY(-50%) scale(0.95); }
.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }

.carousel-counter {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6); color: var(--white);
    padding: 5px 15px; border-radius: 20px; font-size: 0.9rem;
    letter-spacing: 2px; z-index: 10;
}

/* Lightbox - Vyskakovací okno */
.lightbox {
    display: none; position: fixed; z-index: 9999; padding: 20px;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center; justify-content: center; flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox-content {
    position: relative; max-width: 90vw; max-height: 85vh;
    display: flex; justify-content: center; align-items: center;
}
#lightbox-img {
    max-height: 85vh; max-width: 90vw; border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); animation: fadeIn 0.3s ease;
}
.lightbox-close {
    position: absolute; top: 15px; right: 25px; color: white;
    font-size: 40px; font-weight: bold; cursor: pointer; transition: color 0.2s;
}
.lightbox-close:hover { color: var(--primary); }

.lightbox-prev, .lightbox-next {
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
    padding: 16px; color: white; font-weight: bold; font-size: 24px;
    background: rgba(0,0,0,0.4); border: none; border-radius: 4px;
    user-select: none; transition: background 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background-color: var(--primary); color: var(--black); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter { color: #ccc; margin-top: 15px; font-size: 1rem; letter-spacing: 2px; }

@keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.95); } 
    to { opacity: 1; transform: scale(1); } 
}

/* Jak to funguje - Kroky */
.steps-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 30px; margin-top: 50px;
}
.step-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-icon {
    width: 100px; height: 100px; background-color: var(--primary); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin-bottom: 25px;
}
.step-icon svg { width: 50px; height: 50px; fill: var(--white); }
.step-item h3 { font-size: 1.5rem; margin-bottom: 15px; }
.step-item p { font-size: 1rem; color: var(--black); margin: 0; }

/* Ceník */
.pricing-cards { display: flex; flex-direction: column; gap: 30px; margin-top: 40px; }
.p-card { display: flex; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.p-card.reverse { flex-direction: row-reverse; }
.p-img { width: 40%; object-fit: cover; }
.p-content { padding: 50px; width: 60%; }
.price-val { font-size: 1.8rem; color: var(--primary-dark); font-weight: 900; margin: 15px 0; }
.disclaimer { margin-top: 30px; font-size: 0.9rem; font-weight: 700; color: #666; }

/* Kontakt a Patička */
.contact-list { list-style: none; margin: 30px 0; }
.contact-list li { margin-bottom: 10px; font-size: 1.1rem; }
.contact-list a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--primary); }
.fb-link { display: inline-block; background: #1877f2; color: white; padding: 10px 20px; border-radius: 5px; text-decoration: none; }
.footer { padding: 40px 0; background: var(--black); color: #888; font-size: 0.9rem; }


/* =========================================
   4. RESPONZIVITA (MEDIA QUERIES)
   ========================================= */

/* Tablety a menší notebooky (do 991px) */
@media (max-width: 991px) {
    .hero-grid, .grid-2, .pricing-cards { grid-template-columns: 1fr; }
    .hero-content { padding-bottom: 60px; }
    .hero h1 { font-size: 2.8rem; }
    .hero-img-box { display: none; }
    .grid-services { grid-template-columns: 1fr 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
    .p-card, .p-card.reverse { flex-direction: column; }
    .p-img, .p-content { width: 100%; }
}

/* Velké mobilní telefony na šířku (do 767px) */
@media (max-width: 767px) {
    .features-grid { grid-template-columns: 1fr; gap: 40px; }
    .carousel-track { height: 300px; }
    
    /* Společné zmenšení tlačítek pro Lightbox i Carousel */
    .carousel-prev, .carousel-next,
    .lightbox-prev, .lightbox-next { 
        padding: 10px 15px; 
        font-size: 18px; 
    }
    .carousel-prev, .lightbox-prev { left: 5px; }
    .carousel-next, .lightbox-next { right: 5px; }
    .lightbox-close { top: 5px; right: 15px; }
}

/* Klasické mobilní telefony (do 575px) */
@media (max-width: 575px) {
    .section-padding { padding: 50px 0; }
    .grid-services { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; gap: 40px; }
}