:root{
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --dark-blue: #1e40af;
    --light-blue: #dbeafe;
    --accent-blue: #60a5fa;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-500: #10b981;
    --red-500: #ef4444;
    --yellow-500: #f59e0b;
    --purple-500: #8b5cf6;
    --orange-500: #f97316;
    --sidebar-expanded: 260px;
    --sidebar-collapsed: 80px;
}

/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: var(--white);
}

.loader-icon {
    position: relative;
    margin-bottom: 2rem;
}

.loader-ping {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6rem;
    height: 6rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.loader-circle {
    position: relative;
    width: 6rem;
    height: 6rem;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
}

.loader-circle i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    animation: bounce 1s infinite;
}

.loader-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.loader-title i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.loader-title h1 {
    font-size: 3rem;
    font-weight: bold;
}

.loader-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    background: var(--white);
    border-radius: 50%;
    animation: bounce 1s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.15s;
}

.dot:nth-child(3) {
    animation-delay: 0.3s;
}

.loader-content p {
    font-size: 1.125rem;
    opacity: 0.8;
}

/* Layout Principal */
body {
    display: flex;
    min-height: 100vh;
}

/*sidebar para configurarlo*/
 /*Mostrar solo iconos y ocultar textos cuando está colapsado */
#sidebar.collapsed .sidebar-text,
#sidebar.collapsed .sidebar-logo .sidebar-text,
#sidebar.collapsed .sidebar-item span,
#sidebar.collapsed .sidebar-footer .support-card p,
#sidebar.collapsed .sidebar-header h2,
#sidebar.collapsed .sidebar-header p,
#sidebar.collapsed .support-card button{
	display: none !important;
}

 /*Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
	width: var(--sidebar-collapsed);
	overflow-x: hidden;
	box-shadow: 2px 0 8px rgba(0,0,0,.06);
	z-index: 1200;
}

.sidebar.open {
    transform: translateX(0);
}
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}
.sidebar.expanded {
    width: var(--sidebar-expanded);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.sidebar-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--white);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.sidebar-icon i {
    color: var(--primary-blue);
    font-size: 1.5rem;
}
/* Permitir reemplazar el icono por imagen en responsive */
.sidebar-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
}

/* Indicador visual para abrir/colapsar el sidebar */
.sidebar-logo:hover .sidebar-icon {
    transform: scale(1.06) rotate(4deg);
    background: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue));
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.sidebar-text h2 {
    font-size: 1.125rem;
    font-weight: bold;
}

.sidebar-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
    display: none;
}

/* Mostrar botón de cerrar cuando el sidebar está abierto (móvil) */
.sidebar.open .close-sidebar {
    display: block;
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 1rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.3s;
    margin-bottom: 0.5rem;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.sidebar-item i {
    width: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Subitem para entradas provenientes de submenús del navbar (móvil) */
.sidebar-subitem {
    padding-left: 2.25rem;
    opacity: 0.96;
}

/* Tooltips para sidebar colapsado */
.sidebar.collapsed .sidebar-item { position: relative; }
.sidebar.collapsed .sidebar-item:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 2000;
}
/* Tooltip para el logo cuando el sidebar está colapsado */
.sidebar.collapsed .sidebar-logo { position: relative; }
.sidebar.collapsed .sidebar-logo:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 2000;
}

