/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
}

/* Navigation Styling (Floating & Resizing) */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); REMOVED */
    z-index: 1030;
    transition: transform 2s cubic-bezier(0.3, 1, 0.3, 1), border-radius 0.3s ease;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.navbar.nav-hidden {
    transform: translate(-50%, -200%);
}



.navbar-brand span {
    font-size: 1rem;
}

.navbar-nav .nav-link {
    font-size: 0.85rem;
}

/* Navbar Button Hover: Invert colors */
.navbar .btn-dark:hover {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
}

@media (max-width: 991px) {
    .navbar {
        border-radius: 20px;
        top: 10px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Ensure collapse menu fits in specific rounded styling if needed, 
       but standard bootstrap behavior usually works okay inside the container. 
       Use previously ddefined styles for color. */
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* Lenis Recommended CSS */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}





/* Hero Section - Rodičovský kontejner */
.hero-section {
    height: 100vh;
    position: relative;
    /* Nutné pro pozicování pozadí */
    overflow: hidden;
    /* Ořízne rozmazané okraje, které by lezly ven */
    /* background-image ODSUD VYMAŽ - přesouváme ho níže */
}

/* Pseudo-element pro rozmazané pozadí */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Vlastnosti obrázku přesunuté sem */
    background-image: url('photos/hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    /* TOTO je ten blur efekt */
    filter: blur(8px);

    /* Důležité: Zvětšíme obrázek, aby nebyly vidět bílé rozmazané hrany */
    transform: scale(1.1);

    /* Zajistí, že obrázek bude úplně vespod */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Feature Icons */


/* Service Cards - Removed Hover Shadow */
/* Service Cards - Hover Shadow Removed */
.service-card {
    height: 100%;
}

/* Ensure consistent internal spacing for equal height cards */
.service-card .card-title {
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card .card-text {
    min-height: 50px;
}

.service-card img {
    height: 200px;
    /* transition removed */
}



/* Gallery Slider */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-size: 50%, 50%;
}

/* Active Project Button - Pure Black */
.project-btn.active {
    background-color: #212529 !important;
    border-color: #212529 !important;
    color: #fff !important;
}

/* Testimonial Card */


/* Ensure map and form have consistent heights/alignment */
.map-container {
    border: 1px solid #dee2e6;
}

/* Animations */
/* Animations removed */

/* Delays removed */





/* Google Review Card Styling */
/* Google Review Card Styling */
.google-review-card {
    min-height: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.google-review-card>div:last-child {
    margin-top: auto !important;
}



.text-warning i {
    color: #ffc107 !important;
}



/* --- OPRAVENÉ CSS PRO SLIDER --- */

.ba-slider-wrapper {
    border-radius: 15px;
    overflow: hidden;
    /* Zajišťuje, že se wrapper přizpůsobí obsahu */
    display: inline-block;
    width: 100%;
}

.ba-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /* Odstraní mezery pod obrázky */
}

/* Obrázek "PO" - slouží jako pozadí a určuje výšku kontejneru */
.ba-img-after {
    display: block;
    width: 100%;
    height: auto;
}

/* Kontejner pro obrázek "PŘED" - toto je to "okno", které se posouvá */
.ba-img-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    /* Startovní pozice */
    height: 100%;
    overflow: hidden;
    /* DŮLEŽITÉ: Ořezává obsah, který přesahuje */
    border-right: 3px solid #fff;
    /* Bílá dělící čára */
    z-index: 2;
}

/* --- ZDE BYLA CHYBA --- */
/* Obrázek "PŘED" uvnitř ořezávacího kontejneru */
#ba-img-before-source {
    display: block;
    /* Oprava deformace:
       1. Nastavíme výšku na 100%, aby odpovídala kontejneru.
       2. Šířku necháme "auto", aby se dopočítala podle poměru stran.
       3. Zákážeme max-width, aby se obrázek nesnažil nacpat do užšího rodiče.
    */
    height: 100%;
    width: auto;
    max-width: none;

    /* Volitelné: pro jistotu, že obrázek pokryje plochu, pokud by měly mírně jiný poměr */
    object-fit: cover;
}

/* --------------------- */


/* Neviditelný posuvník (input type=range) */
.ba-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* Neviditelný, ale reaguje na dotyk/myš */
    cursor: ew-resize;
    z-index: 10;
    /* Musí být úplně nahoře */
    margin: 0;
}

/* Viditelné tlačítko uprostřed */
.ba-slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 5;
    pointer-events: none;
    /* Kliknutí skrz něj projdou na input */
}

.ba-slider-button i {
    color: #333 !important;
}








