/* GLOBAL STYLES - GOB.MX DESIGN SYSTEM 2026 */
:root {
    --gob-guinda: #9D2449;
    --gob-guinda-oscuro: #621132;
    --gob-guinda-claro: #B8466A;
    --gob-dorado: #BC955C;
    --gob-dorado-oscuro: #98835E;
    --success: #28a745;
    --error: #dc3545;
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F5F5F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-600: #6C757D;
    --gray-800: #343A40;
    --gray-900: #212529;
    --font-titles: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header-container {
    background: var(--gob-guinda);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid var(--gob-dorado);
}

.header-gob-img {
    width: 100%;
    display: block;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    object-position: center;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* STEPPER IMAGES */
.stepper-img {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px;
    display: block;
    height: auto;
}

/* CARDS */
.card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 30px;
}

/* FORMS */
.form-title {
    font-family: var(--font-titles);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.gold-line {
    width: 60px;
    height: 4px;
    background: var(--gob-dorado);
    border-radius: 2px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.required { 
    color: var(--error); 
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.form-input:focus {
    outline: none;
    border-color: var(--gob-guinda);
    box-shadow: 0 0 0 3px rgba(157, 36, 73, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* BUTTONS */
.btn-container {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-200);
    flex-wrap: wrap;
}

.btn {
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: none;
    font-family: var(--font-titles);
    justify-content: center;
}

.btn-primary {
    background: var(--gob-guinda);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--gob-guinda-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 36, 73, 0.3);
}

.btn-primary:disabled {
    background: var(--gray-300);
    color: var(--gray-600);
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--gob-guinda);
    border: 2px solid var(--gob-guinda);
}

.btn-outline:hover {
    background: rgba(157, 36, 73, 0.05);
    transform: translateY(-2px);
}

.btn-download {
    background: var(--success);
    color: var(--white);
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* FOOTER */
.footer-container {
    background: #121212;
    margin-top: 60px;
    border-top: 4px solid var(--gob-dorado);
}

.footer-gob-img {
    width: 100%;
    display: block;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    object-position: center;
}

/* ACTA DOCUMENT - DESCARGA */
.acta-document-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    overflow: hidden;
}

.acta-document-image {
    width: 100%;
    height: auto;
    display: block;
}

.acta-overlay-data {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    font-family: 'Arial', sans-serif;
    color: #222;
    text-transform: uppercase;
}

.field-data { 
    position: absolute; 
    font-weight: 700; 
    font-size: clamp(7px, 1.3vw, 14px);
    white-space: nowrap;
    line-height: 1.2;
}

/* Coordenadas del acta */
.field-curp { 
    top: 13.2%; 
    left: 71.5%; 
    letter-spacing: 2px;
}

.field-nombre { 
    top: 18.8%; 
    left: 14.5%; 
    font-size: clamp(9px, 1.6vw, 18px);
}

.field-apellido1 { 
    top: 18.8%; 
    left: 45.5%; 
    font-size: clamp(9px, 1.6vw, 18px);
}

.field-apellido2 { 
    top: 18.8%; 
    left: 71.5%; 
    font-size: clamp(9px, 1.6vw, 18px);
}

.field-sexo { 
    top: 23.2%; 
    left: 14.5%; 
}

.field-fecha-nac { 
    top: 23.2%; 
    left: 45.5%; 
}

.field-lugar-nac { 
    top: 27.5%; 
    left: 14.5%; 
    width: 70%;
}

.field-entidad-reg { 
    top: 35.2%; 
    left: 14.5%; 
}

.field-municipio-reg { 
    top: 35.2%; 
    left: 45.5%; 
}

.field-padre1-nombre { 
    top: 49.2%; 
    left: 14.5%; 
    width: 50%;
}

.field-padre1-nacionalidad { 
    top: 52.5%; 
    left: 14.5%; 
    font-size: 0.85em;
}

.field-padre2-nombre { 
    top: 57.5%; 
    left: 14.5%; 
    width: 50%;
}

.field-padre2-nacionalidad { 
    top: 60.8%; 
    left: 14.5%; 
    font-size: 0.85em;
}

/* Sello del acta */
.acta-sello-texto {
    position: absolute;
    bottom: 6%;
    right: 6%;
    color: white !important;
    font-size: clamp(5px, 0.8vw, 10px);
    font-weight: 900;
    text-align: center;
    line-height: 1.2;
    background: rgba(0,0,0,0.4);
    padding: 10px;
    border-radius: 50%;
    width: 12%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gob-dorado);
    box-shadow: 0 0 15px rgba(188, 149, 92, 0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 20;
}

/* UTILITIES */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ALERTS */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: #e7f3f8;
    border-left: 5px solid #2980b9;
    color: #2980b9;
}

.alert-success {
    background: #d4edda;
    border-left: 5px solid var(--success);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-left: 5px solid var(--error);
    color: #721c24;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .card {
        padding: 25px;
    }
    
    .form-row { 
        grid-template-columns: 1fr; 
        gap: 0;
    }
    
    .btn-container { 
        flex-direction: column-reverse; 
    }
    
    .btn { 
        width: 100%; 
    }
    
    .stepper-img {
        margin-bottom: 20px;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .acta-sello-texto {
        width: 20%;
        font-size: clamp(4px, 1.5vw, 8px);
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
        border-radius: 8px;
    }
    
    .form-input {
        padding: 12px;
        font-size: 16px; /* Prevenir zoom en iOS */
    }
    
    .btn {
        padding: 12px 24px;
    }
    
    .field-data {
        font-size: clamp(6px, 2vw, 10px);
    }
}

/* PRINT STYLES */
@media print {
    .header-container,
    .footer-container,
    .btn-container,
    .stepper-img {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .acta-document-container {
        box-shadow: none;
        max-width: 100%;
    }
    
    body {
        background: white;
    }
    
    .main-content {
        padding: 0;
        max-width: 100%;
    }
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* LOADING STATES */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--gob-guinda);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* SELECTION COLORS */
::selection {
    background: rgba(157, 36, 73, 0.2);
    color: var(--gob-guinda-oscuro);
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gob-dorado);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gob-guinda);
}