/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #e71d36;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    text-decoration: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: #c9182b;
}

.back-to-top img {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ========================================
   HERO SEKCE - POUZE LOGO A TEXT
   ======================================== */

.autoworks-home .container {
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
}

/* Desktop verze - logo a text vlevo */
@media (min-width: 1025px) {
    /* Logo - vlevo, responsivní - zmenšeno a posunuto výše */
    .autoworks-home .image {
        position: absolute !important;
        top: 20px !important;
        left: 104px !important;
        width: 60vw !important;
        min-width: 600px !important;
        max-width: 2000px !important;
        height: auto !important;
        z-index: 10 !important;
        object-fit: contain !important;
    }

    /* Hero text - vlevo dole */
    .autoworks-home .opravy-karoseri-po {
        position: absolute !important;
        top: 504px !important;
        left: 104px !important;
        bottom: auto !important;
        font-family: "Oswald", Helvetica !important;
        font-weight: 700 !important;
        color: #dee1e6 !important;
        font-size: 32px !important;
        letter-spacing: 0 !important;
        line-height: 48px !important;
        max-width: 600px !important;
        text-align: left !important;
    }

    /* Hero button */
    .autoworks-home .button {
        position: absolute !important;
        top: 619px !important;
        left: 104px !important;
        bottom: auto !important;
        width: 255px !important;
        height: 52px !important;
    }
}

/* Responzivní úpravy pro menší desktop */
@media (max-width: 1439px) and (min-width: 1025px) {
    .autoworks-home .image {
        width: 55vw !important;
        min-width: 500px !important;
        max-width: 1800px !important;
        top: 120px !important;
    }
}

/* Malá P ikona */
.autoworks-home .img {
    position: absolute !important;
    top: 16px !important;
    left: 104px !important;
}

/* Hamburger menu - skryté na desktopu */
.hamburger-menu {
    display: none;
    position: absolute;
    top: 20px;
    right: 40px;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 100;
}

/* LOGO */
.header-logo {
    display: block;
    height: auto;
    z-index: 10002;
    transition: all 0.3s ease;
}

.header-logo img {
    height: auto;
    display: block;
}

/* Default State (Top): Show P, Hide Full */
.header-logo .logo-p {
    display: block !important;
    width: 26px !important;
    /* Small P icon */
}

.header-logo .logo-full {
    display: none !important;
    width: 160px !important;
}

/* Scrolled State: Show Full, Hide P */
.main-header.header-scrolled .logo-p {
    display: none !important;
}

.main-header.header-scrolled .logo-full {
    display: block !important;
}

/* Mobile State (via Media Query - enforced below or here) */
@media (max-width: 1024px) {
    .header-logo .logo-p {
        display: none !important;
    }

    .header-logo .logo-full {
        display: block !important;
    }
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #e71d36;
    margin-bottom: 5px;
    transition: 0.3s;
}

/* ========================================
   MOBILE - LOGO CENTROVÁNÍ
   ======================================== */

@media (max-width: 1024px) {

    /* Hamburger menu visible & clickable */
    .hamburger-menu {
        display: block !important;
        z-index: 20002 !important;
    }

    /* Show dedicated mobile menu when opened */
    .mobile-overlay-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(30, 33, 40, 0.98);
        z-index: 20000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 60px;
    }

    .mobile-overlay-menu.open {
        display: flex !important;
    }

    /* ========================================
   REFACTORED RESPONSIVE HEADER
   ======================================== */

    @media (max-width: 1024px) {

        /* Hide Desktop Nav */
        .desktop-nav {
            display: none !important;
        }

        /* Show Hamburger */
        .hamburger-btn {
            display: flex !important;
        }

        /* Adjust Header Padding */
        .header-content {
            padding: 0 24px;
        }

        /* Hide Giant Hero Logo on Mobile/Tablet */
        /* User Requirement: When header shows small logo/hamburger, hide big hero logo */
        .autoworks-home .image {
            display: none !important;
        }
    }
}

/* Hamburger button adjustment - keep on top */
.hamburger-menu {
    position: absolute;
    z-index: 20001 !important;
    top: 20px;
    right: 20px;
}

/* Hide the OLD header wrapper explicitly */
.autoworks-home .div,
.autoworks-home .header-menu-wrapper {
    display: none !important;
}

/* DŮLEŽITÉ: Skrýt text "Auto Works" */
.autoworks-home .auto-works {
    display: none !important;
}

/* Skrýt "P" ikonu - uživatel chce místo ní hlavní logo */
.autoworks-home .img {
    display: none !important;
}

