/* ===== SECTION ===== */
#download {
    background: var(--gray-50);
    position: relative;
    overflow: hidden;
    padding: 6rem 0 0;
}
#download::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(
        90deg,
        var(--primary-brown),
        var(--accent-color),
        var(--primary-brown)
    );
}

/* Equal height */
.equal-row {
    align-items: stretch;
}
.col-lg-5.d-flex,
.col-lg-7.d-flex {
    align-items: stretch;
}
.flex-fill {
    flex: 1 1 auto;
}

/* Illustration Card */
.illustration-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 85%;
    position: relative;
    overflow: hidden;
}
.illustration-image {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 280px;
}
#brochureImage {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
#brochureImage:hover {
    transform: scale(1.03);
}

/* Brochure Card */
.brochure-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-deep);
    padding: 3rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 85%;
}
.brochure-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-brown),
        var(--accent-color)
    );
}
.brochure-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

/* Header form */
.form-header {
    text-align: left;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}
.form-title {
    color: var(--primary-brown);
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}
.form-title i {
    color: var(--accent-color);
}
.form-subtitle {
    color: var(--gray-500);
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Border field selalu terlihat ===== */
#download input.form-control,
#download textarea.form-control {
    background: #fff !important;
    border: 2px solid var(--primary-brown) !important;
    color: var(--gray-800);
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

/* Floating layout */
.form-group.floating {
    position: relative;
}
.form-group.floating .form-control {
    display: block;
    width: 100%;
    height: 60px;
    padding: 1.25rem 1rem 0;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
        background-color 0.2s ease;
}

/* Hover & Focus */
.form-group.floating .form-control:hover {
    border-color: var(--gray-500) !important;
}
.form-group.floating .form-control:focus {
    border-color: var(--primary-brown) !important;
    box-shadow: 0 0 0 4px rgba(44, 95, 45, 0.12);
}

/* Placeholder transparan untuk floating */
.form-group.floating .form-control::placeholder {
    color: transparent;
}

/* Label mengambang */
.form-group.floating .form-label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--gray-600);
    pointer-events: none;
    padding: 0 0.25rem;
    background: linear-gradient(
        180deg,
        transparent 0,
        #fff 35%,
        #fff 65%,
        transparent 100%
    );
    transition: all 0.15s ease-in-out;
}

.form-group.floating .form-control:focus + .form-label,
.form-group.floating .form-control:not(:placeholder-shown) + .form-label {
    top: 0.6rem;
    transform: none;
    left: 1rem;
    font-size: 0.8rem;
    color: var(--primary-brown);
    font-weight: 600;
}

/* Invalid state */
.form-group.floating .form-control.is-invalid,
.form-group.floating .form-control:invalid:focus {
    border-color: #d64545 !important;
    box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12);
}

/* Hint */
.form-hint {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    display: block;
}

/* Consent */
.consent-box {
    background: var(--light-brown);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
}
.consent-box:has(input:checked) {
    border-color: var(--primary-brown);
    background: rgba(44, 95, 45, 0.1);
}
.consent-box .form-check-input {
    flex-shrink: 0;
    margin-top: 0.1rem;
    margin-right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
}
.consent-box .form-check-input:checked {
    background-color: var(--primary-brown);
    border-color: var(--primary-brown);
}
.consent-box .form-check-label {
    color: var(--gray-700);
    font-weight: 500;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* Actions */
.form-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.btn-action {
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status */
.status-message.success {
    background: #e6f5e8;
    border: 1px solid #b3dbc1;
    color: #2c5f2d;
}
.status-message.error {
    background: #f8e5e5;
    border: 1px solid #e1b4b4;
    color: #a04040;
}

/* Header */
.section-header .icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(
        135deg,
        var(--primary-brown),
        var(--accent-color)
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(44, 95, 45, 0.4);
}
.section-header .icon-wrapper i {
    font-size: 1.8rem;
    color: #fff;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-700);
}
.highlight-text {
    color: var(--primary-brown);
}

/* ====== WA inline (kode negara + nomor WA berdampingan) ====== */
.wa-inline {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}
.wa-inline .form-select {
    width: 140px;
    flex: 0 0 140px;
    height: 60px;
    border: 2px solid var(--primary-brown) !important;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
    background: #fff;
    padding: 0 0.75rem;
}
.wa-inline .form-control {
    flex: 1 1 auto;
    height: 60px;
    border: 2px solid var(--primary-brown) !important;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
    background: #fff;
    padding-top: 0.75rem; /* agar teks lebih tengah */
}

/* Pastikan wrapper input WA lokal mengambil seluruh sisa ruang */
.wa-inline .wa-local-input-wrapper {
    flex: 1 1 auto; /* Ini akan membuat wrapper ini mengisi sisa ruang */
    position: relative; /* Penting untuk floating label di dalamnya */
    margin: 0; /* Pastikan tidak ada margin tambahan */
    padding: 0; /* Pastikan tidak ada padding tambahan */
}

/* Pastikan input di dalamnya mengikuti lebar wrapper-nya */
.wa-local-input-wrapper .form-control {
    width: 100%;
    /* Aturan height, border, padding, dll. sudah ada di .form-group.floating .form-control */
}

/* Fokus */
.wa-inline .form-select:focus,
.wa-inline .form-control:focus {
    border-color: var(--primary-brown) !important;
    box-shadow: 0 0 0 4px rgba(44, 95, 45, 0.12);
}

/* Floating label khusus grup WA */
.form-group.floating.wa-combined-floating {
    --wa-select-w: 140px;
    --wa-gap: 0.5rem;
    position: relative;
}

.form-group.floating .form-control:focus + .form-label,
.form-group.floating .form-control:not(:placeholder-shown) + .form-label {
    top: 0.6rem; /* Posisikan ke atas */
    transform: none;
    font-size: 0.8rem;
    color: var(--primary-brown);
    font-weight: 600;
    left: 1rem; /* Biarkan 1rem, yang mana kini akan berada di atas input #waLocal */
}

/* Select default style di dalam section */
#download .form-select {
    height: 60px;
    border: 2px solid var(--primary-brown) !important;
    border-radius: var(--radius-md);
    background-color: #fff;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
    padding: 0 0.75rem;
}
#download .form-select:focus {
    border-color: var(--primary-brown) !important;
    box-shadow: 0 0 0 4px rgba(44, 95, 45, 0.12);
}

/* Responsif */
@media (max-width: 991.98px) {
    #download {
        padding: 4rem 0 0;
    }
    .brochure-card {
        padding: 2rem;
    }
}
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    .brochure-card {
        padding: 1.5rem;
        margin: 0;
    }
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    .illustration-image {
        min-height: 220px;
    }
}
@media (max-width: 480px) {
    .wa-inline {
        flex-direction: column;
    }
    .wa-inline .form-select {
        width: 100%;
        flex: 0 0 auto;
    }
}

/* Bonus animasi halus utk gambar */
@keyframes float-illustration {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.01);
    }
}
