/* ============================================
   UNIE - Premium University Website Styles
   ============================================ */

/* === CSS Variables === */
:root {
    /* Colors from UNIE logo */
    --primary-blue: #4169E1;
    --primary-purple: #3D2E5C;
    --accent-gold: #FFD700;

    /* Extended palette */
    --blue-light: #6B8EF5;
    --blue-dark: #2952CC;
    --purple-light: #5D4A7A;
    --purple-dark: #2A1F3D;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--blue-light) 0%, var(--purple-light) 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-glass: linear-gradient(135deg, rgba(65, 105, 225, 0.1) 0%, rgba(61, 46, 92, 0.1) 100%);

    /* Neutral colors */
    --white: #FFFFFF;
    --black: #0A0A0A;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    /* Shadows */
    --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);
    --shadow-glow: 0 0 40px rgba(65, 105, 225, 0.3);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 90%;
    /* Scale down UI as requested */
}

body {
    font-family: var(--font-secondary);
    background: linear-gradient(to bottom, #0A0A0A 0%, #1a1a2e 50%, #0A0A0A 100%);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* === Glassmorphism === */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* === Navigation === */
/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transition: all var(--transition-base);
    background: #0A0A0A;
    /* Solid background always */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
}

.navbar.scrolled {
    background: #0A0A0A;
    /* Keep solid */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: var(--spacing-xs) 0;
    /* Slightly smaller on scroll */
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo .logo-img {
    height: 50px;
    transition: all var(--transition-base);
}

.navbar.scrolled .logo-img {
    height: 40px;
}

/* Logo Theme Toggling */
.logo-light-mode {
    display: none;
}

.logo-dark-mode {
    display: block;
}

body.light-mode .logo-light-mode {
    display: block;
}

body.light-mode .logo-dark-mode {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all var(--transition-base);
    padding: var(--spacing-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

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

.nav-link:hover {
    color: var(--blue-light);
}

.btn-campus {
    background: var(--gradient-primary);
    padding: var(--spacing-xs) var(--spacing-md) !important;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-base);
    color: var(--white) !important;
    /* Force white text */
    font-weight: 600;
}

.btn-campus:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(65, 105, 225, 0.5);
}

.btn-campus::after {
    display: none;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    margin-left: var(--spacing-sm);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.sun-icon {
    display: block;
    /* Default for dark mode */
}

.moon-icon {
    display: none;
    /* Hide moon by default */
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 100px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(65, 105, 225, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(61, 46, 92, 0.2) 0%, transparent 50%);
}

.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-blue);
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-purple);
    bottom: 10%;
    right: -5%;
    animation-delay: 7s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-gold);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

.hero-text {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.title-line {
    display: block;
    animation: fadeInUp 1s ease-out;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

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

.gradient-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(20px);
    opacity: 0.5;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-300);
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    font-family: var(--font-primary);
    font-weight: 600;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-full);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 60px rgba(65, 105, 225, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.1);
    transform: translateY(-3px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.stat-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(65, 105, 225, 0.3);
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray-300);
    font-weight: 500;
}

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

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 10px;
    background: var(--white);
    border-radius: var(--radius-full);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* === Section Styles === */
section {
    padding: var(--spacing-3xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(65, 105, 225, 0.1);
    border: 1px solid rgba(65, 105, 225, 0.3);
    border-radius: var(--radius-full);
    color: var(--blue-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

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

/* === Nosotros Section === */
.nosotros {
    background: linear-gradient(180deg, transparent 0%, rgba(61, 46, 92, 0.03) 50%, transparent 100%);
}

.nosotros-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
}

.nosotros-block {
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    text-align: center;
    transition: all var(--transition-base);
}

.nosotros-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(65, 105, 225, 0.2);
}

.block-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
}

.block-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.nosotros-block h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.nosotros-block p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-300);
    max-width: 900px;
    margin: 0 auto;
}

.mision-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-xl);
}

.mv-card {
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-base);
    text-align: center;
}

.mv-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(65, 105, 225, 0.3);
}

.mv-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    transition: all var(--transition-base);
}

.mv-card:hover .mv-icon {
    transform: scale(1.1) rotate(10deg);
}

.mv-icon svg {
    width: 35px;
    height: 35px;
    color: var(--white);
}

.mv-card h3 {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mv-card p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-300);
}

.valores-section {
    margin-top: var(--spacing-xl);
}

.valores-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.valor-item {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.valor-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.valor-item:hover::before {
    transform: scaleY(1);
}

.valor-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(65, 105, 225, 0.2);
}

.valor-number {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
    opacity: 0.5;
}

.valor-item h4 {
    font-family: var(--font-primary);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.valor-item p {
    color: var(--gray-300);
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* === Programas Section === */
.programas {
    background: linear-gradient(180deg, transparent 0%, rgba(65, 105, 225, 0.03) 50%, transparent 100%);
}

.filter-system {
    margin-bottom: var(--spacing-xl);
    display: flex;
    flex-direction: row;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 0 1 auto;
}

.filter-label {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-300);
    text-align: left;
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
    width: 100%;
    max-width: 280px;
    min-width: 220px;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
}

.select-trigger:hover {
    border-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.1);
}

.custom-select.active .select-trigger {
    border-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.15);
}

.select-text {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--white);
}

.select-arrow {
    width: 18px;
    height: 18px;
    color: var(--gray-300);
    transition: transform var(--transition-base);
}

.custom-select.active .select-arrow {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 250px;
    overflow-y: auto;
}

.custom-select.active .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
}

.select-option:hover {
    background: rgba(65, 105, 225, 0.1);
}

.select-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.select-option:hover .checkbox-custom {
    border-color: var(--primary-blue);
}

.select-option input[type="checkbox"]:checked+.checkbox-custom {
    background: var(--gradient-primary);
    border-color: transparent;
}

.select-option input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.select-option span:last-child {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    color: var(--gray-300);
    transition: color var(--transition-base);
}

.select-option:hover span:last-child,
.select-option input[type="checkbox"]:checked~span:last-child {
    color: var(--white);
}

/* Scrollbar for dropdown */
.select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.select-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.select-dropdown::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

.programas-grid {
    display: grid;
    /* Use auto-fit to collapse empty columns, allowing single items to center */
    /* Limit max width to 400px to prevent "giant cards" */
    grid-template-columns: repeat(auto-fit, minmax(340px, 400px));
    justify-content: center;
    gap: var(--spacing-xl);
}

/* Horizontal Scroll Layout (Carousel Mode) */
/* Horizontal Scroll Layout (Carousel Mode) */
.programas-grid.layout-roll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--spacing-md);
    justify-content: flex-start;
    grid-template-columns: none;

    /* Reverting scrollbar hiding */
    scrollbar-width: auto;
    -ms-overflow-style: auto;
}

.programas-grid.layout-roll::-webkit-scrollbar {
    display: block;
    height: 8px;
    /* Making it visible but nice */
}

.programas-grid.layout-roll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.programas-grid.layout-roll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.programas-grid.layout-roll .programa-card {
    flex: 0 0 340px;
    /* Fixed width for carousel items */
    scroll-snap-align: start;
    width: 340px;
    margin-right: var(--spacing-md);
    /* Gap handles spacing but margins help safer safari scroll */
}

/* Ensure images don't break layout */
.programas-grid.layout-roll .programa-card img {
    max-width: 100%;
}

.programa-card {
    padding: 0;
    border-radius: var(--radius-2xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.card-header-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.programa-card:hover .card-header-img img {
    transform: scale(1.05);
}

.card-body {
    padding: var(--spacing-lg);
    /* Was xl. Compact inner space. */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.programa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.programa-card:hover::before {
    transform: scaleX(1);
}

.programa-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(65, 105, 225, 0.3);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.card-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.card-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    /* Was 1.5rem */
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    /* Was md. Compact space. */
    line-height: 1.1;
    /* Tighter for big text */
    letter-spacing: -0.02em;
    /* Modern look */

    /* Line Clamp to 4 lines */
    /* Line Clamp to 4 lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Enforce rigid uniform height for alignment */
    /* Calculated: ~4 lines * 1.6rem (mid size) * 1.1 line-height = 7.04rem -> 7.2rem buffer */
    height: auto;
    min-height: 7.2rem;
}

.card-title.title-md {
    font-size: 1.6rem;
    /* Was 1.25rem */
}

.card-title.title-sm {
    font-size: 1.35rem;
    /* Was 1.1rem */
}

.card-title.title-xs {
    font-size: 1.1rem;
    /* Was 0.95rem */
}

.card-description {
    color: var(--gray-300);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.btn-like svg,
.btn-share svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.btn-share svg {
    /* Visibly smaller to balance visual weight */
    width: 17px;
    height: 17px;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-meta-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    gap: 4px;
    /* Tight vertical gap */
    margin-bottom: var(--spacing-sm);
    flex: 1;
    /* Allow it to grow */
    justify-content: center;
    /* Center vertical if needed */
}

.card-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centered as requested */
    gap: var(--spacing-sm);
    margin-top: auto;
    /* Push to bottom if needed */
    width: 100%;
}

.meta-row {
    font-size: 0.9rem;
    color: var(--gray-400);
    /* Slightly softer than title */
    text-align: center;
    width: 100%;
}

/* Hide the meta-type as it will be shown in the badge */
.meta-type {
    display: none;
}

/* Hide the separator that follows the now-hidden type */
.meta-sep:first-of-type {
    display: none;
}

.meta-item {
    font-size: 0.9rem;
    color: var(--gray-300);
}

.meta-item strong {
    color: var(--white);
}

.card-link {
    color: var(--blue-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-base);
}

.card-link:hover {
    gap: var(--spacing-sm);
    color: var(--primary-blue);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    /* Solid dark background to prevent bleed */
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    transform: translateY(20px);
    z-index: 10;
}

/* Light Mode specific overlay */
body.light-mode .card-overlay {
    background: rgba(255, 255, 255, 0.98);
    /* Almost solid to prevent text bleed */
}

body.light-mode .overlay-desc {
    color: var(--gray-800);
}

.programa-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.overlay-desc {
    color: var(--gray-300);
    margin-bottom: var(--spacing-lg);
    font-size: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.overlay-btn {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
    /* Changed to all to animate border/colors */
    white-space: nowrap;
    /* Prevent wrapping */
    display: inline-block;
    /* Ensure proper sizing */
    border: 2px solid transparent;
    /* Prevent layout shift */
}

.overlay-btn:hover {
    transform: scale(1.05);
    background: var(--white);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* === Excelencia Section === */
.excelencia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    /* Container styling to group them */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    backdrop-filter: blur(5px);
}

.excelencia-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-base);
    /* Make cards transparent by default to blend with container */
    background: transparent !important;
    border: 1px solid transparent;
}

.excelencia-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.excelencia-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    transition: all var(--transition-base);
}

