/* === VARIABLES CSS MEJORADAS === */
:root {
    --primary: #1a4b8c;
    --primary-light: #2c6cb0;
    --primary-dark: #153a6b;
    --secondary: #e74c3c;
    --secondary-light: #ff6b6b;
    --secondary-dark: #c0392b;
    --accent: #f39c12;
    --accent-light: #f1c40f;
    --accent-dark: #e67e22;
    --dark: #2c3e50;
    --darker: #1a252f;
    --light: #ffffff;
    --lighter: #f8f9fa;
    --text: #2d3748;
    --text-light: #4a5568;
    --gray: #718096;
    --gray-light: #a0aec0;
    --success: #27ae60;
    --success-light: #2ecc71;
    --warning: #f39c12;
    --warning-light: #f1c40f;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --box-shadow: 0 8px 30px rgba(26, 75, 140, 0.12);
    --box-shadow-lg: 0 20px 50px rgba(26, 75, 140, 0.18);
    --box-shadow-xl: 0 25px 60px rgba(26, 75, 140, 0.25);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

/* === RESET Y ESTILOS GENERALES MEJORADOS === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* === HEADER MEJORADO - PROBLEMA 1 SOLUCIONADO === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.98) 0%, rgba(44, 108, 176, 0.98) 100%);
    backdrop-filter: blur(20px);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.25);
    transition: var(--transition);
    border-bottom: 3px solid var(--secondary);
    width: 100%;
}

header.scrolled {
    padding: 8px 30px;
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.99) 0%, rgba(44, 108, 176, 0.99) 100%);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 200px;
}

.logo-container img {
    height: 45px;
    border-radius: 12px;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
}

.logo-container img:hover {
    transform: scale(1.1) rotate(3deg);
    border-color: var(--secondary);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    filter: brightness(1.2);
}

header a.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    white-space: nowrap;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

header a.logo-text:hover {
    text-shadow: 0 0 15px rgba(255,255,255,0.5);
}

/* === NAVBAR CORREGIDO - PROBLEMA 1 SOLUCIONADO === */
.navbar {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: var(--transition);
    padding: 10px 16px;
    border-radius: 25px;
    position: relative;
    font-size: 13px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: block;
    text-align: center;
    min-width: 80px;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.nav-menu li a:hover::before {
    left: 100%;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 70%;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* === MENÚ HAMBURGUESA MEJORADO - PROBLEMA 2 SOLUCIONADO === */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    transition: var(--transition);
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background: var(--secondary);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background: var(--secondary);
}

/* === PRELOADER MÁS MODERNO === */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--darker) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--secondary);
    border-right: 4px solid var(--secondary-light);
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.6);
    position: relative;
}

.loader::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === SECCIONES MEJORADAS CON EFECTOS === */
section {
    padding: 120px 50px;
    position: relative;
    width: 100%;
    overflow: hidden;
}

section h1.heading {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 40px;
    color: var(--dark);
    position: relative;
    padding-bottom: 25px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

section h1.heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 10px;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 60px;
    font-weight: 500;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

/* === HOME SECTION MEJORADA - PROBLEMA 2 SOLUCIONADO === */
.home {
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.95) 0%, rgba(44, 108, 176, 0.9) 100%), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 100% 100%;
    animation: float 6s ease-in-out infinite;
}

.home-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 20px;
    width: 100%;
}

.logo-home {
    text-align: center;
    margin-bottom: 40px;
    animation: float 3s ease-in-out infinite;
}

.logo-home img {
    height: 100px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 4px solid white;
    transition: var(--transition);
    filter: brightness(1.1);
}

.logo-home img:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 20px 45px rgba(0,0,0,0.4);
    filter: brightness(1.2);
}

