/* Override terakhir kolase hero ponsel agar bentuknya mengikuti desktop. */
.footer-bottom {
    display: none;
}

@media (max-width: 700px) {
    .hero-image-area {
        display: flex;
        justify-content: center;
        width: 100%;
        overflow: visible;
    }

    .hero-photo-collage {
        position: relative;
        display: block;
        width: min(360px, calc(100vw - 32px));
        max-width: 360px;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
        animation: float 12s ease-in-out infinite;
    }

    .hero-photo-collage::before,
    .hero-photo-collage::after {
        display: none;
    }

    .hero-photo-collage .hero-photo {
        position: absolute;
        inset: auto;
        height: auto;
        border: 5px solid #fff;
        border-radius: 18px;
        box-shadow: 0 14px 28px rgba(15, 81, 50, 0.18);
        transform: none;
        overflow: hidden;
    }

    .hero-photo-collage .hero-photo-top {
        top: 0;
        left: 25%;
        width: 54%;
        aspect-ratio: 2.05 / 1;
        z-index: 2;
    }

    .hero-photo-collage .hero-photo-left {
        top: 22%;
        left: 3%;
        width: 49%;
        aspect-ratio: 1 / 1.05;
        z-index: 3;
    }

    .hero-photo-collage .hero-photo-main {
        top: 22%;
        right: 3%;
        left: auto;
        width: 49%;
        aspect-ratio: 0.88 / 1;
        z-index: 1;
    }

    .hero-photo-collage .hero-photo-bottom {
        top: 69%;
        bottom: auto;
        left: 22%;
        width: 42%;
        aspect-ratio: 1.7 / 1;
        z-index: 5;
    }

    .hero-photo-collage .hero-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Nomor dan judul kartu Syarat sejajar serta tetap rapi saat membungkus. */
@media (max-width: 700px) {
    .syarat-wrapper .syarat-card h2 {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        min-width: 0;
        margin: 0 0 14px;
        padding-bottom: 12px;
        font-size: 16px;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .syarat-wrapper .syarat-card h2::before {
        width: 38px;
        height: 38px;
        min-width: 38px;
        margin: 0;
        border-radius: 10px;
        font-size: 11px;
        line-height: 1;
        align-self: center;
    }
}

@media (max-width: 400px) {
    .syarat-wrapper .syarat-card h2 {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        font-size: 15px;
    }

    .syarat-wrapper .syarat-card h2::before {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 10px;
    }
}

/* Teks CTA Informasi dan Syarat dipusatkan pada tampilan mobile. */
@media (max-width: 700px) {
    .cta-modern,
    .syarat-note {
        text-align: center;
    }

    .cta-modern h2,
    .cta-modern p,
    .syarat-note h2,
    .syarat-note p {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .cta-actions,
    .syarat-note-actions {
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* Menu mobile: bentuk lebih tegas dan warna hijau konsisten dengan website. */
@media (max-width: 1020px) {
    .navbar.main-navbar .nav-links {
        width: min(330px, 86vw);
        padding: 20px 18px 22px;
        gap: 6px;
        border: 1px solid rgba(6, 78, 59, 0.12);
        border-right: 0;
        border-top-left-radius: 16px;
        border-bottom-left-radius: 16px;
        background: linear-gradient(180deg, #ecfdf5 0, #f7fff9 150px, #ffffff 290px);
        box-shadow: -18px 0 44px rgba(6, 78, 59, 0.20);
    }

    .navbar.main-navbar .nav-links-header {
        padding: 4px 4px 16px;
        border-bottom-color: rgba(6, 78, 59, 0.12);
    }

    .navbar.main-navbar .nav-links-header-text img {
        border-radius: 8px;
    }

    .navbar.main-navbar .nav-links-close {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 10px;
        background: #dff5e8;
        color: #064e3b;
    }

    .navbar.main-navbar .nav-links-close:hover {
        background: #c8ecd7;
    }

    .navbar.main-navbar .nav-links > a {
        min-height: 48px;
        padding: 12px 14px;
        border-radius: 10px;
        color: #064e3b;
    }

    .navbar.main-navbar .nav-links > a i {
        color: #0f766e;
    }

    .navbar.main-navbar .nav-links > a:not(.nav-login):hover {
        background: #e3f6ea;
    }

    .navbar.main-navbar .nav-links > a.active:not(.nav-login) {
        border-radius: 10px;
        background: #064e3b;
        color: #ffffff;
        box-shadow: 0 8px 18px rgba(6, 78, 59, 0.16);
    }

    .navbar.main-navbar .nav-links > .nav-login {
        border-radius: 10px;
        background: #064e3b;
        box-shadow: 0 8px 18px rgba(6, 78, 59, 0.18);
    }

    .navbar.main-navbar .nav-links > .nav-login:hover {
        background: #0f766e;
        box-shadow: 0 10px 22px rgba(6, 78, 59, 0.22);
    }
}

/* Tipografi dan ukuran kotak seluruh halaman publik pada ponsel. */
@media (max-width: 700px) {
    .form-wrapper,
    .info-wrapper,
    .syarat-wrapper,
    .login-page {
        padding-top: 26px;
        padding-bottom: 40px;
    }

    .form-container,
    .content-container,
    .page-container,
    .info-wrapper .page-hero,
    .cta-modern,
    .syarat-note,
    .login-container {
        width: calc(100% - 24px);
        max-width: none;
        min-width: 0;
    }

    .form-wrapper .section-heading,
    .info-wrapper .section-heading,
    .syarat-wrapper .section-heading,
    .info-wrapper .page-hero {
        padding: 22px 16px 24px;
        border-radius: 18px;
    }

    .form-wrapper .section-heading h2,
    .info-wrapper .section-heading h2,
    .syarat-wrapper .section-heading h2,
    .info-wrapper .page-hero h1 {
        max-width: 100%;
        margin-bottom: 12px;
        font-size: clamp(23px, 7vw, 29px);
        line-height: 1.18;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .form-wrapper .section-heading p,
    .info-wrapper .section-heading p,
    .syarat-wrapper .section-heading p,
    .info-wrapper .page-hero p {
        max-width: 100%;
        font-size: 13px;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .form-wrapper .section-heading .mini-label,
    .info-wrapper .section-heading .mini-label,
    .syarat-wrapper .section-heading .mini-label,
    .info-wrapper .page-badge {
        max-width: 100%;
        padding: 7px 11px;
        font-size: 11px;
        white-space: normal;
        text-align: left;
    }

    .form-card,
    .form-shell,
    .info-card,
    .activity-card,
    .login-card {
        min-width: 0;
        padding: 16px;
        border-radius: 16px;
    }

    .info-card-content,
    .syarat-card-content {
        min-width: 0;
        padding: 17px 16px 19px;
    }

    .section-head {
        padding: 14px;
    }

    .section-head h2,
    .info-card h2,
    .syarat-card h2,
    .login-card h2 {
        min-width: 0;
        font-size: 18px;
        line-height: 1.3;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .section-head p,
    .info-desc,
    .activity-card li,
    .syarat-card li,
    .login-card .login-subtitle,
    .role-item small {
        font-size: 12.5px;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .activity-card-head {
        gap: 9px;
        align-items: flex-start;
    }

    .activity-card h3,
    .activity-card-head h3,
    .syarat-card h3 {
        min-width: 0;
        font-size: 16px;
        line-height: 1.35;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .activity-number,
    .syarat-card h2::before {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 10px;
        font-size: 12px;
    }

    .info-row {
        align-items: flex-start;
        gap: 10px;
        padding: 11px 0;
        font-size: 12.5px;
    }

    .info-row span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .cta-modern,
    .syarat-note {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .cta-modern h2,
    .syarat-note h2,
    .login-intro h1 {
        max-width: 100%;
        font-size: clamp(25px, 7.5vw, 31px);
        line-height: 1.18;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .cta-modern p,
    .syarat-note p,
    .login-intro p {
        font-size: 13px;
        line-height: 1.65;
    }

    .cta-actions,
    .syarat-note-actions,
    .form-actions {
        gap: 10px;
    }

    .cta-btn,
    .btn-modern,
    .syarat-note-actions .btn,
    .form-actions .btn,
    .login-button {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 10px 14px;
        border-radius: 12px;
        font-size: 13px;
        line-height: 1.3;
        white-space: normal;
        text-align: center;
    }

    .role-item {
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }

    .role-item strong {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .form-wrapper .section-heading h2,
    .info-wrapper .section-heading h2,
    .syarat-wrapper .section-heading h2,
    .info-wrapper .page-hero h1 {
        font-size: 22px;
    }

    .form-card,
    .form-shell,
    .info-card,
    .activity-card,
    .login-card {
        padding: 14px;
    }
}

/* Nomor dan judul kartu kegiatan sejajar tepat pada satu baris. */
@media (max-width: 700px) {
    .activity-card-head {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
    }

    .activity-card-head .activity-number {
        width: 38px;
        height: 38px;
        min-width: 38px;
        margin: 0;
        border-radius: 10px;
        font-size: 12px;
        line-height: 1;
        flex: none;
    }

    .activity-card-head h3,
    .activity-card h3 {
        align-self: center;
        min-width: 0;
        margin: 0;
        font-size: 16px;
        line-height: 1.25;
    }
}

/* Kartu alur Beranda mobile: nomor sejajar dengan judul dan isi lebih ringkas. */
@media (max-width: 700px) {
    .steps-grid {
        gap: 12px;
    }

    .step-card {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: center;
        column-gap: 11px;
        row-gap: 10px;
        min-height: 0;
        padding: 16px;
        border-radius: 16px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        min-width: 36px;
        margin: 0;
        border-radius: 10px;
        font-size: 13px;
        grid-column: 1;
        grid-row: 1;
    }

    .step-card h3 {
        min-width: 0;
        margin: 0;
        font-size: 16px;
        line-height: 1.3;
        white-space: normal;
        overflow-wrap: anywhere;
        grid-column: 2;
        grid-row: 1;
    }

    .step-card p {
        margin: 0;
        font-size: 12.5px;
        line-height: 1.6;
        overflow-wrap: anywhere;
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 400px) {
    .step-card {
        grid-template-columns: 33px minmax(0, 1fr);
        padding: 14px;
    }

    .step-number {
        width: 33px;
        height: 33px;
        min-width: 33px;
        font-size: 12px;
    }

    .step-card h3 {
        font-size: 15px;
    }

    .step-card p {
        font-size: 12px;
    }
}

/* Scrollbar mobile tipis; tampil sebagai overlay pada browser yang mendukung. */
@media (max-width: 768px) {
    html {
        overflow-y: scroll;
        scrollbar-width: thin;
        scrollbar-color: #9ca3af #f1f5f9;
    }

    body {
        min-height: 100%;
        overflow-y: visible;
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        display: block;
        width: 6px;
    }

    html::-webkit-scrollbar-track,
    body::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb {
        min-height: 38px;
        border: 1px solid #f1f5f9;
        border-radius: 999px;
        background: #9ca3af;
    }

    html::-webkit-scrollbar-thumb:active,
    body::-webkit-scrollbar-thumb:active {
        background: #6b7280;
    }
}

/* Footer seluruh halaman dipusatkan dan diseimbangkan pada mobile. */
@media (max-width: 768px) {
    .footer-modern,
    .footer-modern.reveal {
        padding: 42px 20px 22px;
        text-align: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
        justify-items: center;
    }

    .footer-container > div:nth-child(1),
    .footer-container > div:nth-child(2),
    .footer-container > div:nth-child(3) {
        justify-self: center;
        width: 100%;
        max-width: 390px;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
    }

    .footer-brand img {
        width: 54px;
        height: 54px;
        min-width: 54px;
        margin: 0 auto;
        border-radius: 12px;
    }

    .footer-brand-text {
        width: 100%;
        text-align: center;
    }

    .footer-brand-text h3 {
        max-width: 340px;
        margin: 0 auto 12px;
        font-size: 19px;
        line-height: 1.35;
        text-align: center;
    }

    .footer-brand-text p {
        max-width: 350px;
        margin: 0 auto;
        font-size: 13.5px;
        line-height: 1.7;
        text-align: center;
    }

    .footer-title,
    .footer-container > div:nth-child(3) .footer-title,
    .footer-container > div:nth-child(3) .footer-social-text {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .footer-title {
        margin-bottom: 15px;
        font-size: 18px;
    }

    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .footer-contact li {
        width: 100%;
        margin-bottom: 11px;
        text-align: center;
    }

    .footer-contact a,
    .footer-contact span,
    .footer-social-text {
        display: inline-block;
        max-width: 100%;
        font-size: 13.5px;
        line-height: 1.65;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .footer-social-text {
        max-width: 330px;
        margin: 0 auto 17px;
    }

    .footer-social {
        justify-content: center;
        gap: 12px;
        margin: 0 auto;
    }

    .footer-social a {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .footer-bottom {
        max-width: 430px;
        margin: 34px auto 0;
        padding-top: 20px;
        text-align: center;
    }

    .footer-bottom p {
        width: 100%;
        font-size: 12.5px;
        line-height: 1.6;
        text-align: center;
    }
}

/* Animasi kolase dibuat identik dan tetap aktif pada desktop maupun mobile. */
.hero-photo-collage {
    animation: float 12s ease-in-out infinite;
}

/* Kartu informasi kontak dibuat lebih lega dan rapi pada layar sempit. */
@media (max-width: 700px) {
    .info-two-column .info-card:has(.contact-list) {
        padding: 0;
        overflow: hidden;
    }

    .info-card:has(.contact-list) .info-card-content {
        width: 100%;
        padding: 20px 16px;
    }

    .info-card:has(.contact-list) h2 {
        margin-bottom: 16px;
        font-size: 20px;
        line-height: 1.25;
    }

    .contact-list {
        width: 100%;
        gap: 10px;
    }

    .contact-line {
        width: 100%;
        min-width: 0;
        gap: 10px;
        padding: 11px;
        border-radius: 14px;
        font-size: 13px;
        line-height: 1.5;
    }

    .contact-line > div:last-child {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 10px;
        font-size: 15px;
    }

    .contact-line strong,
    .contact-line a,
    .contact-line span {
        font-size: 13px;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Form pendaftaran mobile memakai komponen yang sama dengan desktop,
   hanya grid-nya diubah menjadi satu kolom. */
@media (max-width: 700px) {
    .form-card {
        padding: 16px;
        background: #ffffff;
        border: 1px solid rgba(6, 78, 59, 0.10);
        border-radius: 18px;
    }

    .form-section {
        margin-bottom: 22px;
        padding-bottom: 22px;
    }

    .form-grid,
    .document-grid,
    .upload-payment-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-grid .form-group,
    .form-grid .form-group.full,
    .document-box {
        grid-column: 1;
        width: 100%;
        min-width: 0;
    }

    .form-group label,
    .document-box label {
        display: block;
        margin-bottom: 7px;
        font-size: 13px;
        line-height: 1.45;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .form-card input,
    .form-card select,
    .form-card textarea,
    .custom-select-trigger,
    .custom-date-trigger {
        width: 100%;
        min-height: 48px;
        padding: 11px 12px;
        border: 1px solid #dbe7df;
        border-radius: 12px;
        background: #ffffff;
        font-size: 16px;
    }

    .form-card textarea,
    .form-card .textarea-small {
        height: auto;
        min-height: 84px;
        resize: vertical;
    }

    .form-help,
    .error-text {
        font-size: 11.5px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .document-upload-card {
        padding: 16px;
        border-radius: 16px;
    }

    .document-upload-card h3 {
        font-size: 19px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .document-upload-card .card-desc {
        font-size: 12.5px;
        line-height: 1.6;
    }

    .upload-format-note {
        display: flex;
        width: 100%;
        margin: 8px 0 16px;
        padding: 9px 11px;
        border-radius: 10px;
        font-size: 11.5px;
        line-height: 1.45;
        white-space: normal;
    }

    .document-box {
        min-height: 0;
        padding: 14px;
        border-radius: 14px;
    }

    .custom-file-trigger {
        width: 100%;
        min-width: 0;
        padding: 12px;
        border-radius: 12px;
    }

    .custom-file-text,
    .custom-file-text strong,
    .custom-file-text small {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .custom-select-menu,
    .custom-date-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        margin-top: 22px;
        padding-top: 20px;
    }
}

/* Pola titik hero dipadatkan ke pojok agar tidak mengenai teks mobile. */
@media (max-width: 700px) {
    .hero-modern::before,
    .login-page::before {
        top: 14px;
        right: 10px;
        width: 76px;
        height: 76px;
        background-size: 13px 13px;
        opacity: 0.24;
        animation: none;
    }
}

@media (max-width: 400px) {
    .hero-modern::before,
    .login-page::before {
        top: 10px;
        right: 6px;
        width: 62px;
        height: 62px;
        background-size: 12px 12px;
        opacity: 0.20;
    }
}
