/* =========================================
   OBSAH CSS SOUBORU:
   1. Základní nastavení a proměnné
   2. Společné prvky (Tlačítka, Nadpisy, Utility)
   3. Hlavička a navigace
   4. Úvodní sekce (Hero)
   5. Sekce O nás & Členství
   6. Sekce Služby (Úvodní rozcestník)
   7. Detaily služeb (Podstránky)
   8. Sekce Certifikáty
   9. Sekce Galerie a ukázky práce
   10. Univerzální Lightbox (Pro fotky)
   11. Kontaktní stránka a Mapa
   12. Patička (Footer)
   ========================================= */

/* =========================================
   1. ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ
   ========================================= */
:root {
    --primary-color: #26a16e;    
    --primary-hover: #338b62;    
    --secondary-color: #3e6a77;  
    --text-color: #2c3e50;       
    --text-light: #7f8c8d;       
    --bg-light: #f9fbf9;         
    --white: #ffffff;
    --dark: #2c3e50;             
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

html {
    scroll-behavior: smooth;
    /* Rezerva pro fixní hlavičku při scrollování */
    scroll-padding-top: 100px; 
}


/* =========================================
   2. SPOLEČNÉ PRVKY (Tlačítka, Nadpisy, Utility)
   ========================================= */
/* Nadpisy sekcí */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.section-subtitle {
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Tlačítka */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Utility třídy (Pomocné) */
.text-center {
    text-align: center !important;
}

.load-more-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    width: 100%;
}


/* =========================================
   3. HLAVIČKA A NAVIGACE
   ========================================= */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; 
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px; 
    padding: 10px 20px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 70px;    
    width: auto;     
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a.btn-nav {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav a.btn-nav:hover {
    background-color: var(--primary-hover);
    color: var(--white);
}

.main-nav a:not(.btn-nav).active-link {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

/* Mobilní Hamburger Menu */
.hamburger {
    display: none; 
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .hamburger { display: flex; z-index: 1001; }
    
    .main-nav ul {
        position: fixed;
        right: -100%; 
        top: 100px; 
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
        gap: 15px;
    }
    
    .main-nav ul.active { right: 0; }
    
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}


/* =========================================
   4. ÚVODNÍ SEKCE (Hero)
   ========================================= */
.hero {
    background-image: linear-gradient(rgba(44, 62, 80, 0.5), rgba(44, 62, 80, 0.5)), url('../img/hero.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 85vh;       
    min-height: 600px;  
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px; 
    color: var(--white);
    text-shadow: 0 2px 15px rgba(0,0,0,0.5); 
}

.hero-subtitle {
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 800; 
    letter-spacing: 3px;
    font-size: 1.1rem; 
    margin-bottom: 20px;
    display: block;
}

.hero h1 {
    font-size: 4.2rem; 
    line-height: 1.15;
    margin-bottom: 25px;
}

.hero p {
    font-size: 1.4rem; 
    line-height: 1.6;
    margin-bottom: 40px;
    color: #f1f1f1; 
}

.hero-btns {
    display: flex;
    gap: 20px;
}

@media (max-width: 768px) {
    .hero { 
        /* Necháme fotku jen na 80% obrazovky, aby dole vykouklo pokračování webu */
        height: 80vh; 
        min-height: 550px;
        text-align: center; 
        
        /* Trochu ztmavíme překryv na mobilu (0.7 místo 0.5), ať ten text lépe "svítí" */
        background-image: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('../img/hero.webp');
        
        /* Pokud chceš ukázat víc levou nebo pravou stranu fotky, změň tady to "center" 
           na "left", "right", nebo procenta třeba "70% center" */
        background-position: center; 
    }
    
    .hero h1 { 
        font-size: 2.3rem; /* Lehce zmenšíme obří nadpis, ať nehltá tolik místa */
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 1.1rem; /* Zmenšíme i podnadpis, ať je to elegantnější */
    }
    
    .hero-content { 
        margin: 0 auto; 
    }
    
    .hero-btns { 
        flex-direction: column; 
        align-items: center; 
        gap: 15px; /* Menší mezera mezi tlačítky */
    }
    
    .hero-btns .btn { 
        width: 100%; 
        max-width: 300px; 
    }
}


/* =========================================
   5. SEKCE O NÁS & ČLENSTVÍ
   ========================================= */
.about {
    padding: 100px 0;
    background-color: var(--white);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.about-features {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.feature-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.feature-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.image-wrapper { position: relative; }

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 25px;
    border-radius: 15px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 10px 30px rgba(38, 161, 110, 0.3);
}

/* Členství ve svazu v sekci O nás */
.about-membership {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.schkt-logo-small {
    height: 60px;
    width: auto;
    display: block;
}

.about-membership p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
}

.about-membership strong {
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .about-container { grid-template-columns: 1fr; gap: 40px; }
    .about-text { order: 2; text-align: center; }
    .about-image { order: 1; max-width: 500px; margin: 0 auto; }
    .about-features { justify-content: center; }
}

@media (max-width: 576px) {
    .about-membership { flex-direction: column; text-align: center; gap: 15px; }
}


/* =========================================
   6. SEKCE SLUŽBY (Úvodní rozcestník)
   ========================================= */
.services {
    padding: 100px 0;
    background-color: var(--bg-light); 
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.service-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 15px 30px rgba(38, 161, 110, 0.1); 
    border-color: rgba(38, 161, 110, 0.2);
}

.card-icon {
    color: var(--secondary-color); 
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.service-card:hover .card-icon { color: var(--primary-color); }

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    flex-grow: 1; 
}

.card-link {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .card-link { transform: translateX(5px); }


/* =========================================
   7. DETAILY SLUŽEB (Podstránky)
   ========================================= */
.page-header {
    background-color: var(--bg-light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    color: var(--secondary-color);
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.service-detail-content {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

.service-detail-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.service-intro {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.service-intro-text, 
.service-intro-image {
    flex: 1 1 400px;
}

.service-intro-image img {
    width: 100%;
    max-height: 400px; 
    object-fit: cover; 
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: block;
}

.placeholder-img {
    background-color: #f1f3f5;
    border-radius: 12px;
    height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    border: 2px dashed #dee2e6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    padding: 20px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.benefit-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.benefit-card strong {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.benefit-card span {
    font-size: 0.95rem;
    color: var(--text-light);
}

.process-box {
    background-color: var(--white);
    border: 1px solid #eee;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.process-list {
    list-style: none;
    padding-left: 0;
    color: var(--text-color);
}

.process-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.process-list li span {
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

.cta-bottom {
    text-align: center;
    margin-top: 50px;
}


/* =========================================
   8. SEKCE CERTIFIKÁTY
   ========================================= */
.certificates {
    padding: 100px 0;
    background-color: var(--white); 
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cert-item a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-item a:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(38, 161, 110, 0.15); 
}

.cert-img-wrapper {
    position: relative;
    overflow: hidden;
}

.cert-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
    transition: transform 0.5s ease;
}

.cert-item a:hover .cert-img-wrapper img { transform: scale(1.03); }

.cert-info {
    padding: 20px;
    text-align: center;
}

.cert-info h4 { color: var(--secondary-color); margin-bottom: 5px; font-size: 1.1rem; }
.cert-info p { color: var(--text-light); font-size: 0.9rem; margin: 0; }


/* =========================================
   9. SEKCE GALERIE A UKÁZKY PRÁCE
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    aspect-ratio: 4 / 3; 
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.4s ease;
    cursor: zoom-in;
}

.gallery-item:hover img {
    transform: scale(1.05); 
}

.hidden-photo {
    display: none !important;
}

.empty-gallery-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
}



/* =========================================
   10. UNIVERZÁLNÍ LIGHTBOX (Pro fotky)
   ========================================= */
/* =========================================
   10. UNIVERZÁLNÍ LIGHTBOX (Pro fotky)
   ========================================= */
.lightbox {
    display: flex; /* Místo none to necháme na flex... */
    visibility: hidden; /* ...ale schováme to přes visibility, což jde animovat */
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    /* Delší a plynulejší animace jak pro průhlednost, tak pro viditelnost */
    transition: opacity 0.4s ease, visibility 0.4s ease; 
}

.lightbox.active {
    visibility: visible;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh; 
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    user-select: none; 
    /* Přidáme fotce na začátku menší velikost a pružnou animaci */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

/* Když se lightbox zaktivní, fotka "dopruží" do plné velikosti */
.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10000;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: var(--primary-color);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    color: var(--white);
    margin-top: 20px;
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next { padding: 10px 15px; font-size: 20px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox img { max-width: 95%; max-height: 70vh; }
}


/* =========================================
   11. KONTAKTNÍ STRÁNKA A MAPA
   ========================================= */
.page-content {
    padding: 60px 0;
    min-height: 60vh;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
}

.contact-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.contact-card p {
    margin-bottom: 10px;
    color: var(--text-color);
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.contact-link:hover {
    color: var(--secondary-color);
}

.contact-form-wrapper {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-form-wrapper h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.map-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    line-height: 0; 
}

.map-card iframe {
    border-radius: 10px; 
}
/* Styly pro odesílací tlačítko a hlášky formuláře */
.btn-submit {
    width: 100%;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: var(--text-light);
    border-color: var(--text-light);
}

.form-status {
    margin-top: 15px;
    text-align: center;
    font-weight: 700;
    min-height: 24px; /* Zabrání poskakování webu, když se text objeví */
    transition: all 0.3s ease;
}

.status-success {
    color: var(--primary-color);
}

.status-error {
    color: #721c24; /* Tmavě červená pro chybu */
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 30px 20px; }
}


/* =========================================
   12. PATIČKA (Footer)
   ========================================= */
.main-footer {
    background-color: var(--dark);
    color: #f1f1f1;
    padding-top: 60px;
    margin-top: 0; 
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col p, .footer-col a {
    color: #cccccc;
    margin-bottom: 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col.about-col h3 span { color: var(--primary-color); }

.footer-bottom {
    background-color: #1a252f;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #888;
}

.bottom-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.bottom-container a { 
    color: var(--primary-color); 
    text-decoration: none; 
}

/* =========================================
   ANIMACE PRO NAČÍTÁNÍ DALŠÍCH FOTEK
   ========================================= */
.reveal-anim {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0; /* Na začátku je fotka průhledná */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px); /* Fotka vyjede jemně zespodu */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}