/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* Colores principales - Basados en el logo CEC */
    --primary-color: #e30613;      /* Rojo CEC */
    --primary-dark: #b30510;
    --primary-light: #ff1a27;
    --secondary-color: #00a651;    /* Verde CEC */
    --secondary-dark: #008040;
    --secondary-light: #00c962;
    --accent-yellow: #ffd800;      /* Amarillo CEC */
    --accent-orange: #ff9800;
    --accent-blue: #0066cc;        /* Azul CEC */
    --accent-color: #ffd800;
    
    /* Colores de texto */
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --text-white: #ffffff;
    
    /* Colores de fondo */
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #1a1a1a;
    --bg-gradient: linear-gradient(135deg, #e30613 0%, #ff9800 50%, #00a651 100%);
    --bg-gradient-alt: linear-gradient(135deg, #00a651 0%, #0066cc 100%);
    --bg-gradient-yellow: linear-gradient(135deg, #ffd800 0%, #ff9800 100%);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Tipografía */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

body {
    font-family: var(--font-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

ul {
    list-style: none;
}

/* Mejorar rendimiento de scroll en móviles */
* {
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   UTILIDADES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    max-width: 100%;
    padding: 0 1.5rem;
}

.gradient-text {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.1), rgba(0, 166, 81, 0.1));
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--bg-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

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

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

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--text-white);
}

.btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.logo img {
    height: 55px;
    width: auto;
}

.logo-text {
    color: var(--text-dark);
}

.logo strong {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-yellow), var(--secondary-color), var(--accent-blue));
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e30613 0%, #ff9800 30%, #ffd800 60%, #00a651 90%);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.95), rgba(255, 152, 0, 0.9), rgba(0, 166, 81, 0.95));
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-white);
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 950px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
    min-height: 100px;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-content {
    text-align: left;
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-number::after {
    content: '+';
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: var(--text-white);
    font-size: 2rem;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    padding: 2.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.about-card:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.about-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
    color: var(--text-white);
    border-radius: var(--radius-lg);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-card p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    padding: 2.5rem;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.service-card.featured {
    background: var(--bg-gradient);
    color: var(--text-white);
    transform: scale(1.05);
}

.service-card.featured:hover {
    transform: scale(1.08) translateY(-10px);
}

.featured-badge {
    position: absolute;
    top: -15px;
    right: 30px;
    background: var(--accent-yellow);
    color: var(--text-dark);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.1), rgba(0, 166, 81, 0.1));
    color: var(--primary-color);
    border-radius: var(--radius-lg);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-card.featured .service-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.service-card h3 {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card.featured h3 {
    color: var(--text-white);
}

.service-card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-card.featured p {
    color: rgba(255, 255, 255, 0.95);
}

.service-features {
    margin-bottom: 2rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-medium);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card.featured .service-features li {
    color: var(--text-white);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.service-features i {
    color: var(--secondary-color);
}

.service-card.featured .service-features i {
    color: var(--text-white);
}

/* ============================================
   CONVENIOS SECTION
   ============================================ */
.convenios {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.convenios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    align-items: center;
}

.convenio-card {
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.convenio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.convenio-image {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.convenio-image img {
    max-width: 200px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: var(--transition-normal);
}

.convenio-card:hover .convenio-image img {
    filter: grayscale(0%);
}

/* ============================================
   SEDES SECTION
   ============================================ */
.sedes {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
    overflow: hidden;
}

.sedes-slider-container {
    position: relative;
    margin-top: 3rem;
    padding: 0 4rem;
}

.sedes-slider {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0;
}

.sedes-slider::-webkit-scrollbar {
    display: none;
}

.sede-card {
    flex: 0 0 300px;
    padding: 2.5rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.sede-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.sede-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
    color: var(--text-white);
    border-radius: var(--radius-full);
    font-size: 2rem;
}

.sede-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.sede-card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 0;
}

.slider-btn.next {
    right: 0;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    align-items: center;
}

.contact-info h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    transition: var(--transition-normal);
}

.contact-item:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transform: translateX(10px);
}

.contact-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
    color: var(--text-white);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
}

.contact-text h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-text p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.cta-card {
    padding: 3rem;
    background: var(--bg-gradient);
    color: var(--text-white);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-2xl);
}

.cta-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 3rem;
}

.cta-card h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-card p {
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.cta-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.cta-feature i {
    color: var(--accent-yellow);
    font-size: 1.25rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-primary);
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-section ul li {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.footer-section ul li:hover {
    color: var(--text-white);
    padding-left: 0.5rem;
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--accent-yellow);
}

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

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
}

.footer-bottom i {
    color: #e74c3c;
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: var(--transition-normal);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-2xl);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.campus-float {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent-blue);
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: var(--transition-normal);
    animation: pulse-blue 2s infinite;
}

.campus-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-2xl);
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 102, 204, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

.back-to-top {
    position: fixed;
    bottom: 190px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-dark);
    transform: translateY(-5px);
}