/* --- Úprava Hero tlačítek pro mobilní zařízení --- */
@media (max-width: 768px) {
    .hero-section .btn-lg {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
        font-size: 1rem !important;
        margin: 5px;
    }

    /* Úprava kontejneru tlačítek, aby se lépe vešla vedle sebe */
    .hero-section .d-flex {
        gap: 0.5rem !important;
        /* Přepíše bootstrap gap-3 */
        flex-wrap: wrap;
        /* Na velmi malých displejích (iPhone SE) se zalomí pod sebe */
        justify-content: center;
    }

    /* Reduce Hero Subtitle Size */
    .hero-section p.lead {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    /* Reduce Gallery Title and Subtitle Size */
    #gallery h2 {
        font-size: 1.75rem;
    }

    #gallery .col-lg-7>p.text-muted:first-of-type {
        font-size: 0.9rem;
    }
}

/* --- Mobile Navigation Styling --- */
/* --- Mobile Navigation Styling (Updated with dividers) --- */
/* --- Mobile Navigation Styling (Final Polish) --- */
@media (max-width: 991px) {

    /* Style the dropdown container */
    .navbar-collapse {
        background-color: transparent;
        border-top: 1px solid rgba(0, 0, 0, 0.05);

    }

    /* IMPORTANT: Remove the 'gap-4' from HTML on mobile to prevent huge spaces */
    .navbar-nav {
        gap: 0 !important;
    }

    /* List items: Center text and add separators */
    .navbar-nav .nav-item {
        margin: 0 !important;
        border-bottom: 1px solid #e9ecef;
        width: 100%;
        text-align: center;
        /* Horizontally center the content */
    }

    /* Link styling: Ensure vertical centering and touch area */
    .navbar-nav .nav-link {
        padding-top: 15px;
        padding-bottom: 15px;
        display: block;
        /* Ensures text-align works properly */
        width: 100%;
    }

    /* Special styling for the last item (CTA Button) */
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* Adjust the CTA button */
    .navbar-nav .btn {
        width: 80%;
        margin: 0 auto;
        display: block;
    }
}

/* --- Fix for horizontal overflow (white gap on the right) --- */
html,
body {
    overflow-x: hidden;
    /* Forces the browser to cut off anything extending to the right */
    width: 100%;
    position: relative;
}


/* --- Ultra-Small Mobile Navigation Adjustment (< 400px) --- */
@media (max-width: 400px) {

    /* Resize the logo image */
    .navbar-brand img {
        height: 30px !important;
        /* Override the HTML 'height' attribute */
        width: auto;
        /* Maintain aspect ratio */
    }

    /* Resize the brand text */
    .navbar-brand span {
        font-size: 0.9rem;
        /* Reduce text size (approx 14-15px) */
    }

    /* Reduce spacing between logo and text (optional fine-tuning) */
    .navbar-brand img.me-2 {
        margin-right: 0.25rem !important;
        /* Reduce Bootstrap's me-2 margin */
    }
}

/* Scroll Mouse Animation */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
    z-index: 10;
    animation: fadeIn 1s ease-in-out 1s forwards;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid white;
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 6px;
    }

    100% {
        opacity: 0;
        top: 20px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.8;
    }
}

/* Ensure cards have same height and look good on Mobile Carousel */
@media (max-width: 767px) {
    #services .service-card {
        height: 100%;
    }
}

/* Enhanced Google Review Tag */
.google-tag {
    background-color: #fff;
    border: 1px solid #e9ecef;
    /* box-shadow removed */
    transition: all 0.3s ease;
    font-size: 0.9rem;
    z-index: 10;
}

.google-tag:hover {
    transform: translateY(-2px);
    /* box-shadow removed */
    border-color: #dee2e6;
}

/* Mobile Reviews Optimization */
@media (max-width: 767px) {
    .google-review-card {
        padding: 2rem !important;
        text-align: center;
        margin-top: 1rem;
        min-height: 600px;
    }

    /* Move the Google tag to the top center on mobile */
    .google-tag {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin: 0 auto 1.5rem auto !important;
        display: inline-flex !important;
    }

    /* Adjust star rating container margin */
    .google-review-card .text-warning {
        margin-bottom: 1.5rem !important;
    }
}

/* Contact Section Styling */
.contact-form-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-form-card .form-control,
.contact-form-card .form-select {
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease;
}

.contact-form-card .form-control:focus,
.contact-form-card .form-select:focus {
    box-shadow: none;
    border-color: #333;
    /* Elegant darken on focus without the big blue glow */
    background-color: #fff;
}

/* Button Hover Invert (matches Navbar) */
.btn-invert-hover {
    border: 1px solid transparent !important;
    transition: all 0.3s ease;
}

.btn-invert-hover:hover {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
}

/* Footer Styling */
.footer-link:hover {
    text-decoration: none !important;
    color: #000 !important;
}

.contact-link {
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #000 !important;
}

.social-link {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    color: #555 !important;
}