/* Mobile-first structural layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.app-container {
    width: 100%;
    max-width: 450px; /* Perfect smartphone display boundary */
    background: #ffffff;
    min-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Fixed Multi-Language Header Controls */
.lang-header {
    display: flex;
    background: #111827;
    padding: 12px;
    gap: 8px;
}

.lang-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: #374151;
    color: #ffffff;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.lang-btn.active {
    background: #2563eb; /* Primary visual action blue */
}

/* Card layout formatting */
.form-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

h2 {
    font-size: 18px;
    color: #111827;
    margin-bottom: 4px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 8px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f9fafb;
    outline: none;
}

input:focus, select:focus {
    border-color: #2563eb;
    background-color: #fff;
}

/* Duty selection checkbox zone */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}

.checkbox-item input {
    width: auto;
    margin-top: 3px;
}

.next-btn {
    margin-top: auto;
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;

}/* ==========================================================================
   PATH B: CV PRINT TEMPLATE STYLES
   ========================================================================== */

/* The CV Document Preview Container (Hidden by default on mobile view) */
#cv-template {
    display: none;
    width: 100%;
    background: #ffffff;
    padding: 30px;
    box-sizing: border-box;
}

/* Typography & Layout for the Professional English CV */
.cv-header {
    text-align: center;
    border-bottom: 2px solid #111827;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.cv-name {
    font-size: 26px;
    font-weight: bold;
    text-transform: uppercase;
    color: #111827;
    letter-spacing: 1px;
}

.cv-contact {
    font-size: 13px;
    color: #4b5563;
    margin-top: 6px;
}

.cv-section-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #111827;
    background: #f3f4f6;
    padding: 6px 10px;
    margin-top: 25px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.cv-item {
    margin-bottom: 15px;
}

/* Updated CV Header to allow side-by-side text and photo box */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #111827;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.cv-header-text {
    text-align: left; /* Aligns text left to make room for photo */
}

.cv-name {
    font-size: 26px;
    font-weight: bold;
    text-transform: uppercase;
    color: #111827;
    letter-spacing: 1px;
}

.cv-contact {
    font-size: 13px;
    color: #4b5563;
    margin-top: 6px;
}

/* The Passport Photo Frame Box */
.cv-photo-box {
    width: 95px;       /* Exact proportion for standard passport photo */
    height: 125px;
    border: 2px dashed #9ca3af; /* Clean grey placeholder line */
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    border-radius: 4px;
}

.cv-bullet-list {
    margin-left: 20px;
    padding-left: 0;
}

.cv-bullet-list li {
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Back navigation action button for mobile app view */
.back-btn {
    display: none;
    background: #4b5563;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    margin: 20px;
    cursor: pointer;
    font-weight: bold;
}

/* Print Specific Rules: Forces the browser to ONLY print the clean white CV page */
@media print {
    /* 1. Force absolute zero margin to hide browser headers & footers entirely */
    @page {
        margin: 0;
    }
    
    /* 2. Add padding directly to the body so the text doesn't touch the paper edge */
    body {
        background: white;
        margin: 0;
        padding: 15mm 20mm;
    }
    
    /* Hide all web control interfaces */
    .lang-header, .form-card, #cv-controls, .back-btn, .next-btn {
        display: none !important;
    }
    
    /* 3. Force the CV to expand to 100% full printable width */
    #cv-template {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}
