/* ============================================= */
/* AM Solar - Home Page Custom Styles (Final)   */
/* ============================================= */

/* ==================== CAROUSEL FIX ==================== */

/*
 * STRATEGI FIX:
 * - Carousel & item pakai height: auto + min-height agar bisa expand
 * - Gambar pakai position: absolute agar tidak mendorong konten
 * - Caption pakai position: relative + z-index agar tampil di atas gambar
 * - Overlay (::after) di item tetap absolute, bukan fixed
 */

.carousel-control-prev,
.carousel-control-next {
    z-index: 10 !important;
    width: 60px;
    pointer-events: auto !important;
}

.carousel .carousel-caption {
    pointer-events: none;
}

.carousel .carousel-caption a,
.carousel .carousel-caption button {
    pointer-events: auto;
}
.carousel {
    height: auto !important;
    min-height: calc(100vh - 170px);
    overflow: hidden;
}
.carousel .carousel-inner {
    height: auto !important;
    min-height: calc(100vh - 170px);
}

.carousel .carousel-item {
    position: relative !important;
    height: auto !important;
    min-height: calc(100vh - 170px);
}

.carousel .carousel-item > img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.carousel .carousel-item::after {
    position: absolute !important; 
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1;
}

.carousel .carousel-caption {
    position: relative !important;
    height: auto !important;
    min-height: calc(100vh - 170px); 
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 80px !important;
    padding-bottom: 80px !important;
    z-index: 2;
    left: 0 !important;
    right: 0 !important;
    text-align: center;
}


/* ==================== BADGE & MONEY BACK ==================== */
.carousel-caption .badge-cta {
    background: var(--secondary);
    padding: 5px 15px;
    display: inline-block;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 4px;
}
.carousel-caption .money-back-carousel {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
}


/* ==================== USP HERO LIST ==================== */
.usp-hero {
    margin: 1rem auto;
    max-width: 80%;
    text-align: left;
    display: inline-block;
}
.usp-hero li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.usp-hero li i {
    color: var(--secondary);
    font-size: 1rem;
}

/* ==================== HERO STATS ==================== */
.hero-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 520px;
    margin: 20px auto 0;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    max-width: 160px;
    background: rgba(34, 197, 94, 0.07);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 16px;
    padding: 20px 14px 16px;
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
}
.stat-card:hover {
    background: rgba(34, 197, 94, 0.13);
    border-color: rgba(34, 197, 94, 0.45);
}

.stat-num-wrap {
    font-size: 30px;
    font-weight: 900;
    color: #22c55e;
    line-height: 1;
    letter-spacing: -0.5px;
}
.stat-suffix {
    font-size: 20px;
    font-weight: 900;
    color: #22c55e;
}

.stat-divider {
    width: 28px;
    height: 2px;
    background: rgba(34, 197, 94, 0.4);
    border-radius: 2px;
    margin: 10px auto 8px;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== TOP BAR PHONE ==================== */
.top-bar-phone {
    color: #000000;
    font-weight: 500;
    text-decoration: none;
}
.top-bar-phone:hover {
    color: var(--primary);
}


/* ==================== 4 BENCANA CARDS ==================== */
.bencana-card {
    background: white;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 15px 30px -12px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}
.bencana-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.bencana-card:hover::before { transform: scaleX(1); }
.bencana-card .card-body { padding: 2rem 1.5rem; }
.bencana-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s, color 0.3s;
}
.bencana-card:hover i { transform: scale(1.1) translateY(-5px); }
.bencana-card h4 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.75rem; }
.bencana-card p { font-size: 0.9rem; line-height: 1.5; color: #6c757d; }
.bencana-card .btn-outline-secondary {
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 1rem;
    border-color: var(--secondary);
    color: var(--secondary);
}
.bencana-card:hover .btn-outline-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(34,197,94,0.2);
}


/* ==================== PAIN SECTIONS — BASE ==================== */
.pain-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}
.pain-section::after {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    bottom: 20px;
    opacity: 0.05;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
    z-index: 0;
}
#silent-killer::after, #permit::after  { right: 20px; }
#ghosting::after,      #money-pit::after { left: 20px; }
.pain-section .container { position: relative; }
.pain-section .container::before {
    position: absolute;
    font-size: 18rem;
    font-weight: 900;
    line-height: 1;
    top: -40px;
    opacity: 0.04;
    color: #ffffff;
    pointer-events: none;
    z-index: 0;
    letter-spacing: -10px;
}
#silent-killer .container::before { content: "01"; left: -20px; }
#ghosting .container::before      { content: "02"; right: -20px; left: auto; }
#permit .container::before        { content: "03"; left: -20px; }
#money-pit .container::before     { content: "04"; right: -20px; left: auto; }
.pain-section .container .row { position: relative; z-index: 1; }

