/* =====================================================================
   SISTEMA DE GESTIÓN DE PERSONAL - FUNDACIÓN MÜRÖNTÖ
   ESTILOS GENERALES: TEMA INSTITUCIONAL MÜRÖNTÖ
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* ====================================================================
       SISTEMA DE DISEÑO MÜRÖNTÖ — GOOGLE ANTIGRAVITY LIGHT MODE (PREDETERMINADO)
       Paleta Oficial extraída del Isotipo de Hexágonos Tecnológicos
       ==================================================================== */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f7ff;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --border-card: #e2e8f0;
    --border-focus: #0052b6;
    
    --muronto-blue-royal: #0052b6; /* Azul Real del hexágono primario */
    --muronto-blue-sky: #009cde;   /* Azul Cielo del hexágono intermedio */
    --muronto-cyan-light: #00ffff; /* Cian brillante del hexágono superior */
    --muronto-slate: #7d99aa;      /* Pizarra metálico de los hexágonos */

    --cyber-cyan: #0052b6;         /* Primario interactivo */
    --cyber-cyan-glow: rgba(0, 156, 222, 0.2);
    --gold-patria: #009cde;        /* Azul Cielo Müröntö */
    --gold-glow: rgba(0, 82, 182, 0.18);
    --military-red: #dc2626;
    --military-green: #059669;
    
    --text-primary: #0a0f1d;       /* Negro carbón nítido del logo */
    --text-secondary: #334155;     /* Gris texto secundario */
    --text-muted: #7d99aa;         /* Pizarra del logo */
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-cyber: 0 4px 20px rgba(0, 82, 182, 0.06);

    --btn-primary-gradient: linear-gradient(135deg, #0052b6 0%, #009cde 100%);
    --btn-primary-hover: linear-gradient(135deg, #00459e 0%, #0088c4 100%);
}

[data-theme="dark"] {
    /* MODO OSCURO TÁCTICO MÜRÖNTÖ */
    --bg-main: #060d19;
    --bg-surface: #0c182d;
    --bg-card: #0c182d;
    --bg-card-hover: #12223f;
    --bg-input: #0a1426;
    --border-color: rgba(0, 156, 222, 0.22);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-focus: #00d9f5;
    
    --cyber-cyan: #00d9f5;
    --cyber-cyan-glow: rgba(0, 217, 245, 0.3);
    --gold-patria: #009cde;
    --gold-glow: rgba(0, 156, 222, 0.35);
    --military-red: #ef4444;
    --military-green: #10b981;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #7d99aa;
    --shadow-cyber: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 156, 222, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 82, 182, 0.03) 0%, transparent 40%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 217, 245, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 82, 182, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(6, 13, 25, 0.94), rgba(6, 13, 25, 0.98));
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #070d18;
}
::-webkit-scrollbar-thumb {
    background: #1b2e50;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-cyan);
}

/* TOP CLASSIFICATION BANNER */
.classification-bar {
    background: linear-gradient(90deg, #0052b6 0%, #009cde 100%);
    color: #ffffff;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 6px 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 82, 182, 0.2);
    position: sticky;
    top: 38px;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.classification-bar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.18);
    padding: 3px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 600;
}
.classification-bar a:hover {
    background: #ffffff;
    color: #0052b6;
}

/* HEADER INSTITUCIONAL */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 22px 0;
    position: relative;
    box-shadow: var(--shadow-cyber);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 22px;
}

.crest-logo {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.crest-logo:hover {
    transform: scale(1.03);
}

.header-text h3 {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    color: var(--gold-patria);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-weight: 700;
}

.header-text h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.header-text h2 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cyber-cyan);
    letter-spacing: 1px;
    margin-top: 4px;
}

.header-badge {
    text-align: right;
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    flex-shrink: 0;
}
.header-badge .badge-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    background: rgba(0, 82, 182, 0.08);
    border: 1px solid var(--cyber-cyan);
    color: var(--cyber-cyan);
    padding: 5px 14px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.header-badge p {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* MAIN CONTAINER */
.main-wrapper {
    max-width: 1050px;
    margin: 35px auto 80px auto;
    padding: 0 20px;
}

/* FORM INTRO HERO */
.form-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-cyber);
    position: relative;
    overflow: hidden;
}

.form-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0052b6, #009cde, #00ffff);
}

