/* ============================================
   USER-FRIENDLY IRCC-STYLE ADDITIONS
   FIXED & STABLE VERSION
   ============================================ */

/* Fallback CSS Variables (if root not loaded) */
:root {
    --primary-blue: #1565c0;
    --success-green: #2e7d32;
    --border-gray: #ddd;
    --light-gray: #f5f5f5;
    --text-dark: #333;
    --text-light: #666;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
}

/* ===============================
   WELCOME BANNER
================================ */
.welcome-banner {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.welcome-banner h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.welcome-banner .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* ===============================
   INFO CARDS
================================ */
.info-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    min-width: 200px;
    transition: transform 0.3s ease, background 0.3s ease;
    will-change: transform;
}

.info-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

/* ===============================
   SECTION CARD
================================ */
.section-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-blue);
    transition: box-shadow 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ===============================
   CHECKBOX GROUP
================================ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: var(--light-gray);
}

/* ===============================
   UPLOAD SECTION
================================ */
.upload-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.upload-card {
    background: #fafafa;
    border: 2px dashed var(--border-gray);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-card:hover {
    border-color: var(--primary-blue);
    background: #f0f7ff;
}

/* ===============================
   REVIEW GRID
================================ */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* ===============================
   FORM VALIDATION (SOFT STYLE)
================================ */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ff9800 !important;
    background: #fff3e0;
}

.error-message {
    color: #f57c00;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* ===============================
   ACCESSIBILITY FOCUS
================================ */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ===============================
   HIGH CONTRAST MODE FIX
================================ */
@media (prefers-contrast: high) {
    .section-card {
        border: 2px solid var(--text-dark);
    }

    .btn-primary,
    .btn-secondary,
    .btn-success {
        border: 2px solid currentColor;
    }
}

/* ===============================
   RESPONSIVE FIXES
================================ */
@media (max-width: 768px) {

    .info-cards {
        flex-direction: column;
        gap: 1rem;
    }

    .info-card {
        min-width: 100%;
    }

    .upload-section,
    .review-grid {
        grid-template-columns: 1fr;
    }

    .info-box {
        flex-direction: column;
    }
}

@media (max-width: 480px) {

    .welcome-banner {
        padding: 2rem 1rem;
    }

    .section-card {
        padding: 1rem;
    }
}

/* ===============================
   REDUCED MOTION SUPPORT
================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===============================
   PRINT SAFE
================================ */
@media print {
    header,
    .welcome-banner,
    .form-navigation,
    footer {
        display: none !important;
    }

    .section-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}