/**
 * Maxwell Hero Pro - Styles
 * Version: 1.0.1
 * Author: Charlie K Gackowski
 */

/* Reset and Base Styles */
/* Ensure consistent base font size across all devices */
.maxwell-hero-slider,
.maxwell-hero-slider * {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.maxwell-hero-slider {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 100%;
}

/* Prevent horizontal overflow on body */
body {
    overflow-x: hidden;
}

.maxwell-hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slide */
.maxwell-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.maxwell-hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Background Layers - Stacking Order */

/* Layer 1: Base Color */
.maxwell-hero-bg-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2d3436;
    z-index: 1;
}

/* Layer 2: Overlay Image */
.maxwell-hero-bg-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    pointer-events: none;
}

.maxwell-hero-slide.active .maxwell-hero-bg-overlay {
    opacity: 1;
}

.maxwell-hero-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0.8;
}

/* Overlay Image - Top Center Variant */
.maxwell-hero-bg-overlay-top .maxwell-hero-bg-image-top {
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 50%;
    object-fit: contain;
    object-position: top center;
    opacity: 0.5;
}

/* Overlay slides in from left */
.maxwell-hero-bg-overlay-top {
    transform: translateX(-100px);
    transition: opacity 1.8s ease-in-out, transform 1.8s ease-in-out !important;
}

.maxwell-hero-slide.active .maxwell-hero-bg-overlay-top {
    transform: translateX(0);
}

/* ========================================
   PER-SLIDE OVERLAY IMAGE CUSTOMIZATION
   ========================================

   USAGE GUIDE:
   ------------
   Each slide has separate desktop and mobile controls for overlay images.

   Available properties to customize:
   - top, right, bottom, left: Position of the image
   - transform: translateX(-50%) for centering, or other transforms
   - max-width, max-height: Size constraints
   - width, height: Explicit sizing
   - object-fit: cover (fills), contain (fits), etc.
   - object-position: top center, center center, bottom right, etc.
   - opacity: 0.0 to 1.0 transparency

   For alternative mobile images:
   1. Add class "desktop-only" to desktop image in hero-slider.php
   2. Add class "mobile-only" to mobile image in hero-slider.php
   3. Uncomment the display rules in the CSS for that slide

   Example HTML structure for alternative images:
   <div class="maxwell-hero-bg-overlay">
       <img src="desktop.jpg" class="maxwell-hero-bg-image desktop-only">
       <img src="mobile.jpg" class="maxwell-hero-bg-image mobile-only">
   </div>
*/

/* SLIDE 1 - Hair Extensions (No overlay image) */
/* Desktop */
.maxwell-hero-slide:nth-child(1) .maxwell-hero-bg-overlay {
    /* No overlay image on this slide */
}

/* Mobile */
@media (max-width: 768px) {
    .maxwell-hero-slide:nth-child(1) .maxwell-hero-bg-overlay {
        /* Mobile specific adjustments if needed */
    }
}

/* SLIDE 2 - Profhilo (Top center overlay) */
/* Desktop */
.maxwell-hero-slide:nth-child(2) .maxwell-hero-bg-overlay-top .maxwell-hero-bg-image-top {
    top: 160px;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    object-position: top center;
    opacity: 0.5;
}

/* Mobile */
@media (max-width: 768px) {
    .maxwell-hero-slide:nth-child(2) .maxwell-hero-bg-overlay-top .maxwell-hero-bg-image-top {
        top: 530px;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        max-height: 80%;
        object-fit: contain;
        object-position: top center;
        opacity: 0.25;
    }

    /* Optional: Show different image on mobile */
    /* .maxwell-hero-slide:nth-child(2) .maxwell-hero-bg-image-top.desktop-only {
        display: none;
    }
    .maxwell-hero-slide:nth-child(2) .maxwell-hero-bg-image-top.mobile-only {
        display: block;
    } */
}

