/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Ocultar barra de scroll pero mantener funcionalidad (estilo Apple) */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE y Edge */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari y Opera */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* Gris melange con textura */
:root {
    --gris-melange: #6b6b6b;
    --gris-melange-light: #8b8b8b;
    --rojo-institucional: #B91B1B;
    /* Dusty Red Refined */
    --rojo-hover: #9F1239;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* Texture noise para simular melange */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, .05) 2px, rgba(0, 0, 0, .05) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, .05) 2px, rgba(0, 0, 0, .05) 4px);
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.25rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    /* height: 60px; */
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: var(--rojo-institucional);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.logo-svg {
    height: 72px;
    /* Aumentado para mejor impacto y legibilidad del SVG */
    width: auto;
    max-width: 40vw;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--gris-melange);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: right 0.3s ease;
    padding-top: 80px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
}

.mobile-menu ul li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu ul li a {
    display: block;
    padding: 1.2rem 2rem;
    color: var(--gris-melange);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-menu ul li a:hover {
    background: #f9fafb;
    color: var(--rojo-institucional);
    padding-left: 2.5rem;
}

/* Carousel */
.carousel-section {
    margin-top: 70px;
    position: relative;
    height: 50vh;
    min-height: 300px;
    max-height: 400px;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gris-melange-light), var(--gris-melange));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 300;
}

.carousel-text {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -2px;
    z-index: 2;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

/* Sections */
section:not(.carousel-section) {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gris-melange);
    margin-bottom: 3rem;
}

/* Nuestra Historia */
.historia-section {
    background: #f9fafb;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.badge {
    background: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gris-melange);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--rojo-institucional);
    color: var(--rojo-institucional);
}

.historia-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}

.historia-content p {
    margin-bottom: 1.5rem;
}

.historia-image-placeholder {
    background: #e5e7eb;
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: 15px;
    text-align: center;
    color: var(--gris-melange);
    border: 2px dashed #cbd5e1;
}

/* Oferta Educativa */
.oferta-section {
    background: white;
}

.orientation-container {
    position: relative;
    margin-top: 3rem;
    overflow-x: auto;
    padding: 2rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--rojo-institucional) #f1f1f1;
}

.orientation-container::-webkit-scrollbar {
    height: 8px;
}

.orientation-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.orientation-container::-webkit-scrollbar-thumb {
    background: var(--rojo-institucional);
    border-radius: 10px;
}

.orientation-scroll {
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
    min-width: fit-content;
}

