/* =========================================
   1. VARIABLES Y CONFIGURACIÓN (Design System V3)
   ========================================= */
:root {
    /* Paleta de Marca */
    --color-primario: #417F7B;    /* Verde Petróleo (Oscuro / Seriedad) */
    --color-secundario: #88DED9;  /* Cian Suave (Luz / Energía) */
    
    /* Fondos y Textos */
    --color-fondo: #fbfcfd;       /* <-- CAMBIO: Fondo casi blanco (mucho más claro) */
    --color-blanco: #ffffff;
    --color-texto: #2e3440;       /* Gris oscuro para lectura */
    --color-texto-suave: #4c566a; /* Gris medio */
    --color-borde: #e2e8f0;

    /* Sombras y Radios */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(136, 222, 217, 0.15);
    --shadow-lg: 0 10px 25px rgba(65, 127, 123, 0.1);
    --radius-card: 12px;  /* Tarjetas con radio suave */
    --radius-btn: 8px;    /* <-- CAMBIO: Botones rectangulares (antes era 50px) */
}

/* =========================================
   2. RESET Y BASE TIPOGRÁFICA
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    width: 100%;
}

/* =========================================
   3. FUENTES (Sfizia + Inter)
   ========================================= */
.logo, h2.section-title, .modal-header h2 { 
    font-family: 'Sfizia', serif; font-weight: normal; 
}
h1, h3, h4, p, button, input {
    font-family: 'Inter', sans-serif;
}

/* =========================================
   4. HEADER Y NAVEGACIÓN
   ========================================= */
header {
    background-color: var(--color-blanco);
    border-bottom: 1px solid var(--color-borde);
    height: 80px;
    display: flex; align-items: center;
    position: sticky; top: 0; z-index: 1000;
}
header .container { display: flex; align-items: center; }

.logo {
    display: inline-flex; align-items: center;
    font-size: 28px; color: var(--color-texto);
    text-decoration: none; line-height: 1;
    font-family: 'Sfizia', serif !important; font-weight: bold !important;
}
.logo img { height: 38px; width: auto; display: block; margin-right: 12px; }
.logo span { color: var(--color-primario); }

nav { width: 100%; display: flex; }
nav ul { display: flex; align-items: center; gap: 25px; list-style: none; margin-left: auto; }
nav ul li a { font-family: 'Inter', sans-serif; font-weight: 600; color: var(--color-texto-suave); transition: color 0.2s; font-size: 0.95rem; }
nav ul li a:hover { color: var(--color-primario); }

/* =========================================
   5. BOTONES (Rectangulares)
   ========================================= */
/* Se aplica el nuevo --radius-btn: 8px */
.btn-primary {
    background-color: var(--color-secundario);
    color: #004d40 !important;
    padding: 12px 30px;
    border-radius: var(--radius-btn); /* <-- Usando radio pequeño */
    font-weight: 700;
    transition: all 0.2s ease;
    border: 2px solid var(--color-secundario);
    display: inline-block;
    box-shadow: 0 4px 15px rgba(136, 222, 217, 0.4);
}
.btn-primary:hover {
    background-color: #70c4b8;
    border-color: #70c4b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(136, 222, 217, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primario) !important;
    border: 2px solid var(--color-primario);
    padding: 12px 30px;
    border-radius: var(--radius-btn); /* <-- Usando radio pequeño */
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-block;
}
.btn-secondary:hover {
    background-color: var(--color-primario);
    color: var(--color-blanco) !important;
}

.tag {
    display: inline-block; padding: 5px 14px;
    border-radius: 8px; /* Un poco más cuadrado también */
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    color: #004d40; background-color: var(--color-secundario);
    width: fit-content; margin-bottom: 12px;
}

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero-section {
    padding: 100px 0 80px; text-align: center;
    /* Fondo ajustado al nuevo color más claro */
    background: radial-gradient(circle at 50% 0%, #ffffff 0%, var(--color-fondo) 100%);
}
.hero-content h1 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: clamp(2.5rem, 5vw, 3.8rem); margin-bottom: 25px; line-height: 1.1; color: var(--color-texto); letter-spacing: -1.5px; }
.hero-content p { font-size: 1.25rem; color: var(--color-texto-suave); margin-bottom: 45px; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.hero-buttons { display: flex; justify-content: center; gap: 20px; }

/* =========================================
   7. SECCIONES Y FEATURES
   ========================================= */
.features-section { padding: 80px 0; background: var(--color-blanco); }
.features-section h2 { font-family: 'Sfizia', serif; font-size: 2.5rem; margin-bottom: 15px; color: var(--color-texto); font-weight: bold; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; margin-top: 50px; }
.feature-card {
    background: var(--color-fondo); padding: 35px 30px;
    border-radius: 12px; border: 1px solid transparent; transition: all 0.3s ease;
}
.feature-card:hover { background: var(--color-blanco); transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--color-secundario); }
.feature-card .icon { font-size: 2.5rem; display: block; margin-bottom: 20px; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }

/* CTA Final */
.cta-section {
    background: linear-gradient(135deg, var(--color-primario) 0%, #2a524f 100%);
    color: var(--color-blanco); padding: 80px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(136, 222, 217, 0.1) 0%, transparent 60%); pointer-events: none; }