/* SLIDE 3 - Nails (Full background overlay) */
/* Desktop */
.maxwell-hero-slide:nth-child(3) .maxwell-hero-bg-overlay .maxwell-hero-bg-image {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0.8;
}

/* Mobile */
@media (max-width: 768px) {
    .maxwell-hero-slide:nth-child(3) .maxwell-hero-bg-overlay .maxwell-hero-bg-image {
        object-fit: cover;
        object-position: left center;
        opacity: 0.35;
    }

    /* Optional: Show different image on mobile */
    /* .maxwell-hero-slide:nth-child(3) .maxwell-hero-bg-image.desktop-only {
        display: none;
    }
    .maxwell-hero-slide:nth-child(3) .maxwell-hero-bg-image.mobile-only {
        display: block;
    } */
}

/* SLIDE 4 - Nail Educator (Full background overlay) */
/* Desktop */
.maxwell-hero-slide:nth-child(4) .maxwell-hero-bg-overlay .maxwell-hero-bg-image {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    opacity: 0.8;
}

/* Mobile */
@media (max-width: 768px) {
    .maxwell-hero-slide:nth-child(4) .maxwell-hero-bg-overlay .maxwell-hero-bg-image {
        object-fit: cover;
        object-position: center center;
        opacity: 0.35;
    }

    /* Optional: Show different image on mobile */
    /* .maxwell-hero-slide:nth-child(4) .maxwell-hero-bg-image.desktop-only {
        display: none;
    }
    .maxwell-hero-slide:nth-child(4) .maxwell-hero-bg-image.mobile-only {
        display: block;
    } */
}

/* Layer 3: Contrast Gradient (50% black from left, fading to transparent on right) */
.maxwell-hero-bg-contrast {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 30%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 3;
}

/* Content Grid - 2 Columns */
.maxwell-hero-grid {
    position: relative;
    z-index: 4;
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px 0 60px;
    padding-right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: flex-end;
}

/* Left Column - Content aligned to bottom left */
.maxwell-hero-col-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 80px;
    color: #ffffff;
}

/* Right Column - Image aligned to bottom right */
.maxwell-hero-col-right {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding-bottom: 0;
    padding-right: 0;
}

.maxwell-hero-image-wrapper {
    max-width: 100%;
    max-height: 100%;
    overflow: visible;
    position: relative;
}

.maxwell-hero-featured-image {
    width: auto;
    height: auto;
    max-height: 90vh;
    display: block;
    object-fit: contain;
    object-position: bottom right;
}

/* Badge / Roundel - Square shape with asymmetric rounded corners */
.maxwell-hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 5px 40px 5px 5px;
    padding: 32px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    position: absolute;
    bottom: 50px;
    right: 50px;
    z-index: 10;
    margin-bottom: 0;
}

.maxwell-hero-badge:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.18);
}

.maxwell-hero-badge .badge-text {
    font-size: clamp(2.25rem, 3vw + 0.5rem, 3.25rem);
    font-weight: 300;
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.95);
}

.maxwell-hero-badge .badge-subtitle {
    font-size: clamp(0.5rem, 0.6vw + 0.1rem, 0.625rem);
    font-weight: 600;
    letter-spacing: clamp(0.075rem, 0.1vw, 0.125rem);
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.75);
    opacity: 0.9;
    white-space: nowrap;
}

.maxwell-hero-badge .badge-large {
    font-size: clamp(2.75rem, 3.5vw + 0.75rem, 4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: clamp(0.125rem, 0.2vw, 0.1875rem);
    color: rgba(255, 255, 255, 1);
}

/* Title - Fluid typography using clamp() */
.maxwell-hero-title {
    font-size: clamp(1.5rem, 3vw + 0.5rem, 3rem);
    font-weight: 300;
    line-height: 1.1;
    margin: 0 0 clamp(1rem, 1.5vw, 1.5rem) 0;
    letter-spacing: clamp(0.125rem, 0.4vw, 0.375rem);
    text-transform: uppercase;
}

.hero-title-highlight {
    font-weight: 900;
    display: block;
    letter-spacing: 3px;
}

/* Description - Fluid typography */
.maxwell-hero-description {
    max-width: 580px;
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
    line-height: 1.7;
    margin: 0 0 clamp(1.5rem, 2vw, 2rem) 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 300;
}

/* Buttons - Equal Width, Hover Reverse */
.maxwell-hero-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 16px;
    width: fit-content;
    max-width: 580px;
}

