/* Reset y variables */
:root {
    --primary-color: #003366;
    --secondary-color: #ff6600;
    --accent-color: #00aaff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f4f4;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004080 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--box-shadow);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.logo {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-title h1 {
    font-size: 2em;
    margin-bottom: 5px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 51, 102, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    color: white;
    padding: 40px 20px;
}

.hero-content h2 {
    font-size: 3em;
    margin-bottom: 10px;
    animation: fadeInDown 1s;
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 20px;
    animation: fadeInUp 1s;
}

.btn-hero {
    display: inline-block;
    padding: 15px 30px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    animation: fadeIn 1.5s;
}

.btn-hero:hover {
    background: #ff8533;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 40px 0;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004080 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    font-size: 2em;
}

.card-header h2 {
    font-size: 1.5em;
    margin: 0;
}

.card-body {
    padding: 25px;
}

/* Requisitos Card */
.requisitos-card .info-section {
    margin-bottom: 25px;
}

.requisitos-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-list, .document-list {
    list-style: none;
    padding: 0;
}

.check-list li, .document-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-list i {
    color: var(--success-color);
}

.document-list i {
    color: var(--secondary-color);
}

.pago-box {
    background: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.pago-details p {
    margin: 10px 0;
}

.highlight {
    background: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.monto-inscripcion {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
}

.monto-inscripcion strong {
    color: var(--success-color);
    font-size: 1.5em;
}

.flyer-container {
    text-align: center;
    margin-top: 20px;
}

.flyer-img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Cursos Grid */
.section-title {
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8em;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.curso-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #eee;
}

.curso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.curso-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004080 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.curso-header h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    padding-right: 80px;
}

.badge-modulo {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.curso-body {
    padding: 20px;
}

.curso-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #666;
}

.curso-info i {
    color: var(--primary-color);
    width: 20px;
}

.curso-incluye {
    background: #e8f4fd;
    padding: 10px;
    border-radius: var(--border-radius);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.curso-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.btn-inscribir {
    width: 100%;
    padding: 12px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-inscribir:hover {
    background: #218838;
    transform: scale(1.02);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 30px auto;
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 95%;
    position: relative;
    animation: slideIn 0.3s;
}

.modal-xl {
    max-width: 1100px;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004080 100%);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.close {
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Formulario Styles */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
}

.form-group {
    padding: 0 10px;
    margin-bottom: 15px;
}

.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333%; }
.col-3 { width: 25%; }

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1em;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}

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

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e0e0e0;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    cursor: pointer;
}

.file-input-wrapper small {
    display: block;
    margin-top: 5px;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.btn-submit, .btn-cancel {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-submit {
    background: var(--success-color);
    color: white;
    flex: 2;
}

.btn-submit:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #6c757d;
    color: white;
    flex: 1;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Footer */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.btn-social:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Animations */
@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 {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .header-title h1 {
        font-size: 1.5em;
    }
    
    .hero-content h2 {
        font-size: 2em;
    }
    
    .hero-content p {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .col-6, .col-4, .col-3 {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit, .btn-cancel {
        width: 100%;
    }
    
    .modal-content {
        margin: 10px auto;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .card-header h2 {
        font-size: 1.2em;
    }
    
    .curso-header h3 {
        font-size: 1em;
    }
    
    .badge-modulo {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }

    /* Loader Styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loader-spinner {
    width: 70px;
    height: 70px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--secondary-color);
    border-right: 6px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.loader-overlay p {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal de éxito mejorado */
.modal-exito-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideInDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-exito-content i {
    font-size: 80px;
    color: var(--success-color);
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.modal-exito-content h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 600;
}

.modal-exito-content p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 16px;
}

.modal-exito-content .btn-ok {
    background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.modal-exito-content .btn-ok:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}
}