.home-content h1 {
    font-size: 4rem;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 3px 3px 20px rgba(0,0,0,0.5);
    font-weight: 900;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
    background: linear-gradient(135deg, #fff 0%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-content p {
    font-size: 1.5rem;
    margin-bottom: 50px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    font-weight: 300;
    animation: fadeInUp 1.2s ease;
    line-height: 1.6;
    opacity: 0.95;
}

.home-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 80px;
    animation: fadeInUp 1.4s ease;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 35px 30px;
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.3);
    transition: var(--transition);
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.8s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-12px) scale(1.05);
    background: rgba(255,255,255,0.25);
    border-color: var(--secondary);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--secondary);
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.stat-text {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.cta-button {
    margin-top: 50px;
    padding: 22px 50px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 60px;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.5);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.6s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, #ff5252 100%);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 30px 60px rgba(231, 76, 60, 0.7);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === BOTÓN ADMIN ACCESS MEJORADO - PROBLEMA 3 SOLUCIONADO === */
.admin-access {
    position: fixed;
    bottom: 140px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.5);
    transition: var(--transition);
    font-size: 28px;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

.admin-access:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, #ff5252 100%);
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 20px 45px rgba(231, 76, 60, 0.7);
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === WHATSAPP FLOTANTE MEJORADO === */
.floating-whatsapp {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: var(--transition);
    border: 3px solid white;
    animation: pulse 2s infinite;
}

.floating-whatsapp:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 20px 45px rgba(37, 211, 102, 0.7);
    animation: none;
}

/* === BOX CONTAINER MEJORADO CON EFECTOS === */
.box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.box {
    background: white;
    padding: 50px 40px;
    text-align: center;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

.box:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--box-shadow-xl);
    border-color: var(--primary);
}

.box i {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 30px;
    transition: var(--transition);
    position: relative;
}

.box:hover i {
    color: var(--secondary);
    transform: scale(1.2) rotate(10deg);
}

.box h3 {
    font-size: 26px;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 700;
    position: relative;
}

.box p {
    font-size: 17px;
    color: var(--text-light);
    line-height: 1.8;
    font-weight: 500;
}

/* === ABOUT SECTION MEJORADA - PROBLEMA 3 SOLUCIONADO === */
.about .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
    margin-top: 40px;
}

.about .image {
    flex: 1 1 450px;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--box-shadow-xl);
    position: relative;
}

.about .image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(26,75,140,0.1), rgba(231,76,60,0.1));
    z-index: 1;
}

.about .image img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
    filter: brightness(1.05);
}

.about .image:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.about .content {
    flex: 1 1 550px;
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-section img {
    height: 80px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 3px solid var(--primary);
    filter: brightness(1.1);
    transition: var(--transition);
}

.logo-section img:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.about .content p {
    margin: 25px 0;
    line-height: 1.9;
    font-size: 18px;
    color: var(--text);
    font-weight: 500;
}

/* === CURSOS - CUADRÍCULA 4x4 MEJORADA === */
.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.course-card {
    background: white;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 3px solid transparent;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--box-shadow-xl);
    border-color: var(--primary);
}

.course-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.course-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(26,75,140,0.3), rgba(231,76,60,0.3));
    z-index: 1;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: brightness(1.05);
}

.course-card:hover .course-image img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.course-header {
    padding: 25px 20px 15px;
    border-bottom: 2px solid #f0f2f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: var(--transition);
}

.course-header:hover {
    background: #f8f9fa;
}

.course-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 10px;
    transition: var(--transition);
}

.course-header:hover .course-icon {
    color: var(--secondary);
    transform: scale(1.1);
}

.course-title {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.course-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, padding 0.6s ease;
}

.course-body.expanded {
    padding: 20px;
    max-height: 1200px;
}

.course-detail {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.course-detail i {
    width: 24px;
    color: var(--primary);
    margin-right: 12px;
    font-size: 16px;
}

.course-pricing {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #e4e6eb;
}

.price-column {
    text-align: center;
}

.price-label {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
    font-weight: 600;
}

.original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 16px;
}

.promo-price {
    color: var(--secondary);
    font-weight: 800;
    font-size: 18px;
}

.course-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f2f5;
}

