/* style.css */

/* Variabel CSS untuk kemudahan pengelolaan warna dan font */
:root {
    --primary-blue: #4564FF;
    --text-color-dark: #333;
    /* Untuk teks umum, termasuk logo header */
    --text-color-light: #666;
    --background-color: #FFF;
    /* Background utama halaman, akan terlihat di header */
    --card-background: #FBFBFB;
    --card-background-end-gradient: #F4F4F4;
    /* REVISI: Tambah variabel untuk gradient stop color */
    --border-color-input: #EFEFEF;
    --footer-bg-dark: #1A1A1A;
    --footer-text-light: #CCCCCC;
    --footer-text-link: #FFFFFF;
    --footer-text-bottom: #999;

    --button-secondary-border-color: #FFFFFF;
    /* Border putih untuk Daftar */
    --button-secondary-text-color: #4564FF;
    /* Teks #4564FF untuk Daftar */
}

/* Reset CSS dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    padding: 0;
    width: 96px;
    height: 35px;
    border: none;
    border-radius: 29px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background-color: #3650D8;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    padding: 0;
    width: 96px;
    height: 35px;
    border: 1.5px solid var(--button-secondary-border-color);
    color: var(--button-secondary-text-color);
    border-radius: 29px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--button-secondary-text-color);
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    /* Default mobile padding */
    background-color: transparent;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo-icon {
    width: 30px;
    height: 33px;
    margin-right: 10px;
}

.header-logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color-dark);
}

.header-nav {
    display: flex;
    gap: 6px;
}

/* Login/Register Container */
.login-container {
    /* Digunakan untuk kedua halaman login dan register */
    min-height: 50vh;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: var(--background-color);
    /* Sama dengan body background */
}

/* Base style untuk Card Login & Register */
.login-card,
.register-card {
    background: linear-gradient(180deg, var(--card-background) 0%, var(--card-background-end-gradient) 100%);
    /* Gradient baru */
    border-radius: 28px;
    /* Border radius baru */
    box-shadow:
        inset 0px 2px 3.1px rgba(255, 255, 255, 0.72),
        inset 0px -2px 1px rgba(0, 0, 0, 0.25),
        0px 4px 4px rgba(0, 0, 0, 0.05),
        0px 4px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    height: auto;
    /* Penting: Tinggi menyesuaikan konten */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Konten dimulai dari atas */
    align-items: center;
    box-sizing: content-box;
    padding: 30px 20px;
    /* Default padding mobile, akan disesuaikan di media query */
    width: 362px;
    /* Default width mobile */
}

.form-logo {
    width: 56px;
    height: 61px;
    margin-bottom: 20px;
}

.welcome-text {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-color-dark);
}

.signup-prompt {
    font-size: 14px;
    color: var(--text-color-light);
    margin-bottom: 25px;
}

.signup-link {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Form inputs (untuk login dan register) */
.login-form,
.register-form {
    width: 100%;
    /* Agar input bisa mengambil lebar penuh */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center form elements */
}

.login-form .form-group,
.register-form .form-group {
    margin-bottom: 10px;
    /* Lebih rapat antar input */
    width: 256px;
    /* Ukuran input mobile */
}

.login-form input[type="number"],
.register-form input[type="number"],
.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="tel"],
.register-form input[type="date"],
.register-form select {
    width: 100%;
    height: 45px;
    padding: 12px 15px;
    border: 1px solid var(--border-color-input);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-color-dark);
    outline: none;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
}

.login-form input[type="text"]:focus,
.register-form input[type="text"]:focus,
.register-form input[type="email"]:focus,
.register-form input[type="tel"]:focus,
.register-form input[type="date"]:focus,
.register-form select:focus {
    border-color: var(--primary-blue);
}

/* Style untuk dropdown select */
.select-group {
    position: relative;
    /* Untuk memposisikan ikon panah */
}

.select-group select {
    padding-right: 35px;
    /* Beri ruang untuk ikon panah */
}

.select-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-dark);
    font-size: 14px;
    pointer-events: none;
    /* Agar klik tetap melewati ikon ke select */
}

/* KHUSUS UNTUK TOMBOL LOGIN */
.login-button {
    width: 256px;
    /* Lebar tombol login di mobile */
    height: 45px;
    border-radius: 8px;
    margin-top: 20px;
    /* Jarak dari input terakhir */
}

/* KHUSUS UNTUK TOMBOL REGISTER (Daftar Akun) */
.register-button {
    width: 256px;
    /* Lebar tombol register di mobile */
    height: 45px;
    border-radius: 8px;
    font-size: 14px;
    /* Font size dari .btn-primary */
    font-weight: 700;
    /* Font weight dari .btn-primary */
    margin-top: 20px;
    /* Jarak dari input terakhir */
}