.excelencia-card:hover .excelencia-icon {
    transform: rotateY(360deg);
}

.excelencia-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.excelencia-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.excelencia-card p {
    color: var(--gray-300);
    line-height: 1.7;
}

/* === Program Info Modal === */
.modal-content.modal-large {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    /* NEW: Flex layout for fixed header */
    flex-direction: column;
    /* Stack header and body */
    overflow-y: auto;
    /* Allow scrolling inside modal on mobile if needed */
    overflow-x: hidden;
}

/* Mobile Friendly Modal */
@media (max-width: 768px) {
    .modal-content.modal-large {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: var(--spacing-md);
    }

    .modal-header {
        padding: var(--spacing-sm) 0;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--bg-card);
        /* Ensure bg covers scrolling content */
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .program-symbol {
        display: none;
        /* Hide big logo on mobile to save space */
    }

    .modal-tabs {
        justify-content: flex-start;
        /* Horizontal scroll */
        padding-bottom: 5px;
    }
}

/* Make header sticky/fixed at top of modal */
.modal-header {
    background: var(--bg-card);
    /* Ensure text doesn't overlap transparently */
    padding: var(--spacing-lg) var(--spacing-lg) 0;
    /* Move padding here */
    margin: 0;
    /* Reset margins */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    flex-shrink: 0;
    /* Don't shrink header */
}

/* Tabs stick below header */
.modal-tabs {
    background: var(--bg-card);
    padding: 0 var(--spacing-lg);
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    z-index: 9;
}

/* Scrollable container for content */
.modal-body {
    overflow-y: auto;
    padding: var(--spacing-lg);
    flex-grow: 1;
    /* Take remaining space */
}

.becas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.beca-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.beca-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(65, 105, 225, 0.3);

    /* Modal Header Refinements */
    .program-symbol {
        height: 40px;
        /* Adjust size as asked */
        width: auto;
        object-fit: contain;
        border-radius: var(--radius-full);
    }

    .header-info {
        display: flex;
        gap: var(--spacing-md);
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: var(--spacing-lg);
        /* Space between info and tabs */
    }

    /* Enrollment Button in Header */
    .btn-enroll-sm {
        background: var(--primary-blue);
        color: var(--white);
        border: none;
        padding: 6px 16px;
        border-radius: var(--radius-full);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        margin-left: var(--spacing-sm);
        transition: background 0.2s;
    }

    .btn-enroll-sm:hover {
        background: var(--blue-dark);
    }

    .info-badge.price-badge {
        /* Allow button inside */
        padding-right: 6px;
    }

    .beca-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto var(--spacing-md);
        padding: var(--spacing-sm);
        background: rgba(65, 105, 225, 0.1);
        border-radius: 50%;
        color: var(--primary-blue);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .beca-card h4 {
        font-family: var(--font-primary);
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: var(--spacing-sm);
        color: var(--white);
    }

    .beca-card p {
        color: var(--gray-300);
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .beca-card strong {
        color: var(--white);
        font-weight: 600;
    }

    .becas-info {
        padding: var(--spacing-lg);
        border-radius: var(--radius-lg);
        background: rgba(255, 255, 255, 0.03);
    }

    .becas-info h4 {
        font-family: var(--font-primary);
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: var(--spacing-md);
        color: var(--white);
    }

    .becas-info ol {
        margin: 0;
        padding-left: var(--spacing-xl);
        color: var(--gray-300);
    }

    .becas-info li {
        margin-bottom: var(--spacing-xs);
        line-height: 1.6;
    }



    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-lg);
    }

    .modal-header h2 {
        font-family: var(--font-primary);
        font-size: 2rem;
        font-weight: 800;
        margin: 0;
        flex: 1;
    }

    .program-badge {
        display: inline-block;
        padding: var(--spacing-xs) var(--spacing-md);
        background: var(--gradient-primary);
        border-radius: var(--radius-full);
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--white);
        flex-shrink: 0;
    }

    .header-info {
        display: flex;
        gap: var(--spacing-md);
        flex-wrap: wrap;
    }

    .info-badge {
        display: flex;
        align-items: center;
        gap: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-md);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-lg);
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--gray-300);
    }

    .info-badge svg {
        width: 18px;
        height: 18px;
        color: var(--primary-blue);
        flex-shrink: 0;
    }

    .info-badge.price-badge {
        background: rgba(65, 105, 225, 0.1);
        border-color: var(--primary-blue);
    }

    .info-badge.price-badge span {
        color: var(--primary-blue);
        font-weight: 700;
    }

    /* MISSING LAYOUT FIX: Flex container for rating and actions */
    .card-rating {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: var(--spacing-md);
        width: 100%;
    }

    /* Actions Container */
    .card-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .btn-like,
    .btn-share {
        background: rgba(255, 255, 255, 0.1);
        border: 0 !important;
        outline: none !important;
        box-shadow: none !important;
        color: var(--gray-400);
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden;
    }

    .btn-like *,
    .btn-share * {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .btn-like:hover,
    .btn-share:hover {
        background: rgba(255, 255, 255, 0.2);
        color: var(--primary-accent);
        transform: scale(1.1);
    }

    .btn-like.liked {
        color: #ef4444 !important;
        background-color: rgba(239, 68, 68, 0.2) !important;
        border-color: transparent !important;
    }

    /* Light Mode Specifics */
    body.light-mode .btn-like,
    body.light-mode .btn-share {
        background: rgba(0, 0, 0, 0.05);
        color: var(--gray-700);
        border: 0 !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 50% !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        /* Prevent shrinking */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        /* Reset padding */
        margin: 0 !important;
        -webkit-appearance: none;
        /* Safely remove native styles */
    }

    /* SPECIFIC FIX: Remove any border from EVERYTHING inside buttons */
    body.light-mode .btn-like *,
    body.light-mode .btn-share * {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    body.light-mode .btn-like:hover,
    body.light-mode .btn-share:hover {
        background: rgba(0, 0, 0, 0.1);
        color: var(--primary-blue);
    }

    /* Safely remove native styles */
}

body.light-mode .btn-like:hover,
body.light-mode .btn-share:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary-blue);
}

.btn-like.liked {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    /* Keep consistency */
}

/* Fixed orphaned background block */

.modal-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.tab-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-300);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--white);
    background: rgba(65, 105, 225, 0.1);
}

.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overview-section {
    margin-bottom: var(--spacing-xl);
}

.overview-section h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.overview-section p {
    color: var(--gray-300);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.target-text {
    font-size: 1.125rem !important;
    font-weight: 500;
    color: var(--white) !important;
}

.program-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.detail-item svg {
    width: 40px;
    height: 40px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.detail-item h4 {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-400);
    margin-bottom: var(--spacing-xs);
}

.detail-item p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.objectives-list {
    list-style: none;
    padding: 0;
}

.objectives-list li {
    padding-left: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    position: relative;
    color: var(--gray-300);
    line-height: 1.7;
}

.objectives-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.2rem;
}

.modules-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

.module-item {
    /* Target 2 per line (50%) accounting for gap */
    flex: 0 1 calc(50% - var(--spacing-md));
    min-width: 300px;
    /* Stack on mobile */

    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary-blue);
}

.module-item h4 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.module-item p {
    color: var(--gray-300);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.requirements-list,
.documents-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.requirements-list li,
.documents-list li {
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    position: relative;
    color: var(--gray-300);
}

.requirements-list li::before,
.documents-list li::before {
    content: '→';
    position: absolute;
    left: 1rem;
    color: var(--primary-blue);
    font-weight: 700;
}

.price-card {
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.price-card h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--gray-300);
}

