/* =====================================================
   HERO SECTION — Homeland Tree Care
   File: assets/css/hero-section.css
   ===================================================== */

.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0;
}


/* =====================================================
   2. SLIDER WRAPPER
   — Always takes full viewport height on desktop
   — On mobile height is auto (driven by active slide)
   ===================================================== */

.hero-slider {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}


/* =====================================================
   3. SLIDES (desktop default — all absolute)
   ===================================================== */

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    display: flex;
    align-items: left;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    /* NO position: relative here — stays absolute on desktop */
}


/* =====================================================
   4. OVERLAY
   ===================================================== */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(to right,
            rgba(22, 46, 147, 0.95) 0%,
            rgba(22, 46, 147, 0.85) 35%,
            rgba(22, 46, 147, 0.25) 55%,
            rgba(22, 46, 147, 0.00) 75%);
}


/* =====================================================
   5. CONTAINER (inside each slide)
   ===================================================== */

.hero-section .container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: left;
    padding: 80px 40px 100px;
}


/* =====================================================
   6. LEFT CONTENT
   ===================================================== */

.hero-content {
    flex: 1;
    color: #fff;
    max-width: 650px;
    text-align: left;
}

.hero-title {
    font-size: clamp(26px, 3vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h3 {
    color: #FFB300;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content p {
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}


/* =====================================================
   7. ANIMATION — base states
   ===================================================== */

.hero-slide .hero-title {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =====================================================
   8. ANIMATION — active slide (sequenced)
   ===================================================== */

.hero-slide.active .hero-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.hero-slide.active .hero-content h3 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s;
}

.hero-slide.active .hero-content p:nth-of-type(1) {
    opacity: 0.95;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.hero-slide.active .hero-content p:nth-of-type(2) {
    opacity: 0.95;
    transform: translateY(0);
    transition-delay: 0.45s;
}

/* =====================================================
   10. RIGHT CARD
   — Positioned relative to .hero-section (not slider)
   ===================================================== */

.hero-card-wrapper {
    position: absolute;
    margin-top: 10px;
    transform: translateY(-50%);
    width: 360px;
    z-index: 50;
    max-width: calc(100vw - 40px);
}

.hero-card {
    background: rgba(26, 44, 163, 0.95);
    backdrop-filter: blur(10px);
    padding: 22px 23px;
    border-radius: 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hero-card-title {
    font-weight: 700;
    margin-bottom: 14px;
    color: #FFB300;
    text-align: left;
    line-height: 1.4;
}

.service-item {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-left: 3px solid #FFB300;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.service-item:last-child {
    margin-bottom: 0;
}

.service-item span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    display: block;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
}


/* =====================================================
   11. SLIDER PREV / NEXT BUTTONS
   ===================================================== */

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.slider-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}


/* =====================================================
   12. DOTS
   — Inside .hero-slider so position:absolute is correct
   ===================================================== */

.slider-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 30;
    padding: 6px 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.dot.active {
    background: #FFB300;
    transform: scale(1.25);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.85);
}


/* =====================================================
   13. MOBILE (≤ 768px)
   ===================================================== */

@media (max-width: 768px) {

    .hero-section {
        position: relative;
    }

    /* Slider height = tallest slide */
    .hero-slider {
        min-height: unset;
        height: auto;
        overflow: hidden;
        display: grid;
    }

    /* All slides stacked in grid cell */
    .hero-slide {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        display: flex !important;
        opacity: 0 !important;
        visibility: hidden !important;
        z-index: 1 !important;
        /* Padding to create space for the absolute card below the text */
        padding-bottom: 430px !important;
        transition: opacity 0.5s ease, visibility 0.5s ease !important;
    }

    /* Only active slide shown */
    .hero-slide.active {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 2 !important;
    }

    .hero-section .container {
        flex-direction: column;
        padding: 80px 20px 0px;
        gap: 0;
        align-items: left;
    }
    
    #hero-section .trust-buttons {
        margin-bottom: 5px !important;
    }

    .hero-content {
        max-width: 100%;
        width: 100%;
        text-align: left;
    }

    .hero-title {
        text-align: left;
    }

    .hero-content p {
        text-align: left;
    }

    /* Position the card OVER the extended slider background */
    .hero-card-wrapper {
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        right: auto !important;
        width: calc(100% - 40px) !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 50;
    }

    .hero-card {
        width: 100%;
        padding: 16px;
    }

    .service-item {
        margin-bottom: 12px;
    }

    .service-item span {
        font-size: 14px;
    }

    /* Slider buttons hidden on mobile */
    .slider-btn {
        display: none;
    }

    /* Dots on mobile */
    .slider-dots {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
        padding: 0;
        margin: 0;
        gap: 10px;
        z-index: 50;
        width: 100%;
    }

    .dot {
        width: 9px;
        height: 9px;
    }
}