.pain-section h3 {
    font-size: 1.8rem;
    font-weight: 800;
    padding-left: 20px !important;
    border-left: 4px solid;
    margin-bottom: 24px !important;
    padding-bottom: 0 !important;
    position: relative;
}
.pain-section h3::after { display: none !important; }

#silent-killer h3 {
    border-left-color: #60a5fa;
    background: linear-gradient(135deg, #ffffff 60%, #93c5fd 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#ghosting h3 {
    border-left-color: #93c5fd;
    background: linear-gradient(135deg, #ffffff 60%, #bfdbfe 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#permit h3 {
    border-left-color: #4ade80;
    background: linear-gradient(135deg, #ffffff 60%, #86efac 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#money-pit h3 {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, #ffffff 60%, #4ade80 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.pain-section h5 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 30px;
    margin-top: 24px !important;
    margin-bottom: 10px !important;
    color: #ffffff !important;
}
#silent-killer h5 { background: rgba(96,165,250,.15); border: 1px solid rgba(96,165,250,.4); }
#ghosting   h5   { background: rgba(147,197,253,.15); border: 1px solid rgba(147,197,253,.4); }
#permit     h5   { background: rgba(74,222,128,.12);  border: 1px solid rgba(74,222,128,.35); }
#money-pit  h5   { background: rgba(34,197,94,.12);   border: 1px solid rgba(34,197,94,.35); }

.pain-section p,
.pain-section ul li,
.pain-section ul li strong { color: rgba(255,255,255,0.92) !important; }

.pain-section ul { padding-left: 0 !important; list-style: none !important; }
.pain-section ul li {
    padding: 9px 14px 9px 38px !important;
    margin-bottom: 7px !important;
    position: relative;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
    transition: background .2s, border-color .2s;
}
.pain-section ul li:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}
.pain-section ul li::before {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem; content: '▹';
}
#silent-killer ul li::before { color: #60a5fa; }
#ghosting      ul li::before { color: #93c5fd; }
#permit        ul li::before { color: #4ade80; }
#money-pit     ul li::before { color: #22c55e; }

.pain-section .btn-outline-primary {
    border-radius: 30px !important;
    padding: 0.5rem 1.2rem !important;
    font-weight: 500 !important;
    transition: all .3s !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: #ffffff !important;
    background: rgba(255,255,255,0.07) !important;
    margin-bottom: 8px;
}
.pain-section .btn-outline-primary:hover {
    background: rgba(255,255,255,0.16) !important;
    border-color: rgba(255,255,255,0.7) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.pain-section img {
    border-radius: 16px !important;
    transition: transform 0.4s ease, box-shadow 0.4s;
}
.pain-section img:hover { transform: scale(1.02); }
#silent-killer img { box-shadow: 0 0 0 1px rgba(96,165,250,.25), 0 25px 50px rgba(6,13,26,.7) !important; }
#ghosting      img { box-shadow: 0 0 0 1px rgba(147,197,253,.25), 0 25px 50px rgba(10,21,48,.7) !important; }
#permit        img { box-shadow: 0 0 0 1px rgba(74,222,128,.25), 0 25px 50px rgba(6,15,10,.7) !important; }
#money-pit     img { box-shadow: 0 0 0 1px rgba(34,197,94,.25), 0 25px 50px rgba(3,13,7,.7) !important; }


/* ==================== PAIN SECTION BACKGROUNDS ==================== */
#silent-killer {
    background: linear-gradient(135deg, #060d1a 0%, #0a1628 50%, #0f2040 100%);
    border-top: 1px solid rgba(30,58,138,.4);
}
#ghosting {
    background: linear-gradient(135deg, #0a1530 0%, #0f1e45 50%, #1e3a8a 100%);
    border-top: 1px solid rgba(30,58,138,.5);
}
#permit {
    background: linear-gradient(135deg, #060f0a 0%, #0a2018 50%, #0d3320 100%);
    border-top: 1px solid rgba(34,197,94,.2);
}
#money-pit {
    background: linear-gradient(135deg, #030d07 0%, #052010 50%, #0a3d1f 100%);
    border-top: 1px solid rgba(34,197,94,.25);
}

/* ==================== CTA SECTION ==================== */
.container.py-5 .bg-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 30px !important;
    box-shadow: 0 25px 40px -20px rgba(0,0,0,0.2);
    transition: transform .3s, box-shadow .3s;
}
.container.py-5 .bg-light:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.25);
}
.container.py-5 .my-4.p-4 {
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05);
}