.price {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
}

.price-note {
    color: var(--gray-400);
    font-size: 0.9375rem;
}

.payment-options h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--white);
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.payment-option {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.payment-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(65, 105, 225, 0.3);
}

.payment-option h4 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--white);
}

.payment-option p {
    color: var(--gray-300);
    font-size: 0.9375rem;
    margin: 0;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* === Testimonios Section === */
.testimonios {
    background: linear-gradient(180deg, transparent 0%, rgba(61, 46, 92, 0.05) 50%, transparent 100%);
}

.testimonios-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
    min-height: 300px;
}

.testimonio-card {
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: all var(--transition-slow);
    pointer-events: none;
}

.testimonio-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.testimonio-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--gray-200);
    margin-bottom: var(--spacing-xl);
    font-style: italic;
    position: relative;
}

.testimonio-text::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-blue);
    position: absolute;
    top: -20px;
    left: -10px;
    font-family: Georgia, serif;
    opacity: 0.3;
}

.testimonio-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
}

.author-info h4 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.author-info p {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
}

.slider-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--gradient-primary);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: var(--spacing-sm);
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.dot.active {
    background: var(--gradient-primary);
    width: 40px;
}

/* === Admisiones Section === */
.proceso-timeline {
    max-width: 1200px;
    margin: 0 auto var(--spacing-3xl);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    position: relative;
}

.proceso-timeline::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
            var(--primary-blue) 0%,
            var(--primary-purple) 50%,
            var(--primary-blue) 100%);
    z-index: 0;
}

.timeline-item {
    position: relative;
    text-align: center;
    z-index: 1;
}

.timeline-number {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-number {
    transform: scale(1.2) rotate(360deg);
}

.timeline-content {
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    height: 140px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.timeline-content p {
    color: var(--gray-300);
    line-height: 1.6;
}

.admisiones-cta {
    max-width: 700px;
    margin: 0 auto;
}

.cta-card {
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    text-align: center;
}

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

.cta-card p {
    color: var(--gray-300);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
}

/* === Contacto Section === */
.contacto {
    background: linear-gradient(180deg, transparent 0%, rgba(65, 105, 225, 0.03) 50%, transparent 100%);
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-3xl);
    align-items: start;
}

.contacto-info h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.contacto-info>p {
    color: var(--gray-300);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-2xl);
    line-height: 1.7;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.info-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

body.light-mode .contact-info-icon {
    background: var(--gradient-primary);
    /* Keep the blue gradient for contrast on light */
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.2);
}

body.light-mode .contact-info-icon svg {
    color: #ffffff !important;
}

.info-item h4 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--gray-300);
    line-height: 1.6;
}

.contacto-form {
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
}

.contacto-form h3 {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
}

/* === Forms === */
.form-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-md);
    padding-top: calc(var(--spacing-md) + 8px);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: all var(--transition-base);
    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='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.1);
    box-shadow: 0 0 20px rgba(65, 105, 225, 0.2);
}

.form-group label {
    position: absolute;
    left: var(--spacing-md);
    top: -10px;
    color: var(--gray-400);
    font-size: 0.75rem;
    pointer-events: none;
    transition: all var(--transition-base);
    background: rgba(10, 10, 10, 0.9);
    padding: 0 var(--spacing-xs);
    z-index: 1;
}

.form-group textarea+label {
    top: -10px;
    transform: none;
}

.form-group input:focus+label,
.form-group textarea:focus+label,
.form-group select:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:not(:placeholder-shown)+label,
.form-group select:valid+label {
    top: -10px;
    left: var(--spacing-sm);
    font-size: 0.75rem;
    background: rgba(10, 10, 10, 0.9);
    padding: 0 var(--spacing-xs);
    color: var(--primary-blue);
    transform: none;
}

.form-group select+label {
    top: -10px;
    transform: none;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--gray-900);
    color: var(--white);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

/* === Footer === */
.footer {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    height: 70px;
    margin-bottom: var(--spacing-md);
}

.footer-description {
    color: var(--gray-400);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-col h4 {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: all var(--transition-base);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-legal a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

.footer-legal a:hover {
    color: var(--primary-blue);
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    max-width: 700px;
    width: 100%;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    position: relative;
    animation: slideUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacto-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 220px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        /* Aligned to left */
        padding: var(--spacing-3xl) var(--spacing-lg);
        transition: right var(--transition-base);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        gap: var(--spacing-lg);
        /* Adjusted gap for mobile */
    }

    .nav-menu li {
        width: 100%;
        /* Ensure full width for clickable area */
    }

    body.light-mode .nav-menu {
        background: #ffffff !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05) !important;
    }

    .nav-menu .btn-campus {
        width: 100%;
        display: inline-block;
        text-align: center;
        margin-top: var(--spacing-md);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
        width: 20px;
        /* Narrower width */
    }

    .hamburger span {
        width: 100% !important;
    }

    .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(7px, -7px);
    }

    .programas-grid {
        grid-template-columns: 1fr;
    }

    .proceso-timeline {
        grid-template-columns: 1fr;
    }

    .proceso-timeline::before {
        display: none;
    }

    .filter-system {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .custom-select {
        max-width: 100%;
        min-width: 100%;
    }

    .select-trigger {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .select-text {
        font-size: 0.8125rem;
    }

    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .mision-vision-grid {
        grid-template-columns: 1fr;
    }

    .valores-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* === Mobile Card Improvements === */
    .programas-grid.layout-roll .programa-card {
        flex: 0 0 75vw;
        /* Much narrower to show part of next card */
        width: 75vw;
        max-width: 300px;
        /* Even smaller max width */
        border: 1px solid rgba(255, 255, 255, 0.15);
        /* Subtle border for separation */
    }

    .card-header-img {
        height: 140px;
        /* Even shorter header image */
    }

    .card-body {
        padding: var(--spacing-sm);
        /* Minimal padding */
    }

    .card-icon {
        width: 40px;
        /* Smaller icon container */
        height: 40px;
        margin-bottom: var(--spacing-xs);
    }

    .card-icon svg {
        width: 20px;
        /* Smaller icon */
        height: 20px;
    }

    /* Force smaller titles on mobile regardless of JS calculation */
    .card-title {
        font-size: 1.1rem !important;
        /* Smaller base font */
        height: auto !important;
        /* Remove fixed height constraint */
        min-height: 2.5rem;
        /* Reduced min-height */
        margin-bottom: var(--spacing-xs);
        -webkit-line-clamp: 3;
        /* Max 3 lines */
        line-height: 1.2;
    }

    .card-title.title-md {
        font-size: 1.05rem !important;
    }

    .card-title.title-sm {
        font-size: 1rem !important;
    }

    .card-title.title-xs {
        font-size: 0.9rem !important;
    }

    .card-description {
        display: none !important;
        /* Hide description entirely on mobile for compactness */
    }

    .meta-item {
        font-size: 0.75rem;
        /* Smaller meta text */
    }

    .card-meta {
        margin-bottom: var(--spacing-sm);
        padding-top: var(--spacing-sm);
    }

    .card-rating {
        font-size: 0.8rem;
    }

    /* Mobile Carousel Controls */
    .carousel-btn {
        width: 36px;
        height: 36px;
        background: rgba(10, 10, 10, 0.6);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 100;
        display: flex;
        /* Force visibility on mobile if needed, though JS controls it too */
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }

}


@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* === Scroll Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* === Selection === */
::selection {
    background: var(--primary-blue);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-blue);
    color: var(--white);
}

/* === Nosotros Page Specific Styles === */
.hero-nosotros {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: var(--spacing-3xl);
}

.nosotros-historia {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(61, 46, 92, 0.03) 50%, transparent 100%);
}

.nosotros-block h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
}

.nosotros-block p {
    margin-bottom: var(--spacing-md);
}

.nosotros-block p:last-child {
    margin-bottom: 0;
}

.mision-vision-section {
    padding: var(--spacing-3xl) 0;
}

.valores-section-page {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(65, 105, 225, 0.03) 50%, transparent 100%);
}

.cta-nosotros {
    padding: var(--spacing-3xl) 0;
}

