@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --green-950: #073b18;
    --green-900: #07551e;
    --green-700: #118a35;
    --green-500: #25a84a;
    --green-100: #e9f7ed;
    --green-50: #f4fbf5;
    --yellow: #ffd900;
    --yellow-soft: #fff7c7;
    --text: #172019;
    --text-muted: #647067;
    --border: #e4e9e5;
    --white: #ffffff;
    --radius-lg: 24px;
    --radius-md: 16px;
}

/* ========================================
   RESET
   ======================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
a {
    font-family: inherit;
}

button {
    cursor: pointer;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.60);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    min-height: 68px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: block;
    line-height: 0;
}

.brand img {
    display: block;
    width: auto;
    height: 38px;
    max-width: 150px;
    object-fit: contain;
}

/* ========================================
   HERO
   ======================================== */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 570px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(76, 190, 92, 0.18),
            transparent 45%
        ),
        linear-gradient(
            180deg,
            var(--green-50) 0%,
            #ffffff 100%
        );
}

.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    top: -120px;
    right: -100px;
    border-radius: 50%;
    background: rgba(255, 217, 0, 0.16);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 60px 24px 70px;
    text-align: center;
}

.tambua-image {
    display: block;
    width: min(100%, 420px);
    height: auto;
    margin: 0 auto 32px;
    border-radius: 24px;
    box-shadow:
        0 20px 50px rgba(7, 85, 30, 0.15);
}

.hero h1 {
    max-width: 700px;
    margin: 0 auto 18px;
    color: var(--green-950);
    font-size: clamp(34px, 9vw, 60px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.8px;
}

.hero p {
    max-width: 580px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.7;
}

.hero p strong {
    color: var(--green-700);
    font-weight: 700;
}

/* ========================================
   SECTION
   ======================================== */

.section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 20px;
}

.section > h2 {
    margin-bottom: 38px;
    color: var(--green-950);
    font-size: clamp(25px, 7vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

/* ========================================
   BENEFITS
   ======================================== */

.benefits {
    background: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.benefit {
    min-height: 190px;
    padding: 22px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.benefit:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.07);
}

.benefit-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 20px;
    font-weight: 800;
}

.benefit-icon svg {
    width: 32px;
    height: 32px;
}

.benefit h3 {
    margin-bottom: 3px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.benefit p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

/* ========================================
   PROGRAM
   ======================================== */

.program {
    max-width: none;
    background: var(--green-50);
}

.program > h2,
.program-grid {
    width: 100%;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
}

.program-grid {
    display: grid;
    gap: 14px;
}

.program-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(7, 85, 30, 0.08);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow:
        0 8px 25px rgba(7, 85, 30, 0.05);
}

.program-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-100);
    color: var(--green-900);
    font-size: 25px;
}

.program-icon svg {
    width: 30px;
    height: 30px;
}

.program-card h3 {
    margin-bottom: 3px;
    color: var(--green-950);
    font-size: 17px;
    font-weight: 700;
}