.copyright-card {
    font-size: 12px;
    color: var(--text-color-light);
    margin-top: 20px;
    /* Kurangi jarak copyright di mobile jika perlu */
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg-dark);
    color: var(--footer-text-light);
    padding: 40px 20px 20px;
    /* Default for mobile, will adjust desktop */
    font-size: 14px;
    display: flex;
    /* Make footer a flex container */
    flex-direction: column;
    /* Stack its children (content and bottom) vertically */
    justify-content: center;
    /* Center content vertically if space allows */
    align-items: center;
    /* Center content horizontally within full width */
}

.footer-content {
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* Allows wrapping on smaller screens */
    /* align-items: flex-start; */
    /* Align items to the top */
    max-width: 1200px;
    /* Max width for content columns */
    width: 100%;
    /* Take full width within its parent's padding/max-width */
    margin: 0 auto;
    /* Center the content columns */
    gap: 40px;
    /* Default gap for mobile */
    margin-bottom: 40px;
    /* Space between columns and bottom section */
}

.footer-column {
    /* Untuk mobile, semua kolom akan stack. Di desktop, kita akan kontrol mereka */
    flex-grow: 1;
    flex-shrink: 1;
    /* flex-basis: 250px; */
    /* Default for mobile (grow, shrink, basis auto) */
    /* min-width: 150px; */
    /* Ensures columns are not too small on smaller screens before stacking */
    /* margin-bottom: 20px; */
    /* Margin for stacked columns on mobile */
}

/* REVISI: Hapus bullet points dari daftar di footer */
.footer-column > ul {
    list-style: none;
    /* Menghilangkan bullet points */
    padding-left: 0;
    /* Pastikan tidak ada padding default dari ul */
}

.footer-column ul li {
    margin-bottom: 8px;
}

/* REVISI: Warna teks link di footer menjadi putih */
.footer-column ul li a {
    color: var(--footer-text-link);
    /* Menggunakan variabel yang sudah ada (FFFFFF) */
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #F8F8F8;
    /* Sedikit lebih terang saat hover */
    text-decoration: underline;
    /* Tetap ada underline saat hover */
}


/* Footer Bottom */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    /* Allows wrapping on smaller screens */
    justify-content: space-between;
    /* Pushes copyright left, links middle, back-to-top right */
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    /* Max width for bottom section */
    width: 100%;
    /* Take full width within its parent's padding/max-width */
    margin-left: auto;
    margin-right: auto;
    color: var(--footer-text-bottom);
    /* Warna teks untuk bagian bottom */
}

.footer-bottom .footer-copyright {
    flex: 1;
    /* Memberi ruang untuk copyright */
    text-align: left;
    /* Pastikan rata kiri */
    min-width: 180px;
    /* Agar tidak terlalu kecil di tablet */
}

.footer-bottom .footer-links-bottom {
    color: var(--footer-text-bottom);
    transition: color 0.3s ease;
    font-size: 13px;
}

.footer-bottom .footer-links-bottom a {
    color: var(--footer-text-bottom);
    transition: color 0.3s ease;
    font-size: 13px;
}

.footer-bottom .back-to-top {
    color: var(--footer-text-bottom);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    flex: 1;
    /* Memberi ruang untuk back-to-top */
    justify-content: flex-end;
    /* Mendorong ke kanan */
    min-width: 150px;
    /* Agar tidak terlalu kecil di tablet */
}


/* Responsivitas - Mobile-First Approach */