.cta-content {
    padding: var(--spacing-3xl);
    border-radius: var(--radius-2xl);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--gray-300);
    margin-bottom: var(--spacing-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-nosotros {
        min-height: 50vh;
        padding-top: 100px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* === Light Mode Styles === */
body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    background: #f0f2f5;
    color: var(--text-primary);
}

/* Navbar & Header */
body.light-mode .logo-text,
body.light-mode .logo-symbol {
    color: var(--primary-blue);
    text-shadow: none;
}

body.light-mode .navbar {
    background: #FFFFFF;
    /* Solid white */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .nav-link {
    color: var(--text-primary);
}

body.light-mode .theme-toggle {
    color: var(--text-primary);
}

body.light-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .hamburger span {
    background-color: var(--text-primary);
}

/* Glass Components Overrides */
body.light-mode .glass,
body.light-mode .modal-content,
body.light-mode .programa-card,
body.light-mode .feature-card,
body.light-mode .stat-card,
body.light-mode .testimonio-card,
body.light-mode .excelencia-card,
body.light-mode .detail-item,
body.light-mode .module-item,
body.light-mode .price-card,
body.light-mode .payment-option,
body.light-mode .beca-card,
body.light-mode .becas-info,
body.light-mode .contact-info,
body.light-mode .contact-form,
body.light-mode .card-back,
body.light-mode .nosotros-block,
body.light-mode .mv-card,
body.light-mode .valor-item,
body.light-mode .cta-content,
body.light-mode .timeline-content {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
    transition: all var(--transition-base);
    /* Smooth transition for the glow */
}

/* Restore Blue Glow (Outer Glow) in Light Mode on Hover */
body.light-mode .programa-card:hover,
body.light-mode .feature-card:hover,
body.light-mode .stat-card:hover,
body.light-mode .testimonio-card:hover {
    box-shadow: 0 15px 35px rgba(65, 105, 225, 0.25) !important;
    border-color: rgba(65, 105, 225, 0.4) !important;
}

body.light-mode .modal-header {
    border-bottom-color: var(--glass-border);
}

body.light-mode .modal-tabs {
    border-bottom-color: var(--glass-border);
}

/* Typography Overrides */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode strong,
body.light-mode .hero-title,
body.light-mode .stat-number,
body.light-mode .stat-label,
body.light-mode .program-badge {
    color: var(--text-primary);
}

body.light-mode p,
body.light-mode li,
body.light-mode span,
body.light-mode label,
body.light-mode .program-description,
body.light-mode .hero-subtitle,
body.light-mode .price-note,
body.light-mode .footer-text {
    color: var(--text-secondary);
}

/* Specific component fixes */
body.light-mode .program-badge {
    color: white !important;
    /* Keep badge text white */
}

body.light-mode .target-text {
    color: var(--text-primary) !important;
    /* Override white important */
}

body.light-mode .tab-btn {
    color: var(--text-secondary);
}

body.light-mode .tab-btn:hover,
body.light-mode .tab-btn.active {
    color: var(--primary-blue);
}

body.light-mode .info-badge {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

/* Buttons */
body.light-mode .btn-primary,
body.light-mode .btn-campus {
    color: white !important;
    box-shadow: 0 4px 14px rgba(65, 105, 225, 0.3);
}

body.light-mode .btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

/* Form inputs */
body.light-mode .input-group input,
body.light-mode .input-group textarea,
body.light-mode .input-group select,
body.light-mode .custom-select {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

body.light-mode .input-group label {
    color: var(--text-secondary);
}

body.light-mode .select-dropdown {
    background: white;
    border: 1px solid var(--glass-border);
}

body.light-mode .select-option {
    color: var(--text-primary);
}

body.light-mode .select-option:hover {
    background: var(--bg-secondary);
}

/* Footer */
body.light-mode footer {
    background: white;
    border-top: 1px solid var(--glass-border);
}

body.light-mode .footer-title {
    color: var(--primary-blue);
}

body.light-mode .footer-link {
    color: var(--text-secondary);
}

/* === Light Mode Form Corrections === */
body.light-mode .form-group label {
    background: transparent;
    color: var(--text-secondary);
}

body.light-mode .form-group input:focus+label,
body.light-mode .form-group textarea:focus+label,
body.light-mode .form-group select:focus+label,
body.light-mode .form-group input:not(:placeholder-shown)+label,
body.light-mode .form-group textarea:not(:placeholder-shown)+label,
body.light-mode .form-group select:valid+label {
    background: #ffffff;
    color: var(--primary-blue);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea,
body.light-mode .form-group select {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    color: var(--text-primary);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus,
body.light-mode .form-group select:focus {
    border-color: var(--primary-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
}

body.light-mode .form-group select option {
    background: #ffffff;
    color: var(--text-primary);
}

/* Modal specific override to ensure white background */
body.light-mode .modal-content {
    background: #ffffff !important;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .modal-close {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .modal-close:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

body.light-mode .social-link {
    background: #f0f2f5;
    color: var(--primary-blue);
}

body.light-mode .social-link:hover {
    background: var(--primary-blue);
    color: white !important;
    transform: translateY(-2px);
}

/* Light Mode Custom Selects */
body.light-mode .custom-select .select-trigger {
    background: white;
    border-color: #d1d5db;
    color: #374151;
}

body.light-mode .custom-select .select-dropdown {
    background: white;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.light-mode .custom-select .select-option {
    color: #374151;
}

body.light-mode .custom-select .select-option:hover {
    background: #f3f4f6;
}

/* Custom Multiselect Styles */
.multiselect-wrapper {
    position: relative;
    width: 100%;
    margin-top: 5px;
}

.multiselect-trigger {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
    min-height: 58px;
}

.multiselect-trigger.has-selection {
    color: var(--white);
}

.multiselect-trigger .select-arrow {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    transition: transform 0.3s;
}

.multiselect-wrapper.active .select-arrow {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.multiselect-wrapper.active .multiselect-dropdown {
    display: block;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--gray-300);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.multiselect-option:last-child {
    border-bottom: none;
}

.multiselect-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.multiselect-option input {
    display: none;
}


.custom-check-mini {
    width: 18px;
    height: 18px;
    border: 2px solid #888;
    /* More visible border */
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.multiselect-option:hover .custom-check-mini {
    border-color: var(--primary-blue);
}

.multiselect-option input:checked+.custom-check-mini {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.multiselect-option input:checked+.custom-check-mini::after {
    content: '✓';
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Light Mode for Multiselect */
body.light-mode .multiselect-trigger {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    color: var(--text-secondary);
}

body.light-mode .custom-check-mini {
    border: 2px solid #ccc;
    /* Visible in light mode */
    background: #fff;
}

body.light-mode .multiselect-trigger.has-selection {
    color: var(--text-primary);
}

body.light-mode .multiselect-dropdown {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .multiselect-option {
    color: var(--text-primary);
    border-bottom: 1px solid var(--gray-100);
}

body.light-mode .multiselect-option:hover {
    background: var(--bg-secondary);
}

/* === Form Redesign Styles === */
.input-lg {
    padding: 1.25rem 1rem !important;
    font-size: 1.1rem !important;
}

.form-group label {
    font-size: 0.95rem;
    /* Larger base label */
}

/* Phone Input Styles */
.phone-input-container {
    display: flex !important;
    align-items: center !important;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    padding: 0 !important;
    /* Reset padding to handle divider correctly */
}

/* Country Code Section - Visually Distinct */
.country-code {
    width: auto !important;
    max-width: 150px;
    background: rgba(255, 255, 255, 0.05) !important;
    /* Distinct background */
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* Visible divider */
    color: var(--white);
    padding: 0 10px !important;
    cursor: pointer;
    font-size: 1rem;
    height: 54px;
    /* Full height */
    outline: none !important;
    text-overflow: ellipsis;
}

/* Light Mode Overrides for Phone */
body.light-mode .phone-input-container {
    background: #ffffff;
    border: 1px solid var(--gray-200);
}

body.light-mode .country-code {
    background: #f3f4f6 !important;
    /* Light gray background for country */
    color: var(--text-primary);
    border-right: 1px solid #d1d5db !important;
    /* Stronger divider */
}

.country-code option {
    background: var(--black);
    color: var(--white);
}

body.light-mode .country-code option {
    background: #ffffff;
    color: var(--text-primary);
}

.phone-input-container input {
    border: none !important;
    background: transparent !important;
    flex: 1 !important;
    min-width: 80px !important;
    box-shadow: none !important;
    padding: 0 15px !important;
    /* Padding for the text */
    height: 54px !important;
}



.phone-group label.phone-label {
    top: -25px !important;
    left: 0 !important;
    font-size: 0.9rem !important;
    background: transparent !important;
    color: var(--white);
    transform: none !important;
    pointer-events: none;
}

/* Programs Grid */
.programs-section {
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.static-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-sm);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.custom-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary-blue);
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked+.custom-check {
    background: var(--primary-blue);
}

.checkbox-wrapper input:checked+.custom-check::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.label-text {
    font-size: 1rem;
    color: var(--gray-300);
    line-height: 1.3;
}

/* Light Mode Overrides for New Elements */
body.light-mode .phone-input-container {
    background: #ffffff;
    border: 1px solid var(--gray-200);
}

body.light-mode .country-code {
    color: var(--text-primary);
    border-right: 1px solid var(--gray-200);
}

body.light-mode .country-code option {
    background: #ffffff;
    color: var(--text-primary);
}

body.light-mode .phone-group label.phone-label,
body.light-mode .static-label {
    color: var(--text-secondary);
}

body.light-mode .checkbox-wrapper {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

body.light-mode .checkbox-wrapper:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-blue);
}

body.light-mode .label-text {
    color: var(--text-primary);
}

body.light-mode .custom-check {
    border-color: var(--primary-blue);
}

/* Increase button size */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

/* Light Mode Filter Fixes */
body.light-mode .select-option span:last-child {
    color: var(--text-primary);
}

body.light-mode .select-option:hover span:last-child,
body.light-mode .select-option input[type="checkbox"]:checked~span:last-child {
    color: var(--primary-blue);
    font-weight: 500;
}

body.light-mode .checkbox-custom {
    border-color: var(--gray-300);
    background: #fff;
}

body.light-mode .select-option:hover .checkbox-custom {
    border-color: var(--primary-blue);
}

/* Light Mode Slider Controls */
body.light-mode .slider-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .slider-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

body.light-mode .dot {
    background: rgba(0, 0, 0, 0.2);
}

/* Layout Roll (Horizontal Scroll) for Program Results > 3 */
.programas-grid.layout-roll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    grid-template-columns: none !important;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Carousel Controls */
.carousel-wrapper {
    position: relative;
    width: 100%;
    transition: max-width 0.3s ease;
}

.carousel-wrapper.active-roll {
    max-width: 1100px;
    margin: 0 auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-blue);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.carousel-wrapper.active-roll .carousel-btn {
    display: flex;
}

.carousel-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
    border-color: transparent;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.carousel-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    transform: translateY(-50%);
}

.carousel-btn.prev {
    left: -60px;
}

.carousel-btn.next {
    right: -60px;
}

@media (max-width: 1250px) {
    .carousel-btn.prev {
        left: -20px;
    }

    .carousel-btn.next {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none !important;
    }
}

.programas-grid.layout-roll .programa-card {
    flex: 0 0 auto !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
}

/* === Coursera Style Cards === */
.programa-card.coursera-style {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    min-height: 340px;
    overflow: hidden;
    position: relative;
}

.programa-card.coursera-style:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-blue);
}

.card-header-img {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.programa-card.coursera-style:hover .card-header-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.card-partner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.partner-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
}

.programa-card.coursera-style .card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
    /* Push meta down */
    min-height: 4.5rem;
    /* Force ~3 lines height */
}

.card-meta-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-type {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 2px 6px;
    border-radius: 4px;
}

.meta-sep {
    opacity: 0.5;
}

.card-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.5rem;
    position: relative;
    z-index: 20;
    /* Ensure it stays above the overlay */
}

.star {
    color: #fbbf24;
}

.review-count {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 2px;
}

/* Duplicates removed to prevent override of main theme */

/* Scrollbar Styles for Roll */
.programas-grid.layout-roll::-webkit-scrollbar {
    height: 8px;
}

.programas-grid.layout-roll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.programas-grid.layout-roll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.programas-grid.layout-roll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Like Button */
/* Duplicates removed to prevent override of main theme */

/* === Version Selector (Modal) === */
.version-toggle-wrapper {
    display: none;
    /* Hide old toggles, new one integrated */
}

.version-toggle-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.version-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: var(--white);
}

.version-toggle-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 0 15px rgba(65, 105, 225, 0.3);
}

/* === Card Validity Badges === */
.validity-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Maestría: Premium Purple/Blue */
.badge-maestria {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Diplomado: Professional Teal/Cyan */
.badge-diplomado {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Curso: Energetic Orange/Amber */
.badge-curso {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Micro Certificado: Distinctive Pink/Rose */
.badge-micro {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

/* Legacy / Default */
.badge-rvoe,
.badge-other {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}


.card-badges {
    margin-bottom: var(--spacing-xs);
    /* Was sm. Compact space. */
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Fixed extra closing brace */

/* === Light Mode Overrides === */
body.light-mode {
    background: #f3f4f6;
    color: #1f2937;
    --gray-300: #4b5563;
    /* Darker gray for text readability */
}

body.light-mode .navbar {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
}

body.light-mode .nav-menu {
    background: #ffffff !important;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .nav-link {
    color: #4b5563 !important;
}

body.light-mode .nav-link:hover,
body.light-mode .nav-link.active {
    color: var(--primary-blue) !important;
}

body.light-mode .btn-campus {
    background: var(--gradient-primary);
    color: #ffffff !important;
}


body.light-mode .hamburger span {
    background: #1f2937 !important;
}

body.light-mode .programa-card,
body.light-mode .stat-card,
body.light-mode .nosotros-block,
body.light-mode .mv-card,
body.light-mode .modal-content,
body.light-mode .glass {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    color: #4b5563;
}

body.light-mode .card-title,
body.light-mode .hero-subtitle,
body.light-mode .section-description,
body.light-mode .nosotros-block p,
body.light-mode .timeline-content p,
body.light-mode .info-item p,
body.light-mode .accordion-button,
body.light-mode .modal-title,
body.light-mode .modal-header h2,
body.light-mode .modal-header p,
body.light-mode .form-check label {
    color: #4b5563 !important;
}

body.light-mode .card-title,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4 {
    color: #111827;
}

body.light-mode .meta-row,
body.light-mode .meta-item,
body.light-mode .card-meta {
    color: #6b7280;
    border-color: #e5e7eb;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea,
body.light-mode .form-group select {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

body.light-mode .form-group label {
    background: #ffffff;
    color: #6b7280;
}

/* Fix for icons in light mode */
body.light-mode .btn-secondary {
    color: #4b5563;
    border-color: #d1d5db;
}

body.light-mode .theme-toggle {
    color: #4b5563;
}

body.light-mode .version-toggle-btn {
    color: #1f2937;
    border-color: #d1d5db;
    background: white;
}

body.light-mode .version-toggle-btn:hover {
    background: #f3f4f6;
}

/* Ensure buttons are visible in Light Mode */
body.light-mode .btn-primary {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
}

body.light-mode .close-btn,
body.light-mode .modal-close {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .version-toggle-btn.active {
    background: var(--primary-blue);
    color: white;
}

/* === Card Partner Logo Fix === */
.card-partner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    /* Spacing from title */
    color: var(--gray-300);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.partner-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

body.light-mode .card-partner {
    color: #6b7280;
}

/* =========================================================================
/* =========================================================================
   CARD ACTIONS & BUTTON STYLES (Consolidated Fix)
   ========================================================================= */

/* Flex container for rating and actions */
.card-rating {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: var(--spacing-md);
}

/* Actions Container */
.card-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
}

/* Button Resets (Divs as buttons) */
.btn-like,
.btn-share {
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    -webkit-appearance: none !important;
    transition: all 0.3s ease;
    color: var(--gray-400) !important;
}

/* Inner Elements Reset */
.btn-like *,
.btn-share * {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Hover States */
.btn-share:hover {
    color: var(--primary-blue) !important;
    background: rgba(65, 105, 225, 0.05) !important;
    transform: scale(1.1);
}

.btn-like:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    transform: scale(1.1);
}

/* Liked State */
.btn-like.liked {
    background-color: transparent !important;
    color: #ef4444 !important;
    transform: scale(1.1);
}

.btn-like.liked svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}

/* Overlay Button Fix */
.overlay-btn {
    white-space: nowrap !important;
    display: inline-block !important;
    min-width: max-content !important;
}

/* 2. Button Resets (Divs acting as buttons) - GLOBAL */
.btn-like,
.btn-share {
    background: rgba(255, 255, 255, 0.1);
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--gray-400);
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    -webkit-appearance: none !important;
}

.btn-like *,
.btn-share * {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.btn-like:hover,
.btn-share:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-accent);
    transform: scale(1.1);
}

.btn-like.liked {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.2) !important;
}

/* 3. Light Mode Specifics for Buttons */
body.light-mode .btn-like,
body.light-mode .btn-share {
    background: rgba(0, 0, 0, 0.05);
    color: var(--gray-700);
}

body.light-mode .btn-like:hover,
body.light-mode .btn-share:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary-blue);
}

/* 4. Overlay Button Fix */
.overlay-btn {
    white-space: nowrap !important;
    display: inline-block !important;
    min-width: max-content !important;
}

/* =========================================================================
   FINAL FIXES - LAYOUT & HEART STYLE
   ========================================================================= */

/* 1. FORCE ROW LAYOUT FOR ACTIONS */
.card-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
}

/* Ensure the parent rating container also respects row layout */
.card-rating {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

/* 2. HEART STYLE CORRECTION */

/* Reset Container Backgrounds to transparent (no circles unless hovered) */
.btn-like,
.btn-share {
    background: transparent !important;
    /* No background by default */
    /* If user wants explicit transparent red border on container? No, probably refering to icon */
}

/* Light Mode Hover usually has a slight background, kept for UX, but removed if requested explicitly. 
   User said "corazon con borde rojo transparente", likely meaning the icon stroke. */

/* Default State (Not Liked) */
.btn-like {
    color: var(--gray-400) !important;
    /* Gray stroke */
}

.btn-like:hover {
    color: #ef4444 !important;
    /* Red stroke on hover */
    background: rgba(239, 68, 68, 0.05) !important;
    /* Very subtle red hover bg */
}

/* Liked State */
.btn-like.liked {
    background-color: transparent !important;
    /* Remove the pink circle background */
    color: #ef4444 !important;
    transform: scale(1.1);
    /* Keep the pop effect */
}

/* SVG Styling for Liked State - FILL THE HEART */
.btn-like.liked svg {
    fill: #ef4444 !important;
    /* Fill heart with red */
    stroke: #ef4444 !important;
    /* Red border */
}

/* Share Button cleanup */
.btn-share {
    color: var(--gray-400) !important;
}

.btn-share:hover {
    color: var(--primary-blue) !important;
    background: rgba(65, 105, 225, 0.05) !important;
}

/* Dark Mode Specific Adjustments to ensure visibility */
body:not(.light-mode) .btn-like {
    color: var(--gray-400) !important;
}

body:not(.light-mode) .btn-like:hover {
    color: #ef4444 !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* =========================================================================
   MODAL FIXES - ICONS SIZE & LAYOUT
   ========================================================================= */

/* Fix giant icons in modal header info badges */
.info-badge svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    flex-shrink: 0;
    margin-right: 0.5rem;
    color: var(--primary-blue);
    /* Ensure consistent color */
}

.info-badge {
    display: inline-flex !important;
    /* Force inline flex */
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    background: rgba(255, 255, 255, 0.05);
    /* Subtle bg */
    border-radius: 999px;
    /* Round pill shape */
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    /* Prevent breaking */
}

/* =========================================================================
   MODAL LOGO FIX
   ========================================================================= */

/* Reduce the size of the UNIE symbol in the modal header */
.program-symbol {
    width: 60px !important;
    /* Adjusted size (1/4 of visual perception) */
    height: 60px !important;
    object-fit: contain;
    border-radius: 50%;
    /* Ensure circular persistence */
    margin-left: auto;
    /* Push to the right if in flex container */
    display: block;
}

/* =========================================================================
   MODAL REFINEMENTS v2 (Layout, Logo, Button)
   ========================================================================= */

/* 1. Reduce Header Spacing */
.modal-header {
    padding-top: 1.5rem !important;
    /* Reduced from likely 3rem */
    padding-bottom: 1rem !important;
    position: relative;
    /* Context for absolute logo */
    overflow: hidden;
    /* Contain logo if it spills */
}

.modal-header h2 {
    margin-bottom: 0.5rem !important;
    /* Reduce space after title */
    position: relative;
    z-index: 2;
    /* Text above logo */
    max-width: 85%;
    /* Prevent overlapping with logo area if needed */
}

/* 2. Background Logo (Absolute & Large) */
.program-symbol {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 120px !important;
    /* Double size (approx) */
    height: 120px !important;
    opacity: 0.15 !important;
    /* Subtle background effect */
    z-index: 0 !important;
    pointer-events: none;
    /* Non-interactive */
    display: block !important;
}

/* 3. Space between Header Info and Content */
.header-info {
    margin-top: 0.5rem !important;
    /* Reduced space from title */
    margin-bottom: 1.5rem !important;
    /* Space before tabs */
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    /* Ensure badges wrap if needed */
    gap: 0.75rem !important;
}

.modal-tabs {
    margin-top: 1rem !important;
    /* Explicit space between header info and tabs */
}

/* 4. "Inscribirme" Button Styling - ATTRACTIVE BLUE BUTTON */
.btn-enroll-sm {
    background: var(--gradient-primary) !important;
    color: white !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-full) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all var(--transition-base) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
}

.btn-enroll-sm::after {
    content: " →";
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-enroll-sm:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(65, 105, 225, 0.6) !important;
    filter: brightness(1.1);
}

.btn-enroll-sm:hover::after {
    transform: translateX(4px);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(65, 105, 225, 0.7);
    }

    100% {
        box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4);
    }
}

/* 5. Hide RVOE/Ejecutivo Selector */
#programVersionSelector {
    display: none !important;
}

/* Extra: Enhance Info Badges for cleaner look */
.info-badge {
    background: rgba(255, 255, 255, 0.5) !important;
    /* Lighter bg in light mode */
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--gray-800) !important;
}

body:not(.light-mode) .info-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--gray-300) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Ensure Price Badge (container of Enroll button) aligns contents */
.info-badge.price-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem;
    padding-right: 4px !important;
    /* Adjust since button has own padding/margin */
}