/* ============================================
   MODAL SELECTOR DE SEDES
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 2rem 0;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-dark);
    transition: var(--transition-normal);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: rotate(90deg);
}

.modal-header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.05), rgba(0, 166, 81, 0.05));
    border-bottom: 2px solid var(--bg-light);
}

.modal-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-medium);
    font-size: 1rem;
}

.modal-body {
    padding: 2rem;
}

.sedes-grid-modal {
    display: grid;
    gap: 0.75rem;
}

.sede-modal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
}

.sede-modal-item:hover {
    background: var(--bg-white);
    border-color: var(--secondary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.sede-modal-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-gradient);
    color: var(--text-white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.sede-modal-info {
    flex: 1;
}

.sede-modal-info h4 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.sede-modal-info p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 0;
}

.sede-modal-item > i:last-child {
    color: var(--secondary-color);
    font-size: 1.25rem;
    opacity: 0;
    transition: var(--transition-normal);
}

.sede-modal-item:hover > i:last-child {
    opacity: 1;
}

/* Botones que abren el modal */
.open-modal-btn {
    cursor: pointer;
    border: none;
}

/* ============================================
   EFECTOS 3D Y BACKGROUND
   ============================================ */

/* Canvas 3D de fondo */
.bg-3d-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

/* Cards 3D con transformación */
.service-card,
.about-card,
.convenio-card,
.sede-card {
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    will-change: transform;
}

/* ============================================
   FORMULARIO MEJORADO - DISEÑO PREMIUM
   ============================================ */

.modal-container.modal-form-improved {
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Scroll suave en el modal */
.modal-form-improved::-webkit-scrollbar {
    width: 8px;
}

.modal-form-improved::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.modal-form-improved::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.modal-form-improved::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.modal-header-improved {
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.05), rgba(0, 166, 81, 0.05));
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    border-bottom: none;
}

.modal-icon-bubble {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.3);
    animation: bubble-float 3s ease-in-out infinite;
}

.modal-icon-bubble i {
    font-size: 2rem;
    color: var(--text-white);
}

@keyframes bubble-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.modal-header-improved h3 {
    font-family: var(--font-primary);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-header-improved p {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin: 0;
}

.modal-body-improved {
    padding: 2rem;
    padding-bottom: 2.5rem;
    background: var(--bg-white);
}

.contact-form-improved {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Filas del formulario */
.form-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

.form-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--text-medium);
    font-size: 1.125rem;
    margin-top: 32px;
    transition: color 0.3s ease;
}

.form-row:focus-within .form-icon {
    color: var(--primary-color);
}

.form-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-input-wrapper label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    margin: 0;
    padding-left: 0.25rem;
}

.form-input-wrapper input,
.form-input-wrapper select,
.form-input-wrapper textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
    color: var(--text-dark);
}

.form-input-wrapper input:focus,
.form-input-wrapper select:focus,
.form-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.1);
    transform: translateY(-1px);
}

.form-input-wrapper select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e30613' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-input-wrapper textarea {
    resize: vertical;
    min-height: 90px;
    font-family: var(--font-secondary);
}

/* Botón de envío con gradiente mejorado */
.btn-submit-gradient {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, #e30613 0%, #ff6b00 50%, #00a651 100%);
    background-size: 200% auto;
    color: var(--text-white);
    font-weight: 600;
    font-size: 1.05rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 24px rgba(227, 6, 19, 0.3);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-submit-gradient::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 ease;
}

.btn-submit-gradient:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(227, 6, 19, 0.4);
}

.btn-submit-gradient:hover::before {
    left: 100%;
}

.btn-submit-gradient:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

.btn-submit-gradient i {
    font-size: 1.25rem;
}

/* Mensaje de privacidad */
.form-privacy {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 166, 81, 0.05);
    border-radius: 10px;
    margin-bottom: 0;
}

.form-privacy i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Botón cerrar mejorado */
.modal-form-improved .modal-close {
    background: rgba(227, 6, 19, 0.1);
    color: var(--primary-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.25rem;
}

.modal-form-improved .modal-close:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: rotate(90deg) scale(1.1);
}

