/* =============================================
   Syngenta Verification - Pixel-Perfect CSS
   Values extracted directly from syngenta-hanghieu.com
   ============================================= */

/* Design Tokens */
:root {
    --primary-red: #EC1C24;
    --primary-green: #28a745;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --border-color: #ced4da;
    --input-bg: #e9ecef;
    --font-main: Roboto, sans-serif; /* Original uses Roboto */
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    margin: 0;
    background-color: #2493c8; /* Syngenta blue - mobile mặc định */
    background-image: url("../assets/background.jpg");
    background-position: center top;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    font-size: 16px;
}

.main-content {
    flex: 1;
    position: relative;
    width: 100%;
    padding-top: 54vw; /* đẩy card xuống dưới banner */
}

/* =============================================
   Card Box - mobile-first (mặc định = mobile)
   ============================================= */
.card-box {
    position: relative;
    background: #fff;
    border-radius: 6px;
    box-shadow: none;
    border: none;
    z-index: 100;
    overflow: hidden;
    margin: 18px auto 30px; /* sát banner hơn cho giống hình */
    width: 94%;
}

/* =============================================
   Card Header
   ============================================= */
.card-header {
    background: #e9ecef;
    padding: 16px 18px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.card-header h2 {
    font-size: 22px;
    font-weight: bold;
    line-height: 28px;
    color: #212529;
    margin: 0;
    letter-spacing: 0.2px;
}

/* =============================================
   Card Body
   ============================================= */
.card-body {
    padding: 18px 18px 20px;
}

.subtitle {
    font-size: 17px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 18px;
    line-height: 24px;
}

/* Hộp thông báo kết quả xác thực */
.verify-result {
    padding: 14px 16px;
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 24px;
    border-radius: 4px;
}

/* =============================================
   Form
   ============================================= */
.form-group {
    margin-bottom: 12px;
}

.input-group {
    display: flex;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
}

.input-group input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 16px;
    height: 46px;
    color: #495057;
    outline: none;
    font-family: var(--font-main);
}

.input-group-append {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-left: 1px solid #ced4da;
    width: 46px;
    font-size: 16px;
    color: #6c757d;
}

/* =============================================
   Checkbox
   ============================================= */
.checkbox-group {
    display: flex;
    gap: 10px;
    font-size: 15px;
    margin: 4px 0 18px;
    line-height: 22px;
    color: #212529;
}

.checkbox-group input {
    margin-top: 3px;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 3px; /* checkbox hình vuông */
    border: 1px solid #ced4da;
    outline: none;
    cursor: pointer;
    position: relative;
    background: #fff;
    flex-shrink: 0;
}

.checkbox-group input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.checkbox-group input:checked::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.checkbox-group a {
    color: #007bff;
    text-decoration: none;
}

/* =============================================
   Button
   ============================================= */
.btn-verify {
    width: 100%;
    background: #5cb85c;
    color: #fff;
    border: 1px solid #5cb85c;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 17px;
    font-weight: 400;
    height: 48px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-main);
}

.btn-verify:hover {
    background: #4cae4c;
    border-color: #4cae4c;
}

/* =============================================
   Modal - mobile-first
   ============================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 4vh auto;
    width: 94%;
    max-width: none;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}

.modal-header {
    background: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 500;
    color: #212529;
    margin: 0;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 20px;
    line-height: 1.75;
    color: #212529;
    flex: 1;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.modal-body ol li {
    margin-bottom: 10px;
}

.modal-body a {
    color: #007bff;
    text-decoration: none;
}

.modal-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

.btn-detail {
    display: inline-block;
    background: #17a2b8;
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 17px;
    text-decoration: none;
    line-height: 1.5;
}

.btn-close-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 17px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Desktop / Tablet override (min-width: 576px)
   Mobile-first: phần này chỉ chạy trên màn hình lớn hơn mobile
   ============================================= */
@media (min-width: 576px) {
    body {
        background-color: transparent;
        background-image: url("../assets/background.jpg");
        background-position: center center;
        background-size: cover;
        background-attachment: fixed;
        display: flex;
        flex-direction: column;
    }

    .main-content {
        padding-top: 0;
    }

    .card-box {
        position: absolute;
        left: 26.5%;
        top: 35%;
        transform: translateY(-50%);
        width: 420px;
        margin: 0;
    }

    .card-header {
        padding: 16px 24px;
    }
    .card-header h2 {
        font-size: 32px;
        line-height: 40px;
    }

    .card-body {
        padding: 32px;
    }

    .subtitle {
        font-size: 19px;
        line-height: 28px;
        margin-bottom: 28px;
    }

    .verify-result {
        padding: 16px 20px;
        margin-bottom: 20px;
        font-size: 18px;
        line-height: 27px;
    }

    .form-group {
        margin-bottom: 22px;
    }

    .input-group input {
        height: 48px;
        font-size: 18px;
        padding: 10px 14px;
    }
    .input-group-append {
        width: 48px;
        font-size: 18px;
    }

    .checkbox-group {
        gap: 12px;
        font-size: 17px;
        line-height: 30px;
        margin-bottom: 28px;
    }
    .checkbox-group input {
        width: 20px;
        height: 20px;
        margin-top: 5px;
    }

    .btn-verify {
        height: 48px;
        font-size: 18px;
        padding: 10px 14px;
    }

    /* Modal trên desktop nhỏ gọn hơn */
    .modal-content {
        width: 90%;
        max-width: 500px;
        margin: 5vh auto;
        max-height: 90vh;
    }
    .modal-header h2 {
        font-size: 18px;
    }
    .modal-body {
        font-size: 16px;
        line-height: 1.7;
    }
    .modal-body ol {
        padding-left: 20px;
    }
    .btn-detail,
    .btn-close-modal {
        font-size: 14px;
        padding: 6px 16px;
    }
}