/* Mobile: Default styles (max-width: 767px) */
@media (max-width: 767px) {
    .header-logo-text {
        display: none;
    }

    .main-header {
        padding: 10px 15px;
    }

    .header-logo-icon {
        margin-right: 0;
    }

    .header-nav {
        gap: 6px;
    }

    .login-card,
    .register-card {
        width: 362px;
        /* Ukuran card mobile */
        padding: 30px 20px;
        /* Padding card mobile */
    }

    .login-form .form-group,
    .register-form .form-group {
        width: 256px;
        /* Ukuran input mobile */
        margin-bottom: 10px;
    }

    .login-button,
    .register-button {
        width: 256px;
        /* Lebar tombol di mobile */
        margin-top: 20px;
    }

    .copyright-card {
        margin-top: 20px;
    }

    /* Footer mobile */
    .main-footer {
        padding: 20px 15px;
        /* Adjust padding for mobile footer */
    }

    .footer-content {
        /* flex-direction: column; */
        /* gap: 20px; */
        max-width: 400px;
        margin-bottom: 20px;
        /* Smaller margin for mobile */
    }

    .footer-column {
        min-width: unset;
        margin-bottom: 0;
    }

    /* REVISI: Sembunyikan kolom 'Company' di mobile (jika ada di HTML) */
    .footer-column.company-column {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        /* Stack items vertically */
        align-items: flex-start;
        /* Align to the left */
        padding-top: 15px;
        /* Smaller padding for mobile */
        justify-content: flex-start;
        /* Untuk mobile, rata kiri */
    }

    .footer-bottom .footer-links-bottom {
        flex-direction: column;
        gap: 5px;
        margin-top: 10px;
        justify-content: flex-start;
        /* Rata kiri di mobile */
    }

    .footer-bottom .back-to-top {
        margin-top: 15px;
        align-self: flex-start;
        justify-content: flex-start;
        /* Rata kiri di mobile */
    }

    .footer-copyright,
    .footer-links-bottom,
    .back-to-top {
        width: 100%;
        text-align: left;
    }
}


/* Tablet and Desktop (min-width: 768px) */
@media (min-width: 768px) {
    .main-header {
        background-color: transparent;
        padding: 20px 75px;
        max-width: 100%;
        margin: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-logo-text {
        display: block;
    }

    .header-logo-icon {
        margin-right: 10px;
    }

    .login-card,
    .register-card {
        width: 432px;
        /* Ukuran card desktop */
        padding: 60px 50px;
        /* Padding card desktop */
    }

    .login-form .form-group,
    .register-form .form-group {
        width: 356px;
        /* Ukuran input desktop */
        margin-bottom: 15px;
        /* Jarak antar input di desktop */
    }

    .login-button,
    .register-button {
        width: 356px;
        /* Lebar tombol di desktop */
        margin-top: 30px;
        /* Jarak tombol dari input terakhir di desktop */
    }

    /* Footer desktop */
    .main-footer {
        padding: 40px 0;
        /* Adjust vertical padding, horizontal padding handled by children's max-width/margin */
        justify-content: flex-start;
        /* Align content to the top of the footer */
    }

    .footer-content {
        /* flex-direction: row; */
        /* Columns in a row */
        /* align-items: flex-start; */
        /* justify-content: space-between; */
        /* REVISI: Mulai kolom dari kiri */
        /* gap: 50px; */
        /* REVISI: Hapus gap di sini, kita akan gunakan margin */
        /* margin-bottom: 40px; */
        /* Space below columns */
    }

    .footer-column {
        flex-grow: 1;
        /* Mencegah kolom tumbuh */
        flex-shrink: 1;
        flex-basis: 250px;
        /* Mencegah kolom menyusut */
        min-width: 150px;
        /* Izinkan basis/lebar eksplisit */
        margin-bottom: 0 !important;
        margin-left: 0 o !important;
    }

    /* REVISI UTAMA: Set specific widths and margins for each of the 3 columns */
    .footer-column:nth-child(1) {
        /* Layanan */
        flex-basis: 200px;
        /* Lebar kolom Layanan (sesuaikan jika perlu) */
        /* margin-right: 80px; */
        /* Jarak antara Layanan dan Konseling */
    }

    .footer-column:nth-child(2) {
        /* Konseling */
        flex-basis: 200px;
        /* Lebar kolom Konseling (sesuaikan jika perlu) */
        /* margin-right: auto; */
        /* Mendorong kolom Social ke kanan terjauh, menciptakan celah besar */
        /* margin-left: 20px; */
    }

    /* REVISI: Sembunyikan kolom 'Company' di desktop juga jika ada di HTML */
    .footer-column.company-column {
        display: none;
    }

    .footer-column.social-column {
        /* Social */
        flex-basis: 150px;
        /* Lebar kolom Social (sesuaikan jika perlu) */
        margin-left: 20px;
        /* Pastikan tidak ada margin tambahan */
    }

    .footer-bottom {
        padding-top: 25px;
        /* Standard padding */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0;
    }
}

/* Larger Desktop screens (min-width: 1024px) */
@media (min-width: 1024px) {

    /* Login Container dan Footer Content tetap di tengah dengan max-width */
    .login-container,
    .main-footer .footer-content,
    .main-footer .footer-bottom {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .login-container {
        padding: 20px 20px;
    }

    /* main-footer tetap full width, padding 0 di sisi */
    .main-footer {
        padding-left: 0;
        padding-right: 0;
    }
}