/* Tablet a mobilní verze - centrované logo a text */
@media (max-width: 1024px) {
    /* Proportional Container specific for mobile/tablet */
    .autoworks-home .container {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16/9 !important;
        width: 100% !important;
    }

    /* 
       HLAVNÍ LOGO - VYCENTROVANÉ NAHOŘE
       (Uživatel chce logo uprostřed vždy, když je hamburger menu)
    */
    .autoworks-home .image {
        position: absolute !important;
        top: 65px !important;
        /* Adjusted to sit just below header (80px) */
        /* Moved down ~2-3cm + header height */
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 70vw !important;
        /* Increased 3x (was 25vw) per user request */
        min-width: 300px;
        max-width: 800px;
        height: auto !important;
        z-index: 10 !important;
    }

    /* 
       TEXT - Vycentrován v Hero sekci
       (Když je logo pryč ze středu, můžeme text dát doprostřed)
    */
    .autoworks-home .opravy-karoseri-po {
        position: absolute !important;
        top: 60% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 3.5vw !important;
        /* Decreased from 5vw per user request */
        line-height: 1.4 !important;
        height: auto !important;
        z-index: 5;
    }

    /* Button Centering - Below text */
    .autoworks-home .button {
        position: absolute !important;
        top: 80% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: auto !important;
        margin: 0 !important;
        scale: 1.1 !important;
    }
}

/* Dynamic adjustment when menu is open (body.no-scroll) */


@media (max-width: 768px) {
    .autoworks-home .container {
        aspect-ratio: 4/3 !important;
    }

    /* Logo size adjustments for smaller screens */
    .autoworks-home .image {
        width: 160px !important;
        top: 25px !important;
    }

    .autoworks-home .opravy-karoseri-po {
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        font-size: 5.5vw !important;
    }

    .autoworks-home .button {
        top: 75% !important;
    }
}

@media (max-width: 480px) {
    .autoworks-home .container {
        aspect-ratio: 9/16 !important;
        height: 90vh !important;
        max-height: none !important;
    }

    .autoworks-home .image {
        display: none !important;
    }

    .autoworks-home .opravy-karoseri-po {
        top: 45% !important;
        transform: translate(-50%, -50%) !important;
        font-size: 7vw !important;
    }

    .autoworks-home .button {
        top: 65% !important;
        scale: 1.1 !important;
    }
}

/* ========================================
   SEKCE "CO JE METODA PDR" - KOMPLETNÍ REDO
   ======================================== */

.autoworks-home .container-2 {
    height: auto !important;
    min-height: auto !important;
    padding: 80px 40px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* Nadpis sekce */
.autoworks-home .container-2 .p {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 auto 60px !important;
    text-align: center !important;
}

/* Text v levé části */
.autoworks-home .metoda-PDR-paintless {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    max-width: 800px !important;
    margin: 0 auto 40px !important;
}

/* Karty - flexbox layout */
.autoworks-home .container-3,
.autoworks-home .container-4,
.autoworks-home .container-5,
.autoworks-home .container-6 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 20px !important;
    display: inline-block !important;
    vertical-align: top !important;
}

/* ========================================
   SEKCE "JAK TO PROBÍHÁ" - REDO
   ======================================== */

.autoworks-home .container-7 {
    height: auto !important;
    padding: 80px 40px !important;
}

.autoworks-home .container-7 .text-wrapper-16 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    text-align: center !important;
    margin: 0 auto 60px !important;
}

.autoworks-home .container-8,
.autoworks-home .container-9,
.autoworks-home .container-10,
.autoworks-home .container-11 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 20px !important;
    display: inline-block !important;
    vertical-align: top !important;
}

/* ========================================
   SEKCE S OBRÁZKEM A KROKY
   ======================================== */

.autoworks-home .container-12 {
    height: auto !important;
    padding: 80px 40px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 40px !important;
}

.autoworks-home .image-2 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    flex: 1 !important;
    min-width: 400px !important;
    max-width: 100% !important;
    height: auto !important;
}

.autoworks-home .group {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    flex: 1 !important;
    min-width: 400px !important;
}

.autoworks-home .group>* {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
}

/* ========================================
   REFERENCE SEKCE
   ======================================== */

.autoworks-home .container-17 {
    height: auto !important;
    padding: 80px 40px !important;
}

.autoworks-home .group-2 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 30px !important;
    width: 100% !important;
}

.autoworks-home .container-18 {
    flex: 0 1 350px !important;
}

/* ========================================
   KONTAKT SEKCE - MOVED TO contact-section.css
   ======================================== */

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 1024px) {

    .autoworks-home .container-2,
    .autoworks-home .container-7,
    .autoworks-home .container-17,
    .autoworks-home .container-21 {
        padding: 60px 20px !important;
    }
}

@media (max-width: 768px) {

    .autoworks-home .container-3,
    .autoworks-home .container-4,
    .autoworks-home .container-5,
    .autoworks-home .container-6,
    .autoworks-home .container-8,
    .autoworks-home .container-9,
    .autoworks-home .container-10,
    .autoworks-home .container-11 {
        display: block !important;
        width: 100% !important;
        max-width: 400px !important;
        margin: 20px auto !important;
    }

    .autoworks-home .image-2,
    .autoworks-home .group {
        min-width: 100% !important;
        width: 100% !important;
    }
}