/*
Theme Name: Petrvykopal Child
Template: petrvykopal
*/

/* ===== Globální základ ===== */

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Schovat sociální ikony v hlavičce všude */
header .social-sites {
    display: none !important;
}

/* ===== Header / grid ===== */

header[role="banner"] > div,
.elementor-site-footer__inner {
    max-width: 1135px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1280px) {
    header[role="banner"] > div {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Desktop – zarovnání menu doprava */
@media (min-width: 769px) {
    header[role="banner"] nav {
        display: flex;
        justify-content: flex-end;
    }

    header[role="banner"] nav ol {
        margin-left: auto;
        justify-content: flex-end;
    }
}

/* ===== Elementor stránky ===== */

main.elementor-page-content > div {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

body > .elementor-compatible-page {
    flex: 1 0 auto;
}

main.elementor-page-content {
    margin-top: 0 !important;
    padding-top: 88px !important;
}

@media (max-width: 768px) {
    main.elementor-page-content {
        padding-top: 0 !important;
    }
}

/* ===== Elementor main hero layout pro běžné Elementor stránky ===== */

.elementor-page-content .pv-main-hero {
    min-height: calc(100vh - 137px);
    display: flex;
    align-items: stretch;
}

.elementor-page-content .pv-main-photo {
    height: calc(100vh - 137px);
}

.elementor-page-content .pv-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

@media (max-width: 768px) {
    .elementor-page-content .pv-main-hero,
    .elementor-page-content .pv-main-photo {
        min-height: auto;
        height: auto;
        padding-top: 0 !important;
        gap: 0 !important;
    }

    .elementor-page-content .pv-main-photo img {
        height: auto;
        object-fit: contain;
        object-position: top center;
        display: block;
        margin-top: 70px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .elementor-page-content .pv-main-hero {
        padding-top: 0 !important;
    }

    .elementor-page-content .pv-main-photo img {
        margin-top: 0 !important;
    }
}

/* ===== Elementor obrázek – pravý gradient fade ===== */

.pv-image-fade {
    position: relative;
    overflow: hidden;
}

.pv-image-fade::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 97px;
    height: 100%;
    background: url("/wp-content/themes/petrvykopal/res/gradient.png") repeat-y right center;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 768px) {
    .pv-image-fade::after {
        display: none;
    }
}

/* ===== Footer ===== */

.elementor-site-footer {
    background: #cac7c0;
    color: #fff;
    font-size: 13px;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
}

.elementor-site-footer__inner {
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.elementor-site-footer__copy,
.elementor-site-footer__links,
.elementor-site-footer__social-links {
    flex: 1;
}

.elementor-site-footer__copy {
    color: #fff;
}

.elementor-site-footer__links {
    text-align: center;
}

.elementor-site-footer__links a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
}

.elementor-site-footer__links a:hover {
    text-decoration: underline;
}

.elementor-site-footer__social-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.elementor-site-footer__social-links a {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

.elementor-site-footer__social-links a:focus,
.elementor-site-footer__social-links a:active {
    outline: none;
    box-shadow: none;
}

.elementor-site-footer__social-links a:hover {
    opacity: 0.8;
}

.elementor-site-footer__social-links svg {
    width: 15px;
    height: 15px;
    fill: #000;
    display: block;
}

/* Tablet + mobile footer: 2 řádky */
@media (max-width: 1024px) {
    .elementor-site-footer__inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 14px;
        text-align: center;
        padding: 10px 15px;
    }

    .elementor-site-footer__copy,
    .elementor-site-footer__links {
        flex: 0 0 auto;
    }

    .elementor-site-footer__social-links {
        flex: 0 0 100%;
        justify-content: center;
    }

    .elementor-site-footer__links a {
        margin: 0 6px;
    }
}

/* ===== Mobilní menu – fix pro Elementor template ===== */

@media (max-width: 768px) {
    main.page-997.menu {
        background: #9d9a94;
        padding: 90px 15px 20px;
        min-height: 100vh;
    }

    main.page-997.menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    main.page-997.menu li {
        margin-bottom: 14px;
    }

    main.page-997.menu a {
        color: #fff;
        text-transform: uppercase;
        text-decoration: none;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

    main.page-997.menu li:first-child a {
        color: #111;
    }
}

/* ===== Homepage clean slider ===== */

.elementor-page-content {
    position: relative;
    min-height: calc(100vh - 137px);
    overflow: hidden;
}

.elementor-page-content .pv-home-hero {
    position: relative;
    min-height: calc(100vh - 137px);
    overflow: hidden;
    padding: 0 !important;
    background: transparent !important;
}

.elementor-page-content .pv-home-hero::before {
    display: none !important;
}

.elementor-page-content .pv-home-hero .elementor-widget-html,
.elementor-page-content .pv-home-hero .elementor-widget-html .elementor-widget-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pv-clean-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.pv-clean-bg {
    position: absolute;
    inset: 0;
    z-index: 1;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.pv-clean-bg.is-active {
    opacity: 1;
    z-index: 2;
}

.pv-clean-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 55%;
    z-index: 5;

    width: 100%;
    box-sizing: border-box;

    padding: 62px 30px;

    color: #fff;
    font-size: 58px;
    font-weight: 300;
    line-height: 1.1;
    text-align: center;

    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    text-shadow: 0 2px 8px rgba(0,0,0,0.45);

    opacity: 0 !important;
    pointer-events: none;

    transition: opacity 1s ease 0.2s !important;
}

.pv-clean-title.is-active {
    opacity: 1 !important;
}

/* Mobile */
@media (max-width: 768px) {

    .elementor-page-content .pv-home-hero {
        min-height: 85vh;
    }

    .pv-clean-bg {
        background-position: 30% center;
    }

    .pv-clean-title {
        top: 58%;
        padding: 30px 18px;
        font-size: 34px;
        line-height: 1.18;
    }
}

/* ===== FINAL CLEAN SLIDER CROSSFADE ===== */

.pv-clean-bg {
    opacity: 0 !important;
    z-index: 1 !important;

    transform: scale(1);

    transition:
        opacity 2s ease-in-out,
        transform 7s ease-out !important;
}

.pv-clean-bg.is-active {
    opacity: 1 !important;
    z-index: 2 !important;

    transform: scale(1.04);
}

.pv-clean-bg.is-leaving {
    opacity: 0 !important;
    z-index: 3 !important;

    transform: scale(1.04);
}

/* ===== STICKY FOTOGRAFIE NA BĚŽNÝCH STRÁNKÁCH – DESKTOP ===== */

@media (min-width: 1025px) {
    main.elementor-page-content:has(.pv-main-hero) {
        overflow: visible;
    }

    .elementor-page-content .pv-main-hero > .pv-main-photo {
        position: sticky;
        top: 88px;
        align-self: flex-start;
    }
}
/* ===== FIXNÍ PATIČKA – POUZE DESKTOP ===== */

@media (min-width: 1025px) {
    .elementor-site-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        margin-top: 0;
    }

    main.elementor-page-content {
        padding-bottom: 49px !important;
    }
}
/* ===== ŠIRŠÍ DESKTOPOVÁ HLAVIČKA – MENU BEZ ZALAMOVÁNÍ ===== */

@media (min-width: 1025px) {
    header[role="banner"] > div {
        width: calc(100% - 30px);
        max-width: 1250px;
        box-sizing: border-box;
    }

    header[role="banner"] nav ol {
        flex-wrap: nowrap;
    }

    header[role="banner"] nav ol li {
        flex: 0 0 auto;
    }

    header[role="banner"] nav ol li a {
        white-space: nowrap;
    }
}
/* ===== REFERENCE – VŠECHNY MŘÍŽKY, VYSTŘEDĚNÍ NA MOBILU ===== */

@media (max-width: 768px) {
    [data-elementor-id="303"] .e-grid-base {
        width: 100% !important;
        max-width: none !important;
        justify-items: stretch !important;
    }

    [data-elementor-id="303"] .e-grid-base > .e-div-block-base {
        width: 100% !important;
        max-width: 100% !important;
        justify-self: stretch !important;
        text-align: center !important;
    }

    [data-elementor-id="303"] .e-grid-base .e-image-link-base {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
    }

    [data-elementor-id="303"] .e-grid-base img.e-image-base {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
/* Posunutí spodní hrany gradientu mimo viditelnou oblast */

.pv-image-fade::after {
    top: 0;
    bottom: -2px;
    height: auto;
}