.orientation-card-square {
    position: relative;
    width: 300px;
    height: 300px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.orientation-card-square:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.orientation-card-content {
    padding: 2.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1a1a1a;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: all 0.4s ease;
}

.orientation-card-square:hover .orientation-card-content {
    background: rgba(255, 255, 255, 0.85);
}

/* Theme Gradients for Orientations - Sober & Sophisticated */
.orientation-card-square[data-orientation="informatica"] {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.orientation-card-square[data-orientation="economia"] {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
}

.orientation-card-square[data-orientation="sociales"] {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.orientation-card-square[data-orientation] .orientation-title {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.orientation-card-square[data-orientation] .orientation-description {
    color: rgba(255, 255, 255, 0.9);
}

.orientation-card-square[data-orientation] .orientation-card-content {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.orientation-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    text-align: center;
    letter-spacing: -0.5px;
}

.orientation-description {
    flex: 0;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.expand-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: var(--rojo-institucional);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.expand-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-radius: 32px;
    max-width: 750px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Themed Modal Backdrops - Inheriting Card Colors */
.modal-content[data-orientation="informatica"] {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.8) 100%);
    color: white;
}

.modal-content[data-orientation="economia"] {
    background: linear-gradient(135deg, rgba(69, 10, 10, 0.8) 0%, rgba(127, 29, 29, 0.8) 100%);
    color: white;
}

.modal-content[data-orientation="sociales"] {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(49, 46, 129, 0.8) 100%);
    color: white;
}

.modal-content[data-orientation] h2,
.modal-content[data-orientation] h3,
.modal-content[data-orientation] h4,
.modal-content[data-orientation] strong,
.modal-content[data-orientation] .modal-close {
    color: white !important;
}

.modal-content[data-orientation] .modal-info-item,
.modal-content[data-orientation] .year-group {
    background: none;
    border: none;
}

.modal-content[data-orientation] p,
.modal-content[data-orientation] li {
    color: rgba(255, 255, 255, 0.9);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.modal-close:hover {
    color: var(--rojo-institucional);
    transform: rotate(90deg);
}

.modal-body {
    padding: 3.5rem 4rem;
    clear: both;
}

.modal-header-content {
    text-align: left;
    margin-bottom: 3.5rem;
}

.modal-header-content h2 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.modal-info-item {
    padding: 0;
    background: none;
    backdrop-filter: none;
    border: none;
}

.modal-info-item strong {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.7rem;
    opacity: 0.5;
}

.modal-info-item p {
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 500;
}

.modal-materias {
    margin-top: 2rem;
}

.modal-materias h3 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.year-group {
    background: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 3rem;
    border: none;
}

.year-title {
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: white;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.4;
}

.subjects-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    padding: 0;
}

.subjects-list li {
    padding: 0.4rem 0;
    color: var(--gris-melange);
    font-size: 0.9rem;
}

.subjects-list li::before {
    content: '• ';
    color: var(--rojo-institucional);
    font-weight: bold;
    margin-right: 8px;
}

.modal-content[data-orientation] .subjects-list li::before {
    color: white;
    opacity: 0.5;
}

/* Contacto */
.contacto-section {
    background: #f9fafb;
    margin-top: 0;
    padding-top: 0 !important;
}

.dynamic-pill-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.dynamic-pill {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    width: 350px;
    /* Ancho fijo para evitar saltos y asegurar centrado */
    margin-left: auto;
    margin-right: auto;
}

.dynamic-pill.changing>* {
    opacity: 0;
    transform: translateY(5px);
}

.dynamic-pill>* {
    transition: all 0.3s ease;
}

.pill-icon {
    display: flex;
    align-items: center;
    color: var(--rojo-institucional);
}

.pill-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    white-space: nowrap;
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contacto-info {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.contacto-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--rojo-institucional);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-item p {
    color: var(--gris-melange);
    font-size: 0.95rem;
}

.whatsapp-contact-link {
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.whatsapp-contact-link:hover {
    transform: translateX(5px);
    opacity: 0.8;
}

.mapa-container {
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    min-height: 400px;
}

.mapa-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gris-melange);
    padding: 0;
    text-align: center;
}

.map-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mapa-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mapa-placeholder small {
    font-size: 0.9rem;
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--rojo-institucional);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.social-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.social-links a:hover {
    color: var(--rojo-institucional);
}

.tech-stack {
    color: var(--gris-melange-light) !important;
    font-size: 0.85rem !important;
    margin-top: 0.5rem;
    font-weight: 500;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ====== NUESTRA HISTORIA (INTERACTIVA) ====== */
.historia-cards-container {
    margin: 3rem 0;
    position: relative;
    padding: 1rem 0;
}

.historia-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 2rem 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--rojo-institucional) #f1f1f1;
}

.historia-scroll::-webkit-scrollbar {
    height: 8px;
}

.historia-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.historia-scroll::-webkit-scrollbar-thumb {
    background: var(--rojo-institucional);
    border-radius: 10px;
}

.historia-card {
    flex: 0 0 350px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    overflow: hidden;
    scroll-snap-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    border: 1px solid var(--glass-border);
    cursor: grab;
}

.historia-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.85);
}

.historia-card .card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-date {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--rojo-institucional);
    margin-bottom: 0.5rem;
    display: block;
}