.sidebar-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
}
/*----xd----*/
.support-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.support-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.support-card button {
    width: 100%;
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.support-card button:hover {
    background: var(--light-blue);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active,
.overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
body.no-scroll {
    overflow: hidden;
}
/* Main content: z-index bajo para no tapar submenús del navbar */
.main-content {
    flex: 1;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 0;
}

/* Navbar */
/* Navbar: isolation y z-index alto para estar encima del main y cualquier contenido */
.navbar {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10000;
    isolation: isolate;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem; /* aumentar altura para evitar texto apretado */
    position: relative; /* ensure stacking context over main */
    z-index: 3000;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background: var(--gray-100);
}
.menu-toggle {
    display: none !important;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 1rem; /* un poco más de separación entre icono y texto */
}

.navbar-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-icon i {
    color: var(--white);
    font-size: 1.5rem;
}

.navbar-text h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.05;
    letter-spacing: 0.15px;
    text-align: center;
}

.navbar-text p {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.05;
    letter-spacing: 0.15px;
}

/* Marca corta mostrada cuando el sidebar está abierto */
.gapor-brand {
    display: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: visible; /* evitar clipping del dropdown en desktop */
    white-space: nowrap;
    position: relative; /* mantener dropdowns por encima */
    z-index: 10001;
}

.navbar-menu::-webkit-scrollbar { /* ya no necesario, pero se deja por compatibilidad */
    display: none;
}
.navbar-menu::-webkit-scrollbar {
    display: none;
}
.navbar-menu > * {
    flex: 0 0 auto;
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, background 0.3s, transform 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
}
.nav-link:hover {
    color: var(--primary-blue);
    background: var(--light-blue);
    box-shadow: 0 2px 8px rgba(59,130,246,0.15);
    transform: translateY(-1px);
}

/* Contenedor del dropdown con z-index alto para evitar clipping por el main */
.dropdown {
    position: relative;
    z-index: 10002;
}

/* Navbar dropdown panel - must sit above main */
/* Panel del dropdown (submenús) - siempre encima del main y héroe */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    min-width: 16rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10003;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* Soporte móvil: mostrar submenús al usar clase .open */
.dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.navbar-cta {
    display: none;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-button:hover {
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
}

.slider-container {
    position: relative;
    height: 100vh;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 3rem;
}

.slide-text {
    flex: 1;
    color: var(--white);
    animation: slideInLeft 1s ease-out;
}

.slide-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.slide-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 35rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-blue);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.slide-photo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 1s ease-out;
}

.photo-frame {
    position: relative;
    max-width: 25rem;
    animation: float 6s ease-in-out infinite;
}

/* Hero decoration (desktop baseline). In responsive we reduce size via media queries */
.frame-bg {
    position: absolute;
    width: 100%;
    height: 20rem;
    border-radius: 1rem;
}

.frame-1 {
    background: linear-gradient(45deg, #f59e0b, #f97316);
    transform: rotate(3deg);
    animation: floatFrame1 4s ease-in-out infinite;
}

.frame-2 {
    background: var(--white);
    transform: rotate(-2deg);
    animation: floatFrame2 4s ease-in-out infinite;
}

.photo-container {
    position: relative;
    background: var(--white);
    padding: 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: rotate(0deg);
    transition: transform 0.7s ease;
    animation: photoReveal 1s ease-out;
}

.photo-frame:hover .photo-container {
    transform: scale(1.05);
}

.photo-container img {
    width: 100%;
    height: 16rem; /* desktop default */
    object-fit: cover;
    border-radius: 0.5rem;
    transition: all 0.7s ease;
}

.photo-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 0.75rem;
    animation: captionSlide 0.6s ease-out 0.3s both;
}

.photo-caption p {
    color: var(--gray-800);
    font-weight: 600;
    text-align: center;
    font-size: 0.875rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 0.5rem;
}

.slider-nav.next {
    right: 0.5rem;
}

.slider-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active,
.indicator:hover {
    background: var(--white);
    transform: scale(1.25);
}

/* Programs Section */
.programs-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--gray-50), var(--light-blue));
}

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

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.section-icon i {
    font-size: 3rem;
    color: var(--primary-blue);
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 48rem;
    margin: 0 auto;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.program-card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.5s ease;
    transform: translateY(0);
}

.program-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-0.5rem);
}

.program-image {
    position: relative;
    overflow: hidden;
}

.program-image img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.program-card:hover .program-image img {
    transform: scale(1.1);
}

.program-content {
    padding: 1.5rem;
}

.program-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.program-card:hover .program-content h3 {
    color: var(--primary-blue);
}

.program-content p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.program-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
}

