/* ============================================
   BASE STYLE
============================================ */
* {
    font-family: 'Segoe UI', sans-serif;
}

.card-title,
.card-text,
.form-label,
.form-control,
.btn,
button,
input {
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('../images/gedung.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
}

/* ============================================
   FIX OVERFLOW DI LAYAR PENDEK
   (vh-100 + align-items-center sering motong card)
============================================ */
.container.vh-100 {
    height: auto !important;               /* biar bisa tumbuh kalau konten tinggi */
    min-height: 100vh;
    min-height: 100dvh;                    /* dukungan dynamic viewport */
    padding-top: 20px;
    padding-bottom: 20px;
}

.row.h-100 {
    height: auto !important;
    min-height: calc(100vh - 40px);
    min-height: calc(100dvh - 40px);
}

/* ============================================
   CARD & FORM
============================================ */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.card-body {
    padding: 1.5rem !important;
}

.card-title {
    font-size: 1.5rem;
}

.card-text {
    font-size: 1rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-control {
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;          /* cegah auto-zoom iOS */
    height: auto;
    min-height: 44px;         /* target sentuh nyaman */
}

.form-control:focus {
    border-color: #188094;
    box-shadow: 0 0 0 0.2rem rgba(24, 128, 148, 0.25);
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
    min-width: 44px;
    min-height: 44px;
}

/* ============================================
   TOMBOL
============================================ */
.btn-primary {
    border-radius: 25px;
    padding: 10px 40px;
    font-size: 18px;
    font-weight: 500;
    background-color: #188094;
    border: 2px solid #188094;
    min-height: 44px;
}

.btn-primary:hover {
    background-color: #146b7a;
    border-color: #146b7a;
}

.btn-primary:active,
.btn-primary:focus {
    background-color: #105b68 !important;
    border-color: #105b68 !important;
    box-shadow: 0 0 0 0.2rem rgba(24, 128, 148, 0.25) !important;
}

/* ============================================
   TABLET (<= 992px)
============================================ */
@media (max-width: 992px) {
    .card {
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    }

    .btn-primary {
        padding: 9px 32px;
        font-size: 16px;
        border-radius: 22px;
    }

    .form-control {
        padding: 9px 13px;
        font-size: 16px;
    }
}

/* ============================================
   TABLET KECIL / HP BESAR (<= 768px)
============================================ */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;     /* lebih smooth di mobile */
    }

    .card {
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    .card-body {
        padding: 1.25rem !important;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-text {
        font-size: 0.95rem;
    }

    .btn-primary {
        width: 100%;
        padding: 11px 20px;
        font-size: 16px;
        border-radius: 22px;
    }

    /* Netralkan px-5 Bootstrap supaya tombol tidak mepet di HP */
    .btn-primary.px-5 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* ============================================
   HP KECIL (<= 576px)
============================================ */
@media (max-width: 576px) {
    .container.vh-100 {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .card {
        border-radius: 10px;
    }

    .card-body {
        padding: 1rem !important;
    }

    .card-title {
        font-size: 1.2rem !important;
    }

    .card-text {
        font-size: 0.9rem;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px;   /* tetap 16px agar iOS tidak zoom */
        border-radius: 6px;
    }

    .input-group .btn {
        padding: 8px 12px;
        border-radius: 0 6px 6px 0;
    }

    .btn-primary {
        padding: 11px 16px;
        font-size: 15px;
        border-radius: 20px;
    }
}

/* ============================================
   HP SANGAT KECIL (<= 400px)
============================================ */
@media (max-width: 400px) {
    .card-body {
        padding: 0.875rem !important;
    }

    .card-title {
        font-size: 1.05rem !important;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .form-label {
        font-size: 0.8rem;
    }

    .form-control {
        padding: 9px 10px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 10px 14px;
    }
}

/* ============================================
   HP LANDSCAPE / LAYAR PENDEK
============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .container.vh-100 {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .row.h-100 {
        min-height: calc(100vh - 20px);
        min-height: calc(100dvh - 20px);
    }

    .card-body {
        padding: 0.875rem !important;
    }

    .card-title {
        font-size: 1.1rem !important;
        margin-bottom: 6px !important;
    }

    .form-label {
        margin-bottom: 2px;
    }

    .mb-3 {
        margin-bottom: 0.6rem !important;
    }
}

/* ============================================
   LAYAR BESAR (>= 1400px)
============================================ */
@media (min-width: 1400px) {
    .card-body {
        padding: 2rem !important;
    }

    .card-title {
        font-size: 1.75rem !important;
    }

    .card-text {
        font-size: 1.05rem;
    }

    .btn-primary {
        padding: 12px 50px;
        font-size: 19px;
        border-radius: 30px;
    }

    .form-control {
        padding: 12px 18px;
        font-size: 16px;
        border-radius: 10px;
    }

    .form-label {
        font-size: 1rem;
    }
}

/* ============================================
   AKSESIBILITAS
============================================ */
.btn-primary:focus-visible,
.form-control:focus-visible {
    outline: 2px solid #188094;
    outline-offset: 2px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #1a1a1a !important;
    }

    .card-title { color: #e0e0e0 !important; }
    .card-text  { color: #b0b0b0 !important; }
    .form-label { color: #d0d0d0 !important; }

    .form-control {
        background-color: #2a2a2a !important;
        border-color: #444 !important;
        color: #e0e0e0 !important;
    }

    .form-control::placeholder { color: #888 !important; }

    .input-group .btn {
        background-color: #2a2a2a !important;
        border-color: #444 !important;
        color: #e0e0e0 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}