.cta-section h2 { color: var(--color-blanco); font-family: 'Sfizia', serif; }
.cta-section p { color: rgba(255,255,255,0.9); margin-bottom: 30px; font-size: 1.1rem;}
.cta-section .btn-secondary { border-color: var(--color-secundario); color: var(--color-secundario) !important; }
.cta-section .btn-secondary:hover { background: var(--color-secundario); color: #004d40 !important; }

/* =========================================
   8. CATÁLOGO DE CURSOS
   ========================================= */
.filter-section { text-align: center; padding: 60px 0 30px; }
.filter-section h1 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 2.8rem; margin-bottom: 15px; color: var(--color-texto); letter-spacing: -1px; }
.search-bar {
    padding: 14px 24px; width: 100%; max-width: 450px;
    border: 2px solid var(--color-borde); border-radius: 8px; /* Rectangular */
    outline: none; font-family: 'Inter', sans-serif; font-size: 1rem; transition: border-color 0.2s;
}
.search-bar:focus { border-color: var(--color-secundario); }
.filter-group { margin-top: 25px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.filter-btn {
    background: var(--color-blanco); border: 1px solid var(--color-borde);
    padding: 10px 24px; border-radius: 8px; /* Rectangular */
    cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 600; transition: all 0.2s; color: var(--color-texto-suave);
}
.filter-btn.active, .filter-btn:hover { background: var(--color-secundario); color: #004d40; border-color: var(--color-secundario); box-shadow: 0 4px 10px rgba(136, 222, 217, 0.4); }

.grid-cursos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 35px; padding: 40px 0 100px; }
.curso-card {
    background: var(--color-blanco); border: 1px solid var(--color-borde);
    border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: var(--shadow-sm);
}
.curso-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--color-secundario); }
.curso-card.hidden { display: none; }
.curso-img { height: 150px; background-color: #f0fdfa; display: flex; align-items: center; justify-content: center; font-size: 4.5rem; border-bottom: 1px solid #e0f2f1; }
.curso-content { padding: 28px; display: flex; flex-direction: column; flex-grow: 1; }
.curso-card h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.4rem; margin-bottom: 12px; color: var(--color-texto); line-height: 1.3; }
.curso-card p { font-size: 0.95rem; color: var(--color-texto-suave); margin-bottom: 24px; }

.btn-inscribirse {
    margin-top: auto; width: 100%;
    background-color: var(--color-secundario); color: #004d40;
    padding: 14px; border-radius: 8px; /* Rectangular */
    font-weight: 700; transition: all 0.2s; border: none; cursor: pointer;
}
.btn-inscribirse:hover { background-color: #4db6b0; box-shadow: 0 4px 10px rgba(136, 222, 217, 0.5); }

/* =========================================
   9. FOOTER (Color Cian)
   ========================================= */
footer {
    background-color: var(--color-secundario); /* <-- CAMBIO: Fondo cian */
    color: #004d40; /* <-- CAMBIO: Texto verde oscuro para contraste */
    padding: 60px 0;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600; /* Un poco más de peso para que se lea bien sobre el color */
}

/* =========================================
   10. RESPONSIVE & MODAL
   ========================================= */
.menu-toggle { display: none; background: none; border: none; font-size: 28px; color: var(--color-primario); cursor: pointer; }
@media (max-width: 768px) {
    .menu-toggle { display: block; margin-left: auto; }
    nav ul.nav-menu { display: none; position: absolute; top: 80px; left: 0; width: 100%; background-color: var(--color-blanco); flex-direction: column; padding: 20px 0; border-bottom: 2px solid var(--color-borde); box-shadow: var(--shadow-lg); gap: 20px; }
    nav ul.nav-menu.active { display: flex; animation: slideDown 0.3s ease forwards; }
    nav ul li { width: 100%; text-align: center; }
    nav ul li a.btn-primary, nav ul li a.btn-secondary { display: inline-block; width: 85%; }
    .hero-content h1 { font-size: 2.2rem; }
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal-content { background-color: var(--color-blanco); margin: 5% auto; width: 90%; max-width: 600px; border-radius: var(--radius-card); box-shadow: var(--shadow-lg); position: relative; animation: slideUp 0.3s ease-out; }
.close-btn { position: absolute; right: 25px; top: 20px; font-size: 32px; line-height: 1; cursor: pointer; color: #cbd5e0; transition: color 0.2s; }
.close-btn:hover { color: var(--color-primario); }
.modal-header { padding: 35px 30px 15px; text-align: center; border-bottom: 1px solid var(--color-fondo); }
.modal-header h2 { font-size: 2rem; color: var(--color-primario); font-family: 'Sfizia', serif; font-weight: bold; }
.modal-icon { font-size: 4rem; margin-bottom: 15px; }
.modal-body { padding: 30px 40px 50px; }
.modal-description { color: var(--color-texto-suave); margin-bottom: 30px; line-height: 1.7; }
.modal-list { margin-bottom: 35px; padding-left: 20px; }
.modal-list li { margin-bottom: 12px; color: var(--color-texto); font-weight: 500;}
.price-tag { display: block; text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--color-primario); margin-bottom: 25px; font-family: 'Inter', sans-serif; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }