/* ==========================================================================
   ACF Header Slider Block Styles
   ========================================================================== */

/* Header Slider Section */
.header-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    min-height: 700px;
    line-height: 0;
    font-size: 0;
}

/* Override any page content padding that might affect the slider */
.page-content .header-slider-section,
.content-wrapper .header-slider-section,
.entry-content .header-slider-section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure slider container takes full height without any spacing */
.header-slider-section .header-slider-container {
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove spacing between header-slider-container and wood-divider */
.header-slider-section .header-slider-container + .wood-divider {
    margin-top: 0 !important;
}

.header-slider-section .wood-divider {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    line-height: 0;
    font-size: 0;
    vertical-align: top;
}

/* Ensure no whitespace between container and divider */
.header-slider-section .header-slider-container,
.header-slider-section .header-slider-wrapper,
.header-slider-section .slick-list,
.header-slider-section .slick-track {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Force slider to break out of content wrapper constraints on inner pages */
.page-content .header-slider-section,
.content-wrapper .header-slider-section,
.entry-content .header-slider-section {
    /* Break out of content wrapper */
    margin-left: calc(-100vw / 2 + 100% / 2) !important;
    margin-right: calc(-100vw / 2 + 100% / 2) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    /* Remove any top spacing */
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Override any WordPress default margins */
.wp-block-group .header-slider-section,
.wp-block-column .header-slider-section,
.wp-block-columns .header-slider-section {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-100vw / 2 + 100% / 2) !important;
    margin-right: calc(-100vw / 2 + 100% / 2) !important;
}

/* Override any WordPress block editor spacing */
.wp-block-group .header-slider-section,
.wp-block-column .header-slider-section,
.wp-block-columns .header-slider-section,
.wp-block .header-slider-section {
    /* Remove any block editor margins */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* Ensure full width */
    width: 100vw !important;
    max-width: 100vw !important;
    /* Break out of container */
    margin-left: calc(-100vw / 2 + 100% / 2) !important;
    margin-right: calc(-100vw / 2 + 100% / 2) !important;
}

/* Remove spacing when header-slider-section is followed by wood-divider */
.header-slider-section + .wood-divider,
.header-slider-section + * .wood-divider {
    margin-top: 0 !important;
}

/* Override any theme-specific content spacing */
.theme-content .header-slider-section,
.main-content .header-slider-section,
.page-content .header-slider-section,
.post-content .header-slider-section {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-100vw / 2 + 100% / 2) !important;
    margin-right: calc(-100vw / 2 + 100% / 2) !important;
}

/* Full-width alignment for Header Slider */
.header-slider-section.alignfull {
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    width: 100vw;
    max-width: 100vw;
}

.header-slider-section.alignwide {
    margin-left: calc(-100vw / 2 + 100% / 2 + 50px);
    margin-right: calc(-100vw / 2 + 100% / 2 + 50px);
    width: calc(100vw - 100px);
    max-width: calc(100vw - 100px);
}

/* Slider Container */
.header-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0;
    font-size: 0;
}

.header-slider-wrapper {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
}

/* Remove spacing from Slick elements */
.header-slider-container .slick-list {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
}

.header-slider-container .slick-track {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
}

.header-slider-container .slick-slide {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
}

.header-slider-slide {
    position: relative;
    height: 800px;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
}

.header-slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0 !important;
    padding: 0 !important;
}

.header-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

.header-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 20, 0.3);
    z-index: 2;
}

/* Text Content Overlay — split layout matches inner-page hero (hero-split + Gravity Form) */
.header-slider-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Ensure content is centered vertically within the slider container */
.header-slider-section .header-slider-container {
    position: relative;
}

.header-slider-content .header-slider-content-inner {
    display: block;
    height: 100%;
    width: 100%;
    max-width: var(--container-max-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding, 1.5rem);
    padding-right: var(--container-padding, 1.5rem);
    padding-top: calc(var(--lighthouse-header-offset, clamp(10rem, 22vmin, 14rem)) + var(--lighthouse-admin-bar-offset, 0px) + var(--spacing-md, 1rem));
    padding-bottom: var(--spacing-xl);
    box-sizing: border-box;
    pointer-events: none;
}

.header-slider-hero-split {
    width: 100%;
    pointer-events: auto;
}

.header-slider-split-text {
    pointer-events: auto;
}