.course-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* === BOTONES MÁS ATRACTIVOS === */
.btn-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-inscribirse {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    border: 3px solid transparent;
    font-size: 15px;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn-inscribirse:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, #ff5252 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.6);
}

.btn-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: 3px solid transparent;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(26, 75, 140, 0.4);
}

.btn-info:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(26, 75, 140, 0.6);
}

.btn-testimonio {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    border: 3px solid transparent;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-testimonio:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-dark) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.6);
}

/* === TESTIMONIOS MEJORADOS CON GRID RESPONSIVO === */
.testimonial-container {
    margin-top: 40px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    border: 2px solid #e4e6eb;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--box-shadow-xl);
    border-color: var(--primary);
}

.testimonial-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #f0f2f5;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    flex-shrink: 0;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-info h4 {
    margin: 0;
    color: var(--dark);
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-course {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-rating {
    color: #ffc107;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.testimonial-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.testimonial-text {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text);
    font-size: 15px;
    position: relative;
    padding-left: 20px;
    flex: 1;
}

.testimonial-text::before {
    content: '"';
    font-size: 60px;
    color: var(--primary);
    position: absolute;
    left: -15px;
    top: -20px;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-date {
    color: var(--gray);
    font-size: 12px;
    text-align: right;
    font-style: italic;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
}

.testimonial-media {
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
    flex-shrink: 0;
    position: relative;
}

.testimonial-media img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    filter: brightness(1.05);
}

.testimonial-media img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.add-testimonial {
    text-align: center;
    margin-top: 40px;
}

/* === VALIDACIÓN DE CERTIFICADOS MEJORADA - PROBLEMA 8 SOLUCIONADO === */
.certificate-validation {
    padding: 100px 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.validation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.validation-card {
    background: white;
    padding: 35px 25px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.validation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.validation-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary);
}

.validation-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(26, 75, 140, 0.3);
}

.validation-icon img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    filter: brightness(1.2);
    object-fit: contain;
}

.validation-card h3 {
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

.validation-card p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 14px;
}

.btn-validation {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(26, 75, 140, 0.3);
}

.btn-validation:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 75, 140, 0.4);
}

/* === CERTIFICACIONES ELITE ACADEMY MEJORADA - PROBLEMA 6 SOLUCIONADO === */
.elite-certifications {
    padding: 100px 50px;
    background: white;
}

.certification-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.certification-header {
    text-align: center;
    margin-bottom: 40px;
}

.certification-header h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.certification-search {
    margin-bottom: 40px;
    text-align: center;
}

.search-box {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#cedulaSearch {
    padding: 15px 20px;
    border: 3px solid #e4e6eb;
    border-radius: 50px;
    font-size: 16px;
    width: 300px;
    max-width: 100%;
    transition: var(--transition);
    background: white;
}

#cedulaSearch:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.btn-search {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-search:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, #229954 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.search-note {
    color: var(--gray);
    font-size: 14px;
    font-style: italic;
    text-align: center;
    width: 100%;
}

.certification-results {
    min-height: 200px;
    background: #f8f9fa;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    margin-bottom: 30px;
    border: 2px dashed #e4e6eb;
    transition: var(--transition);
}

.results-placeholder {
    color: var(--gray);
    text-align: center;
}

.results-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.certification-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid var(--warning);
    text-align: center;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--dark);
    justify-content: center;
}

.info-box i {
    color: var(--warning);
    font-size: 20px;
}

/* === INSCRIPCIÓN MEJORADA === */
.inscription-form {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow-xl);
    border: 3px solid #f0f2f5;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 3px solid #e4e6eb;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* === CONTACTO MEJORADO === */
.contact .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.contact .box {
    background: white;
    padding: 40px 30px;
    text-align: center;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.contact .box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.contact .box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary);
}

.contact .box i {
    font-size: 45px;
    margin-bottom: 20px;
    color: var(--primary);
    transition: var(--transition);
}

.contact .box:hover i {
    color: var(--secondary);
    transform: scale(1.2) rotate(10deg);
}