.historia-card h3 {
    color: #1a1a1a;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.historia-card p {
    font-size: 1rem;
    color: var(--gris-melange);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ====== DYNAMIC HIGHLIGHT PILL (MINIMALIST) ====== */
.dynamic-pill-container {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.search-container {
    margin-top: 2rem;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris-melange);
    display: flex;
    align-items: center;
    opacity: 0.5;
}

@media (max-width: 600px) {
    .dynamic-pill {
        width: 280px;
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* ====== PROGRAMAS DE EXAMEN ====== */
.programas-section {
    background: #f9fafb;
}

.programas-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3.5rem;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.selector-group {
    margin-bottom: 2rem;
}

.selector-group label {
    display: block;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.chip {
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
    border: 2px solid #f3f4f6;
    background: white;
    color: #4b5563;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.chip:hover {
    border-color: var(--rojo-institucional);
    color: var(--rojo-institucional);
    background: rgba(220, 38, 38, 0.02);
}

.chip.active {
    background: var(--rojo-institucional);
    color: white;
    border-color: var(--rojo-institucional);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.search-container {
    margin-top: 2.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    font-size: 1.2rem;
    opacity: 0.5;
}

.search-input-wrapper input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    border-radius: 20px;
    border: 2px solid #f3f4f6;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--rojo-institucional);
    background: white;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.quick-access {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.quick-access span {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

.quick-chip {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 0.8rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-chip:hover {
    background: #f9fafb;
    border-color: var(--rojo-institucional);
    color: var(--rojo-institucional);
}

.search-results {
    margin-top: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.search-results.hidden {
    display: none;
}

.result-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: #fff5f5;
    color: var(--rojo-institucional);
}

.download-action {
    margin-top: 3rem;
    text-align: center;
}

.premium-btn {
    background: var(--rojo-institucional);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.premium-btn:not(:disabled):hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(220, 38, 38, 0.4);
    background: var(--rojo-hover);
}

.premium-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 600px) {
    .historia-card {
        flex: 0 0 280px;
    }

    .programas-card {
        padding: 2rem;
    }

    .chips-container {
        gap: 0.5rem;
    }

    .chip {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .search-input-wrapper input::placeholder {
        font-size: 0.85rem;
    }
}


/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .carousel-text {
        font-size: 2.5rem;
    }

    .historia-content {
        font-size: 1rem;
    }

    .badges-container {
        gap: 0.8rem;
    }

    .badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .orientation-scroll {
        padding: 0 1rem;
    }

    .orientation-card-square {
        width: 280px;
        height: 280px;
    }

    .modal-content {
        max-height: 90vh;
        margin: 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }

    section:not(.carousel-section) {
        padding: 3rem 0;
    }
}

/* ====== SECCIÓN PROGRAMAS DE EXAMEN - LISTA DE MATERIAS ====== */
.subject-list-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.subject-list-container::-webkit-scrollbar {
    width: 4px;
}

.subject-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.subject-list-container::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.subject-item:hover {
    background: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(220, 38, 38, 0.1);
}

.subject-item.selected {
    background: white;
    border-color: var(--rojo-institucional);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.subject-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subject-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 1rem;
}

.select-indicator {
    font-size: 0.8rem;
    color: var(--rojo-institucional);
    font-weight: 600;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
}

.subject-item:hover .select-indicator,
.subject-item.selected .select-indicator {
    opacity: 1;
    transform: translateX(0);
}

.subject-item.selected .select-indicator {
    content: 'Seleccionada';
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-style: italic;
}

@media (max-width: 480px) {
    .carousel-section {
        height: 40vh;
        min-height: 250px;
    }

    .carousel-text {
        font-size: 2rem;
    }

    .school-name-header {
        font-size: 1.2rem;
    }

    .logo-placeholder {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
}

/* ====== SECCIÓN DE DESCARGAS - MINIMALISTA ====== */
.descargas-section {
    background: #fdfdfd;
}

.descargas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

.descarga-card-minimal {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
}

.descarga-card-minimal:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border-color: rgba(220, 38, 38, 0.15);
}

.descarga-info-minimal h3 {
    color: #111827;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.file-type {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

.download-btn-minimal {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--rojo-institucional);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background: transparent;
    border: 1.5px solid rgba(220, 38, 38, 0.1);
    transition: all 0.2s ease;
}

.download-btn-minimal:hover {
    background: var(--rojo-institucional);
    color: white;
    border-color: var(--rojo-institucional);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    transition: transform 0.3s ease;
}

@media (max-width: 600px) {
    .descarga-card-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .download-btn-minimal {
        width: 100%;
        justify-content: center;
    }
}