/* =========================================
   Hero Slider CSS
   Separated for cleaner code and conflict resolution
   ========================================= */

/* --- Base Layout --- */
.hero {
    display: block;
    height: 100vh;
    min-height: 100vh;
    position: relative;
    padding: 0;
    margin: 0;
    margin-top: 80px;
    overflow: hidden;
}

.hero-slider-container {
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: relative;
}

/* --- Slide Item --- */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
    display: flex;
    align-items: center;
    /* Vertical Center */
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Background */
.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Background gradient set via inline style or variable */
}

/* Container & Wrappers */
.hero-slide .container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-content-wrapper {
    position: relative;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 50%;
    /* Constrain text width to prevent overlap with image */
}

.hero-content .hero-badge,
.hero-content h1,
.hero-content .hero-subtitle,
.hero-content .hero-buttons {
    position: relative;
    z-index: 15;
}

.hero-content h1 {
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(0.875rem, 1.5vw, 1.25rem);
}

/* --- Typography & Elements --- */
.hero-badge {
    display: inline-block;
    padding: clamp(4px, 0.5vw, 6px) clamp(12px, 1.2vw, 16px);
    border-radius: 50px;
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: clamp(16px, 2vw, 24px);
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 24px;
    font-weight: 800;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.6;
}

/* Base styles for buttons assumed in main css, positioning here if needed */
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Visual Image (Desktop) --- */
.slide-visual-image {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%) translateX(3vw);
    width: clamp(350px, 40vw, 700px);
    max-width: 50%;
    z-index: 5;
    opacity: 0;
    transition: all 0.8s ease-out 0.2s;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 60%, rgba(0,0,0,0.4) 85%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 60%, rgba(0,0,0,0.4) 85%, rgba(0,0,0,0) 100%);
}

.hero-slide.active .slide-visual-image {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.slide-visual-image img {
    width: 100%;
    height: auto;
}

/* --- Visual Icon (Fallback) --- */
.slide-visual-icon {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.8s ease-out;
}

.hero-slide.active .slide-visual-icon {
    opacity: 1;
    transform: translateY(-50%);
}

.slide-visual-icon i {
    font-size: 180px;
}

/* --- Crypto Widget --- */
.crypto-widget {
    position: absolute;
    top: 15%;
    right: 1%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 1vw, 15px);
    z-index: 20;
    animation: floatCrypto 3s ease-in-out infinite;
}

.crypto-label {
    color: #fff;
    font-size: clamp(11px, 1vw, 13px);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.4);
    padding: clamp(4px, 0.5vw, 6px) clamp(10px, 1vw, 14px);
    border-radius: clamp(8px, 1vw, 12px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.crypto-icons-list {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 12px);
}

.c-icon {
    width: clamp(35px, 3vw, 42px);
    height: clamp(35px, 3vw, 42px);
    border-radius: clamp(8px, 1vw, 12px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 1.5vw, 20px);
    transition: all 0.3s;
    box-shadow: 0 0.3vw 1vw rgba(0, 0, 0, 0.2);
}

.c-icon:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

@keyframes floatCrypto {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* --- Slide Navigation Dots --- */
.slide-nav-dots {
    position: absolute;
    bottom: clamp(20px, 3vw, 40px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(8px, 1vw, 12px);
    z-index: 30;
}

.slide-dot {
    width: clamp(10px, 1vw, 12px);
    height: clamp(10px, 1vw, 12px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.slide-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.slide-dot.active {
    background: #fff;
    width: clamp(24px, 2.5vw, 32px);
    border-radius: clamp(4px, 0.5vw, 6px);
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .hero {
        margin-top: 70px;
    }

    .slide-visual-image {
        width: clamp(300px, 45vw, 600px);
        max-width: 48%;
    }

    .hero-content {
        max-width: 48%;
    }

    .crypto-widget {
        right: 0.5%;
        top: 12%;
    }
}

@media (max-width: 991px) {
    .hero {
        margin-top: 60px;
    }

    .hero-content h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .slide-visual-image {
        width: clamp(280px, 50vw, 450px);
        max-width: 50%;
    }

    .hero-content {
        max-width: 45%;
    }

    .crypto-widget {
        right: 0.5%;
        top: 10%;
    }
}

@media (max-width: 768px) {

    .hero {
        margin-top: 70px;
        height: auto;
        min-height: calc(100vh - 70px);
    }

    /* Reset Hero Height for Content Flow */
    .hero-slider-container {
        height: auto;
        min-height: calc(100vh - 70px);
        overflow: hidden;
        position: relative;
    }

    /* Slide with fade animation on mobile */
    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        min-height: calc(100vh - 70px);
        padding: 20px 15px 80px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
        z-index: 1;
    }

    .hero-slide.active {
        opacity: 1;
        visibility: visible;
        z-index: 2;
        position: relative;
    }

    /* Image shows FIRST - Order 1 */
    .slide-visual-image,
    .slide-visual-icon {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 20px;
        order: 1 !important;
        opacity: 1 !important;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .slide-visual-icon {
        margin-bottom: 15px;
    }

    .slide-visual-icon i {
        font-size: 70px;
    }

    /* Crypto Widget - Order 2 */
    .crypto-widget {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        order: 2;
        flex-direction: row !important;
        margin: 10px auto 20px;
        animation: none;
        background: rgba(0, 0, 0, 0.3);
        padding: 8px 16px;
        border-radius: 40px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 1 !important;
        transform: none !important;
    }

    .crypto-icons-list {
        flex-direction: row !important;
        gap: 10px;
    }

    .crypto-label {
        display: block !important;
        font-size: 10px;
        padding: 0;
        background: none;
        border: none;
        margin-right: 6px;
    }

    .c-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    /* Container comes AFTER crypto widget - Order 3 */
    .hero-slide .container {
        order: 3 !important;
        width: 100%;
        height: auto !important;
        display: block !important;
    }

    /* Flex Ordering for Mobile Flow */
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        max-width: 100% !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-badge {
        order: 1;
        margin-bottom: 12px;
        font-size: 11px;
        padding: 4px 12px;
    }

    .hero-content h1 {
        order: 2;
        font-size: 1.5rem !important;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .hero-subtitle {
        order: 3;
        font-size: 0.9rem !important;
        margin-bottom: 20px;
        max-width: 100%;
        line-height: 1.5;
    }

    .hero-buttons {
        order: 4;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        padding: 10px 18px;
        font-size: 13px;
    }

    /* Navigation dots for mobile */
    .slide-nav-dots {
        bottom: 20px;
        z-index: 100;
    }

    .slide-dot {
        width: 8px;
        height: 8px;
    }

    .slide-dot.active {
        width: 20px;
    }

    /* Disable Mobile Background Overlay if utilizing Image */
    .hero-slide[style*="--mobile-hero-bg"] .hero-slide-bg::after {
        display: none;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .hero {
        margin-top: 60px;
    }

    .hero-slide {
        padding: 15px 12px 70px;
    }

    .slide-visual-image,
    .slide-visual-icon {
        max-width: 240px;
        margin-bottom: 15px;
    }

    .hero-content h1 {
        font-size: 1.3rem !important;
    }

    .hero-subtitle {
        font-size: 0.85rem !important;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        padding: 8px 14px;
        font-size: 12px;
    }
}