.contact .box p {
    font-size: 16px;
    text-align: center;
    color: var(--text);
    font-weight: 600;
}

.location-toggle {
    display: inline-flex;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: var(--box-shadow);
    border: 2px solid #e4e6eb;
    margin-bottom: 40px;
}

.location-btn {
    padding: 12px 30px;
    border: none;
    background: transparent;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    color: var(--gray);
    font-size: 14px;
}

.location-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(26, 75, 140, 0.3);
}

.location-btn:hover:not(.active) {
    background: #f8f9fa;
    color: var(--primary);
    transform: translateY(-1px);
}

.location-content {
    display: none;
    animation: fadeIn 0.6s ease;
}

.location-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === FOOTER MEJORADO === */
footer {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    color: white;
    text-align: center;
    padding: 50px 30px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 70px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: 3px solid white;
    filter: brightness(1.1);
}

.footer-logo span {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.social-media {
    margin: 40px 0;
}

.social-media h3 {
    font-size: 22px;
    margin-bottom: 25px;
    color: white;
    font-weight: 700;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.red-social {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 22px;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.red-social::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.red-social:hover::before {
    left: 100%;
}

.red-social.facebook {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(59, 89, 152, 0.4);
}

.red-social.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(188, 24, 136, 0.4);
}

.red-social.tiktok {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.red-social:hover {
    transform: scale(1.12) rotate(5deg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

footer p {
    margin-top: 30px;
    font-size: 15px;
    opacity: 0.9;
    font-weight: 500;
}

/* === MODALES MEJORADOS === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 3px solid var(--primary);
    animation: modalAppear 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    background: #f8f9fa;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.close-modal:hover {
    background: var(--secondary);
    color: white;
    transform: rotate(90deg);
}

/* === RATING SYSTEM - CORREGIDO === */
.rating {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 15px 0;
}

.star {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.star:hover {
    transform: scale(1.3) rotate(10deg);
    color: #ffc107;
}

.star.selected {
    color: #ffc107;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.8);
    animation: starPop 0.4s ease;
}

@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1.3); }
}

/* === PANEL ADMINISTRADOR - MEJORADO Y RESPONSIVE === */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.admin-modal.active {
    display: flex;
}

.admin-modal .modal-content {
    background: white;
    border-radius: var(--border-radius-xl);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    border: 4px solid var(--primary);
    z-index: 10001;
}

#adminLogin {
    padding: 40px;
    text-align: center;
}

#adminLogin h2 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 28px;
}

#adminLogin .form-group {
    margin-bottom: 25px;
}

#adminLogin input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.admin-tabs {
    display: flex;
    border-bottom: 3px solid #e4e6eb;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 18px 35px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray);
    border-bottom: 4px solid transparent;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tab-btn:hover:not(.active) {
    color: var(--primary);
    background: rgba(26, 75, 140, 0.1);
}

.admin-tab-content {
    padding: 25px;
    display: none;
    animation: fadeIn 0.5s ease;
    max-height: 60vh;
    overflow-y: auto;
}

.admin-tab-content.active {
    display: block;
}

/* === TABLAS RESPONSIVE PARA ADMIN === */
.admin-table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #f0f2f5;
    font-size: 14px;
    white-space: nowrap;
}

.admin-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    transition: var(--transition);
}

/* === ESTILOS PARA CERTIFICADO HORIZONTAL - PROBLEMAS 1, 4, 5, 7 SOLUCIONADOS === */
.certificado-horizontal {
    width: 29.7cm;
    height: 21cm;
    background: url('images/certificado_fondo.jpg') no-repeat center center;
    background-size: cover;
    border: 15px solid var(--primary);
    position: relative;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 1.5cm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    page-break-inside: avoid;
}

.certificado-borde {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid var(--secondary);
    pointer-events: none;
}

.certificado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e4e6eb;
}

