/**
 * Klaaser Hero Slider - Frontend Styles
 * Follows Bold Builder design patterns
 */

/* Import Pacifico Font */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

/* Hero Section Container (Matches Bold Builder section spacing) */
.klaaser-hero-slider-wrapper {
    width: 100%;
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.klaaser-hero-section {
    padding: 80px 0 0;
    position: relative;
    background-color: transparent;
}

.klaaser-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Slider Container */
.klaaser-hero-slider {
    position: relative;
}

/* Individual Slide */
.klaaser-slide-item {
    outline: none;
}

.klaaser-slide-content {
    width: 100%;
}

.klaaser-slide-row {
    display: flex;
    gap: 40px;
    align-items: center;
    min-height: 400px;
}

/* Columns */
.klaaser-slide-col {
    flex: 1;
}

.klaaser-slide-col-text {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.klaaser-slide-col-image {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.klaaser-slide-text-inner {
    padding: 30px 60px;
    max-width: 100%;
    width: 100%;
}

/* Small Title (Pacifico Font - BLACK) */
.klaaser-slide-small-title {
    font-family: 'Pacifico', cursive;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.3;
    color: #191919;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

/* Large Title (Bold - BLUE #1e73be) */
.klaaser-slide-large-title {
    font-size: 60px;
    font-weight: 700;
    line-height: 1.1;
    color: #1e73be;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.klaaser-slide-large-title strong,
.klaaser-slide-large-title b {
    font-weight: 700;
}

/* Description Text (excerpt_text) */
.klaaser-slide-description {
    font-size: 16px;
    line-height: 1.75;
    color: #191919;
    margin: 0 0 25px 0;
    opacity: 0.9;
}

/* Buttons Container */
.klaaser-slide-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Button Styles (Matches Bold Builder dark-accent-skin filled style) */
.klaaser-slide-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background-color: #1e73be;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.3s ease;
    border: none;
    line-height: 1.5;
}

.klaaser-slide-button:hover {
    background-color: #155a94;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 115, 190, 0.3);
}

.klaaser-slide-button .button-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    opacity: 0.85;
}

.klaaser-slide-button:hover .button-icon {
    transform: translateX(2px);
    opacity: 1;
}

/* Image Container */
.klaaser-slide-col-image {
    position: relative;
}

.klaaser-slide-image {
    position: relative;
    width: 400px;
    height: 400px;
    max-width: 100%;
    background: transparent; /* No white background for transparent images */
}

.klaaser-slide-image img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: none; /* No shadow for transparent images */
    object-fit: cover;
    object-position: center;
    background: transparent; /* No white background for transparent images */
    opacity: 0; /* Hidden until loaded */
    transition: opacity 0.3s ease-in;
}

/* Show image when loaded */
.klaaser-slide-image img.loaded {
    opacity: 1;
}

/* Animations removed for cleaner slide transitions */

/* Slick Slider Overrides */
.klaaser-hero-slider.slick-slider {
    margin-bottom: 0;
}

.klaaser-hero-slider .slick-list {
    overflow: hidden;
}

.klaaser-hero-slider .slick-track {
    display: flex;
    align-items: stretch;
}

.klaaser-hero-slider .slick-slide {
    height: auto;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.klaaser-hero-slider .slick-slide.slick-active {
    opacity: 1;
}

/* Loading State */
.klaaser-hero-slider.slick-loading .klaaser-slide-item {
    opacity: 0.3;
}

/* FOUC Prevention - Hide slides before Slick initialization */
.klaaser-hero-slider:not(.slick-initialized) .klaaser-slide-item:not(:first-child) {
    display: none !important;
}

.klaaser-hero-slider {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.klaaser-hero-slider.slick-initialized {
    opacity: 1;
}

.klaaser-hero-slider:not(.slick-initialized) {
    min-height: 400px;
}

/* Dot Navigation Styles */
.klaaser-hero-slider {
    position: relative;
    padding-bottom: 70px;
}

.klaaser-hero-slider .slick-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
    z-index: 100;
    display: block !important;
}

.klaaser-hero-slider .slick-dots li {
    display: inline-block;
    margin: 0 6px;
    padding: 0;
    cursor: pointer;
}

.klaaser-hero-slider .slick-dots li button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid #1e73be;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    transition: all 0.3s ease;
    outline: none;
    display: block;
}

.klaaser-hero-slider .slick-dots li button:hover {
    background-color: rgba(30, 115, 190, 0.6);
    border-color: #1e73be;
    transform: scale(1.2);
}

.klaaser-hero-slider .slick-dots li.slick-active button {
    background-color: #1e73be;
    border-color: #1e73be;
    transform: scale(1.3);
}

.klaaser-hero-slider .slick-dots li button:focus {
    outline: 2px solid #1e73be;
    outline-offset: 3px;
}

/* Tablet Styles (< 1024px) */
@media (max-width: 1024px) {
    .klaaser-slide-small-title {
        font-size: 30px;
    }
    
    .klaaser-slide-large-title {
        font-size: 48px;
    }
    
    .klaaser-slide-description {
        font-size: 15px;
    }
    
    .klaaser-slide-col-text {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .klaaser-slide-col-image {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .klaaser-slide-text-inner {
        padding: 30px 40px;
    }
    
    .klaaser-slide-image {
        width: 350px;
        height: 350px;
    }
}

/* Mobile Styles (< 820px) - Tekst ja pilt ilusti üksteise all */
@media (max-width: 820px) {
    .klaaser-hero-section {
        padding: 65px 0 0;
        position: relative;
    }
    
    .klaaser-slide-row {
        flex-direction: column;
        min-height: auto;
        gap: 25px;
    }
    
    .klaaser-slide-col-text,
    .klaaser-slide-col-image {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    
    /* Stack order: tekst pealt, pilt all */
    .klaaser-slide-col-text {
        order: 1;
    }
    
    .klaaser-slide-col-image {
        order: 2;
    }
    
    .klaaser-slide-text-inner {
        padding: 15px 20px;
        width: 100%;
    }
    
    .klaaser-slide-small-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .klaaser-slide-large-title {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .klaaser-slide-description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 18px;
    }
    
    .klaaser-slide-buttons {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .klaaser-slide-button {
        justify-content: center;
        width: auto;
        min-width: 140px;
        padding: 14px 24px;
        font-size: 12px;
    }
    
    /* Pilt max-height 300px mobiilis */
    .klaaser-slide-col-image {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 20px;
    }
    
    .klaaser-slide-image {
        width: 100%;
        height: 300px;
        max-width: 300px;
    }
    
    .klaaser-slide-image img {
        border-radius: 6px;
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }
    
    /* Dot navigation mobiilis */
    .klaaser-hero-slider .slick-dots {
        bottom: 20px;
    }
    
    .klaaser-hero-slider .slick-dots li {
        margin: 0 5px;
    }
    
    .klaaser-hero-slider .slick-dots li button {
        width: 10px;
        height: 10px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .klaaser-hero-container {
        padding: 0 15px;
    }
    
    .klaaser-slide-small-title {
        font-size: 20px;
    }
    
    .klaaser-slide-large-title {
        font-size: 26px;
    }
    
    .klaaser-slide-description {
        font-size: 13px;
        line-height: 1.55;
    }
    
    .klaaser-slide-button {
        font-size: 12px;
        padding: 12px 20px;
    }
    
    .klaaser-slide-text-inner {
        padding: 10px 15px;
    }
    
    /* Pilt väiksem väga väikesel ekraanil */
    .klaaser-slide-image {
        height: 250px;
        max-width: 250px;
    }
    
    .klaaser-slide-image img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Dot navigation väikesel ekraanil */
    .klaaser-hero-slider .slick-dots {
        bottom: 15px;
    }
    
    .klaaser-hero-slider .slick-dots li {
        margin: 0 4px;
    }
    
    .klaaser-hero-slider .slick-dots li button {
        width: 9px;
        height: 9px;
        border-width: 1.5px;
    }
}

/* Dark Background Support */
.klaaser-hero-section.dark-bg .klaaser-slide-small-title {
    color: #7fd5d8;
}

.klaaser-hero-section.dark-bg .klaaser-slide-large-title,
.klaaser-hero-section.dark-bg .klaaser-slide-description {
    color: #ffffff;
}

/* Accessibility */
.klaaser-slide-button:focus {
    outline: 2px solid #1e73be;
    outline-offset: 2px;
}

.klaaser-slide-button:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   STATIC PAGE HERO STYLES
   ======================================== */

/* Static hero section (no slider, single hero) */
.klaaser-static-hero-wrapper .klaaser-hero-section {
    padding: 80px 0 40px;
}

.klaaser-static-hero {
    position: relative;
}

/* No bottom padding for static heroes (no dots navigation) */
.klaaser-static-hero-section {
    padding-bottom: 40px !important;
}

/* Page hero title uses h1 */
.klaaser-page-hero-title {
    font-size: 60px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    color: #1e73be !important;
    margin: 0 0 20px 0 !important;
}

/* Mobile adjustments for static heroes */
@media (max-width: 820px) {
    .klaaser-static-hero-wrapper .klaaser-hero-section {
        padding: 65px 0 30px;
    }
    
    .klaaser-page-hero-title {
        font-size: 32px !important;
    }
}

@media (max-width: 480px) {
    .klaaser-page-hero-title {
        font-size: 26px !important;
    }
}

/* Print Styles */
@media print {
    .klaaser-hero-slider {
        display: block !important;
    }
    
    .klaaser-slide-item {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .klaaser-slide-buttons {
        display: none;
    }
}