/* Animación de entrada del modal mejorado */
.modal-form-improved {
    animation: modalFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
    color: var(--text-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet landscape y desktop pequeño */
@media (max-width: 1200px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero {
        padding: 7rem 0 3rem;
    }
    
    .section-title {
        font-size: clamp(1.875rem, 4.5vw, 2.75rem);
    }
    
    .about-content,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .sedes-slider-container {
        padding: 0 3rem;
    }
    
    .convenios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card.featured {
        transform: scale(1);
    }
    
    .service-card.featured:hover {
        transform: translateY(-10px);
    }
    
    /* Hero optimizado para móvil */
    .hero {
        padding: 6rem 0 2rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: clamp(2rem, 5vw, 3rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 2vw, 1.125rem);
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        gap: 1rem;
        margin-bottom: 3rem;
    }
    
    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Stats optimizados */
    .stat-item {
        justify-content: flex-start;
        padding: 1.25rem 1rem;
        min-height: 90px;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* About y servicios */
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-card,
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .about-icon,
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    /* Secciones generales */
    .container {
        padding: 0 1.5rem;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .convenios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .sedes-slider-container {
        padding: 0 2rem;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
    
    .campus-float {
        bottom: 95px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .back-to-top {
        bottom: 170px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Modal responsive */
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .sede-modal-item {
        padding: 0.875rem 1rem;
    }
    
    .sede-modal-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .sede-modal-info h4 {
        font-size: 1rem;
    }
    
    /* Formulario mejorado responsive */
    .modal-form-improved {
        width: 95%;
        max-width: 95%;
        max-height: 85vh;
        border-radius: 20px;
    }
    
    .modal-overlay {
        padding: 1rem 0;
    }
    
    .modal-header-improved {
        padding: 1.75rem 1.5rem 1.25rem;
    }
    
    .modal-icon-bubble {
        width: 60px;
        height: 60px;
    }
    
    .modal-icon-bubble i {
        font-size: 1.75rem;
    }
    
    .modal-header-improved h3 {
        font-size: 1.5rem;
    }
    
    .modal-body-improved {
        padding: 1.5rem;
        padding-bottom: 2rem;
    }
    
    .form-icon {
        margin-top: 28px;
        font-size: 1rem;
    }
    
    .btn-submit-gradient {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Container más compacto */
    .container {
        padding: 0 1rem;
    }
    
    /* Hero ultra compacto */
    .hero {
        padding: 5rem 0 2rem;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        gap: 0.875rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* Stats más compactos */
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem 0.875rem;
        gap: 0.75rem;
        min-height: 80px;
    }
    
    .stat-icon {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Secciones */
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    .section-description {
        font-size: 0.95rem;
    }
    
    .section-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    /* Cards */
    .about-card,
    .service-card {
        padding: 1.75rem 1.25rem;
    }
    
    .about-icon,
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .about-card h3,
    .service-card h3 {
        font-size: 1.375rem;
    }
    
    /* Convenios */
    .convenios-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .convenio-card {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    /* Sedes slider */
    .sede-card {
        flex: 0 0 260px;
        padding: 2rem 1.5rem;
    }
    
    .sedes-slider-container {
        padding: 0 1rem;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .cta-card {
        padding: 2rem 1.5rem;
    }
    
    .cta-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 0 2rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
    
    /* Modal más compacto */
    .modal-container {
        width: 98%;
        border-radius: 1rem;
    }
    
    .modal-header {
        padding: 1.5rem 1rem 0.875rem;
    }
    
    .modal-header i {
        font-size: 2.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .modal-header p {
        font-size: 0.875rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .sede-modal-item {
        padding: 0.75rem 0.875rem;
        gap: 0.75rem;
    }
    
    .sede-modal-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    
    .sede-modal-info h4 {
        font-size: 0.95rem;
    }
    
    .sede-modal-info p {
        font-size: 0.8rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.125rem;
    }
    
    /* Botones flotantes más pequeños */
    .whatsapp-float,
    .campus-float {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float {
        font-size: 1.5rem;
    }
    
    .campus-float {
        font-size: 1.375rem;
        bottom: 85px;
    }
    
    /* Formulario mejorado para móviles pequeños */
    .modal-form-improved {
        width: 98%;
        max-height: 80vh;
        border-radius: 16px;
    }
    
    .modal-overlay {
        padding: 0.5rem 0;
    }
    
    .modal-header-improved {
        padding: 1.5rem 1.25rem 1rem;
    }
    
    .modal-icon-bubble {
        width: 55px;
        height: 55px;
    }
    
    .modal-icon-bubble i {
        font-size: 1.5rem;
    }
    
    .modal-header-improved h3 {
        font-size: 1.25rem;
    }
    
    .modal-header-improved p {
        font-size: 0.875rem;
    }
    
    .modal-body-improved {
        padding: 1.25rem;
        padding-bottom: 1.75rem;
    }
    
    .contact-form-improved {
        gap: 1rem;
    }
    
    .form-row {
        gap: 0.75rem;
    }
    
    .form-icon {
        margin-top: 26px;
        width: 20px;
        font-size: 0.95rem;
    }
    
    .form-input-wrapper label {
        font-size: 0.8rem;
    }
    
    .form-input-wrapper input,
    .form-input-wrapper select,
    .form-input-wrapper textarea {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .btn-submit-gradient {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    
    .btn-submit-gradient i {
        font-size: 1.125rem;
    }
    
    .form-privacy {
        font-size: 0.75rem;
        padding: 0.625rem;
    }
    
    .modal-form-improved .modal-close {
        width: 38px;
        height: 38px;
        font-size: 1.125rem;
        top: 0.875rem;
        right: 0.875rem;
    }
}
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.125rem;
    }
    
    /* Botones flotantes más pequeños */
    .whatsapp-float,
    .campus-float {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float {
        font-size: 1.5rem;
    }
    
    .campus-float {
        font-size: 1.375rem;
        bottom: 85px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 155px;
    }
}
        padding: 0 1rem;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}