.logo-left, .logo-right {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.escudo-ecuador, .logo-academia {
    max-width: 100%;
    max-height: 100%;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    padding: 8px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.titulo-centro {
    text-align: center;
    flex: 1;
    margin: 0 20px;
}

.titulo-centro h1 {
    font-size: 18px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.titulo-centro h2 {
    font-size: 16px;
    color: var(--dark);
    font-weight: 600;
    font-style: italic;
}

.certificado-body {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
}

.certificado-titulo h3 {
    font-size: 32px;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.certificado-titulo p {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 30px;
    font-weight: 500;
}

.nombre-estudiante {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin: 15px 0;
    text-transform: uppercase;
    border-bottom: 2px solid #e4e6eb;
    padding-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.cedula-estudiante {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 30px;
    font-weight: 600;
}

.mensaje-certificado p {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 500;
}

.programa-estudiante {
    font-size: 22px;
    color: var(--primary);
    font-weight: 700;
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
}

.fecha-certificacion {
    font-size: 16px;
    color: var(--text);
    margin-top: 30px;
    font-style: italic;
    font-weight: 500;
}

.certificado-firmas {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e4e6eb;
    flex-wrap: wrap;
    gap: 20px;
}

.firma-item {
    text-align: center;
    width: 45%;
    margin-bottom: 10px;
    min-width: 200px;
}

.linea-firma {
    border-top: 2px solid var(--dark);
    width: 80%;
    margin: 0 auto 10px;
    padding-top: 5px;
}

.nombre-firma {
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 3px;
    line-height: 1.2;
}

.cargo-firma {
    font-size: 10px;
    color: var(--text);
    margin-bottom: 2px;
    font-weight: 600;
    line-height: 1.2;
}

.institucion-firma {
    font-size: 9px;
    color: var(--gray);
    font-style: italic;
    line-height: 1.2;
}

.certificado-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e4e6eb;
}

.qr-validation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.qr-code {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border: 2px solid #e4e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--gray);
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    font-weight: 600;
}

.texto-validacion {
    font-size: 10px;
    color: var(--gray);
    text-align: right;
    font-style: italic;
}

/* === ESTILOS PARA IMPRESIÓN - PROBLEMA 4 SOLUCIONADO === */
@media print {
    body * {
        visibility: hidden;
    }
    
    .certificate-modal-content,
    .certificate-modal-content * {
        visibility: visible;
    }
    
    .certificate-modal-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border: none;
        box-shadow: none;
        background: white;
    }
    
    .certificado-horizontal {
        width: 29.7cm !important;
        height: 21cm !important;
        border: 15px solid var(--primary) !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 1.5cm !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .certificate-actions {
        display: none !important;
    }
    
    .modal-content {
        box-shadow: none;
        border: none;
        max-width: none !important;
        max-height: none !important;
    }
    
    @page {
        size: landscape;
        margin: 0;
    }
}

/* === RESPONSIVE DESIGN MEJORADO - CORRECCIONES PARA MÓVIL === */
@media (max-width: 1200px) {
    .course-grid,
    .validation-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .certificado-horizontal {
        width: 100%;
        height: auto;
        padding: 1.5cm;
    }
    
    .nav-menu {
        gap: 12px;
    }
    
    .nav-menu li a {
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .course-grid,
    .validation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certificado-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo-left, .logo-right {
        width: 100px;
        height: 100px;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .nav-menu li a {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    header {
        padding: 10px 25px;
    }
    
    header.scrolled {
        padding: 6px 25px;
    }
}

/* === CORRECCIONES CRÍTICAS PARA MÓVIL (768px) === */
@media (max-width: 768px) {
    /* Layout general */
    section {
        padding: 100px 20px !important;
    }

    .course-grid,
    .validation-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .certificado-horizontal {
        padding: 1cm;
        border-width: 10px;
        transform: scale(0.9);
        transform-origin: center top;
    }
    
    .certificado-firmas {
        flex-direction: column;
        gap: 30px;
    }
    
    .firma-item {
        width: 100%;
    }
    
    .certificado-titulo h3 {
        font-size: 28px;
    }
    
    .nombre-estudiante {
        font-size: 24px;
    }
    
    /* === MENÚ HAMBURGUESA - CORREGIDO COMPLETAMENTE === */
    .menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 100px;
        gap: 20px;
        transition: var(--transition);
        box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 90%;
        text-align: center;
    }
    
    .nav-menu li a {
        padding: 20px;
        font-size: 18px;
        text-align: center;
        border-radius: 15px;
        display: block;
        width: 100%;
        margin: 5px 0;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(10px);
    }

    .nav-menu li a:hover {
        background: rgba(255,255,255,0.25);
        transform: translateY(-3px);
    }
    
    /* Header móvil */
    header {
        padding: 10px 20px;
        width: 100%;
    }
    
    .logo-container {
        min-width: auto;
        gap: 10px;
    }
    
    .logo-container img {
        height: 40px;
    }
    
    header a.logo-text {
        font-size: 18px;
    }

    /* Home section móvil */
    .home-content h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }

    .home-content p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .home-stats {
        gap: 20px;
        margin-top: 40px;
    }

    .stat-item {
        min-width: 150px;
        padding: 25px 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-text {
        font-size: 1rem;
    }

    /* Botones flotantes móvil */
    .admin-access {
        bottom: 100px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .floating-whatsapp {
        bottom: 30px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    /* Formularios móvil */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .inscription-form {
        padding: 30px 20px;
    }

    /* Testimonios móvil */
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        margin: 0 10px;
    }

    /* Certificaciones móvil */
    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    #cedulaSearch {
        width: 100%;
        max-width: 100%;
    }

    .certification-results {
        padding: 20px;
    }
}

/* === CORRECCIONES PARA MÓVIL PEQUEÑO (480px) === */
@media (max-width: 480px) {
    .certificado-horizontal {
        padding: 0.5cm;
        border-width: 5px;
        transform: scale(0.8);
    }
    
    .titulo-centro h1 {
        font-size: 14px;
    }
    
    .titulo-centro h2 {
        font-size: 12px;
    }
    
    .certificado-titulo h3 {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .nombre-estudiante {
        font-size: 20px;
    }
    
    .programa-estudiante {
        font-size: 18px;
    }
    
    header {
        padding: 8px 15px;
    }
    
    .logo-container {
        gap: 8px;
        min-width: 150px;
    }
    
    .logo-container img {
        height: 35px;
    }
    
    header a.logo-text {
        font-size: 16px;
    }
    
    section {
        padding: 80px 15px !important;
    }

    .home-content h1 {
        font-size: 2rem;
    }

    .home-content p {
        font-size: 1rem;
    }

    .home-stats {
        flex-direction: column;
        gap: 15px;
    }

    .stat-item {
        width: 100%;
        min-width: auto;
    }

    /* Botones más pequeños en móvil */
    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .cta-button {
        padding: 18px 35px;
        font-size: 1.1rem;
    }

    /* Ajustes de texto */
    section h1.heading {
        font-size: 2.5rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }
}

/* === CORRECCIONES EXTRA PARA PROBLEMAS ESPECÍFICOS DE MÓVIL === */

/* Prevenir scroll horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Asegurar que todo el contenido esté dentro del viewport */
.container, .home-content, .box-container, .course-grid, .testimonial-grid {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix para elementos que se salían en móvil */
.certificate-modal-content {
    max-width: 95% !important;
    margin: 10px auto !important;
}

.certificate-actions {
    flex-direction: column;
    gap: 10px;
    padding: 15px !important;
}

/* Ajustes para el modal de testimonios en móvil */
.testimonial-modal-content {
    width: 95% !important;
    margin: 20px auto !important;
}

/* Mejoras para la experiencia táctil */
@media (hover: none) and (pointer: coarse) {
    .btn:hover, 
    .course-card:hover, 
    .testimonial-card:hover,
    .box:hover {
        transform: none;
    }
    
    .nav-menu li a:hover {
        transform: none;
        background: rgba(255,255,255,0.2);
    }
}

/* === EFECTOS DE ANIMACIÓN MEJORADOS === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === SCROLLBAR PERSONALIZADO === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* === EFECTOS DE HOVER MEJORADOS === */
* {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === ESTILOS ESPECÍFICOS PARA CERTIFICADO MODAL === */
#certificateModal {
    z-index: 10000 !important;
}

.certificate-modal-content {
    max-width: 95% !important;
    max-height: 90vh !important;
    margin: 20px auto !important;
    position: relative;
    z-index: 1000;
    background: white !important;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}

.certificate-actions {
    position: sticky !important;
    bottom: 0 !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, white 100%) !important;
    padding: 20px !important;
    border-top: 3px solid #1a4b8c !important;
    z-index: 1001 !important;
    margin-top: 30px !important;
    display: flex;
    justify-content: center;
    gap: 20px;
    backdrop-filter: blur(5px);
}

.certificate-container {
    max-height: calc(90vh - 150px) !important;
    overflow-y: auto !important;
    padding: 20px !important;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px;
}

.certificado-horizontal {
    min-width: 800px !important;
    transform-origin: top left !important;
    background: white;
    padding: 30px;
    border: 15px solid #1a4b8c;
    border-radius: 5px;
}

/* Asegurar que los botones no se superpongan */
.btn-primary, .btn-secondary {
    position: relative !important;
    z-index: 1002 !important;
    transform: none !important;
}

/* Responsive para certificado */
@media (max-width: 900px) {
    .certificado-horizontal {
        min-width: 600px !important;
        transform: scale(0.9);
    }
}

@media (max-width: 700px) {
    .certificado-horizontal {
        min-width: 500px !important;
        transform: scale(0.8);
    }
    
    .certificate-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* === ESTILOS DE NOTIFICACIONES === */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.notification-close:hover {
    opacity: 0.8;
}

.admin-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin: 2px;
}

.view-btn {
    background: #3498db;
    color: white;
}

.view-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.no-testimonials {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.inscription-details p {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}

.inscription-details h3 {
    color: var(--primary);
    margin: 25px 0 15px 0;
}

.loading-results {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.loading-results .fa-spinner {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary);
}

.certificate-found, .certificate-not-found {
    text-align: center;
    padding: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e4e6eb;
}

.detail-label {
    font-weight: 600;
    color: var(--dark);
}

.detail-value {
    color: var(--text);
}

.status-valid {
    background: var(--success);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-expired {
    background: var(--error);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.certificate-actions {
    margin-top: 20px;
}

.btn-success {
    background: var(--success);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-success:hover {
    background: #229954;
}

.help-text {
    font-size: 14px;
    color: var(--gray);
    margin-top: 10px;
}

.testimonial-media {
    margin: 15px 0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
}

.testimonial-media img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.testimonial-media video {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
    background: #000;
}

.certificate-modal-content {
    max-width: 800px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border: 10px solid var(--primary);
}

.certificate-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.certificate-header img {
    height: 80px;
    margin-bottom: 15px;
}

.certificate-header h2 {
    font-size: 28px;
    margin: 0;
    font-weight: 800;
}

.certificate-body {
    padding: 40px;
    text-align: center;
}

.certificate-body h3 {
    font-size: 32px;
    color: var(--primary);
    margin: 20px 0;
    font-weight: 700;
}

.certificate-body h4 {
    font-size: 24px;
    color: var(--dark);
    margin: 15px 0;
    font-weight: 600;
}

.certificate-signatures {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 50px;
}

.signature {
    text-align: center;
}

.signature p:first-child {
    margin-bottom: 10px;
    font-size: 18px;
}

.certificate-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 2px solid #e4e6eb;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}
.approve-btn {
    background: #27ae60;
    color: white;
}
.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}
.status-pending {
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-approved {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-rejected {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Botones de moderación */
.approve-btn {
    background: #27ae60;
    color: white;
}

.approve-btn:hover {
    background: #229954;
}

.reject-btn {
    background: #e74c3c;
    color: white;
}

.reject-btn:hover {
    background: #c0392b;
}