/* ============================================
   ESTILOS GENERALES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #14421f;
    --primary-dark: #af9900;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --light-gray: #f3f4f6;
    --medium-gray: #e5e7eb;
    --dark-gray: #374151;
    --text-color: #1f2937;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.logo-principal {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-programa {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-principal:hover,
.logo-programa:hover {
    transform: scale(1.05);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.main-container {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* ============================================
   INFORMACIÓN DEL PROGRAMA
   ============================================ */

.programa-info {
    margin-bottom: 30px;
}

.info-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeInDown 0.6s ease;
}

.icon-header {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--light-gray), var(--medium-gray));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow);
}

.icon-header i {
    font-size: 40px;
    color: var(--white);
}

.titulo-principal {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitulo {
    font-size: 1.2rem;
    color: var(--dark-gray);
    font-weight: 400;
    margin-bottom: 20px;
}

.descripcion {
    max-width: 700px;
    margin: 0 auto;
    color: var(--dark-gray);
    font-size: 1rem;
}

/* ============================================
   SECCIÓN DE BÚSQUEDA
   ============================================ */

.search-section {
    margin-bottom: 30px;
}

.search-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.search-header i {
    font-size: 28px;
    color: var(--primary-color);
}

.search-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.search-form {
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
    animation: shake 0.5s;
}

.form-help {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 8px;
}

.form-help i {
    font-size: 0.75rem;
}

/* ============================================
   BOTÓN DE SUBMIT
   ============================================ */

.btn-submit {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow);
    font-family: 'Poppins', sans-serif;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   INFORMACIÓN DE CONTACTO
   ============================================ */

.contact-info {
    margin-bottom: 30px;
}

.contact-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease;
}

.contact-card h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact-card h3 i {
    color: var(--primary-color);
}

.contact-card p {
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin: 10px 0;
}

.email-link:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.contact-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 10px;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.4s ease;
    position: relative;
}

.close-modal {
    color: var(--dark-gray);
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: var(--light-gray);
    color: var(--danger-color);
}

/* ============================================
   TARJETA DE RESULTADOS
   ============================================ */

.resultado-card {
    padding: 40px;
}

.resultado-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 30px;
}

.resultado-header .icon-success {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow);
}

.resultado-header .icon-success i {
    font-size: 40px;
    color: var(--white);
}

.resultado-header h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.resultado-header .documento-number {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.resultado-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.info-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.info-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-item-label i {
    color: var(--primary-color);
}

.info-item-value {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
    word-break: break-word;
}

.info-item-value.highlight {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.resultado-footer {
    background: #fef3c7;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
}

.resultado-footer h4 {
    color: #92400e;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resultado-footer h4 i {
    color: var(--warning-color);
}

.resultado-footer p {
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 15px;
}

.resultado-footer .contact-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--warning-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.resultado-footer .contact-email:hover {
    background: #d97706;
    transform: scale(1.05);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--white);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-links .separator {
    color: var(--medium-gray);
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .titulo-principal {
        font-size: 2rem;
    }

    .subtitulo {
        font-size: 1rem;
    }

    .info-card,
    .search-card,
    .contact-card {
        padding: 25px;
    }

    .resultado-card {
        padding: 25px;
    }

    .resultado-body {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .logo-section {
        gap: 20px;
    }

    .logo-principal {
        height: 50px;
    }

    .logo-programa {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .titulo-principal {
        font-size: 1.6rem;
    }

    .search-header h2 {
        font-size: 1.4rem;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 14px 24px;
    }

    .info-card,
    .search-card,
    .contact-card {
        padding: 20px;
    }
}

/* ============================================
   SWEETALERT2 CUSTOMIZACIÓN
   ============================================ */

.swal2-popup {
    border-radius: var(--border-radius) !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-title {
    color: var(--text-color) !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: var(--dark-gray) !important;
}

.swal2-confirm {
    background: var(--primary-color) !important;
    border-radius: 8px !important;
    padding: 12px 32px !important;
    font-weight: 600 !important;
}

.swal2-confirm:hover {
    background: var(--primary-dark) !important;
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}