/* =====================================================
   14. EXTRA SMALL (≤ 480px)
   ===================================================== */

@media (max-width: 480px) {

    .hero-section .container {
        padding: 90px 14px 0px;
    }
    
    .hero-slide {
        padding-bottom: 390px !important;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero-content p {
    }

    .hero-card {
        padding: 14px;
    }

    .hero-card-title {
        margin-bottom: 10px;
    }

    .service-item {
        padding: 8px 10px;
        margin-bottom: 10px;
    }

    .service-item span {
        font-size: 13px;
    }
}


/* =====================================================
   15. TABLET (769px – 1024px)
   ===================================================== */

@media (min-width: 769px) and (max-width: 1024px) {

    .hero-section {
        position: relative;
    }

    /* Slider height = tallest slide */
    .hero-slider {
        min-height: unset;
        height: auto;
        overflow: hidden;
        display: grid;
    }

    /* All slides stacked in grid cell */
    .hero-slide {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        display: flex !important;
        opacity: 0 !important;
        visibility: hidden !important;
        z-index: 1 !important;
        /* Padding to create space for the absolute card below the text */
        padding-bottom: 510px !important;
        transition: opacity 0.5s ease, visibility 0.5s ease !important;
    }

    /* Only active slide shown */
    .hero-slide.active {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 2 !important;
    }

    .hero-section .container {
        flex-direction: column;
        padding: 80px 30px 0px;
        align-items: left;
    }
    
    #hero-section .trust-buttons {
        margin-bottom: 5px !important;
    }

    .hero-content {
        text-align: left;
        max-width: 100%;
    }

    .hero-title {
        text-align: left;
    }

    /* Position the card OVER the extended slider background */
    .hero-card-wrapper {
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        right: auto !important;
        width: calc(100% - 60px) !important; /* perfectly aligns with 30px container padding */
        max-width: none !important;
        z-index: 50;
        margin: 0 !important;
    }

    .slider-dots {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
        padding: 0;
        margin: 0;
        z-index: 50;
        width: 100%;
    }

    .slider-btn.prev,
    .slider-btn.next {
        display: none !important;
    }
}


/* =====================================================
   16. DESKTOP (1025px – 1280px)
   ===================================================== */

@media (min-width: 1025px) {

    .hero-slider {
        min-height: 100vh;
    }

    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        min-height: 100vh;
        display: flex;
    }

    .hero-slide.active {
        position: absolute;
    }

    .hero-card-wrapper {
        position: absolute;
        top: 50%;
        right: 40px;
        transform: translateY(-50%);
        width: 360px;
    }

    .slider-dots {
        bottom: 28px;
    }
}


/* =====================================================
   17. SMALL LAPTOP / MACBOOK (1200px – 1440px)
   ===================================================== */

@media (min-width: 1200px) and (max-width: 1440px) {

    .hero-section .container {
        max-width: 1200px;
        padding-left: 40px;
        padding-right: 40px;
    }

    .hero-card-wrapper {
        right: calc(50% - 560px);
        width: 380px;
    }
}


/* =====================================================
   18. MACBOOK AIR (1441px – 1600px)
   ===================================================== */

@media (min-width: 1441px) and (max-width: 1600px) {

    .hero-card-wrapper {
        right: calc(50% - 560px);
        width: 400px;
    }
}


/* =====================================================
   19. LARGE DESKTOP (1601px+)
   ===================================================== */

@media (min-width: 1601px) {

    .hero-card-wrapper {
        right: calc(50% - 560px);
        width: 420px;
    }
}

/* =========================================
   TYPOGRAPHY STANDARDIZATION (USER REQUESTED)
   ========================================= */
/* Desktop */
.hero-content h3, .hero-card-title, .hero-card-body h3 { font-size: 22px !important; }
.hero-content p, .hero-card-body p { font-size: 18px !important; line-height: 1.6 !important; }

/* Tablet and Mobile (<= 1024px) */
@media (max-width: 1024px) {
    .hero-content h3, .hero-card-title, .hero-card-body h3 { font-size: 22px !important; }
    .hero-content p, .hero-card-body p { font-size: 18px !important; line-height: 1.6 !important; }
}

@media (max-width: 400px) {
    .hero-card-wrapper {
        width: calc(100% - 20px) !important;
    }
}