.form-hero h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.form-hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.hero-instructions {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.instruction-item {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.instruction-item i {
    color: var(--gold-patria);
    font-size: 1.1rem;
}

/* SECTION CARD STYLES */
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 26px;
    box-shadow: var(--shadow-cyber);
    backdrop-filter: blur(14px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.form-section:focus-within {
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow: 0 10px 35px rgba(0, 210, 255, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.section-num {
    background: linear-gradient(135deg, var(--muronto-blue-royal), var(--muronto-blue-sky));
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 82, 182, 0.25);
    flex-shrink: 0;
}

.section-title h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.8px;
}

.section-title p {
    font-size: 0.83rem;
    color: var(--text-secondary);
}

/* GRID LAYOUTS */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
}

.form-group.col-full {
    grid-column: 1 / -1;
}

/* LABELS & INPUTS */
label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

label .required-dot {
    color: #ff5252;
    font-weight: bold;
}

.input-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: -3px;
    margin-bottom: 3px;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
select,
textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 12px 14px;
    outline: none;
    transition: all 0.25s ease;
    width: 100%;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 12px var(--cyber-cyan-glow);
    background-color: var(--bg-surface);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230052b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    padding: 10px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* FOTO UPLOAD BOX - MILITARY BADGE PREVIEW */
.photo-upload-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    background: var(--bg-card-hover);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.photo-preview-box {
    width: 140px;
    height: 175px;
    border: 2px solid var(--muronto-blue-royal);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-cyber);
    flex-shrink: 0;
}

.photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    padding: 10px;
}

.photo-preview-placeholder i {
    font-size: 2.2rem;
    color: var(--muronto-blue-royal);
    margin-bottom: 8px;
}

.photo-preview-placeholder span {
    font-size: 0.72rem;
    line-height: 1.2;
}

.photo-instructions-container {
    flex: 1;
    min-width: 250px;
}

.tiuna-badge-notice {
    background: rgba(0, 156, 222, 0.08);
    border-left: 3px solid var(--muronto-blue-sky);
    padding: 10px 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
}

.tiuna-badge-notice strong {
    color: var(--muronto-blue-royal);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
    font-size: 0.88rem;
}

.tiuna-badge-notice p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-input-custom {
    position: relative;
    display: inline-block;
}

.btn-file-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--muronto-blue-royal);
    color: var(--muronto-blue-royal);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-file-select:hover {
    background: var(--muronto-blue-royal);
    color: #ffffff;
    box-shadow: 0 0 15px var(--cyber-cyan-glow);
}

.selected-file-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    word-break: break-all;
}

/* CV UPLOAD DROPZONE */
.cv-dropzone {
    border: 2px dashed var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cv-dropzone:hover, .cv-dropzone.dragover {
    border-color: var(--muronto-blue-royal);
    background: var(--bg-card-hover);
    box-shadow: 0 0 20px rgba(0, 82, 182, 0.1);
}

.cv-dropzone i {
    font-size: 2.8rem;
    color: var(--muronto-blue-royal);
    margin-bottom: 12px;
}

.cv-dropzone h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cv-dropzone p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* REPEATER ITEM STYLES (TITULOS Y CURSOS) */
.repeater-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.repeater-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--muronto-blue-royal);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    position: relative;
    transition: all 0.25s ease;
    animation: fadeInSlide 0.3s ease-out;
}

.repeater-item:hover {
    border-color: var(--muronto-blue-sky);
    box-shadow: var(--shadow-cyber);
}

.repeater-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.repeater-tag {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muronto-blue-royal);
    letter-spacing: 0.8px;
}

.btn-remove-item {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: #e74c3c;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-remove-item:hover {
    background: #c0392b;
    color: #ffffff;
}

.btn-add-repeater {
    background: rgba(0, 156, 222, 0.08);
    border: 1px dashed var(--muronto-blue-sky);
    color: var(--muronto-blue-royal);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    width: 100%;
    justify-content: center;
}

.btn-add-repeater:hover {
    background: rgba(0, 156, 222, 0.16);
    box-shadow: 0 0 15px var(--cyber-cyan-glow);
}

/* CONDITIONAL CONTAINERS */
.conditional-box {
    display: none;
    margin-top: 18px;
    padding: 18px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    animation: fadeInSlide 0.3s ease-out;
}

.conditional-box.active {
    display: block;
}

/* CHECKBOXES & PILLS FOR SPECIALIZATION AREAS */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.cyber-checkbox-card {
    position: relative;
}

.cyber-checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.cyber-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.cyber-checkbox-label:hover {
    background: var(--bg-card-hover);
    border-color: var(--muronto-blue-sky);
    transform: translateY(-1px);
}

.cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label {
    background: var(--bg-card-hover);
    border-color: var(--muronto-blue-royal);
    box-shadow: 0 4px 18px rgba(0, 82, 182, 0.15);
}

[data-theme="dark"] .cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label {
    border-color: var(--cyber-cyan);
    box-shadow: 0 4px 20px rgba(0, 217, 245, 0.2);
}

.custom-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--bg-surface);
    color: transparent;
}

.cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label .custom-box {
    background: var(--muronto-blue-royal);
    border-color: var(--muronto-blue-royal);
    color: #ffffff;
}

[data-theme="dark"] .cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label .custom-box {
    background: var(--cyber-cyan);
    border-color: var(--cyber-cyan);
    color: #060d19;
}

.cyber-checkbox-content {
    flex: 1;
}

.cyber-checkbox-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

.cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label .cyber-checkbox-title {
    color: var(--muronto-blue-royal);
}

[data-theme="dark"] .cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label .cyber-checkbox-title {
    color: var(--cyber-cyan);
}

