/*
Theme Name: Luviana Child
Theme URI: https://hotel-altes-kasino.de
Description: Child theme for Altes Kasino Hotel, extending Luviana theme with SEO optimizations, heading fixes, and performance improvements.
Author: Altes Kasino
Author URI: https://hotel-altes-kasino.de
Template: luviana
Version: 1.0.1
Text Domain: luviana-child
*/

/* ==========================================================================
   Slick Carousel CLS Fix
   Reserves carousel dimensions before JavaScript initializes to prevent
   Cumulative Layout Shift (CLS). Targets the front page hero slider.

   The parent theme already hides non-first slides via:
     .child-pages-list:not(.slick-initialized) .child-page:not(:first-child) { display: none; }
   and sets min-height: 80vh on .child-page items.

   This child theme CSS ensures the CONTAINER itself reserves space and
   prevents any reflow when Slick wraps elements in its track/list divs.
   ========================================================================== */

/* Reserve space on the main carousel container before Slick initializes.
   Matches the min-height of .child-page (80vh) from parent theme. */
.luviana-front-page-header .child-pages-list:not(.slick-initialized) {
    min-height: 80vh;
    overflow: hidden;
    position: relative;
}

/* Ensure first slide fills container width before initialization */
.luviana-front-page-header .child-pages-list:not(.slick-initialized) > .child-page:first-child {
    width: 100%;
}

/* Prevent navigation slider from causing layout shift during init.
   Parent theme already sets visibility: hidden on .child-pages-nav-slider
   and display: none on wrapper (display: block above 992px).
   This adds overflow: hidden as extra insurance. */
.luviana-front-page-header .child-pages-nav-slider:not(.slick-initialized) {
    overflow: hidden;
    max-height: 0;
}

/* After Slick initializes, let it control dimensions */
.luviana-front-page-header .child-pages-list.slick-initialized {
    min-height: auto;
}

.luviana-front-page-header .child-pages-nav-slider.slick-initialized {
    max-height: none;
    overflow: visible;
}