/* =========================================================================
   FINAL VISUAL TWEAKS (No Opacity, Tight Spacing)
   ========================================================================= */

/* 1. Header Title Spacing - ZERO TOLERANCE */
.modal-header h2 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    line-height: 1.2 !important;
    margin-bottom: 0.5rem !important;
}

/* 2. Logo Clarity - NO OPACITY */
.program-symbol {
    opacity: 1 !important;
    /* Full visibility */
    width: 80px !important;
    /* Adjusted size for balance */
    height: 80px !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 1 !important;
    /* Ensure it is visible but ideally not blocking text */
    /* If text overlaps, we might need to pad the header-top right side */
}

/* Ensure header text doesn't hit the logo */
.header-top {
    padding-right: 90px !important;
    /* Space for logo */
    position: relative;
    display: block !important;
    /* Ensure block formatting for title/logo flow */
}

/* 3. Blue Button Assurance */
#btnEnrollHeader {
    background-color: var(--primary-blue) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(65, 105, 225, 0.4) !important;
}

/* 4. Extra tightening of header */
.modal-header {
    padding-bottom: 0.25rem !important;
}

.header-info {
    margin-bottom: 1rem !important;
}

/* =========================================================================
   SPACE KILLER - REMOVE TOP MODAL WHITESPACE
   ========================================================================= */

