/**
 * Hero Banner Styles
 * Customowe style dla Hero Banner z Owl Carousel
 *
 * @package Alfabetmarki_Theme
 * @since   1.0.0
 */

/* ===============================================
   HERO BANNER CONTAINER
   =============================================== */

.hero-banner-container {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Slajdy + treść w jednym obszarze (nakładka przez grid zamiast absolute na tekście) */
.hero-banner-media {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
}

.hero-banner-slides {
    grid-area: 1 / 1;
    position: relative;
    min-height: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-banner-slider {
    height: 100%;
    min-height: 100%;
}

.hero-banner-slider .owl-stage-outer,
.hero-banner-slider .owl-stage,
.hero-banner-slider .owl-item {
    height: 100%;
}

.hero-banner-slider .owl-item > .hero-slide-item {
    height: 100%;
}

/* Pojedynczy slajd bez Owl — ta sama wysokość co kontener mediów */
.hero-banner-slides > .hero-slide-item {
    height: 100%;
    min-height: 100%;
}

/* ===============================================
   HERO BUTTONS
   =============================================== */
   .wprowadzenie {
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0px 0px 25px rgba(0,0,0,0.2);
    margin-top: 0px !important;
    position: relative;
    background: #fff;
    z-index: 9;
}
.wprowadzenie p {
    font-size: 40px;
    line-height: 50px;
}
.hero-buttons-wrapper {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    
}
.btn-hero-primary {
    background-color: #75826b;
    border-radius: 50px;
    font-weight: 600;
    font-size: 25px;
    padding: 12px 40px;
    border: 2px solid #75826b;
    width:auto;
}
.btn-hero-primary:hover {
    background-color: #3d4042;
    border-color: #3d4042;
    color: #ffffff;
}
.hero-page-heading-three {
    margin-top: 20px;
}
/* Przycisk główny (primary) */
.btn-hero-more {
    background-color: transparent;
    color: #fff;
    padding: 12px 40px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid #ffffff;
}

.btn-hero-more:hover {
    background-color: #75826b;
    border-color: #75826b;
    color: #ffffff;
}

/* Przycisk drugorzędny (secondary) */
.btn-hero-secondary {
    background-color: #666;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid #666;
}

.btn-hero-secondary:hover {
    background-color: #444;
    border-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(68, 68, 68, 0.3);
}

/* Przycisk outline */
.btn-hero-outline {
    background-color: transparent;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn-hero-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* ===============================================
   OWL CAROUSEL CUSTOMIZATION
   =============================================== */

/* Nawigacja Owl Carousel */
.hero-banner-slider .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 20;
    margin: 0 !important;
    display: none !important;
}

.hero-banner-slider .owl-nav button {
    position: absolute;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-banner-slider .owl-nav button:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.hero-banner-slider .owl-nav button.owl-prev {
    left: 20px;
}

.hero-banner-slider .owl-nav button.owl-next {
    right: 20px;
}

.hero-banner-slider .owl-nav button span {
    font-size: 32px;
    line-height: 1;
}

/* Dots (pagination) */
.hero-banner-slider .owl-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 10px;
    justify-content: center;
    display: none;
}

.hero-banner-slider .owl-dots .owl-dot {
    /* Wizualny rozmiar bullet'a pozostaje 12x12, ale klikalny obszar 24x24
       (Google PageSpeed wymaga >= 24px). Tło rysowane przez content-box. */
    width: 24px;
    height: 24px;
    padding: 6px;
    background-color: rgba(255, 255, 255, 0.5);
    background-clip: content-box;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    box-sizing: content-box;
    cursor: pointer;
}

.hero-banner-slider .owl-dots .owl-dot.active,
.hero-banner-slider .owl-dots .owl-dot:hover {
    background-color: #fff;
    transform: scale(1.3);
    border-color: rgba(0, 0, 0, 0.2);
}

/* ===============================================
   HERO SLIDE ITEMS
   =============================================== */

.hero-slide-item {
    position: relative;
    width: 100%;
}

.hero-slide-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Zmienne w inline style; background-image tu, żeby działała podmiana w @media */
.hero-slide-item.hero-slide-image.hero-slide-item--has-portrait {
    background-image: var(--hero-slide-bg-desktop);
}

.hero-slide-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Treść w tej samej komórce co slajdy — desktop: środek w pionie; dołem tylko na mobile (patrz media query) */
.hero-banner-container .hero-page-container {
    position: relative;
    grid-area: 1 / 1;
    align-self: center;
    z-index: 10;
    width: 100%;
    pointer-events: none;
}

.hero-banner-container .hero-page-container a,
.hero-banner-container .hero-page-container button,
.hero-banner-container .hero-page-container .btn {
    pointer-events: auto;
}

.hero-page-content {
    width: 100%;
}
.hheading-1, .hheading-2, .hheading-3 {
    background: #75826b42;
    color: #fff;
    backdrop-filter: blur(5px);
    border: 1px solid #75826b;
}
/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 768px) {
    .hero-slide-item.hero-slide-image.hero-slide-item--has-portrait {
        background-image: var(--hero-slide-bg-mobile);
    }
    .home .hero-banner-container .hero-page-container {
        align-self: end;
    }
    .wprowadzenie p {
        font-size: 25px;
        line-height: 35px;
    }
    .wprowadzenie {
        padding: 20px;
    }
    .hero-buttons-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-hero-more,
    .btn-hero-secondary,
    .btn-hero-outline {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    /* Mniejsze przyciski nawigacji */
    .hero-banner-slider .owl-nav button {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .hero-banner-slider .owl-nav button.owl-prev {
        left: 10px;
    }
    
    .hero-banner-slider .owl-nav button.owl-next {
        right: 10px;
    }
    
    .hero-banner-slider .owl-dots {
        bottom: 10px;
        display: none;
    }
    
    .hero-banner-slider .owl-dots .owl-dot {
        /* Mobile: utrzymujemy obszar dotykowy >= 24px, wizualnie 10px. */
        width: 24px;
        height: 24px;
        padding: 7px;
    }
}

@media (max-width: 560px) {
    .hero-page-content {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .btn-hero-primary {
        font-size: 16px;
        width:100%
    }
    .btn-hero-more {
        max-width: 100%;
    }
}

@media (max-width: 460px) {
    /* Ukryj nawigację na bardzo małych ekranach */
    .hero-banner-slider .owl-nav button span {
        font-size: 24px;
    }
    
    .hero-banner-slider .owl-nav button {
        width: 35px;
        height: 35px;
    }

}

@media (max-width: 440px) {
    #hero-banner-7 .hero-slide-item {
        height: 100%;
    }
    .hero-banner-container#hero-banner-7 .hero-page-container {
        align-self: end;
    }
}


/* ===============================================
   SKELETON LOADER
   =============================================== */

.hero-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    z-index: 5;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.hero-skeleton.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dark overlay dla lepszej czytelności tekstu */
.hero-banner-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}



/* ===============================================
   ACCESSIBILITY & PERFORMANCE
   =============================================== */

/* Reduce motion dla użytkowników z preferencją */
@media (prefers-reduced-motion: reduce) {
    .hero-banner-slider,
    .hero-banner-slider .owl-item,
    .btn-hero-more,
    .btn-hero-secondary,
    .btn-hero-outline,
    .hero-skeleton {
        animation: none !important;
        transition: none !important;
    }
    
    .hero-banner-slider .owl-nav button:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .hero-banner-slider .owl-nav,
    .hero-banner-slider .owl-dots,
    .hero-skeleton {
        display: none !important;
    }
    
    .hero-banner-container::before {
        display: none;
    }
}

/* ===============================================
   MOBILE LANDSCAPE OVERRIDE
   Telefon w orientacji poziomej (krótki ekran).
   Inline style="height: ..." z PHP wymaga !important.
   =============================================== */
@media (max-width: 960px) and (max-height: 460px) {
    .hero-banner-container,
    .hero-banner-container .hero-skeleton,
    .hero-banner-container .hero-slide-item {
        height: 200vh !important;
    }
}