/* ==================== BUTTONS ==================== */
.btn-wa {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 10px 20px -8px rgba(37,211,102,0.3);
    border-radius: 40px;
    padding: 12px 35px;
    font-weight: 600;
    transition: all .3s;
    color: white;
    border: none;
    display: inline-block;
}
.btn-wa:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -8px rgba(37,211,102,0.4);
    background: linear-gradient(135deg, #20b859, #0e6b5c);
    color: white;
}
.btn-outline-primary {
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all .3s;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30,58,138,0.2);
}

/* ================= EXIT POPUP ================= */

#exitPopup .modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
}

/* Header */
#exitPopup .modal-header {
    background: linear-gradient(135deg, #1E3A8a, #22c55e);
    border-bottom: none;
    justify-content: center;
    position: relative;
}

#exitPopup .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    text-align: center;
}

#exitPopup .close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #fff;
    opacity: 1;
}

/* Body */
#exitPopup .modal-body {
    padding: 30px 25px;
}

#exitPopup .modal-body p {
    margin-bottom: 10px;
    font-size: 15px;
}

/* Strike price */
#exitPopup .modal-body p:nth-child(3) {
    text-decoration: line-through;
    color: #999;
}

/* Highlight FREE */
#exitPopup .modal-body p:last-of-type {
    font-size: 22px;
    font-weight: bold;
    color: #28a745;
}

/* CTA Button */
#exitPopup .btn-wa {
    background: #25D366;
    color: #fff;
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 15px;
    transition: 0.3s;
}

#exitPopup .btn-wa:hover {
    background: #1ebc59;
    transform: translateY(-2px);
}

/* ==================== RESPONSIVE — TABLET ==================== */
@media (max-width: 992px) {
    .pain-section { padding: 60px 0; }
    .pain-section h3 { font-size: 1.6rem; }
    .bencana-card .card-body { padding: 1.5rem; }
}