.program-card p {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   INSTALLMENT
   ======================================== */

.installment {
    max-width: none;
    padding-top: 80px;
    padding-bottom: 80px;
    text-align: center;
    background: var(--green-950);
    color: white;
}

.installment h2 {
    color: white;
}

.installment-value {
    margin: 15px 0 25px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.installment-value strong {
    color: var(--yellow);
    font-size: clamp(100px, 28vw, 190px);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -8px;
}

.installment-value span {
    font-size: 28px;
    font-weight: 800;
}

.installment-price {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--yellow);
    color: #1d2100;
    font-size: 16px;
    font-weight: 600;
}

.installment-price strong {
    font-size: 20px;
}

.interest {
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.interest strong {
    color: var(--yellow);
    font-size: 30px;
}

/* ========================================
   PACKAGE
   ======================================== */

.package {
    text-align: left;
    padding-bottom: 32px;
}

.package > h2 {
    text-align: left;
}

.package > p {
    margin-bottom: 28px;
    color: var(--text-muted);
    font-size: 16px;
}

.package-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.package-items span {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--green-50);
    color: var(--green-900);
    font-size: 13px;
    font-weight: 700;

    display: flex;
    align-items: center;
    gap: 10px;
}

.package-items svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ========================================
   PARTNERS / SUPPORTED BY
   ======================================== */

.partners {
    padding-top: 8px;
    padding-bottom: 50px;
    background: var(--white);
    text-align: center;
}

.partners-title {
    margin-bottom: 28px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.partners-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-item img {
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.partner-item img:hover {
    transform: translateY(-2px);
}

/* Individual proportional sizing & desktop spacing adjustments */
.partner-item img[src*="pln_long"] {
    height: 100px;
    max-width: 280px;
}

/* Pulls PLN Icon Plus closer to PLN */
.partner-item:has(img[src*="pln_long"]) {
    margin-right: -16px;
}

.partner-item img[src*="pln_plus"] {
    height: 80px;
    max-width: 240px;
}

.partner-item img[src*="bank_nagari"] {
    height: 70px;
    max-width: 240px;
}

/* Gives Bank Nagari a balanced gap from PLN Plus */
.partner-item:has(img[src*="bank_nagari"]) {
    margin-left: 12px;
}

@media (max-width: 767px) {
    .partners {
        padding-top: 36px;
        padding-bottom: 50px;
    }

    .partners-title {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .partners-container {
        gap: 10px 16px; /* Row and column gap */
    }

    /* Reset desktop horizontal pull on mobile */
    .partner-item:has(img[src*="pln_long"]),
    .partner-item:has(img[src*="bank_nagari"]) {
        margin-right: 0;
        margin-left: 0;
    }

    /* Top row: 2 PLN logos side-by-side with equal space */
    .partner-item {
        flex: 1 1 40%;
        max-width: 48%;
    }

    /* Bottom row: Bank Nagari centered taking full width with custom top margin */
    .partner-item:has(img[src*="bank_nagari"]),
    .partner-item:nth-child(3) {
        flex: 1 1 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        margin-top: -10px; /* Adjust this value to increase/decrease distance to PLN row */
    }

    /* Mobile sizes */
    .partner-item img[src*="pln_long"] {
        height: 90px;
        max-width: 100%;
    }

    .partner-item img[src*="pln_plus"] {
        height: 80px;
        max-width: 100%;
    }

    .partner-item img[src*="bank_nagari"] {
        height: 70px;
        max-width: 260px;
    }
}

/* ========================================
   CTA
   ======================================== */

.cta {
    position: relative;
    overflow: hidden;
    padding: 72px 20px 100px;
    text-align: center;
    background: var(--green-700);
    color: white;
}

.cta::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    top: -100px;
    left: -100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.cta h2 {
    position: relative;
    margin-bottom: 30px;
    font-size: clamp(26px, 7vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.cta button {
    position: relative;
    width: 100%;
    max-width: 420px;
    min-height: 58px;
    padding: 15px 25px;
    border: none;
    border-radius: 100px;
    background: var(--yellow);
    color: #172000;
    font-size: 16px;
    font-weight: 800;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.15);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.cta button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================
   WHATSAPP MODAL
   ======================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 16px;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(10, 20, 12, 0.55);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 30px 20px 20px;
    border-radius: 24px 24px 18px 18px;
    background: white;
    box-shadow:
        0 -10px 50px rgba(0, 0, 0, 0.2);
    animation: modal-up 0.25s ease-out;
}

@keyframes modal-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    margin-bottom: 5px;
    color: var(--green-950);
    font-size: 24px;
    font-weight: 800;
}

.modal-content > p {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 13px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f1f4f1;
    color: var(--text);
    font-size: 25px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.whatsapp-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.whatsapp-contacts a {
    min-height: 54px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #25d366;
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.15s ease;
}

.whatsapp-contacts a:active {
    transform: scale(0.98);
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.contact-info strong {
    font-size: 15px;
    font-weight: 700;
}

.contact-info span {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    padding: 24px 20px;
    text-align: center;
    background: #052b11;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* ========================================
   MOBILE
   ======================================== */

@media (max-width: 767px) {
    .brand img {
        height: 30px;
        max-width: 120px;
    }

    .tambua-image {
        max-width: 320px;
    }
}

/* ========================================
   DESKTOP
   ======================================== */

@media (min-width: 768px) {
    .header-inner {
        min-height: 80px;
        padding-left: 30px;
        padding-right: 30px;
    }

    .brand span {
        font-size: 21px;
    }

    .hero {
        min-height: 650px;
    }

    .hero-content {
        padding-top: 90px;
        padding-bottom: 100px;
    }

    .tambua-logo {
        width: 210px;
        height: 210px;
    }

    .tambua-logo span {
        font-size: 34px;
    }

    .section {
        padding: 100px 30px;
    }

    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .benefit {
        min-height: 220px;
    }

    .program-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .package-items {
        grid-template-columns: repeat(4, 1fr);
    }

    .cta {
        padding-top: 100px;
        padding-bottom: 120px;
    }

    .modal {
        align-items: center;
    }

    .modal-content {
        border-radius: 24px;
        padding: 35px;
    }
}

/* ========================================
   FLOATING CONTACT BUTTON
   ======================================== */

.floating-contact {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px;
    border: none;
    border-radius: 100px;
    background: #25d366;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow:
        0 8px 25px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.floating-contact:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 30px rgba(37, 211, 102, 0.4);
}

.floating-contact svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Hidden when already at the contact section */
.floating-contact.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 767px) {
    .floating-contact {
        right: 20px;
        bottom: 24px;
        padding: 12px 17px;
        font-size: 13px;
    }

    .floating-contact svg {
        width: 19px;
        height: 19px;
    }
}

/* ========================================
   DASHBOARD TOP STYLES
   ======================================== */

.header-title {
    font-size: clamp(16px, 3.5vw, 24px);
    font-weight: 800;
    color: #1a73e8;
    text-align: center;
    letter-spacing: -0.5px;
}

.dashboard-section {
    background: #f8faf9;
    padding: 30px 20px 40px;
    border-bottom: 1px solid var(--border);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* KPI Scorecard Banner */
.kpi-banner {
    background: #ffffff;
    border: 1.5px solid #6ba3e8;
    border-radius: 16px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 200px;
}

.kpi-icon svg {
    width: 44px;
    height: 44px;
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 13px;
    font-weight: 800;
    color: #1a73e8;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 800;
    color: #2b3b4c;
}

.kpi-divider {
    width: 1px;
    height: 45px;
    background: #e2e8f0;
}

/* 2x2 Dashboard Chart Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 860px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.chart-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.chart-header h3 {
    font-size: 13px;
    font-weight: 800;
    color: #5f6368;
    text-align: center;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.map-box {
    width: 100%;
    height: 280px;
    border-radius: 10px;
    z-index: 10;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
}

.donut-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 767px) {
    .kpi-divider {
        display: none;
    }
    .kpi-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }
}

/* ========================================
   LARGE DESKTOP
   ======================================== */

@media (min-width: 1100px) {
    .hero-content {
        padding-top: 110px;
        padding-bottom: 120px;
    }

    .benefits-grid {
        gap: 20px;
    }

    .benefit {
        padding: 30px;
    }
}

/* ========================================
   DESKTOP SPACING OVERRIDES
   ======================================== */

@media (min-width: 768px) {
    .package {
        padding-bottom: 32px;
    }

    .partners {
        padding-top: 40px;
        padding-bottom: 50px;
    }
}