/* ==========================================================================
   ACF Header Slider Block Styles
   ========================================================================== */

/* Header Slider Section */
.header-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 700px;
}

/* 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;
}

/* 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;
}

/* 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;
}

.header-slider-wrapper {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.header-slider-slide {
    position: relative;
    height: 700px;
    margin: 0 !important;
    padding: 0 !important;
}

.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;
}

/* Mobile: Make images shrink to be fully visible */
@media (max-width: 768px) {
    .header-slide-image {
        object-fit: contain;
        object-position: center;
    }
}

@media (max-width: 480px) {
    .header-slide-image {
        object-fit: contain;
        object-position: center;
        max-width: 100%;
        max-height: 100%;
    }
}

.header-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Text Content Overlay */
.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;
}

.header-slider-text-content {
    text-align: center;
    color: #ffffff;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-2xl);
    pointer-events: auto;
}

/* Title */
.header-slider-title {
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Subtitle */
.header-slider-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

/* Description */
.header-slider-description {
    font-size: 1.75rem;
    color: #ffffff;
    line-height: 1.7;
    margin: 0 0 2rem 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: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.header-slider-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #ad031a;
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.125rem;
    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: #8b0215;
    transform: translateY(-2px);
    color: white;
    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: #9edef5;
}

.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: #9edef5 !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: #9edef5 !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-title {
        font-size: 3rem;
    }
    
    .header-slider-subtitle {
        font-size: 1.75rem;
    }
    
    .header-slider-description {
        font-size: 1.5rem !important;
    }
    
    .header-slider-button {
        font-size: 1rem;
        padding: 0.875rem 2rem;
    }
    
    .header-slider-button-container {
        gap: 1rem;
    }
    
    .header-slider-description p {
        font-size: 1rem !important;
    }
    
    .header-slider-text-content {
        padding-top: 100px;
    }
    
    .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-title {
        font-size: 2.5rem;
    }
    
    .header-slider-subtitle {
        font-size: 1.5rem;
    }
    
    .header-slider-description {
        font-size: 1.25rem !important;
    }
    
    .header-slider-description p {
        font-size: 1.25rem !important;
    }
    
    .header-slider-text-content {
        padding-top: 100px;
    }
    
    .header-slider-button {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .header-slider-button-container {
        gap: 1rem;
    }
    
    .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;
    }
}