.maxwell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.875rem, 1vw, 1rem) clamp(1.5rem, 2vw, 2rem);
    font-size: clamp(0.625rem, 0.75vw + 0.125rem, 0.75rem);
    font-weight: 600;
    letter-spacing: clamp(0.075rem, 0.1vw, 0.09375rem);
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
    min-width: clamp(12rem, 15vw, 15rem);
}

.maxwell-btn-primary {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.maxwell-btn-primary:hover {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.maxwell-btn-secondary {
    background: transparent;
    border: 2px dashed #ffffff;
    color: #ffffff;
}

.maxwell-btn-secondary:hover {
    background: #ffffff;
    color: #000000;
    border-style: solid;
}

/* Layer Animation */
.maxwell-layer {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Right column slides in from right */
.maxwell-hero-col-right .maxwell-layer {
    transform: translateX(50px);
}

/* Slow smooth slide from right - special class */
.maxwell-slide-right {
    transform: translateX(120px) !important;
    transition: opacity 1.4s ease-out, transform 1.4s ease-out !important;
}

.maxwell-hero-slide.active .maxwell-layer {
    opacity: 1;
    transform: translateY(0);
}

.maxwell-hero-slide.active .maxwell-hero-col-right .maxwell-layer {
    transform: translateX(0);
}

.maxwell-hero-slide.active .maxwell-slide-right {
    transform: translateX(0) !important;
}

.maxwell-hero-slide.active .maxwell-layer[data-delay="0"] {
    transition-delay: 0.1s;
}

.maxwell-hero-slide.active .maxwell-layer[data-delay="200"] {
    transition-delay: 0.3s;
}

.maxwell-hero-slide.active .maxwell-layer[data-delay="400"] {
    transition-delay: 0.5s;
}

.maxwell-hero-slide.active .maxwell-layer[data-delay="600"] {
    transition-delay: 0.7s;
}

.maxwell-hero-slide.active .maxwell-layer[data-delay="800"] {
    transition-delay: 0.9s;
}

.maxwell-hero-slide.active .maxwell-layer[data-delay="1000"] {
    transition-delay: 1.1s;
}

/* Pause/Play Control Button - Removed */

/* Pagination - Smaller, Slimmer, Elegant */
.maxwell-hero-pagination {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.maxwell-pagination-dot {
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.maxwell-pagination-dot:hover {
    transform: scale(1.15);
    opacity: 1;
}

.maxwell-pagination-dot.active {
    opacity: 1;
}

.pagination-progress {
    width: 100%;
    height: 100%;
}

.pagination-border {
    fill: none;
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 1;
}

.pagination-fill {
    fill: none;
    stroke: #ffffff;
    stroke-width: 1;
    stroke-dasharray: 92;
    stroke-dashoffset: 92;
    transition: stroke-dashoffset 0.2s ease;
}

.maxwell-pagination-dot.active .pagination-fill {
    animation: fillProgress var(--duration) linear forwards;
}

@keyframes fillProgress {
    from {
        stroke-dashoffset: 92;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.maxwell-pagination-dot:not(.active) .pagination-border {
    stroke: rgba(255, 255, 255, 0.4);
}

.maxwell-pagination-dot.active .pagination-border {
    stroke: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .maxwell-hero-grid {
        padding: 0 50px;
        gap: 60px;
    }
}

@media (max-width: 1200px) {
    .maxwell-hero-grid {
        padding: 0 40px;
        gap: 50px;
    }
}

@media (max-width: 992px) {
    .maxwell-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 40px;
    }

    .maxwell-hero-col-left,
    .maxwell-hero-col-right {
        padding-bottom: 40px;
    }

    .maxwell-hero-col-right {
        max-height: 40vh;
    }

    .maxwell-hero-badge {
        width: 160px;
        height: 160px;
        padding: 28px;
    }
}

@media (max-width: 768px) {
    .maxwell-hero-slider {
        height: 100vh;
        min-height: 600px;
    }

    .maxwell-hero-grid {
        padding: 0 30px;
        padding-right: 0;
    }

    .maxwell-hero-col-right {
        margin-right: 0;
        padding-right: 0;
    }

    .maxwell-hero-image-wrapper {
        margin-right: 0;
        padding-right: 0;
        max-width: none;
    }

    .maxwell-hero-featured-image {
        object-position: bottom right;
    }

    /* Badge - Two row layout: "50% OFF" then "LIMITED OFFER" */
    .maxwell-hero-badge {
        width: auto;
        height: auto;
        padding: 12px 20px;
        bottom: 20px;
        right: 20px;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        border-radius: 5px 25px 5px 5px;
    }

    .maxwell-hero-badge .badge-text,
    .maxwell-hero-badge .badge-large {
        font-size: clamp(2rem, 5vw, 2.25rem);
        font-weight: 600;
        line-height: 1;
        margin-bottom: 0;
    }

    .maxwell-hero-badge .badge-large {
        margin-bottom: 2px;
    }

    .maxwell-hero-badge .badge-subtitle {
        font-size: clamp(0.625rem, 2vw, 0.75rem);
        font-weight: 600;
        letter-spacing: clamp(0.05rem, 0.15vw, 0.075rem);
        margin-bottom: 0;
        white-space: nowrap;
        line-height: 1;
    }

    /* Buttons - Side by side in row */
    .maxwell-hero-buttons {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }

    .maxwell-btn {
        flex: 1;
        min-width: 0;
        padding: clamp(0.75rem, 2vw, 0.875rem) clamp(0.875rem, 2vw, 1rem);
        font-size: clamp(0.5rem, 1.5vw, 0.625rem);
        letter-spacing: clamp(0.04rem, 0.1vw, 0.05rem);
        white-space: normal;
        line-height: 1.3;
    }

    /* Overlay images are now controlled per-slide above */
    /* See "PER-SLIDE OVERLAY IMAGE CUSTOMIZATION" section */

    .maxwell-hero-pagination {
        bottom: 20px;
    }

    .maxwell-pagination-dot {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .maxwell-hero-grid {
        padding: 0 20px;
        padding-right: 0;
    }

    .maxwell-hero-col-left {
        padding:100px 20px 30px 10px;

    }

    .maxwell-hero-col-right {
        padding-bottom: 0px;
        margin-right: 0;
        padding-right: 0;
    }

    .maxwell-hero-image-wrapper {
        margin-right: 0;
        padding-right: 0;
        max-width: none;
    }

    .maxwell-hero-featured-image {
        object-position: bottom right;
    }

    /* Badge - More compact on small screens */
    .maxwell-hero-badge {
        padding: 10px 16px;
        gap: 4px;
        bottom: 15px;
        right: 15px;
        flex-direction: column;
        align-items: center;
    }

    /* Buttons - Stack vertically on very small screens */
    .maxwell-hero-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .maxwell-hero-pagination {
        bottom: 15px;
        gap: 6px;
    }

    .maxwell-pagination-dot {
        width: 18px;
        height: 18px;
    }
}

/* Loading State */
.maxwell-hero-slider.loading {
    background: #2d3436;
}

/* Fade Transition Override */
body.maxwell-fade-transition .maxwell-hero-slide {
    transition-duration: var(--speed);
}