.program-features {
    margin-bottom: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.feature i {
    color: var(--green-500);
    width: 1rem;
}

.program-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.program-btn:hover {
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    transform: scale(1.05);
}

.stats-section {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.stat-item:nth-child(1) .stat-number {
    color: var(--primary-blue);
}

.stat-item:nth-child(2) .stat-number {
    color: var(--green-500);
}

.stat-item:nth-child(3) .stat-number {
    color: var(--purple-500);
}

.stat-item:nth-child(4) .stat-number {
    color: var(--orange-500);
}

.stat-item p {
    color: var(--gray-600);
    font-weight: 500;
}

/* News Section */
.news-section {
    padding: 5rem 0;
    background: var(--white);
}

.news-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 3rem;
    align-items: start;
}

/* Desktop: featured left, side list right */
@media (min-width: 1024px) {
    .news-grid { grid-template-columns: 1.3fr 1fr !important; column-gap: 1.25rem; }
    .news-grid > .featured-news { grid-column: 1 !important; }
    .news-grid > .news-list-secondary {
        grid-column: 2;
        position: sticky;
        top: 2rem;
        align-self: start;
        max-height: 56vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
    }
    .news-grid > .news-list:not(.news-list-secondary) { display: none !important; }
}

.featured-news {
    cursor: pointer;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100); /* subtle frame */
    transition: all 0.3s;
}

.featured-news:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Featured news: 16:9 like YouTube, no fixed heights */
.news-image {
    position: relative;
    overflow: hidden;
}
.featured-news .news-image {
    aspect-ratio: 16/9;
    height: auto !important; /* override inline heights */
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-news:hover .news-image img {
    transform: scale(1.1);
}

/* Featured slider controls */
.featured-slider { position: relative; }
.featured-slide { display: none; }
.featured-slide.active { display: block; }
.featured-prev,
.featured-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: var(--gray-900);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    z-index: 5;
}
.featured-prev { left: 0.5rem; }
.featured-next { right: 0.5rem; }
.featured-prev:hover,
.featured-next:hover { background: #fff; }

/* Mobile-friendly controls: bigger hit areas at bottom corners */
@media (max-width: 768px) {
  .featured-prev,
  .featured-next {
    top: auto;
    bottom: 0.75rem;
    width: 3rem;
    height: 3rem;
    background: rgba(255,255,255,0.95);
  }
  .featured-prev { left: 0.75rem; }
  .featured-next { right: 0.75rem; }
}

/* Desktop: keep controls centered but avoid overlaying bottom content */
@media (min-width: 1024px) {
  .featured-prev,
  .featured-next { top: 45%; }
}

/* Side list (right column) as vertical scroll list */
.news-list-secondary {
    display: block !important; /* volver al contenedor estándar */
}
.news-list-secondary .news-item {
    display: flex; /* horizontal como originalmente */
    flex-direction: row;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.news-list-secondary .news-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.news-list-secondary .news-thumb {
    width: auto; /* vuelve al ancho de miniatura */
}
.news-list-secondary .news-thumb img {
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}
.news-list-secondary .news-item:hover .news-thumb img {
    transform: scale(1.05);
}
.news-list-secondary .news-details {
    padding: 0; /* sin padding extra, usa el de la tarjeta */
}
.news-list-secondary .news-details h4 {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--gray-900);
}
.news-list-secondary .news-details p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* suficiente para que se note */
    overflow: hidden;
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

/* Responsive: stack secondary cards on smaller screens */
@media (max-width: 1023px) {
    .news-list-secondary {
        grid-template-columns: 1fr !important;
        position: static !important;
        top: auto !important;
        align-self: stretch !important;
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
}

.news-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2), transparent);
    display: flex;
    align-items: flex-end;
}