/* Reduce the overall padding of the modal container */
.modal-content.modal-large {
    padding-top: 1.5rem !important;
    /* Reduced from likely 3rem */
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* Force header to start immediately */
.modal-header {
    margin-top: 0 !important;
    padding-top: 0.5rem !important;
    /* Minimal breathing room */
}

/* Ensure title has no top margin */
.modal-header h2 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Adjust layout so title doesn't hit close button */
.header-top {
    padding-right: 40px !important;
    /* Space for close button if needed */
}

/* Position Close Button properly in corner */
.modal-close {
    top: 15px !important;
    right: 15px !important;
    z-index: 100 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    /* Subtle backing */
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

/* =========================================================================
   FORM STYLING UPDATES - REQUIRED FIELDS & MULTISELECT
   ========================================================================= */

/* 1. Required Asterisks Red */
.form-group input[required]~label::after,
.form-group select[required]~label::after,
.form-group textarea[required]~label::after {
    content: " *";
    color: #ef4444 !important;
    font-weight: bold;
}

/* 2. Custom Multiselect Group Styling - Match standard inputs */
.multiselect-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Ensure the trigger looks exactly like other inputs */
.multiselect-trigger {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: #fff;
    border: 1px solid #e2e8f0;
    /* Standard border color, adjust variable if needed */
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    min-height: 50px;
    /* Ensure height matches input-lg */
}

.multiselect-trigger:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
    outline: none;
}

/* 3. Form Check (Privacy / Consent) */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
    margin-top: 10px;
}

.form-check input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.form-check label {
    cursor: pointer;
    user-select: none;
}

.form-check a:hover {
    text-decoration: underline !important;
}

body.light-mode .form-check {
    color: var(--text-secondary);
}

/* Force "Legend" style label for Multiselect */
.floating-label-multiselect {
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 0.85rem;
    color: var(--primary-blue);
    background-color: #fff;
    /* Default light */
    padding: 0 6px;
    pointer-events: none;
    transition: all 0.2s ease;
    font-weight: 600;
    z-index: 5;
}

.floating-label-multiselect::after {
    content: " *";
    color: #ef4444 !important;
    font-weight: bold;
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
    display: block;
}

body.light-mode .modal-title {
    color: var(--gray-900);
}