/* Subtitle (block field) under hero headline */
.header-slider-hero-subtitle {
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.45;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.header-slider-hero-email,
.header-slider-hero-address {
    margin: var(--spacing-sm) 0 0 0;
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.header-slider-hero-email a {
    color: #ffffff;
    text-decoration: none;
}

.header-slider-hero-email a:hover,
.header-slider-hero-email a:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Description */
.header-slider-description {
    font-size: var(--font-size-lg);
    color: #ffffff;
    line-height: 1.7;
    margin: 0 0 var(--spacing-xl) 0;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.header-slider-description p {
    margin-bottom: var(--spacing-md);
}

.header-slider-description p:last-child {
    margin-bottom: 0;
}

/* Button */
.header-slider-button-container {
    margin-top: var(--spacing-xl);
}

.header-slider-button {
    display: inline-block;
    padding: 30px;
    background-color: rgba(122,1,2,1);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    font-size: var(--font-size-lg);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-shadow: none;
}

.header-slider-button:hover {
    background-color: #000001;
    transform: translateY(-2px);
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Contact Information (Bottom Left with Triangle Cutout on Right Side - Side by Side) */
.header-slider-contact {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 4;
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    pointer-events: auto;
    background: #ffffff;
    padding: var(--spacing-xl) var(--spacing-2xl) var(--spacing-xl) var(--spacing-2xl);
    clip-path: polygon(0 0, calc(100% - 70px) 0, 100% 100%, 0 100%);
    box-shadow: 2px -2px 12px rgba(0, 0, 0, 0.15);
    min-width: 750px;
}

.header-contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: transparent;
    padding: 0;
    margin: 0 auto;
    text-align: center;
    flex: 0 1 auto;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.header-contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.header-contact-link:hover {
    opacity: 0.8;
}

.header-contact-link:hover .header-contact-text {
    color: rgba(122,1,2,1);
}

.header-contact-link:hover .header-contact-icon {
    opacity: 0.9;
}

.header-contact-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    transition: opacity 0.2s ease;
}

.header-contact-text {
    color: #111827;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    text-align: center;
    transition: color 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Responsive adjustments for contact area */
@media (max-width: 768px) {
    .header-slider-contact {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-slider-contact {
        display: none;
    }
}

/* Slick Customizations - Squares on Bottom Right */
.header-slider-container .slick-dots {
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    left: auto;
    width: auto;
    text-align: right;
    z-index: 4;
}

.header-slider-container .slick-dots li {
    width: 30px;
    height: 30px;
    margin: 0 8px;
}

.header-slider-container .slick-dots li button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid #ffffff;
    background: transparent;
    border-radius: 2px;
    opacity: 0.5;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.header-slider-container .slick-dots li button:before {
    display: none;
}

.header-slider-container .slick-dots li.slick-active button {
    background: #ffffff;
    opacity: 1;
}

.header-slider-container .slick-prev,
.header-slider-container .slick-next {
    z-index: 1000 !important;
    width: 50px !important;
    height: 50px !important;
    background: none !important;
    border: none !important;
    border-radius: 50% !important;
    color: rgba(122,1,2,1) !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.header-slider-container .slick-prev {
    left: 50px !important;
}

.header-slider-container .slick-next {
    right: 50px !important;
}

.header-slider-container .slick-prev:before,
.header-slider-container .slick-next:before {
    content: "←" !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    color: rgba(122,1,2,1) !important;
    font-weight: bold !important;
    text-align: center !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.header-slider-container .slick-next:before {
    content: "→" !important;
}

.header-slider-container .slick-prev,
.header-slider-container .slick-next {
    text-indent: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
    display: none !important;
}

/* Responsive Design */

/* Tablets */
@media (max-width: 768px) {
    .header-slider-section {
        min-height: 600px;
    }
    
    .header-slider-slide {
        height: 600px;
    }
    
    .header-slider-content .hero-headline {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }

    .header-slider-hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .header-slider-description {
        font-size: 1rem !important;
    }
    
    .header-slider-description p {
        font-size: 1rem !important;
    }

    .header-slider-content .header-slider-content-inner {
        padding-top: calc(var(--lighthouse-header-offset, clamp(12.5rem, 36vmin, 22rem)) + var(--lighthouse-admin-bar-offset, 0px) + var(--spacing-sm));
    }
    
    .header-slider-button-container {
        margin-bottom: var(--spacing-3xl);
    }
    
    .header-slider-contact {
        display: none;
    }
    
    .header-slider-container .slick-dots {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
    }
    
    .header-slider-container .slick-prev {
        left: 20px !important;
        width: 35px !important;
        height: 35px !important;
    }
    
    .header-slider-container .slick-next {
        right: 20px !important;
        width: 35px !important;
        height: 35px !important;
    }
    
    /* Adjust full-width on smaller screens */
    .header-slider-section.alignfull,
    .page-content .header-slider-section,
    .content-wrapper .header-slider-section,
    .entry-content .header-slider-section {
        margin-left: calc(-100vw / 2 + 100% / 2) !important;
        margin-right: calc(-100vw / 2 + 100% / 2) !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .header-slider-section.alignwide {
        margin-left: calc(-100vw / 2 + 100% / 2 + 20px);
        margin-right: calc(-100vw / 2 + 100% / 2 + 20px);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .header-slider-section {
        min-height: 550px;
    }
    
    .header-slider-slide {
        height: 550px;
    }
    
    .header-slider-content .hero-headline {
        font-size: var(--font-size-2xl);
    }

    .header-slider-hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .header-slider-description {
        font-size: 1rem !important;
    }
    
    .header-slider-description p {
        font-size: 1rem !important;
    }

    .header-slider-content .header-slider-content-inner {
        padding-top: calc(var(--lighthouse-header-offset, clamp(12.5rem, 36vmin, 22rem)) + var(--lighthouse-admin-bar-offset, 0px) + var(--spacing-xs));
    }
    
    .header-slider-button {
        padding: 30px;
        font-size: var(--font-size-base);
    }
    
    .header-slider-button-container {
        margin-bottom: 120px;
    }
    
    .header-slider-contact {
        display: none;
    }
    
    .header-slider-container .slick-dots {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    .header-slider-container .slick-prev {
        left: 15px !important;
        width: 30px !important;
        height: 30px !important;
    }

    .header-slider-container .slick-next {
        right: 15px !important;
        width: 30px !important;
        height: 30px !important;
    }
    
    /* Full-width on mobile */
    .header-slider-section.alignwide,
    .page-content .header-slider-section,
    .content-wrapper .header-slider-section,
    .entry-content .header-slider-section {
        margin-left: calc(-100vw / 2 + 100% / 2) !important;
        margin-right: calc(-100vw / 2 + 100% / 2) !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

