/* VARIABLES GLOBALES - LIGHT MODE + BRAND COLORS */
:root {
    /* Fondos Claros */
    --bg-main: #F8FAFC;         /* Un gris muy claro/blanco azulado */
    --bg-secondary: #FFFFFF;    /* Blanco puro para secciones o tarjetas */
    
    /* Textos oscuros */
    --text-primary: #1E293B;    /* Gris muy oscuro, casi negro */
    --text-secondary: #475569;  /* Gris medio para párrafos */
    
    /* Colores de Marca CAMPTA */
    --brand-dark: #0b333c;      /* Verde cerceta / azul muy oscuro */
    --brand-primary: #1b647c;   /* Verde cerceta brillante */
    
    /* Efecto Glassmorphism Ligero */
    --surface-glass: rgba(255, 255, 255, 0.7);
    --surface-glass-hover: rgba(255, 255, 255, 0.95);
    --border-glass: rgba(226, 232, 240, 0.8); /* Borde sutil gris/azulado */
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --glass-shadow-hover: 0 10px 30px rgba(27, 100, 124, 0.15); /* Sombra con color marca */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-mid: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-center {
    text-align: center;
}

/* UTILITIES */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
}

/* GLASSMORPHISM PANEL (Light Mode) */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-mid);
}

.glass-panel:hover {
    background: var(--surface-glass-hover);
    transform: translateY(-5px);
    border-color: rgba(27, 100, 124, 0.3);
    box-shadow: var(--glass-shadow-hover);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-mid);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--brand-primary);
    color: #FFF;
    border: none;
}

.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 4px 15px rgba(11, 51, 60, 0.3);
}

.btn-glow {
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
    color: white;
    border: none;
}

.btn-glow:hover {
    box-shadow: 0 8px 25px rgba(27, 100, 124, 0.4);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: white;
    background: var(--brand-primary);
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 45px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a:hover { 
    width: 100%; 
    color: var(--brand-primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--brand-dark);
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* HERO SECTION */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(circle, rgba(27, 100, 124, 0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 95%;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(27, 100, 124, 0.1);
    color: var(--brand-primary);
    border: 1px solid rgba(27, 100, 124, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 51, 60, 0.1) 0%, rgba(27, 100, 124, 0.05) 100%);
    mix-blend-mode: multiply;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

/* ABOUT SECTION */
.about-section {
    padding: 6rem 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 6rem;
}

.stat-card {
    text-align: center;
}

.stat-card h3 {
    font-size: 3rem;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-icon {
    font-size: 2.5rem;
    background: #FFFFFF;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--glass-shadow);
    color: var(--brand-primary);
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* BENEFITS SECTION */
.benefits-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefit-card .b-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* COURSES SECTION */
.courses-section {
    padding: 6rem 0;
}

.course-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-card {
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.category-card .cat-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.category-card:hover .cat-icon {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--brand-primary);
    font-weight: 500;
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 51, 60, 0.4); /* Oscurecido con brand dark translucido */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-secondary);
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 0.5rem;
    z-index: 10;
}

.modal-close:hover {
    color: var(--brand-dark);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-icon {
    font-size: 2.5rem;
}

.modal-header h2 {
    margin-bottom: 0;
    font-size: 1.75rem;
    color: var(--brand-dark);
}

.modal-description {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.95rem;
}

.modal-modules ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.modal-modules li {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: transform 0.2s, background 0.2s;
    font-size: 0.95rem;
}

.modal-modules li::before {
    content: '▶';
    font-size: 0.6rem;
    color: var(--brand-primary);
    margin-right: 0.8rem;
}

.modal-modules li:hover {
    transform: translateX(5px);
    background: #e8f3f6; /* Cian muy, muy clarito basado en branding */
    color: var(--brand-dark);
}

.modal-footer .btn {
    width: 100%; 
}

/* FOOTER */
.footer {
    padding: 5rem 0 0 0;
    border-top: 1px solid var(--border-glass);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.social-links a:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
}

/* ------------------------------------- */
/* RESPONSIVE DESIGN (100% Adaptable)    */
/* ------------------------------------- */

/* TABLETAS (1024px o menos) */
@media (max-width: 1024px) {
    .hero { padding-top: 140px; min-height: auto; }
    .hero-text h1 { font-size: 3rem; }
    .hero-container, .about-content { gap: 3rem; }
    .hero-img { height: 400px; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 4rem; }
    .benefits-grid, .course-categories-grid { grid-template-columns: repeat(2, 1fr); }
    
    .section-title h2 { font-size: 2.5rem; }
}

/* SMARTPHONES GRANDES Y TABLETAS PEQUEÑAS (768px o menos) */
@media (max-width: 768px) {
    /* Header & Nav */
    .header-actions .btn { display: none; }
    .menu-toggle { display: flex; }
    
    .hero-container, .about-content, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Secciones Generales */
    .section-title h2 { font-size: 2rem; }
    .hero { padding-bottom: 3rem; }
    .about-section, .benefits-section, .courses-section { padding: 4rem 0; }
    
    /* Hero Center Aligned */
    .hero-text { text-align: center; }
    .hero-text p { max-width: 100%; margin: 0 auto 2rem auto; }
    .hero-buttons { justify-content: center; flex-wrap: wrap; }
    .hero-img { height: 350px; }
    
    /* Grids */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .benefits-grid, .course-categories-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    
    .stat-card h3 { font-size: 2.25rem; }
    .about-text h2 { font-size: 2.2rem; text-align: center; }
    
    .feature-item { flex-direction: column; text-align: center; align-items: center; }
    
    .footer-brand p { margin: 1rem auto; text-align: center; }
    .social-links { justify-content: center; }
    .footer-links, .footer-contact { text-align: center; }
    
    .footer-bottom .container { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* SMARTPHONES PEQUEÑOS (480px o menos) */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-text h1 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
    
    /* Ajustes Extra para Modal en móviles pequeños */
    .modal-box { padding: 1.5rem; }
    .modal-header { flex-direction: column; text-align: center; }
    .modal-header h2 { font-size: 1.5rem; }
    .modal-description { text-align: center; font-size: 0.85rem; }
    .modal-modules li { font-size: 0.85rem; padding: 0.8rem; }
}
