/**
 * PimPam5G Hero Slideshow V2
 * Mobile: Full-screen background image slideshow
 * Desktop: Split layout - text left, contained portrait slideshow right
 */

/* ===================================
   BASE HERO SECTION
   ================================== */

.hero-fullscreen {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ===================================
   HERO TEXT COLUMN
   ================================== */

.hero-text .hero-headline {
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-text .hero-price {
    color: var(--color-primary, #E91E63);
}

.hero-text .hero-subtext {
    margin-bottom: 2rem;
}

.hero-text .btn-primary {
    background-color: var(--color-primary, #E91E63);
    border-color: var(--color-primary, #E91E63);
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.4);
}

.hero-text .btn-primary:hover {
    background-color: var(--color-primary-dark, #C2185B);
    border-color: var(--color-primary-dark, #C2185B);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.5);
}

/* ===================================
   HERO VISUAL / SLIDESHOW COLUMN
   ================================== */

.hero-visual {
    position: relative;
}

/* Images inside the slideshow */
.hero-slideshow-bg .slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slideshow-bg .slide-image.active {
    opacity: 1;
}

/* ===================================
   CUSTOMER INFO BADGES
   ================================== */

.hero-customer-badge {
    position: absolute;
    background: var(--color-primary, #E91E63);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 15;
    transition: all 0.3s ease;
}

.hero-customer-badge i {
    font-size: 0.85rem;
}

.hero-customer-info {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 15;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-customer-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
    color: #333;
}

.hero-customer-plan {
    font-size: 0.85rem;
    color: var(--color-primary, #E91E63);
    font-weight: 500;
}

/* ===================================
   SLIDESHOW NAVIGATION DOTS
   ================================== */

.hero-slideshow-dots {
    position: absolute;
    display: flex;
    gap: 0.5rem;
    z-index: 15;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slideshow-dot.active {
    background: var(--color-primary, #E91E63);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

/* Dark overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===================================
   MOBILE LAYOUT (< 768px)
   Full-screen background slideshow
   ================================== */

@media (max-width: 767px) {
    .hero-fullscreen {
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #111; /* fallback while images load */
    }

    /*
     * KEY: wrapper must be position:static on mobile so that
     * .hero-visual (absolute) positions relative to .hero-fullscreen,
     * NOT the wrapper. This lets images fill the entire section.
     */
    .hero-content-wrapper {
        position: static;
        width: 100%;
        padding: 100px 1rem 7rem;
    }

    /* Text sits above everything via its own stacking context */
    .hero-text {
        position: relative;
        z-index: 10;
        text-align: center;
    }

    .hero-text .hero-headline {
        color: #ffffff;
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
        text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    }

    .hero-text .hero-price {
        text-shadow: 0 0 30px rgba(233, 30, 99, 0.5);
    }

    .hero-text .hero-subtext {
        color: rgba(255, 255, 255, 0.95);
        font-size: 0.95rem;
        margin-bottom: 1rem;
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
    }

    .hero-text .hero-note {
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.8rem;
    }

    .hero-text .hero-cta .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .hero-text .hero-note .text-success {
        color: #76FF03 !important;
    }

    /* Slideshow fills entire section as background */
    .hero-visual {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* no z-index here — children use their own z-index
           in the section's stacking context */
    }

    .hero-slideshow-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .hero-slideshow-bg .slide-image {
        object-position: center 30%;
        z-index: 1;
    }

    .hero-slideshow-bg .slide-image.active {
        z-index: 2;
    }

    /* Dark overlay sits above images, below text */
    .hero-overlay {
        z-index: 5;
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.35) 35%,
            rgba(0, 0, 0, 0.15) 55%,
            rgba(0, 0, 0, 0.55) 100%
        );
    }

    /* Customer badges float above overlay - positioned above dots */
    .hero-customer-info {
        bottom: 3.5rem;
        left: 1rem;
        padding: 0.4rem 0.6rem;
        max-width: 45%;
    }

    .hero-customer-badge {
        bottom: 3.5rem;
        right: 1rem;
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .hero-customer-name {
        font-size: 0.8rem;
    }

    .hero-customer-plan {
        font-size: 0.7rem;
    }

    /* Dots at very bottom */
    .hero-slideshow-dots {
        bottom: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .slideshow-dot {
        width: 8px;
        height: 8px;
    }

    /* Fade in animation */
    .hero-text {
        animation: fadeInUp 0.8s ease-out;
    }
}

/* ===================================
   DESKTOP LAYOUT (768px+)
   Split layout: text left, slideshow right
   ================================== */

@media (min-width: 768px) {
    .hero-fullscreen {
        min-height: 0;
        background: var(--color-bg-primary, #ffffff);
    }

    /* Overlay hidden on desktop */
    .hero-overlay {
        display: none;
    }

    .hero-content-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        gap: 3rem;
        max-width: 1200px;
        margin: 0 auto;
        padding: 6rem 2rem 4rem 2rem;
    }

    /* Text column - left side */
    .hero-text {
        flex: 1 1 55%;
        text-align: left;
    }

    .hero-text .hero-headline {
        color: var(--color-gray-dark, #333);
        font-size: 2.5rem;
    }

    .hero-text .hero-subtext {
        color: var(--color-gray-medium, #666);
        font-size: 1.15rem;
    }

    .hero-text .hero-note {
        color: var(--color-gray-medium, #666);
    }

    .hero-text .hero-note .text-success {
        color: var(--color-success, #4CAF50) !important;
    }

    /* Visual column - right side, contained slideshow */
    .hero-visual {
        flex: 0 0 auto;
        width: 380px;
        height: 520px;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    .hero-slideshow-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .hero-slideshow-bg .slide-image {
        object-position: center center;
        border-radius: 16px;
    }

    /* Customer badges within contained slideshow */
    .hero-customer-info {
        bottom: 3.5rem;
        left: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .hero-customer-name {
        font-size: 0.9rem;
    }

    .hero-customer-plan {
        font-size: 0.75rem;
    }

    .hero-customer-badge {
        bottom: 3.5rem;
        right: 0.75rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* Dots inside contained slideshow */
    .hero-slideshow-dots {
        bottom: 0.75rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .slideshow-dot {
        width: 8px;
        height: 8px;
        background: rgba(255, 255, 255, 0.6);
    }
}

/* Larger desktop */
@media (min-width: 1024px) {
    .hero-content-wrapper {
        gap: 4rem;
        padding: 7rem 2rem 5rem 2rem;
    }

    .hero-text .hero-headline {
        font-size: 3rem;
    }

    .hero-text .hero-subtext {
        font-size: 1.25rem;
    }

    .hero-visual {
        width: 420px;
        height: 570px;
    }
}

/* Large desktop */
@media (min-width: 1400px) {
    .hero-content-wrapper {
        gap: 5rem;
    }

    .hero-text .hero-headline {
        font-size: 3.5rem;
    }

    .hero-text .hero-subtext {
        font-size: 1.4rem;
    }

    .hero-visual {
        width: 460px;
        height: 620px;
    }
}

/* ===================================
   HERO REVIEWS (rotating testimonials)
   ================================== */

.hero-reviews {
    position: relative;
    height: 100px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.review-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.review-item.active {
    opacity: 1;
    transform: translateY(0);
}

.review-stars {
    color: #FFD700;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.review-text {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.review-author {
    font-size: 0.8rem;
    font-style: italic;
    font-weight: 600;
}

/* Mobile review colors */
@media (max-width: 767px) {
    .hero-reviews {
        text-align: center;
        height: 85px;
        margin-top: 1rem;
    }

    .review-stars {
        font-size: 0.75rem;
        margin-bottom: 0.15rem;
    }

    .review-text {
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .review-author {
        color: rgba(255, 255, 255, 0.75);
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
        font-size: 0.7rem;
    }
}

/* Desktop review colors */
@media (min-width: 768px) {
    .hero-reviews {
        text-align: left;
    }

    .review-text {
        color: var(--color-primary, #E91E63);
    }

    .review-author {
        color: var(--color-gray-medium, #666);
    }
}

/* ===================================
   ANIMATIONS
   ================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ken Burns effect on images */
.hero-slideshow-bg .slide-image {
    transform: scale(1);
    transition: opacity 1s ease-in-out, transform 8s ease-out;
}

.hero-slideshow-bg .slide-image.active {
    transform: scale(1.05);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-slideshow-bg .slide-image {
        transition: opacity 0.5s ease;
        transform: none !important;
    }

    .hero-text {
        animation: none !important;
    }

    .slideshow-dot {
        transition: none;
    }
}

/* ===================================
   NAVBAR - ADAPTIVE BEHAVIOR
   ================================== */

.navbar-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile: transparent over full-screen image, NOT fixed initially */
@media (max-width: 767px) {
    .navbar-hero-overlay {
        background: transparent !important;
        box-shadow: none;
    }

    .navbar-hero-overlay .navbar-brand img {
        filter: brightness(0) invert(1);
    }

    .navbar-hero-overlay .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .navbar-hero-overlay .nav-link:hover {
        color: #ffffff !important;
    }

    /* When scrolled past hero on mobile - becomes fixed + white */
    .navbar-hero-overlay.scrolled {
        position: fixed;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        animation: slideDown 0.3s ease;
    }

    .navbar-hero-overlay.scrolled .navbar-brand img {
        filter: none;
    }

    .navbar-hero-overlay.scrolled .nav-link {
        color: var(--color-gray-dark, #333) !important;
    }

    @keyframes slideDown {
        from {
            transform: translateY(-100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

/* Desktop: solid white and fixed */
@media (min-width: 768px) {
    .navbar-hero-overlay {
        position: fixed;
        background: #ffffff !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    }

    .navbar-hero-overlay .nav-link {
        color: var(--color-gray-dark, #333) !important;
    }

    .navbar-hero-overlay .nav-link:hover {
        color: var(--color-primary, #E91E63) !important;
    }
}

/* ===================================
   STICKY CTA - MOBILE ONLY, AFTER HERO
   ================================== */

@media (max-width: 767px) {
    .sticky-cta {
        opacity: 0;
        transform: translateY(100%);
        transition: opacity 0.3s ease, transform 0.3s ease;
        pointer-events: none;
    }

    .sticky-cta.visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* ===================================
   MOBILE MENU
   ================================== */

.navbar-toggler {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.navbar-toggler-icon {
    color: #ffffff;
    transition: color 0.3s ease;
}

.navbar-hero-overlay.scrolled .navbar-toggler-icon {
    color: var(--color-gray-dark, #333);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
    display: block;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: block;
    padding: 1rem 0;
    color: var(--color-gray-dark, #333);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: color 0.2s ease;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    color: var(--color-primary, #E91E63);
}

.mobile-nav-link i {
    width: 24px;
    color: var(--color-primary, #E91E63);
}

/* Desktop: hide toggler and mobile menu */
@media (min-width: 768px) {
    .navbar-toggler,
    .mobile-menu {
        display: none !important;
    }
}