/* ==================== RESPONSIVE — MOBILE ==================== */
@media (max-width: 767.98px) {
    /* --- CAROUSEL MOBILE --- */
    .carousel,
    .carousel .carousel-inner,
    .carousel .carousel-item {
        min-height: 100vh;
    }
    .carousel .carousel-caption {
        min-height: 100vh;
        padding: 80px 20px 60px !important;
    }
    .carousel-caption p:first-of-type {
        font-size: 14px !important;
        margin-bottom: 5px;
    }
    .carousel .carousel-caption h1 {
        font-size: 1.6rem !important;
        line-height: 1.2;
        margin-bottom: 10px;
    }
    .carousel-caption .badge-cta {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    .carousel-caption .money-back-carousel {
        font-size: 0.9rem;
        margin-top: 5px;
    }
    .usp-hero {
        max-width: 100%;
        text-align: left;
        margin: 15px auto 0;
    }
    .usp-hero li {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    .hero-stats {
        gap: 8px; 
        max-width: 92%; 
    }
    .stat-card {
        padding: 14px 10px 12px;
        border-radius: 12px;
    }
    .stat-num-wrap {
        font-size: 22px;
    }
    .stat-suffix {
        font-size: 15px; 
    }
    .stat-label {
        font-size: 9px; 
    }
    .carousel .carousel-caption .btn {
        font-size: 0.8rem;
        padding: 8px 16px;
        margin-top: 15px;
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
    }

    /* --- BENCANA CARDS --- */
    .bencana-card .card-body { padding: 1.2rem; }
    .bencana-card i          { font-size: 2rem; }
    .bencana-card h4         { font-size: 1.1rem; }
    .bencana-card p          { font-size: 0.85rem; }
    .bencana-card .btn-outline-secondary { font-size: 0.8rem; padding: 0.3rem 1rem; }

    /* --- PAIN SECTIONS --- */
    .pain-section { padding: 40px 0; }
    .pain-section .container::before { font-size: 7rem; opacity: 0.04; }
    .pain-section h3 { font-size: 1.3rem !important; padding-left: 14px !important; border-left-width: 3px; }
    .pain-section h5 { font-size: 0.72rem !important; padding: 4px 10px; margin-top: 16px !important; }
    .pain-section p,
    .pain-section ul li { font-size: 0.88rem !important; }
    .pain-section ul li { padding: 8px 10px 8px 32px !important; }
    .pain-section img { margin-top: 1.5rem; }
    .pain-section .btn-outline-primary {
        font-size: 0.8rem !important;
        padding: 0.4rem 1rem !important;
        margin-bottom: 0.5rem;
        margin-left: 0 !important;
        display: inline-block;
    }
    .pain-cta-group { flex-direction: column; gap: 8px; }
    .pain-cta-group .btn { width: 100%; text-align: center; }

    /* --- CTA PENUTUP --- */
    .cta-closing { padding: 50px 0; }
    .cta-closing-title { font-size: 1.8rem; }
    .cta-closing-lead  { font-size: 0.95rem; }
    .cta-guarantee     { padding: 20px 24px; }
    .cta-guarantee-text { font-size: 1.2rem; }
    .btn-wa-lg { padding: 14px 28px !important; font-size: 0.95rem !important; }
    .pain-result { font-size: 0.85rem !important; }

    /* --- MODAL --- */
    .modal-dialog { margin: 1rem; }
    .modal-body   { padding: 1rem; }
}


/* ==================== BENCANA ICON COLORS ==================== */
.text-bencana-1 { color: #60a5fa; }
.text-bencana-2 { color: #818cf8; }
.text-bencana-3 { color: #34d399; }
.text-bencana-4 { color: #22c55e; }


/* ==================== PAIN SECTION — CTA GROUP ==================== */
.pain-cta-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pain-cta-group .btn { flex-shrink: 0; }


/* ==================== PAIN 3 — CHECKLIST & RESULT ==================== */
.pain-section ul.checklist li::before { content: '✓'; font-weight: 700; font-size: 0.8rem; }
#permit ul.checklist li::before { color: #4ade80; }

.pain-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    color: rgba(255,255,255,0.92) !important;
    font-size: 0.95rem !important;
    line-height: 1.5;
}
.pain-result i { color: #4ade80; font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }


/* ==================== CTA PENUTUP ==================== */
.cta-closing {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 50%, #eff6ff 100%);
    position: relative;
    overflow: hidden;
}
.cta-closing::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    top: -200px; right: -150px;
    background: radial-gradient(circle, rgba(34,197,94,.06) 0%, transparent 70%);
    pointer-events: none;
}
.cta-closing::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    bottom: -150px; left: -100px;
    background: radial-gradient(circle, rgba(30,58,138,.05) 0%, transparent 70%);
    pointer-events: none;
}
.cta-closing-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cta-closing-eyebrow {
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--secondary); margin-bottom: 12px;
}
.cta-closing-title { font-size: 2.8rem; font-weight: 800; color: var(--dark); margin-bottom: 20px; line-height: 1.15; }
.cta-closing-lead  { font-size: 1.1rem; color: #475569; line-height: 1.7; margin-bottom: 40px; }
.cta-closing-lead strong { color: var(--primary); }
.cta-guarantee {
    display: inline-block;
    padding: 24px 40px; margin-bottom: 36px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(30,58,138,0.08);
}
.cta-guarantee-icon   { font-size: 2.2rem; color: var(--secondary); display: block; margin-bottom: 10px; }
.cta-guarantee-label  { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #94a3b8; margin-bottom: 6px; }
.cta-guarantee-text   { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin: 0; }
.btn-wa-lg { padding: 16px 48px !important; font-size: 1.05rem !important; border-radius: 50px !important; }
.cta-closing-sub { margin-top: 20px; font-size: 0.82rem; color: #94a3b8; letter-spacing: 0.5px; }


/* ==================== RESPONSIVE CTA PENUTUP ==================== */
@media (max-width: 767.98px) {
    .cta-closing { padding: 50px 0; }
    .cta-closing-title { font-size: 1.8rem; }
    .cta-closing-lead  { font-size: 0.95rem; }
    .cta-guarantee     { padding: 20px 24px; }
    .cta-guarantee-text { font-size: 1.2rem; }
    .btn-wa-lg { padding: 14px 28px !important; font-size: 0.95rem !important; }
    .pain-cta-group { flex-direction: column; }
    .pain-cta-group .btn { width: 100%; text-align: center; }
    .pain-result { font-size: 0.85rem !important; }
}