.cyber-checkbox-desc {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    transition: color 0.2s ease;
}

/* ALTO CONTRASTE REFORZADO */
[data-contrast="high-contrast"] .cyber-checkbox-label {
    border: 2px solid #000000 !important;
}

[data-contrast="high-contrast"][data-theme="dark"] .cyber-checkbox-label {
    border: 2px solid #ffffff !important;
}

[data-contrast="high-contrast"] .cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label {
    border: 2.5px solid var(--muronto-blue-royal) !important;
}

[data-contrast="high-contrast"][data-theme="dark"] .cyber-checkbox-card input[type="checkbox"]:checked + .cyber-checkbox-label {
    border: 2.5px solid #00ffff !important;
}

.cyber-checkbox-label span.text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* SUBMIT CARD & FOOTER ACTIONS */
.submit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-cyber);
    margin-top: 30px;
}

.oath-statement {
    background: var(--bg-card-hover);
    border-left: 3px solid var(--muronto-blue-royal);
    padding: 14px 18px;
    text-align: left;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 24px;
}

.btn-submit-cyber {
    background: linear-gradient(135deg, var(--muronto-blue-royal) 0%, var(--muronto-blue-sky) 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 16px 45px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 82, 182, 0.35);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .btn-submit-cyber {
        white-space: normal;
        padding: 14px 22px;
        font-size: 0.98rem;
        width: 100%;
    }
    .header-badge .badge-tag,
    .header-badge p {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .header-badge .badge-tag,
    .header-badge p {
        white-space: normal;
    }
}

.btn-submit-cyber:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 82, 182, 0.45);
}

.btn-submit-cyber:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* CONFIRMATION / SUCCESS MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 14, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-focus);
    border-radius: var(--radius-lg);
    max-width: 580px;
    width: 100%;
    padding: 35px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 82, 182, 0.2);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon-success {
    width: 80px;
    height: 80px;
    background: rgba(5, 150, 105, 0.12);
    border: 2px solid var(--military-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: var(--military-green);
    font-size: 2.5rem;
    box-shadow: 0 0 25px rgba(5, 150, 105, 0.25);
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.expediente-badge {
    background: rgba(0, 82, 182, 0.08);
    border: 1px solid var(--muronto-blue-royal);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    margin: 18px 0;
    display: inline-block;
}

.expediente-badge span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.expediente-badge strong {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--muronto-blue-royal);
    letter-spacing: 1.5px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--muronto-blue-royal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--muronto-blue-royal) 0%, var(--muronto-blue-sky) 100%);
    border: 1px solid var(--muronto-blue-royal);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #00459e 0%, #0088c4 100%);
    box-shadow: 0 0 15px var(--cyber-cyan-glow);
}

/* ANIMATIONS */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE DESIGN */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 850px) {
    .classification-bar {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 6px 12px;
    }
    .classification-bar a {
        font-size: 0.7rem;
    }
    .classification-bar div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 0 15px;
    }
    .brand-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .header-badge {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(0, 210, 255, 0.2);
        padding-top: 12px;
        width: 100%;
        text-align: center;
    }
    .main-wrapper {
        margin: 20px auto 60px auto;
        padding: 0 15px;
    }
    .form-hero {
        padding: 22px 18px;
    }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .form-section {
        padding: 22px 18px;
    }
    .checkbox-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 15px 0;
    }
    .crest-logo {
        width: 70px;
        height: 70px;
    }
    .header-text h1 {
        font-size: 1.3rem;
    }
    .header-text h2 {
        font-size: 0.95rem;
    }
    .form-hero h2 {
        font-size: 1.25rem;
    }
    .hero-instructions {
        grid-template-columns: 1fr;
    }
    .photo-upload-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
        gap: 18px;
    }
    .photo-instructions-container {
        min-width: 100%;
        width: 100%;
        text-align: center;
    }
    .tiuna-badge-notice {
        text-align: left;
    }
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    .cyber-checkbox-label {
        padding: 12px 14px;
    }
    .submit-card {
        padding: 22px 16px;
    }
    .btn-submit-cyber {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1rem;
        letter-spacing: 1px;
    }
    .modal-content {
        padding: 24px 16px;
        width: 95vw;
        max-width: 95vw;
        margin: 10px;
    }
    .modal-content h3 {
        font-size: 1.3rem;
    }
    .modal-actions {
        flex-direction: column;
        width: 100%;
    }
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.15rem;
    }
    .header-text h2 {
        font-size: 0.85rem;
    }
    .form-section {
        padding: 16px 12px;
        border-radius: var(--radius-md);
    }
    .section-header {
        gap: 10px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    .section-num {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    .section-title h3 {
        font-size: 1.05rem;
    }
    input[type="text"],
    input[type="tel"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 0.88rem;
        padding: 10px 12px;
    }
    .repeater-item {
        padding: 14px 12px;
    }
    .repeater-item-header {
        flex-wrap: wrap;
        gap: 8px;
    }
}