.news-content {
    padding: 1.25rem; /* compact content padding */
    color: var(--white);
    width: 100%;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.news-category {
    background: var(--secondary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.news-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.news-content h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-news:hover .news-content h3 {
    color: var(--light-blue);
}

.news-content p {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.news-info {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.news-date,
.news-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--light-blue);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.featured-news:hover .read-more {
    color: var(--white);
    transform: translateX(0.5rem);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.news-item:hover {
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.news-item {
    display: flex;
    gap: 1rem;
}

.news-thumb {
    flex-shrink: 0;
}

.news-thumb img {
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s;
}

.news-item:hover .news-thumb img {
    transform: scale(1.05);
}

.news-details {
    flex: 1;
    min-width: 0;
}

.news-details .news-meta {
    margin-bottom: 0.5rem;
}

.news-details .news-category {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
}

.news-details .news-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.news-details h4 {
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
    line-height: 1.4;
}

.news-item:hover .news-details h4 {
    color: var(--primary-blue);
}

.news-details p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-details .news-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.news-details .news-info i:last-child {
    color: var(--secondary-blue);
    transition: transform 0.3s;
}

.news-item:hover .news-details .news-info i:last-child {
    transform: translateX(0.25rem);
}

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

/* Links Section */
.links-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--gray-900), var(--primary-blue), var(--dark-blue));
    color: var(--white);
}

.links-section .section-header h2,
.links-section .section-header p {
    color: var(--white);
}

.links-section .section-header p {
    color: rgba(255, 255, 255, 0.8);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.link-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.24));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.875rem;
    padding: 1.25rem 1.25rem;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
    transform: translateY(0);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.link-card:active {
    transform: translateY(0) scale(0.98);
}
.link-card:focus-visible {
    outline: 3px solid rgba(255,255,255,0.6);
    outline-offset: 3px;
}

.link-icon {
    width: 3rem; /* compact */
    height: 3rem; /* compact */
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem; /* compact */
    transition: box-shadow 0.3s;
}

.link-card:hover .link-icon {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.link-icon.red {
    background: linear-gradient(135deg, var(--red-500), #dc2626);
}

.link-icon.blue {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

.link-icon.green {
    background: linear-gradient(135deg, var(--green-500), #059669);
}

.link-icon.purple {
    background: linear-gradient(135deg, var(--purple-500), #7c3aed);
}

.link-icon i {
    font-size: 1.5rem; /* compact */
    color: var(--white);
}

.link-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.link-header h3 {
    font-size: 1.25rem;
    font-weight: bold;
    transition: color 0.3s;
}

.link-card:hover .link-header h3 {
    color: rgba(255, 255, 255, 0.9);
}

.link-header i {
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: color 0.3s;
}

.link-card:hover .link-header i {
    color: var(--white);
}

.link-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.link-footer {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s;
}

.link-card:hover .link-footer {
    color: var(--white);
}

.link-footer i {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.link-card:hover .link-footer i {
    transform: translateX(0.25rem);
}

.additional-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.additional-info h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.additional-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.info-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--gray-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon.blue {
    background: rgba(59, 130, 246, 0.1);
}

.contact-icon.green {
    background: rgba(16, 185, 129, 0.1);
}

.contact-icon.purple {
    background: rgba(139, 92, 246, 0.1);
}

.contact-icon.orange {
    background: rgba(249, 115, 22, 0.1);
}

.contact-icon.blue i {
    color: var(--secondary-blue);
}

.contact-icon.green i {
    color: var(--green-500);
}

.contact-icon.purple i {
    color: var(--purple-500);
}

.contact-icon.orange i {
    color: var(--orange-500);
}

.contact-details h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

/* Stronger contrast for contact details to ensure readability */
.contact-details p {
    color: var(--gray-800);
    line-height: 1.6;
}

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

.contact-form {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 6rem;
}

.map-container {
    position: sticky;
    top: 2rem;
}

.map-wrapper {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.map-wrapper iframe {
    width: 100%;
    height: 25rem;
    border: none;
}

.map-info {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.map-info h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.map-info p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.transport-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.transport-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.transport-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.transport-dot.blue {
    background: var(--secondary-blue);
}

.transport-dot.green {
    background: var(--green-500);
}

.transport-dot.yellow {
    background: var(--yellow-500);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--gray-900), var(--primary-blue), var(--dark-blue));
    color: var(--white);
    padding: 4rem 0 2rem;
}

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

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-icon {
    width: 3rem;
    height: 3rem;
    background: var(--white);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-text h3 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: -0.5rem;
}

.footer-text p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.social-links a {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section ul li a:hover {
    color: var(--white);
    transform: translateX(0.5rem);
}

.footer-contact {
    margin-bottom: 1.5rem;
}

/* Footer-only contact info styles to avoid affecting the Contact section */
.footer-contact .contact-info {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact .contact-info i {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.footer-contact .contact-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.newsletter h5 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.newsletter p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem 0 0 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 0.875rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--white);
}

.newsletter-form button {
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background: var(--light-blue);
}

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

.footer-bottom-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.copyright p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.copyright p:first-child {
    margin-bottom: 0.25rem;
}

.copyright p:last-child {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

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

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    z-index: 100;
}

.floating-btn {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.faq-btn {
    background: var(--purple-500);
}

.faq-btn:hover {
    background: #7c3aed;
}

.whatsapp-btn {
    background: var(--green-500);
    /* Quitar animación para que el botón quede estático */
    animation: none !important;
    transition: background 0.2s ease, transform 0.12s ease;
}

.whatsapp-btn:hover {
    background: #059669;
    /* mantener solo cambio de color, sin escalado ni parpadeo */
    transform: none !important;
}

/* Forzar ausencia de animaciones en el botón y sus hijos (evita parpadeos) */
.whatsapp-btn, .whatsapp-btn * {
    animation: none !important;
    transition: none !important;
}

/* Estilos para chat flotante de WhatsApp */
.whatsapp-chat {
    position: fixed;
    right: 1.5rem;
    bottom: 6.5rem;
    width: 360px;
    max-width: calc(100vw - 3rem);
    /* Fondo actualizado: degradado suave azul claro */
    background: linear-gradient(180deg,#eff6ff 0%,#e0f2fe 100%);
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(180deg,#eff6ff 0%,#e0f2fe 100%);
    background-size: 14px 14px, auto;
    box-shadow: 0 24px 60px rgba(2,6,23,0.18);
    border-radius: 14px;
    overflow: hidden;
    display: none;
    z-index: 1500;
    flex-direction: column;
}
.whatsapp-chat[aria-hidden="false"], .whatsapp-chat.active {
    display: flex;
}
.whatsapp-chat .chat-header {
    padding: 0.6rem 0.8rem;
    background: linear-gradient(90deg,var(--green-500),#059669);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.whatsapp-chat .close-chat {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}
.whatsapp-chat .chat-messages {
    padding: 0.75rem;
    background: #f8fafc;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Avatar y estado */
.whatsapp-chat .chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.whatsapp-chat .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    border: 2px solid rgba(255,255,255,0.18);
}
.whatsapp-chat .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.whatsapp-chat .chat-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.whatsapp-chat .chat-title .name {
    font-weight: 500;
    text-transform: lowercase;
    font-size: 1.12rem;
    /* separar visualmente del estado */
    margin-bottom: 0.18rem;
}
.whatsapp-chat .chat-title .status {
    font-size: 0.78rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0;
}
.whatsapp-chat .chat-title .online-dot {
    width: 8px;
    height: 8px;
    background: #34D399; /* green */
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(52,211,153,0.6);
}
.whatsapp-chat .message {
    max-width: 85%;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
}
.whatsapp-chat .message.sent {
    align-self: flex-end;
    background: linear-gradient(90deg,#DCF8C6,#c7f0b6);
    color: #073b16;
}
.whatsapp-chat .message.received {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e6e6e6;
    color: #111827;
}

/* Estado temporal al enviar */
.whatsapp-chat .status-message {
    align-self: center;
    background: transparent;
    color: #374151;
    font-size: 0.9rem;
    opacity: 0.95;
    padding: 0.35rem 0.6rem;
}
.whatsapp-chat .chat-quick {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem;
    background: #fff;
    flex-wrap: wrap;
}
.whatsapp-chat .quick-msg-btn {
    padding: 0.45rem 0.7rem;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.92rem;
}

/* Horario de atención dentro del chat */
.whatsapp-chat .contact-hours {
    padding: 1rem 0.9rem;
    background: #ffffffcc;
    border-top: 1px solid rgba(17,24,39,0.04);
    border-bottom: 1px solid rgba(17,24,39,0.04);
    color: #374151;
    font-size: 0.95rem;
}
.whatsapp-chat .contact-hours strong {
    display: block;
    margin-bottom: 0.45rem;
}
.whatsapp-chat .contact-hours p {
    margin: 0;
    line-height: 1.45;
    margin-top: 0.25rem;
}
.whatsapp-chat .chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem;
    background: #fff;
    border-top: 1px solid #eef2ff;
    align-items: center;
}
.whatsapp-chat textarea#messageInput {
    flex: 1;
    resize: none;
    padding: 0.5rem;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    font-family: inherit;
    line-height: 1.3;
    box-sizing: border-box;
    max-height: 140px; /* limitar altura para evitar apariencia alargada */
    overflow-y: auto; /* permitir scroll interno cuando exceda max-height */
}
.whatsapp-chat textarea#messageInput {
    transition: height 180ms ease, max-height 180ms ease;
    min-height: 36px;
}
.whatsapp-chat .send-btn {
    background: var(--green-500);
    color: #fff;
    border: none;
    /* tamaño reducido para ahorrar espacio */
    padding: 0.22rem 0.5rem !important;
    border-radius: 8px;
    cursor: pointer;
    flex: none; /* no crecer junto al textarea */
    min-width: 44px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* evitar que el texto haga wrap y aumente el ancho */
    font-size: 0.9rem;
    box-shadow: none !important;
}

.tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-right: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.floating-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.online-indicator {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: bounce 2s infinite;
}

.online-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--green-500);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.online-indicator span {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 32rem;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 1rem 1rem 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gray-900);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item details summary {
    cursor: pointer;
    padding: 1rem;
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-800);
    list-style: none;
    transition: background-color 0.3s;
    position: relative;
}

.faq-item details summary:hover {
    background: var(--gray-100);
}

.faq-item details summary::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.faq-item details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item details p {
    padding: 1rem;
    color: var(--gray-600);
    background: var(--white);
    margin: 0;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 0 0 1rem 1rem;
}

.modal-footer h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.modal-footer p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
}

.modal-buttons .btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-buttons .btn-secondary {
    flex: 1;
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: calc(1.5rem + 4.5rem);
    background: var(--secondary-blue);
    color: var(--white);
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-blue);
    transform: scale(1.1);
}

.sidebar-trigger {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    border: none;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 1100;
    cursor: pointer;
}
.sidebar-trigger i {
    font-size: 1.25rem;
}
@media (max-width: 1023px) {
    .sidebar-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        top: 4.5rem; /* debajo del navbar para unificar flujo */
    }
}
/* Animations */
@keyframes ping {
    75%, 100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-25%);
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes floatFrame1 {
    0%, 100% {
        transform: rotate(3deg) translateY(0px);
    }
    50% {
        transform: rotate(3deg) translateY(-6px);
    }
}

@keyframes floatFrame2 {
    0%, 100% {
        transform: rotate(-2deg) translateY(0px);
    }
    50% {
        transform: rotate(-2deg) translateY(5px);
    }
}

@keyframes photoReveal {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(5deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

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

/* Responsive Design */
@media (min-width: 1024px) {
    .sidebar {
        transform: none;
    }
    .close-sidebar {
        display: none;
    }
    .navbar-menu {
        display: flex;
    }
    .navbar-cta {
        display: block;
    }
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
    .main-content.shifted {
        margin-left: var(--sidebar-expanded);
    }
}

@media (max-width: 1023px) {
    .close-sidebar {
        display: block;
    }
    .navbar-menu { display: none !important; }

    /* Put support card at the end of the list to avoid covering items */
    .sidebar-footer {
        position: static;
        margin: 1rem;
    }
    
    /* Reduce hero decoration size only on responsive */
    .frame-bg { height: 14rem; }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .slide-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .slide-photo {
        order: -1;
    }
    
    .photo-frame {
        max-width: 20rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    /* Reubicar el botón de scroll-top para no tapar WhatsApp en pantallas pequeñas */
    .scroll-top {
        right: calc(1rem + 3.75rem);
        bottom: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }
    
    .navbar-text {
        display: block;
        max-width: 50vw;
    }
    .navbar-text h1 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--gray-900);
    }
    .navbar-text p { display: none; }
    
    .slide-content {
        padding: 2rem 0;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1.125rem;
    }
    
    .slide-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 16rem;
    }
    
    .photo-frame {
        max-width: 16rem;
    }
    
    .photo-container img {
        height: 12rem;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem 1rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
    
    .floating-btn {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.875rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .slide-title {
        font-size: 1.75rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .slide-description {
        font-size: 0.875rem;
    }
    
    .photo-frame {
        max-width: 14rem;
    }
    
    .photo-container img {
        height: 10rem;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .news-content {
        padding: 1.5rem;
    }
    
    .news-content h3 {
        font-size: 1.5rem;
    }
    
    .news-content p {
        font-size: 1rem;
    }
    
    .floating-buttons {
        bottom: 0.75rem;
        right: 0.75rem;
    }
    
    .floating-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1rem;
    }
    
    .online-indicator {
        padding: 0.375rem;
    }
    
    .online-indicator span {
        font-size: 0.75rem;
    }
}