/* Adjust dropdown position */
.multiselect-dropdown {
    top: 105%;
    /* Push it down slightly */
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.multiselect-option {
    padding: 10px 16px;
}

.multiselect-option:hover {
    background-color: #f8fafc;
}

/* =========================================================================
   PHONE INPUT STYLES & FIXES
   ========================================================================= */

.phone-input-container {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    position: relative;
}

/* Country Code Select with Arrow */
.country-code {
    width: 130px !important;
    /* Fitted for (+52) Flag */
    flex-shrink: 0;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 12px 30px 12px 12px !important;
    font-size: 0.85rem !important;
    color: #334155 !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 16px !important;
    min-height: 50px !important;
}

.country-code:focus {
    border-color: var(--primary-blue) !important;
    outline: none !important;
}

/* Phone Number Input */
.phone-input-container input {
    flex: 1 !important;
    min-height: 50px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 12px 16px !important;
}

.phone-input-container input:focus {
    border-color: var(--primary-blue) !important;
    outline: none !important;
}

/* Fix Label Position (Always Floating style since structure changed) */
.phone-group label.phone-label {
    position: absolute !important;
    top: -10px !important;
    left: 12px !important;
    font-size: 0.85rem !important;
    color: var(--primary-blue) !important;
    background: #fff !important;
    padding: 0 6px !important;
    pointer-events: none;
    font-weight: 500 !important;
    z-index: 10 !important;
}

/* =========================================================================
   PHONE ARROW FIX
   ========================================================================= */

.country-code {
    /* High contrast reliable arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23111827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 8px center !important;
    background-size: 1.25rem 1.25rem !important;
    background-repeat: no-repeat !important;
    padding-right: 2.5rem !important;

    /* Wider for full names */
    width: 170px !important;

    /* Force cleanup */
    -webkit-appearance: none !important;
    appearance: none !important;
    color: #111827 !important;
    /* Dark text */
}

/* Ensure label sits on top clearly */
.phone-group label.phone-label {
    z-index: 50 !important;
    background-color: #fff !important;
    padding: 0 4px !important;
}

/* =========================================================================
   DARK MODE FIXES (Inputs, Arrows, Labels)
   ========================================================================= */

/* --- 1. Override previous forced white backgrounds --- */

/* Country Code & Multiselect Trigger - DARK MODE DEFAULT */
.country-code,
.multiselect-trigger {
    background-color: rgba(25, 25, 35, 0.6) !important;
    /* Semi-transparent dark */
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
}

/* Light Mode Overrides (Only if specific light class exists, e.g. .light-mode body) */
/* Assuming site is primary dark based on screenshots. */

/* --- 2. Fix Arrow Colors for Dark Background --- */

/* Country Code Arrow (White) */
.country-code {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

/* Multiselect Arrow */
.multiselect-trigger .select-arrow {
    stroke: #fff !important;
}

.multiselect-trigger .selected-text {
    color: #e2e8f0 !important;
    /* Light gray text */
}

/* --- 3. Fix Floating Labels Backgrounds --- */
.phone-group label.phone-label,
.floating-label-multiselect {
    background-color: #121217 !important;
    color: var(--blue-light) !important;
    border-radius: 4px;
}

body.light-mode .phone-group label.phone-label,
body.light-mode .floating-label-multiselect {
    background-color: #ffffff !important;
    color: var(--primary-blue) !important;
}

/* --- 4. Inputs Focus States --- */
.country-code:focus,
.multiselect-trigger:focus {
    border-color: var(--primary-blue) !important;
    background-color: rgba(25, 25, 35, 0.9) !important;
}

/* --- 5. Multiselect Dropdown Dark Theme --- */
.multiselect-dropdown {
    background-color: #1a1a2e !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.multiselect-option {
    color: #fff !important;
}

.multiselect-option:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.checkbox-label-text {
    color: #e2e8f0 !important;
}

/* --- 6. Phone Input Consistency --- */
.phone-input-container input {
    /* Ensure the text input matches the select style */
    background-color: rgba(25, 25, 35, 0.6) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.phone-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* =========================================================================
   WIDTH FIX - COMPACT COUNTRY CODE
   ========================================================================= */

/* Since we reverted to short codes (MX, US), we can reduce width significantly */
.country-code {
    width: 120px !important;
    /* Compact width */
    padding-right: 30px !important;
    /* Space for arrow */
    min-width: 120px !important;
    /* Prevent shrinking */
}

/* Allow Number input to take all gained space */
.phone-input-container input {
    flex-grow: 1 !important;
    width: auto !important;
}

/* Optional: Tweaks for form row balance if needed */
.phone-group {
    flex: 1.2 !important;
    /* Give slightly more weight to phone group if utilizing flex row */
}

/* Be careful modifying form-group flex as it might affect other rows */

/* =========================================================================
   CENTER SUBMIT BUTTON
   ========================================================================= */

#admisionForm button[type="submit"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin-top: 2rem !important;
    width: 100% !important;
    /* Ensure full width usage */
    padding-left: 0 !important;
    /* Reset any lopsided padding */
    padding-right: 0 !important;
}

/* =========================================================================
   ARROW & WIDTH FINE TUNING (COMPACT)
   ========================================================================= */

.country-code {
    /* Auto width allows it to shrink to text size */
    width: auto !important;
    min-width: 95px !important;
    /* Ensure minimal clickable area */

    /* Position arrow closer */
    padding-right: 24px !important;
    /* Just enough space for arrow */
    background-position: right 4px center !important;
    /* Hug the right edge */

    /* Adjust padding left to be snug */
    padding-left: 10px !important;
}

/* Ensure container allows shrinkage */
.phone-input-container {
    gap: 8px !important;
    /* Tighter gap between code and number */
}

/* =========================================================================
   THEME ADAPTATION (LIGHT/DARK MEDIA QUERIES)
   ========================================================================= */

/* --- FORCE LIGHT THEME STYLES WHEN PREFERRED --- */
/* --- FORCE LIGHT THEME STYLES WHEN body.light-mode IS ACTIVE --- */
body.light-mode .country-code,
body.light-mode .multiselect-trigger,
body.light-mode .phone-input-container input {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #e2e8f0 !important;
}

body.light-mode .country-code:focus,
body.light-mode .multiselect-trigger:focus,
body.light-mode .phone-input-container input:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-blue) !important;
}

/* Arrows - Dark Color */
body.light-mode .country-code {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

body.light-mode .select-arrow {
    stroke: #333333 !important;
}

/* Text Colors */
body.light-mode .multiselect-trigger .selected-text,
body.light-mode .checkbox-label-text {
    color: #111827 !important;
}

/* Dropdowns Light */
body.light-mode .multiselect-dropdown {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #111827 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .multiselect-option:hover {
    background-color: #f1f5f9 !important;
}

body.light-mode .multiselect-option {
    color: #111827 !important;
}

body.light-mode .multiselect-option input[type="checkbox"] {
    border-color: #cbd5e1 !important;
}

/* Floating Labels - White Background */
body.light-mode .phone-group label.phone-label,
body.light-mode .floating-label-multiselect {
    background-color: #ffffff !important;
    color: var(--primary-blue) !important;
}

/* --- REINFORCE DARK THEME STYLES --- */
@media (prefers-color-scheme: dark) {

    .country-code,
    .multiselect-trigger,
    .phone-input-container input {
        background-color: rgba(25, 25, 35, 0.8) !important;
        color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }

    .country-code {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    }

    .select-arrow {
        stroke: #ffffff !important;
    }

    .phone-group label.phone-label,
    .floating-label-multiselect {
        background-color: #121217 !important;
        /* Matches dark modal */
        color: var(--blue-light) !important;
    }
}

/* =========================================================================
   LIGHT MODE CORRECTIONS (FINAL PATCH)
   ========================================================================= */

/* LIGHT MODE CORRECTIONS (FINAL PATCH) */
body.light-mode .country-code {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

body.light-mode .country-code,
body.light-mode .phone-input-container input,
body.light-mode .multiselect-trigger {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #d1d5db !important;
}

body.light-mode .phone-group label.phone-label,
body.light-mode .floating-label-multiselect {
    background-color: #ffffff !important;
    color: var(--primary-blue) !important;
    padding: 0 4px !important;
}

body.light-mode .phone-input-container input::placeholder {
    color: #9ca3af !important;
}

body.light-mode .multiselect-dropdown {
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

body.light-mode .multiselect-option:hover {
    background-color: #f3f4f6 !important;
}

/* =========================================================================
   ARROW NUKE FIX (Base64 Black Arrow)
   ========================================================================= */

/* ARROW NUKE FIX (Base64 Black Arrow) */
body.light-mode .phone-input-container .country-code,
body.light-mode form .phone-input-container .country-code {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000000'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 1.5rem !important;
    padding-right: 2.5rem !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #000000 !important;
    opacity: 1 !important;
}

body.light-mode .country-code::after {
    display: none !important;
}

/* =========================================================================
   MODAL HEADER CENTER & CLEANUP
   ========================================================================= */

/* Center the metadata row */
.header-info {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
}

/* Style the text badges */
.info-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    /* Subtle backing */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important;
    padding: 0.5rem 1.25rem !important;
    font-size: 0.9rem !important;
    color: inherit !important;
    display: flex !important;
    align-items: center !important;
}

/* CTA Button Container */
.modal-cta-container {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    /* Breathing room before tabs */
}

/* Light Mode Badge Override */
@media (prefers-color-scheme: light) {
    .info-badge {
        background: #f3f4f6 !important;
        border-color: #e5e7eb !important;
        color: #374151 !important;
    }
}

/* =========================================================================
   BOLD HEADER BADGES
   ========================================================================= */

.info-badge {
    font-weight: 700 !important;
    /* Bold text as requested */
    letter-spacing: 0.02em !important;
}

/* =========================================================================
   CENTER MODAL TABS
   ========================================================================= */

.modal-tabs {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    /* Keep spacing consistent */
}

/* =========================================================================
   COMPACT INVESTMENT PRICE STYLES
   ========================================================================= */

.investment-compact-container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2rem !important;
    padding: 1rem !important;
    border-radius: 0.75rem !important;
    margin-bottom: 2rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.price-compact-item {
    display: flex !important;
    align-items: baseline !important;
    gap: 0.5rem !important;
}

.price-label {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
}

.price-amount {
    font-size: 1.4rem !important;
    /* Prominent but compact */
    font-weight: 700 !important;
    color: var(--white) !important;
    line-height: 1 !important;
}

.price-sub {
    font-size: 0.75rem !important;
    color: var(--text-secondary) !important;
    opacity: 0.8 !important;
}

.price-vertical-divider {
    width: 1px !important;
    height: 30px !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Mobile: Stack if too narrow */
@media (max-width: 640px) {
    .investment-compact-container {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .price-vertical-divider {
        width: 100% !important;
        height: 1px !important;
    }
}

/* Light Mode Support */
@media (prefers-color-scheme: light) {
    .investment-compact-container {
        background: #f1f5f9 !important;
        border-color: #e2e8f0 !important;
    }

    .price-amount {
        color: #111827 !important;
    }

    .price-vertical-divider {
        background-color: #cbd5e1 !important;
    }
}

/* =========================================================================
   TITLED PRICE CONTAINER STYLES
   ========================================================================= */

.investment-compact-container {
    flex-direction: column !important;
    gap: 1rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.price-header-title {
    margin: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    /* Subtle title */
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.price-values-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2rem !important;
    flex-wrap: wrap !important;
}

@media (max-width: 640px) {
    .price-values-row {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
}

/* =========================================================================
   FINAL COMPACT PRICE LAYOUT (Title Outside)
   ========================================================================= */

.investment-compact-container {
    display: flex !important;
    flex-direction: row !important;
    /* Side by side items */
    align-items: center !important;
    justify-content: center !important;
    gap: 3rem !important;
    /* More breathing room */
    padding: 1.5rem !important;
    margin-top: 1rem !important;
}

/* Ensure centering on mobile */
@media (max-width: 640px) {
    .investment-compact-container {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
}

/* =========================================================================
   GRID PRICE LAYOUT (2 Columns x 2 Rows)
   ========================================================================= */

.price-column-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 0 1rem !important;
}

.price-detail-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    /* Label left, value right? or just gap */
    gap: 1rem !important;
    width: 100% !important;
}

.price-label {
    min-width: 100px !important;
    /* Align labels somewhat */
    text-align: right !important;
}

.price-amount-sm {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--white) !important;
}

@media (prefers-color-scheme: light) {
    .price-amount-sm {
        color: #111827 !important;
    }
}

@media (max-width: 640px) {
    .price-detail-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }

    .price-label {
        text-align: left !important;
    }
}

/* =========================================================================
   NEW PRICING UI (Switch + 2 Columns)
   ========================================================================= */

.pricing-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
}

/* Reset H3 to match regular section headers if needed */
.pricing-header-row h3 {
    margin: 0 !important;
    /* Styles are inherited from global h3 */
}

/* Currency Toggle */
.currency-toggle {
    display: flex !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 9999px !important;
    padding: 4px !important;
}

.currency-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-btn.active {
    background-color: var(--primary-blue);
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pricing Grid Table */
.pricing-table-container {
    display: flex !important;
    border-radius: 16px !important;
    overflow: visible !important;
    margin-bottom: 2rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-column {
    flex: 1;
    padding: 1.5rem;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pricing-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Badges */
.column-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.badge-rvoe,
.badge-continues {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-rvoe {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-continues {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Rows */
.price-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.pg-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pg-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
}

/* Light Mode */
@media (prefers-color-scheme: light) {
    .currency-toggle {
        background: #e2e8f0 !important;
    }

    .currency-btn {
        color: #64748b;
    }

    .currency-btn.active {
        color: #ffffff !important;
    }

    .pricing-table-container {
        border-color: #e2e8f0;
    }

    .pricing-divider {
        background: #e2e8f0;
    }

    .pg-value {
        color: #1e293b !important;
    }

    .badge-rvoe {
        background: #eff6ff;
        color: #2563eb;
        border-color: #dbeafe;
    }

    .badge-continues {
        background: #f8fafc;
        color: #475569;
        border-color: #e2e8f0;
    }
}

@media (max-width: 640px) {
    .pricing-table-container {
        flex-direction: column;
    }

    .pricing-divider {
        width: 100%;
        height: 1px;
    }
}

/* =========================================================================
   PRICE MODAL TWEAKS (Icon Size, Colors, Tooltips)
   ========================================================================= */

/* 1. Reduce Icon Size by ~50% in Pricing/Becas section */
.beca-icon svg,
.payment-option svg {
    width: 24px !important;
    height: 24px !important;
}

.beca-icon,
.payment-option-icon-wrapper {
    width: auto !important;
    /* Let it shrink */
    height: auto !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
}

/* 2. Distinct Badge Colors */
.badge-rvoe {
    background: rgba(16, 185, 129, 0.15) !important;
    /* Emerald Green */
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.badge-continues {
    background: rgba(249, 115, 22, 0.15) !important;
    /* Orange */
    color: #fb923c !important;
    border: 1px solid rgba(249, 115, 22, 0.3) !important;
}

/* 3. Tooltips */
.badge-group {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.info-icon {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-secondary) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: help !important;
    position: relative !important;
}

/* Tooltip Bubble */
.info-icon::after {
    content: attr(data-tooltip) !important;
    position: absolute !important;
    bottom: 130% !important;
    /* Above toggle */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 240px !important;
    background: #1e293b !important;
    color: #f1f5f9 !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-align: center !important;

    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    pointer-events: none !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    white-space: normal !important;
}

/* Hover State */
.info-icon:hover::after {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(-5px) !important;
}

/* Light Mode Overrides */
@media (prefers-color-scheme: light) {
    .badge-rvoe {
        background: #ecfdf5 !important;
        color: #059669 !important;
        border-color: #a7f3d0 !important;
    }

    .badge-continues {
        background: #fff7ed !important;
        color: #ea580c !important;
        border-color: #fed7aa !important;
    }

    .info-icon {
        background: #e2e8f0 !important;
        color: #64748b !important;
    }

    .info-icon::after {
        background: #ffffff !important;
        color: #334155 !important;
        border-color: #e2e8f0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
}

#curriculumTitle {
    margin-bottom: 2rem;
}

/* Requirements Section Titles - Fix for visibility in both modes */
.req-title {
    display: block !important;
    color: var(--white) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
    text-align: left !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.requirements-list,
.documents-list {
    text-align: left !important;
}

/* Light Mode Overrides for Requirements */
@media (prefers-color-scheme: light) {
    .req-title {
        color: var(--gray-900) !important;
    }
}

/* =========================================================================
   CRITICAL FIX: FORCE DARK INPUTS WHEN NOT IN LIGHT MODE
   (Overrides any system preference media queries and ensures Dark Mode is respected)
   ========================================================================= */

/* 1. Base Input Styles for Dark Mode */
body:not(.light-mode) .phone-input-container input,
body:not(.light-mode) .country-code,
body:not(.light-mode) .multiselect-trigger,
body:not(.light-mode) .form-control,
body:not(.light-mode) input[type="text"],
body:not(.light-mode) input[type="email"],
body:not(.light-mode) input[type="tel"],
body:not(.light-mode) select,
body:not(.light-mode) textarea {
    background-color: rgba(25, 25, 35, 0.6) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* 2. Placeholder Colors */
body:not(.light-mode) .phone-input-container input::placeholder,
body:not(.light-mode) input::placeholder,
body:not(.light-mode) textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* 3. Floating Labels Background Matches Modal */
body:not(.light-mode) .phone-group label.phone-label,
body:not(.light-mode) .floating-label-multiselect {
    background-color: #121217 !important;
    /* Modal dark bg color */
    color: var(--blue-light) !important;
}

/* 4. Multiselect Specifics */
body:not(.light-mode) .multiselect-trigger .selected-text {
    color: #ffffff !important;
}

body:not(.light-mode) .multiselect-trigger .select-arrow {
    stroke: #ffffff !important;
}

/* 5. Country Code Arrow (White) */
body:not(.light-mode) .country-code {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

/* 6. Focus States */
body:not(.light-mode) .phone-input-container input:focus,
body:not(.light-mode) .country-code:focus,
body:not(.light-mode) .multiselect-trigger:focus,
body:not(.light-mode) input:focus,
body:not(.light-mode) select:focus,
body:not(.light-mode) textarea:focus {
    border-color: var(--primary-blue) !important;
    background-color: rgba(25, 25, 35, 0.9) !important;
    box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.2) !important;
}

/* 7. Requirements Title Fix */
body:not(.light-mode) .req-title {
    color: var(--white) !important;
}

/* 8. Pricing Value Fix */
body:not(.light-mode) .pg-value {
    color: var(--white) !important;
}

/* Fix for Excelencia Cards on Mobile */
@media (max-width: 768px) {
    .excelencia-card {
        padding: 1.5rem !important;
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 1rem;
    }

    .excelencia-card h3 {
        font-size: 1.25rem;
    }
}

/* Fix for admission form modal layout - DESKTOP & MOBILE CONSISTENCY */
/* Fix for admission form modal layout - PC & Mobile Safe */
#admisionForm {
    width: 100%;
    /* Ensure form takes full space */
}

/* On PC, form-row puts items side-by-side. 
   On Mobile, we need them stacked. */
#admisionForm .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* Force stacked layout on mobile */
@media (max-width: 768px) {
    #admisionForm .form-row {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

#admisionForm .form-group {
    flex: 1;
    width: 100%;
    /* Ensure it fills flex container */
}

/* Full Width Elements (Experience, Privacy, Multiselect) */
#admisionForm .form-full-width,
#admisionForm .multiselect-group {
    width: 100%;
    display: block;
    clear: both;
    margin-top: 1rem;
}

/* Ensure checkbox is flex to align box and text */
#admisionForm .form-check {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

#admisionForm .form-check input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}
/* Adjustments for Phone and Level Row to give more space to Level */
@media (min-width: 768px) {
    .phone-level-row {
        grid-template-columns: 0.8fr 1.2fr !important;
    }
}
