* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    width: 100vw;
    margin: 0;
    padding: 20px 40px 20px 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #fff, #f093fb, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.2rem;
    color: white;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Sombra para mejor legibilidad */
}

/* Romantic Heart Feature */
.subtitle-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Spatial Heart Button in Tabs - Same style as inactive tabs */
.love-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    min-width: 160px;
    height: 48px;
    user-select: none;
    margin-left: 12px;
}

.love-heart:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(240, 147, 251, 0.15);
    color: rgba(255, 255, 255, 1);
}

.love-heart:active {
    transform: scale(0.95) translateY(0px);
}

.heart-icon {
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart-icon i {
    color: rgba(255, 255, 255, 0.85);
}

.love-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Heart Rain Animation */
.heart-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.falling-heart {
    position: absolute;
    font-size: 1.5rem;
    animation: heartFallEnhanced linear;
    pointer-events: none;
    user-select: none;
}

@keyframes heartFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.heart-rain-active .falling-heart {
    animation-play-state: running;
}

/* Apple visionOS Spatial UI - Tabs */
.tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 8px;
    padding: 12px;
    backdrop-filter: blur(30px);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(240, 147, 251, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Spatial Tab Button */
.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    min-width: 160px;
    height: 48px;
}

/* Font Awesome icons in tabs */
.tab i {
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.2s ease-in-out;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(240, 147, 251, 0.15);
    color: rgba(255, 255, 255, 1);
}

.tab:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.tab.active {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.8), rgba(245, 87, 108, 0.8));
    backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.3),
        0 8px 25px rgba(240, 147, 251, 0.4),
        0 0 30px rgba(240, 147, 251, 0.2);
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.tab.active i {
    opacity: 1;
    transform: scale(1.05);
}

/* Apple visionOS Spatial UI - Filters (now compact inside content) */
.filters {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.filters:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 0 20px rgba(240, 147, 251, 0.15);
    border-color: rgba(240, 147, 251, 0.2);
    transform: translateY(-1px);
}

/* Removed h3 styling since filters title was removed */

.filter-row, .advanced-search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

/* Simple Criteria Admin Panel */
.current-criteria {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.current-criteria h5 {
    margin-bottom: 10px;
    color: #764ba2;
}

.current-criteria ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.current-criteria li {
    padding: 5px 0;
    color: #666;
    font-weight: 500;
}

.criteria-form {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.criteria-form h5 {
    margin-bottom: 15px;
    color: #764ba2;
}

.simple-criteria-inputs {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.criteria-input-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.criteria-input-row label {
    width: 100px;
    font-weight: 600;
    color: #495057;
}

.criteria-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
}

.criteria-input-row input:focus {
    outline: none;
    border-color: #667eea;
}

.save-btn {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: linear-gradient(45deg, #e083eb, #e3475a);
    transform: translateY(-1px);
}

/* Criteria levels section */
.criteria-levels-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.criteria-level-group {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.criteria-level-group h6 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1rem;
}

.level-inputs {
    display: grid;
    gap: 10px;
}

.level-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-row span {
    min-width: 20px;
    font-weight: bold;
    color: #495057;
}

.level-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.level-row input:focus {
    outline: none;
    border-color: #667eea;
}

/* Spatial Filter Labels */
.filter-group label {
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
}

/* Spatial Filter Inputs */
.filter-group input, .filter-group select {
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    transition: all 0.2s ease-in-out;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom dropdown arrow for select */
.filter-group select {
    background-image: 
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.8) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.8) 50%, transparent 50%);
    background-position: 
        calc(100% - 20px) calc(1em + 2px),
        calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px;
    cursor: pointer;
}

/* Dropdown options styling */
.filter-group select option {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-size: 14px;
}

.filter-group select option:hover,
.filter-group select option:checked {
    background: rgba(240, 147, 251, 0.3);
    color: white;
}

.filter-group input:focus, .filter-group select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(240, 147, 251, 0.6);
    box-shadow: 
        inset 0 0 0 1px rgba(240, 147, 251, 0.3),
        0 4px 16px rgba(240, 147, 251, 0.2),
        0 0 20px rgba(240, 147, 251, 0.1);
}

.filter-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Apple visionOS Spatial UI - Content */
.content {
    backdrop-filter: blur(30px);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 30px;
    min-height: 600px;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(240, 147, 251, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

/* Mapa */
#map {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#map:hover {
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(240, 147, 251, 0.15);
    border-color: rgba(240, 147, 251, 0.2);
    transform: translateY(-1px);
}

/* Leaflet Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    padding: 15px;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

/* Marker Cluster Styles */
.marker-cluster {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marker-cluster:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Override all cluster colors to be consistently blue - very specific selectors */
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-marker-icon.marker-cluster-small {
    background-color: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-marker-icon.marker-cluster-medium {
    background-color: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-marker-icon.marker-cluster-large {
    background-color: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

/* More specific overrides */
.marker-cluster-small {
    background: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

.marker-cluster-medium {
    background: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

.marker-cluster-large {
    background: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

/* Ensure all clusters are blue regardless of size */
.marker-cluster {
    background-color: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

/* Target the specific leaflet classes */
.leaflet-marker-icon.marker-cluster {
    background-color: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

/* Override the external CSS with high specificity */
.leaflet-marker-icon.marker-cluster-small div,
.leaflet-marker-icon.marker-cluster-medium div,
.leaflet-marker-icon.marker-cluster-large div {
    background-color: rgba(43, 130, 203, 0.8) !important;
    color: white !important;
}

/* Leaflet Standard Marker Icon Styles */
.leaflet-marker-icon {
    transition: transform 0.2s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1) translate(0, -5px);
    z-index: 1000 !important;
}

/* All clusters and markers should be navy blue regardless of status */

/* Marker Popup Styles */
.marker-popup {
    padding: 10px;
    min-width: 220px;
}

/* Status badges in marker popups */
.marker-popup .status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
    justify-content: center;
}

.marker-popup .status-badge {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.marker-popup .status-badge.aplicando {
    background-color: #00c853;
    color: white;
}

.marker-popup .status-badge.interesado {
    background-color: #2979ff;
    color: white;
}

.marker-popup .status-badge.considerando {
    background-color: #ff9100;
    color: white;
}

.marker-popup .status-badge.pendiente {
    background-color: #757575;
    color: white;
}

.marker-popup .status-badge.descartado {
    background-color: #f44336;
    color: white;
}

.marker-popup h3 {
    color: #764ba2;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(118, 75, 162, 0.2);
    padding-bottom: 8px;
}

.marker-popup p {
    margin: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.marker-popup p:nth-child(2)::before {
    content: "📍";
}

.marker-popup p:nth-child(3)::before {
    content: "📚";
}

.ver-universidad-btn {
    background: linear-gradient(45deg, #764ba2, #667eea);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    margin-top: 12px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ver-universidad-btn::before {
    content: "👁️";
}

.ver-universidad-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3);
}

/* White Inner Container for Tab Views */
.white-content-container {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    overflow: hidden;
    margin: 0;
    padding: 30px;
    height: calc(100vh - 280px);
    overflow-y: auto;
}

/* Universidades View Styles */
.universidades-header {
    text-align: center;
    margin-bottom: 30px;
}

.universidades-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 8px;
}

.universidades-header p {
    color: #666;
    font-size: 1.1rem;
}

.universidades-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 4px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.universidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.university-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.university-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.15);
    border-color: rgba(118, 75, 162, 0.2);
}

.university-card-header {
    margin-bottom: 16px;
}

.university-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.university-location {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.university-programs {
    margin-bottom: 16px;
}

.programs-count {
    font-size: 0.85rem;
    color: #764ba2;
    font-weight: 500;
    margin-bottom: 8px;
}

.program-preview {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.university-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.university-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-value {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.view-university-btn {
    background: linear-gradient(45deg, #764ba2, #667eea);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-university-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* Ciudades View Styles */
.ciudades-header {
    text-align: center;
    margin-bottom: 30px;
}

.ciudades-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 8px;
}

.ciudades-header p {
    color: #666;
    font-size: 1.1rem;
}

.ciudades-dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
}

.dashboard-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.metric-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #764ba2, #667eea);
    border-radius: 12px;
    color: white;
}

.metric-content {
    flex: 1;
}

.metric-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 4px;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.cities-ranking {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.city-ranking-item {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.city-ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.1);
}

.city-rank-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.city-rank-number {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.city-rank-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.city-rank-details p {
    color: #666;
    font-size: 0.85rem;
}

.city-rank-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: right;
}

.city-programs-count {
    color: #764ba2;
    font-weight: 600;
    font-size: 0.9rem;
}

.city-rating {
    color: #ffc107;
    font-weight: 600;
    font-size: 0.9rem;
}

.geo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.country-stat {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.country-flag {
    font-size: 2rem;
}

.country-name {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.country-count {
    color: #764ba2;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Favoritos View Styles */
.favoritos-header {
    text-align: center;
    margin-bottom: 30px;
}

.favoritos-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 8px;
}

.favoritos-header p {
    color: #666;
    font-size: 1.1rem;
}

.favoritos-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fav-stat-card {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 16px;
    padding: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(240, 147, 251, 0.2);
}

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

.fav-stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.fav-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.favoritos-carousel {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.carousel-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.carousel-controls {
    display: flex;
    gap: 8px;
}

.carousel-btn {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #764ba2;
}

.carousel-btn:hover {
    background: #764ba2;
    color: white;
    transform: scale(1.05);
}

.carousel-container {
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease;
    min-height: 200px;
}

.favorite-carousel-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-width: 280px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.15);
}

.favoritos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.favoritos-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
}

.favoritos-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.status-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-group {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.status-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.status-emoji {
    font-size: 1.2rem;
}

.status-name {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.status-count {
    background: #764ba2;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-programs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-program {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
}

.top-rated-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-rated-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-rated-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.1);
}

.top-rated-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.top-rated-info p {
    color: #666;
    font-size: 0.8rem;
}

.top-rated-rating {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Admin View Styles */
.admin-container {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    overflow: hidden;
    margin: 0;
    padding: 40px;
    height: calc(100vh - 280px);
    overflow-y: auto;
}

/* Metadata Section at Top */
.admin-metadata-section {
    margin-bottom: 40px;
}

.metadata-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.metadata-card-new {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.metadata-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.1);
}

.metadata-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.metadata-info {
    flex: 1;
}

.metadata-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

/* Save Indicator Ribbon - Word-like unsaved changes indicator */
.save-indicator-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 12px 20px;
    z-index: 999999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    height: 60px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.save-indicator-ribbon.hidden {
    transform: translateY(-100%);
}

/* Body padding will be managed by JavaScript */

.save-indicator-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.save-indicator-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.save-indicator-left i {
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.save-indicator-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.save-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.save-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.discard-btn {
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    margin-right: 10px;
}

.discard-btn:hover {
    background: rgba(200, 35, 51, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.dismiss-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Download suggestion popup */
.download-suggestion {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    max-width: 350px;
    animation: slideInRight 0.3s ease;
}

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

.suggestion-content {
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.suggestion-content i {
    color: #764ba2;
    font-size: 1.5rem;
    margin-top: 4px;
}

.suggestion-text {
    flex: 1;
}

.suggestion-text strong {
    color: #333;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.suggestion-text p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.suggestion-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.suggestion-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    border: none;
}

.suggestion-btn.primary {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
}

.suggestion-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

.suggestion-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.suggestion-btn.secondary:hover {
    background: #e9ecef;
}

/* Save reminder notification */
.save-reminder-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.3);
    z-index: 9997;
    animation: slideInUp 0.3s ease;
}

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

.reminder-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
}

.reminder-content i {
    font-size: 1.2rem;
}

.reminder-content span {
    flex: 1;
    font-weight: 500;
}

.reminder-content button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reminder-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Adjust body padding when save indicator is visible */
/* Ribbon now pushes content down naturally with relative positioning */

.metadata-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Two Column Layout */
.admin-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.admin-column {
    display: flex;
    flex-direction: column;
}

.column-card {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e9ecef;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.column-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.upload-icon {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.download-icon {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.column-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Upload Zone */
.upload-zone {
    background: white;
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.upload-visual {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.upload-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.upload-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Download Options */
.download-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.download-option {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.download-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.1);
}

.download-option-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.download-option-content {
    flex: 1;
}

.download-option-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.download-option-content p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* Action Buttons */
.action-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.upload-btn {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.download-btn {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

/* Info Sections */
.upload-info,
.download-info {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Vista Tabla */
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-btn {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f5f5f5; /* Fondo claro para encabezados */
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    color: #764ba2; /* Color para mantener consistencia */
}

tr:hover {
    background: #f9f9f9;
}

.editable {
    background: #f8f8f8;
    border: 1px solid #ddd;
    color: #333;
    padding: 5px 8px;
    border-radius: 5px;
    width: 100%;
}

.editable:focus {
    border-color: #f093fb;
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(240, 147, 251, 0.2);
}

/* Action Buttons */
.action-btn, .btn-ver, .btn-agregar {
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 2px;
}

.view-btn, .btn-ver {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.delete-btn {
    background: #ff4757;
}

.btn-agregar {
    background: #20bf6b;
}

.action-btn:hover, .btn-ver:hover, .btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Nuevo Modal de Universidad */
.university-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.university-modal-content {
    position: absolute;
    top: 2vh;
    transition: top 0.3s ease;
    left: 2vw;
    width: 96vw;
    height: 96vh;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.university-modal.show {
    opacity: 1;
}

.university-modal.show .university-modal-content {
    transform: scale(1);
    opacity: 1;
}

.university-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.university-modal-header h2 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.back-btn:active::before {
    width: 150px;
    height: 150px;
}

.navigation-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-btn:hover:not(:disabled) {
    transform: translateX(-2px);
}

.next-btn:hover:not(:disabled) {
    transform: translateX(2px);
}

#programCounter {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.university-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.university-info {
    padding: 20px 30px;
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
}

.university-location {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#universityCity {
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
}

#universityCity::before {
    content: "📍";
    margin-right: 8px;
}

.university-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.view-city-btn {
    background: linear-gradient(45deg, #2e86de, #54a0ff);
}

.view-university-btn {
    background: linear-gradient(45deg, #20bf6b, #0fb9b1);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

.program-details {
    padding: 30px;
    background: #fff;
    flex: 1;
    position: relative;
}

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

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

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

.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.program-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.program-header h3 {
    font-size: 1.8rem;
    margin: 0;
    color: #333;
    font-weight: 700;
}

.program-status {
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.program-status[data-status="pendiente"] {
    background: #9e9e9e;
}

.program-status[data-status="considerando"] {
    background: #ff9800;
}

.program-status[data-status="interesado"] {
    background: #2196f3;
}

.program-status[data-status="aplicando"] {
    background: #4caf50;
}

.program-status[data-status="descartado"] {
    background: #f44336;
}

.program-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.program-section {
    background: #f8f9fb;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.program-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.program-section h4 {
    margin: 0;
    padding: 15px 20px;
    background: #eaecf1;
    color: #555;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

.program-section-content {
    padding: 20px;
}

.program-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Estilos para los criterios específicos */
.program-criteria-section h4 {
    background-color: rgba(0, 105, 140, 0.1);
}

.criteria-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.criteria-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.criteria-row .label {
    font-weight: 500;
    color: #444;
    width: auto;
}

.criteria-value {
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.criteria-value.show {
    opacity: 1;
    transform: translateY(0);
}

.criteria-avg {
    font-size: 15px;
    background-color: #f0f8ff;
    padding: 4px 10px;
}

/* Colores según valor */
.criteria-0 {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

.criteria-1 {
    background-color: #ffebee;
    color: #c62828;
}

.criteria-2 {
    background-color: #fff3e0;
    color: #e65100;
}

.criteria-3 {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.criteria-4 {
    background-color: #e3f2fd;
    color: #1565c0;
}

.criteria-5 {
    background-color: #e1f5fe;
    color: #0277bd;
}

/* Estilos para el resumen de criterios en la vista modal del programa */
.program-criteria-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.criteria-row-avg {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.criteria-value {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.criteria-value.show {
    opacity: 1;
    transform: translateY(0);
}

.criteria-0 {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

.criteria-1 {
    background-color: #ffebee;
    color: #c62828;
}

.criteria-2 {
    background-color: #fff3e0;
    color: #e65100;
}

.criteria-3 {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.criteria-4 {
    background-color: #e3f2fd;
    color: #1565c0;
}

.criteria-5 {
    background-color: #e1f5fe;
    color: #0277bd;
}

.criteria-avg {
    font-size: 15px;
    background-color: #f0f8ff;
    color: #0d47a1;
    padding: 5px 12px;
}

/* Estilos para la vista de criterios en el modal del programa */
.criteria-avg-summary {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f5f9ff;
    border-radius: 8px;
}

.criteria-rating-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.current-value {
    font-weight: 600;
    min-width: 40px;
    padding: 3px 10px;
    border-radius: 4px;
    text-align: center;
    background-color: #f0f0f0;
}

.criteria-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
}

.criteria-level-item {
    display: flex;
    align-items: flex-start;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.criteria-level-item:hover {
    background-color: #f0f0f0;
}

.criteria-level-item[data-active="true"] {
    background-color: #e3f2fd;
}

.level-number {
    font-weight: 600;
    color: #555;
    margin-right: 10px;
    min-width: 20px;
    text-align: center;
}

.level-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}

/* Estilos para las estrellas de calificación en la vista del programa */
.program-criteria .criteria-stars {
    display: flex;
    gap: 5px;
}

/* Estilos para estrellas (nuevo) */
.criteria-star {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ddd;
    user-select: none;
}

.criteria-star:hover {
    transform: scale(1.2);
    color: #ffc107;
}

.criteria-star.active {
    color: #ffc107;
}

/* Mantener compatibilidad con dots para legacy */
.program-criteria .criteria-dot {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ccc;
}

.program-criteria .criteria-dot:hover {
    transform: scale(1.2);
}

.program-criteria .criteria-dot.active, 
.program-criteria .criteria-dot:hover {
    color: #2196f3;
}

.program-criteria .criteria-dot[data-value="1"].active {
    color: #f44336;
}

.program-criteria .criteria-dot[data-value="2"].active {
    color: #ff9800;
}

.program-criteria .criteria-dot[data-value="3"].active {
    color: #4caf50;
}

.program-criteria .criteria-dot[data-value="4"].active {
    color: #2196f3;
}

.program-criteria .criteria-dot[data-value="5"].active {
    color: #3f51b5;
}

/* Modal de confirmación de criterios */
#criteria-rating-modal .modal-content {
    max-width: 500px;
    margin: 100px auto;
}

#criteria-rating-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#criteria-rating-modal .modal-header h4 {
    margin: 0;
    color: #333;
}

#criteria-rating-modal .close-criteria-modal {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    transition: color 0.2s;
}

#criteria-rating-modal .close-criteria-modal:hover {
    color: #333;
}

#criteria-rating-modal #criteria-rating-stars {
    color: #ffc107;
    font-size: 24px;
    margin: 0 5px;
}

#criteria-rating-modal .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.criteria-help {
    padding-top: 10px;
    font-size: 13px;
}

.criteria-help summary {
    cursor: pointer;
    color: #0066cc;
    font-size: 13px;
}

.criteria-descriptions {
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 12px;
}

.criteria-descriptions p {
    margin-bottom: 10px;
    line-height: 1.4;
}

.program-info-item .label {
    font-weight: 600;
    color: #555;
    width: 100px;
    flex-shrink: 0;
}

.program-info-item a {
    color: #2196f3;
    text-decoration: none;
}

.program-info-item a:hover {
    text-decoration: underline;
}

.program-info-item .updated-date {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-style: italic;
    margin-left: 8px;
    border: 1px solid #e9ecef;
}

.rating-display {
    display: flex;
    align-items: center;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars .star {
    color: #ddd;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rating-stars .star.filled {
    color: #f1c40f;
    text-shadow: 0 1px 3px rgba(241, 196, 15, 0.3);
}

#programSummary {
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.city-metrics .metric-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.city-metrics .metric-row:last-child {
    border-bottom: none;
}

.city-metrics .label {
    font-weight: 600;
    color: #555;
}

.city-metrics .value {
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.city-metrics .value.show {
    opacity: 1;
    transform: translateY(0);
}

.city-metrics .value.alto {
    color: #f44336;
}

.city-metrics .value.medio {
    color: #ff9800;
}

.city-metrics .value.bajo {
    color: #4caf50;
}

/* University metrics styling */
.university-metrics .metric-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.university-metrics .metric-row:last-child {
    border-bottom: none;
}

.university-metrics .label {
    font-weight: 600;
    color: #555;
}

.university-metrics .value {
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.university-metrics .value.show {
    opacity: 1;
    transform: translateY(0);
}

/* Explanation section styling */
.explanation-section {
    grid-column: 1 / -1; /* Span across all columns */
}

#detailedExplanation {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

.explanation-block {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease forwards;
}

.explanation-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.explanation-block h5 {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(118, 75, 162, 0.2);
    position: relative;
}

.explanation-block.general-info h5::before {
    content: "ℹ️";
    margin-right: 8px;
}

.explanation-block.stats-info h5::before {
    content: "🏛️";
    margin-right: 8px;
}

.explanation-block.city-info h5::before {
    content: "🏙️";
    margin-right: 8px;
}

.metric-explanation {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: rgba(245, 245, 245, 0.5);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.3s ease;
}

.metric-explanation:hover {
    background: rgba(245, 245, 245, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.metric-explanation .metric-name {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.metric-explanation p {
    margin: 0;
    color: #555;
}

/* Estilo para cuando no hay datos disponibles */
.explanation-block.no-data {
    color: #777;
    font-style: italic;
    background: rgba(0,0,0,0.03);
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
}

.explanation-block.no-data p {
    margin: 0;
    position: relative;
    display: inline-block;
}

.explanation-block.no-data p::before,
.explanation-block.no-data p::after {
    content: "—";
    color: #aaa;
    padding: 0 10px;
}

#researchLines ul {
    margin: 0;
    padding-left: 20px;
}

#researchLines li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .program-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .university-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .navigation-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Info Panel (mantener para compatibilidad) */
.info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white; /* Fondo sólido */
    border-radius: 20px;
    padding: 35px;
    width: 90%;
    max-width: 700px; /* Panel más ancho */
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    color: #333; /* Texto oscuro para legibilidad */
}

.info-panel h2 {
    margin-bottom: 15px;
    color: #f093fb;
    font-size: 1.9rem;
}

.info-panel h3 {
    margin: 25px 0 15px 0;
    color: #764ba2; /* Color para mantener consistencia */
    font-size: 1.4rem;
}

.university-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 15px;
}

.info-panel p {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #444;
}

.info-panel strong {
    font-weight: 600;
    color: #555;
}

.image-buttons {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.image-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.university-btn {
    background: linear-gradient(45deg, #20bf6b, #0fb9b1);
    min-width: 150px;
    justify-content: center;
}

.city-btn {
    background: linear-gradient(45deg, #2e86de, #54a0ff);
    min-width: 150px;
    justify-content: center;
}

.image-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    color: #764ba2;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 1100;
}

.close-btn:hover {
    background: #f5f5f5;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.program-item {
    background: #2a2d3e; /* Fondo oscuro para contraste */
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid #f093fb;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    color: #e0e0e0; /* Texto claro para contrastar con el fondo oscuro */
}

/* Status-specific left borders */
.program-item.status-aplicando {
    border-left-color: #0abde3;
}

.program-item.status-interesado {
    border-left-color: #3c40c6;
}

.program-item.status-considerando {
    border-left-color: #4b6584;
}

.program-item.status-pendiente {
    border-left-color: #778ca3;
}

.program-item.status-descartado {
    border-left-color: #ee5253;
    opacity: 0.85;
}

.program-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.program-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.program-item h4 {
    color: #f5576c; /* Color del título que contrasta con fondo oscuro */
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.program-item p {
    margin-bottom: 16px;
}

.program-item strong {
    color: #b0b0c0; /* Color para etiquetas en texto claro */
    font-weight: 600;
}

.program-summary {
    color: #e0e0e0; /* Texto claro para el resumen */
    line-height: 1.6;
    font-size: 1.05rem;
}

.program-item a {
    color: #bb86fc; /* Color de enlace para fondo oscuro */
    font-weight: 500;
    text-decoration: none;
}

.program-item a:hover {
    text-decoration: underline;
    color: #d9b2ff; /* Color más claro al hover */
}

.program-rating-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    background: rgba(255, 255, 255, 0.07);
    padding: 12px 15px;
    border-radius: 8px;
}

.program-rating-label {
    min-width: 120px;
}

.program-stars {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-value {
    font-size: 0.95rem;
    color: #bb86fc;
    margin-left: 10px;
    font-weight: 600;
}

.program-item .star {
    color: #50525e; /* Estrella vacía más oscura para fondo oscuro */
    font-size: 1.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.program-item .star.filled {
    color: #ffb957; /* Amarillo/dorado para las estrellas llenas */
}

.program-summary-section {
    margin-top: 10px;
    padding-top: 5px;
}

.program-item .no-data {
    color: #8d8d9e;
    font-style: italic;
    padding: 5px 0;
    display: inline-block;
}

.program-status {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Status styles */
.status-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dropdown, .status-select {
    background: #f8f8f8;
    border: 1px solid #ddd;
    color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
}

.status-dropdown:focus, .status-select:focus {
    outline: none;
    border-color: #f093fb;
    box-shadow: 0 0 0 2px rgba(240, 147, 251, 0.2);
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

/* Status colors */
.status-pendiente {
    background-color: #e6e9ee; /* gris azulado muy claro */
}

.program-item.status-pendiente {
    border-left-color: #778ca3;
}

.status-considerando {
    background-color: #dce3ec; /* azul grisáceo pálido */
}

.program-item.status-considerando {
    border-left-color: #4b6584;
}

.status-interesado {
    background-color: #e3e4fb; /* azul violáceo pastel */
}

.program-item.status-interesado {
    border-left-color: #3c40c6;
}

.status-aplicando {
    background-color: #e0f7fb; /* celeste muy suave */
}

.program-item.status-aplicando {
    border-left-color: #0abde3;
}

.status-descartado {
    background-color: #fde9e9; /* rojo claro, tipo "blush" */
}

.program-item.status-descartado {
    border-left-color: #ee5253;
    opacity: 0.9; /* opcional: ligeramente atenuado */
}
/* Status counts in table */
.status-counts {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.status-counts .status-badge {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    font-size: 0.7rem;
}

/* Hidden classes */
.hidden {
    display: none;
}

/* Advanced Search */
.advanced-search {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.toggle-advanced-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    display: block;
    margin: 0 auto;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-advanced-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.advanced-search-panel {
    margin-top: 15px;
    padding: 15px;
    background: #f8f8f8; /* Fondo sólido claro */
    border-radius: 15px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.advanced-search-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.search-btn {
    background: linear-gradient(45deg, #26de81, #2bcbba);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 222, 129, 0.3);
}

.reset-btn {
    background: linear-gradient(45deg, #ff5e57, #ff3f34);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 94, 87, 0.3);
}

/* Status Indicator */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active {
    background-color: #2ecc71;
}

.status-inactive {
    background-color: #e74c3c;
}

/* Error Messages */
.error-message {
    background: #ffecec;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    color: #333;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(240, 147, 251, 0.3);
    border-radius: 50%;
    border-top-color: #f093fb;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Analysis View Styles */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.action-container {
    display: flex;
    align-items: center;
}

.enrich-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.enrich-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.loading-indicator {
    display: flex;
    align-items: center;
    margin-left: 15px;
    background: #f8f8f8;
    padding: 8px 15px;
    border-radius: 50px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: #f8f8f8; /* Fondo sólido claro */
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 10px;
    background: linear-gradient(45deg, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
    color: #764ba2; /* Color para mantener consistencia */
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.summary-container {
    background: #f8f8f8; /* Fondo sólido claro */
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-wrapper, .summary-container {
    background: #f8f8f8; /* Fondo sólido claro */
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-wrapper h4, .summary-container h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #764ba2; /* Color para mantener consistencia */
}

.radar-chart-container {
    height: 300px;
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 10px;
}

.university-selector-container {
    margin-bottom: 15px;
}

.university-selector-container select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    font-size: 0.9rem;
}

.summary-content {
    background: white;
    border-radius: 10px;
    padding: 15px;
    min-height: 300px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333;
}

.summary-content h5 {
    margin-bottom: 10px;
    color: #f093fb;
}

.summary-content p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.metrics-section {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.metrics-section h4 {
    color: #764ba2;
    margin-bottom: 10px;
}

/* Criteria Configuration Styles */
.criteria-config-container {
    background: #f8f8f8;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.criteria-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.load-criteria-btn, .save-criteria-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.save-criteria-btn {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.load-criteria-btn:hover, .save-criteria-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.save-criteria-btn:hover {
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

.save-criteria-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.criteria-config-form {
    display: none;
    margin-top: 20px;
}

.criteria-config-form.active {
    display: block;
}

.criteria-type-tabs {
    display: flex;
    margin-bottom: 25px;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.criteria-type-tab {
    background: white;
    border: 2px solid #e0e0e0;
    color: #764ba2;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.criteria-type-tab:hover {
    background: #f8f8f8;
    border-color: #764ba2;
}

.criteria-type-tab.active {
    background: linear-gradient(45deg, #764ba2, #f093fb);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.criteria-config-items {
    display: grid;
    gap: 20px;
}

.criteria-config-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.criteria-config-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #764ba2;
}

.criteria-config-item h5 {
    background: linear-gradient(45deg, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.criteria-number {
    background: linear-gradient(45deg, #764ba2, #f093fb);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #764ba2;
    background: white;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.levels-grid {
    display: grid;
    gap: 12px;
    margin-top: 15px;
}

.level-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.level-group:hover {
    background: #f0f0f0;
}

.level-number {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.level-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
}

.level-input:focus {
    outline: none;
    border-color: #f093fb;
    box-shadow: 0 0 0 2px rgba(240, 147, 251, 0.1);
}

.criteria-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.criteria-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.criteria-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.criteria-status.loading {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
}

/* Responsive Design for Criteria Config */
@media (max-width: 768px) {
    .criteria-config-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .load-criteria-btn, .save-criteria-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .criteria-type-tabs {
        flex-direction: column;
    }
    
    .criteria-type-tab {
        width: 100%;
        text-align: center;
    }
    
    .level-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .level-number {
        align-self: flex-start;
    }
    
    /* Mobile responsiveness for heart feature */
    .love-heart {
        padding: 6px 12px;
        gap: 6px;
    }
    
    .heart-icon {
        font-size: 1rem;
    }
    
    .love-text {
        font-size: 0.8rem;
    }
    
    .falling-heart {
        font-size: 1.2rem;
    }
}

.metrics-section ul {
    list-style: none;
    padding-left: 0;
}

.metrics-section li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #333;
}

.info-alert {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
}

/* Rating UI */
.program-card {
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.program-header {
    padding: 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.program-meta {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #666;
}

.program-content {
    padding: 15px;
}

.program-description {
    margin-bottom: 15px;
    color: #555;
}

.program-rating h4 {
    color: #764ba2;
    margin-bottom: 10px;
}

.rating-stars {
    margin-bottom: 10px;
}

.star {
    color: #ddd;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover, .star.filled {
    color: #f5576c;
}

.rating-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.favorite-btn {
    background: #f8f8f8;
    border: 1px solid #ddd;
    color: #666;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn.favorited {
    background: #fff8e1;
    color: #ff9800;
    border-color: #ffcc80;
}

.favorite-btn:hover {
    background: #f5f5f5;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.favorite-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #764ba2;
}

.favorite-meta {
    font-size: 0.8rem;
    color: #666;
}

.remove-favorite {
    background: #ff5e57;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.no-favorites-message, .no-programs-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Ranking Table */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ranking-table th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    color: #764ba2;
    font-weight: 600;
}

.ranking-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.ranking-stars .star {
    font-size: 1.2rem;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Table New Styles */
.universities-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.university-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.university-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f7fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e4e8f0;
    cursor: pointer;
}

.university-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-university-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #555;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-university-btn.collapsed {
    transform: rotate(-90deg);
}

.university-name {
    color: #764ba2;
    margin: 0;
    font-size: 1.3rem;
}

.university-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #555;
    font-size: 0.9rem;
}

.university-city {
    display: flex;
    align-items: center;
    gap: 5px;
}

.university-city::before {
    content: "📍";
}

.program-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.program-count::before {
    content: "📚";
}

.university-actions {
    display: flex;
    gap: 10px;
}

.add-program-uni-btn, .edit-university-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-program-uni-btn {
    color: #20bf6b;
    border-color: #20bf6b;
}

.add-program-uni-btn:hover {
    background: #20bf6b;
    color: white;
}

.edit-university-btn {
    color: #3498db;
    border-color: #3498db;
}

.edit-university-btn:hover {
    background: #3498db;
    color: white;
}

.programs-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.programs-container.hidden {
    display: none;
}

/* Add new styles for university pagination */
.university-pagination, .universities-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Global pagination styles for both program-level and university-level pagination */
.pagination-prev, .pagination-next, .pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    margin: 0 5px;
}

.pagination-prev:disabled, .pagination-next:disabled, .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin: 0 10px;
}

/* University-level pagination specific styles */
.universities-pagination {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.program-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 5px solid #f093fb;
}

.program-card.status-pendiente {
    border-left-color: #778ca3;
}

.program-card.status-considerando {
    border-left-color: #4b6584;
}

.program-card.status-interesado {
    border-left-color: #3c40c6;
}

.program-card.status-aplicando {
    border-left-color: #0abde3;
}

.program-card.status-descartado {
    border-left-color: #ee5253;
    opacity: 0.85;
}

.program-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.program-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.program-name {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.program-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.program-status-container {
    display: flex;
    align-items: center;
}

.status-select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    font-size: 0.9rem;
}

.program-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.program-rating-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-label {
    font-weight: 600;
    color: #555;
    min-width: 100px;
}

.program-summary-section {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.editable-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    min-height: 40px;
}

.field-content {
    flex: 1;
    word-break: break-word;
}

.edit-field-btn {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 3px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.editable-field:hover .edit-field-btn {
    opacity: 1;
    color: #764ba2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f7fa;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.toggle-metrics-btn, .toggle-city-btn, .toggle-lines-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.toggle-metrics-btn.collapsed, .toggle-city-btn.collapsed, .toggle-lines-btn.collapsed {
    transform: rotate(-90deg);
}

.metrics-content, .city-content, .lines-content {
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.metrics-content.hidden, .city-content.hidden, .lines-content.hidden {
    display: none;
}

.metric-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.metric-label {
    min-width: 150px;
    font-weight: 500;
    color: #555;
}

.metric-field {
    width: 100px;
    text-align: center;
}

.city-description {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 10px;
}

.city-description-content {
    background: white;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.program-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}

.edit-program-btn, .save-program-btn, .delete-program-btn, .duplicate-program-btn {
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.edit-program-btn {
    background: #3498db;
}

.save-program-btn {
    background: #f093fb;
}

.save-program-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.delete-program-btn {
    background: #e74c3c;
}

.duplicate-program-btn {
    background: #f39c12;
}

.edit-program-btn:hover, .save-program-btn:hover, .delete-program-btn:hover, .duplicate-program-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.program-card.edit-mode .editable-field {
    background-color: rgba(52, 152, 219, 0.1);
    border: 1px dashed #3498db;
}

.program-card:not(.edit-mode) .editable-field {
    cursor: default;
}

.add-program-btn {
    background: linear-gradient(45deg, #20bf6b, #0fb9b1);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-program-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(32, 191, 107, 0.3);
}

.editable-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-family: inherit;
    font-size: inherit;
}

.editable-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    resize: vertical;
    font-family: inherit;
    font-size: inherit;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow: auto;
    transition: all 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    color: #333;
}

.modal-content h4 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.confirm-btn, .cancel-btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.confirm-btn {
    background: linear-gradient(45deg, #26de81, #2bcbba);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(38, 222, 129, 0.3);
}

.cancel-btn {
    background: #f0f0f0;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

/* Form styles for modals */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #333;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

/* Editable cells in DataTable */
.editable-cell {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    min-height: 30px;
    position: relative;
}

.editable-cell:hover {
    background-color: rgba(240, 147, 251, 0.1);
}

.editable-cell.editing {
    background-color: #f8f8f8;
    box-shadow: 0 0 0 2px rgba(240, 147, 251, 0.5);
}

/* Clases para costo de vida (escala invertida 1-10) */
.costo-alto {
    color: #ff5e62; /* Costo alto (valores 1-3) = malo */
}

.costo-medio {
    color: #ffdd59; /* Costo medio (valores 4-7) = neutral */
}

.costo-bajo {
    color: #26de81; /* Costo bajo (valores 8-10) = bueno */
}

/* Clases para calidad (aire, transporte, servicio médico) */
.calidad-alta {
    color: #26de81;
}

.calidad-media {
    color: #ffdd59;
}

.calidad-baja {
    color: #ff5e62;
}

/* Clases para distancia a Madrid */
.distancia-cerca {
    color: #26de81;
}

.distancia-media {
    color: #ffdd59;
}

.distancia-lejos {
    color: #ff5e62;
}

/* Contenedores para métricas */
.costo-container, .calidad-container, .distancia-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Estilos para tooltips en métricas de ciudad */
.has-tooltip {
    cursor: help;
    position: relative;
    border-bottom: 1px dashed #ccc;
}

/* Mejoras visuales para el contenido de ciudad */
.city-content {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin-top: 5px;
}

.city-content .metric-row {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.city-content .metric-row:last-child {
    border-bottom: none;
}

.city-content .metric-label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.city-content .field-content {
    font-weight: 500;
    text-align: right;
    flex-grow: 1;
}

.city-description {
    margin-top: 15px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 10px;
}

.city-description-content, .lines-field .field-content {
    font-style: normal;
    line-height: 1.5;
    color: #555;
    text-align: left;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.city-description-content strong {
    color: #764ba2;
    font-weight: 600;
}

/* Styling for bullet points in city description */
.city-description-content ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.city-description-content li,
.city-description-content * {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.city-description-content * {
    display: block;
}

.city-description-content *::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #764ba2;
    font-weight: bold;
}

/* Admin view */
.admin-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-section h4 {
    color: #764ba2;
    margin-bottom: 15px;
}

.admin-section h5 {
    color: #764ba2;
    margin: 20px 0 10px;
    font-size: 1.1rem;
}

.admin-section p {
    margin-bottom: 15px;
    color: #555;
}

.admin-section ul {
    margin-bottom: 20px;
    margin-left: 20px;
}

.admin-section li {
    margin-bottom: 5px;
    color: #555;
}

.enrich-controls {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.enrich-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.enrich-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.enrich-options label:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.last-enrichment-info {
    background-color: white;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
    border-left: 3px solid #26de81;
}

.action-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.enrich-btn, .fix-geo-btn {
    background: linear-gradient(45deg, #26de81, #2bcbba);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.enrich-btn:hover, .fix-geo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(38, 222, 129, 0.3);
}

.current-university-info {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #555;
}

.progress-container {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.progress-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #26de81, #2bcbba);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-details {
    font-size: 0.9rem;
    color: #777;
    display: flex;
    justify-content: space-between;
}

.enrich-log-container {
    margin-top: 20px;
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.enrich-log {
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.enrich-log-entry {
    padding: 8px;
    margin-bottom: 5px;
    border-left: 3px solid #26de81;
    background-color: rgba(38, 222, 129, 0.05);
}

.enrich-log-entry.error {
    border-left-color: #ff5e62;
    background-color: rgba(255, 94, 98, 0.05);
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #26de81;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .info-panel {
        max-width: 90vw;
        margin: 20px;
    }
    
    .analysis-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-container {
        margin-top: 15px;
        width: 100%;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .add-btn, .save-btn, .enrich-btn {
        width: 100%;
    }
}

/* New Calificar Section Styles */
.calificar-content .stats-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background: #f5f7fa;
    padding: 15px;
    border-radius: 8px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.calificar-content .stats-card {
    background: white;
    border-radius: 6px;
    padding: 12px 20px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.calificar-content .stats-label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.calificar-content .stats-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #764ba2;
}

.calificar-content .status-distribution {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.calificar-content .export-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.calificar-content .export-btn {
    background: white;
    border: 1px solid;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.calificar-content .json-btn {
    color: #9b59b6;
    border-color: #9b59b6;
}

.calificar-content .json-btn:hover {
    background: #9b59b6;
    color: white;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.calificar-content .csv-btn {
    color: #2980b9;
    border-color: #2980b9;
}

.calificar-content .csv-btn:hover {
    background: #2980b9;
    color: white;
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3);
}

.calificar-content .status-badge {
    background: white;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

.calificar-content .status-count {
    background: #f5f7fa;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid #eaeaea;
}

.calificar-content .status-pendiente {
    color: #3498db;
    border-color: #3498db;
}

.calificar-content .status-considerando {
    color: #f39c12;
    border-color: #f39c12;
}

.calificar-content .status-interesado {
    color: #9b59b6;
    border-color: #9b59b6;
}

.calificar-content .status-aplicando {
    color: #2ecc71;
    border-color: #2ecc71;
}

.calificar-content .status-descartado {
    color: #e74c3c;
    border-color: #e74c3c;
}

.calificar-content .calificar-filters {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.calificar-content .filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.calificar-content .rating-filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.calificar-content .filter-btn {
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
    font-weight: 500;
}

.calificar-content .filter-btn:hover {
    background: #eaeaea;
}

.calificar-content .filter-btn.active {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
    box-shadow: 0 2px 5px rgba(118, 75, 162, 0.3);
}

.calificar-content #filter-not-rated.active {
    background: #3498db;
    border-color: #3498db;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.calificar-content #filter-rated.active {
    background: #2ecc71;
    border-color: #2ecc71;
    box-shadow: 0 2px 5px rgba(46, 204, 113, 0.3);
}

.calificar-content .programs-table-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.calificar-content .programs-table {
    width: 100%;
    border-collapse: collapse;
}

.calificar-content .programs-table th {
    text-align: left;
    padding: 12px 15px;
    background: #f5f7fa;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #eaeaea;
}

.calificar-content .programs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
    color: #333;
}

.calificar-content .programs-table tr:hover td {
    background: rgba(240, 147, 251, 0.05);
}

.calificar-content .programs-table .loading-cell {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.calificar-content .action-buttons {
    display: flex;
    gap: 8px;
}

.calificar-content .edit-btn, 
.calificar-content .duplicate-btn {
    background: #f5f7fa;
    border: 1px solid;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    font-weight: 500;
}

.calificar-content .edit-btn {
    color: #3498db;
    border-color: #3498db;
}

.calificar-content .edit-btn:hover {
    background: #3498db;
    color: white;
}

.calificar-content .duplicate-btn {
    color: #f39c12;
    border-color: #f39c12;
}

.calificar-content .duplicate-btn:hover {
    background: #f39c12;
    color: white;
}

/* Program Edit Modal */
#program-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

#program-edit-modal .modal-content {
    background: white;
    border-radius: 8px;
    margin: 50px auto;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #eaeaea;
}

#program-edit-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
    background: #f5f7fa;
}

#program-edit-modal .modal-header h4 {
    margin: 0;
    color: #333;
}

#program-edit-modal .close-modal {
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
}

#program-edit-modal .close-modal:hover {
    color: #333;
}

#program-edit-modal .modal-body {
    padding: 20px;
}

#program-edit-form .form-group {
    margin-bottom: 15px;
}

/* Estilos para la sección de criterios */
.criteria-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.criteria-block {
    margin-bottom: 25px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.criteria-header h5 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.criteria-description {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
}

.criteria-level {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.3;
}

.criteria-rating-input {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.criteria-stars {
    display: flex;
    gap: 15px;
}

.criteria-dot {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ccc;
}

.criteria-dot:hover {
    transform: scale(1.2);
}

.criteria-dot.active, .criteria-dot:hover {
    color: #2196f3;
}

.criteria-dot[data-value="1"].active {
    color: #f44336;
}

.criteria-dot[data-value="2"].active {
    color: #ff9800;
}

.criteria-dot[data-value="3"].active {
    color: #4caf50;
}

.criteria-dot[data-value="4"].active {
    color: #2196f3;
}

.criteria-dot[data-value="5"].active {
    color: #3f51b5;
}

#program-edit-form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

#program-edit-form input,
#program-edit-form select,
#program-edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
}

#program-edit-form input:focus,
#program-edit-form select:focus,
#program-edit-form textarea:focus {
    border-color: #764ba2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.1);
}

#program-edit-form input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f5f5f5;
}

#program-edit-form textarea {
    resize: vertical;
    min-height: 100px;
}

#program-edit-form .rating-input {
    margin-top: 5px;
}

#program-edit-form .star-rating {
    display: flex;
    gap: 5px;
}

#program-edit-form .star-rating .star {
    color: #ddd;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

#program-edit-form .star-rating .star:hover,
#program-edit-form .star-rating .star.active {
    color: #f1c40f;
}

#program-edit-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

#program-edit-form .save-btn, 
#program-edit-form .duplicate-btn, 
#program-edit-form .cancel-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

#program-edit-form .save-btn {
    background: #2ecc71;
    color: white;
}

#program-edit-form .save-btn:hover {
    background: #27ae60;
    box-shadow: 0 2px 5px rgba(39, 174, 96, 0.3);
}

#program-edit-form .duplicate-btn {
    background: #f39c12;
    color: white;
}

#program-edit-form .duplicate-btn:hover {
    background: #e67e22;
    box-shadow: 0 2px 5px rgba(230, 126, 34, 0.3);
}

#program-edit-form .cancel-btn {
    background: #95a5a6;
    color: white;
}

#program-edit-form .cancel-btn:hover {
    background: #7f8c8d;
}

/* Rating Confirmation Modal */
#rating-confirm-modal .modal-content {
    max-width: 450px;
}

#rating-confirm-modal p {
    font-size: 1.1rem;
    text-align: center;
    margin: 20px 0;
}

#rating-value-text {
    font-weight: bold;
    color: #f1c40f;
}

/* Star Rating in Calificar Table */
.calificar-content .rating-stars {
    display: flex;
    gap: 3px;
}

.calificar-content .rating-stars .star {
    color: #ddd;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.calificar-content .rating-stars .star.filled {
    color: #f1c40f;
    text-shadow: 0 1px 3px rgba(241, 196, 15, 0.3);
}

/* Table view styles */
.table-container {
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
}

.table-filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.table-filters .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.table-filters .filter-group {
    display: flex;
    flex-direction: column;
}

.table-filters .filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #764ba2;
}

.table-filters input,
.table-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.reset-filters-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-filters-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

#programsDataTable {
    width: 100%;
    border-collapse: collapse;
}

#programsDataTable th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

#programsDataTable td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#programsDataTable tr:hover {
    background: #f8f9fa;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f0f0f0;
    color: #333;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-edit {
    background: #4CAF50;
    color: white;
}

.btn-duplicate {
    background: #2196F3;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Edit modal styles */
.modal-lg {
    max-width: 800px;
    width: 90%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.criterios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.criterios-grid input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.export-btn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Ranking enhancements */
.criteria-stats-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.criteria-stats-section h4 {
    margin-bottom: 20px;
    color: #764ba2;
    font-size: 1.2rem;
}

.criteria-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.criteria-stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.criteria-stat-card h5 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 0.9rem;
}

.criteria-avg {
    font-size: 2rem;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 10px;
}

.criteria-avg.total {
    color: #f093fb;
}

.criteria-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.criteria-bar-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.5s ease;
}

.criteria-bar-fill.total {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

/* Charts grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-section h4 {
    margin-bottom: 15px;
    color: #764ba2;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Ranking table enhancements */
.criteria-display {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

.mini-criteria {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.no-criteria {
    color: #999;
    font-style: italic;
}

.criteria-avg-label {
    font-size: 11px;
    color: #666;
}

.combined-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f093fb;
}

.ranking-table td {
    vertical-align: middle;
}

/* Criteria rating modal - ensure it appears on top */
#criteria-rating-modal {
    z-index: 9999 !important;
}

#criteria-rating-modal .modal-content {
    z-index: 10000 !important;
    position: relative;
}

/* Also ensure other confirmation modals are on top */
#rating-confirm-modal,
#saveConfirmModal,
#confirmModal {
    z-index: 10001 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

/* When shown, use flex display */
#rating-confirm-modal.show,
#saveConfirmModal.show,
#confirmModal.show {
    display: flex;
}

#saveConfirmModal .modal-content,
#confirmModal .modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    margin: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

#saveConfirmModal .modal-content h4,
#confirmModal .modal-content h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

#saveConfirmModal .modal-content p,
#confirmModal .modal-content p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

#saveConfirmModal .modal-actions,
#confirmModal .modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

#saveConfirmModal .confirm-btn,
#confirmModal .confirm-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#saveConfirmModal .confirm-btn:hover,
#confirmModal .confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#saveConfirmModal .cancel-btn,
#confirmModal .cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#saveConfirmModal .cancel-btn:hover,
#confirmModal .cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* University info modal should be above ribbon but below confirmation modals */
#universityModal {
    z-index: 10000;
}

/* ===== CRITERIA TABS STYLING ===== */

/* Criteria Tabs */
.criteria-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.criteria-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.criteria-tab:hover {
    color: #667eea;
    background: #f8f9fa;
}

.criteria-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

.criteria-section {
    display: none;
    margin-bottom: 20px;
}

.criteria-section.active {
    display: block;
}

/* Mobile responsive for criteria tabs */
@media (max-width: 768px) {
    .criteria-tabs {
        flex-direction: column;
    }
    
    .criteria-tab {
        text-align: left;
        padding: 10px 16px;
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
    }
    
    .criteria-tab.active {
        border-bottom-color: #667eea;
        border-left: 3px solid #667eea;
    }
}

/* Map Popup Styles */
.university-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.university-popup-content {
    padding: 15px;
    font-family: 'Inter', sans-serif;
    max-width: 450px;
}

.university-popup-content h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
}

.university-popup-content h4 {
    margin: 15px 0 10px 0;
    color: #555;
    font-size: 1rem;
    font-weight: 600;
}

.university-popup-content p {
    margin: 0 0 10px 0;
    color: #666;
}

.university-popup-content hr {
    border: none;
    height: 1px;
    background: #e0e0e0;
    margin: 10px 0;
}

.programs-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 5px 0;
}

.university-popup-content .program-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.university-popup-content .program-card:hover {
    background: #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.university-popup-content .program-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.university-popup-content .program-card-left {
    flex: 1;
    margin-right: 10px;
}

.university-popup-content .program-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.university-popup-content .program-status-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.university-popup-content .popup-rating {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #666;
}

.university-popup-content .popup-favorite-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.university-popup-content .popup-favorite-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.program-item {
    padding: 8px 0;
}

.program-item strong {
    color: #333;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 3px;
}

.program-item small {
    color: #777;
    font-size: 0.8rem;
    line-height: 1.3;
}

.program-separator {
    margin: 8px 0 !important;
    background: #f0f0f0 !important;
}

/* New program card design for map popup */
.program-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.program-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.program-card:last-child {
    margin-bottom: 0;
}

.program-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.program-card-left {
    flex: 1;
    cursor: pointer;
}

.program-card-right {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.popup-favorite-btn {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 0.8rem;
}

.popup-favorite-btn:hover {
    background: #f8f9fa;
    border-color: #f093fb;
    color: #f093fb;
    transform: scale(1.1);
}

.popup-favorite-btn.is-favorite {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-color: #f093fb;
    color: white;
}

.popup-favorite-btn.is-favorite:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
}

.program-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    flex: 1;
}

.program-status-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.program-status-badge.status-pending {
    background-color: #e8f0fe;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.program-status-badge.status-considering {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.program-status-badge.status-interested {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.program-status-badge.status-applying {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.program-status-badge.status-discarded {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.popup-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-stars {
    color: #ffc107;
    font-size: 1rem;
    letter-spacing: 1px;
}

.popup-rating-number {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.popup-no-rating {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.view-details-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.view-details-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Enhanced Modal Content Styles */
.metric-value {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.metric-value.metric-high {
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
}

.metric-value.metric-medium {
    background: linear-gradient(45deg, #FF9800, #FFB74D);
    color: white;
}

.metric-value.metric-low {
    background: linear-gradient(45deg, #FF5722, #FF7043);
    color: white;
}

.metric-value.metric-very-low {
    background: linear-gradient(45deg, #F44336, #EF5350);
    color: white;
}

.metric-value.no-data {
    background: #e0e0e0;
    color: #666;
}

.distance-value {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.distance-value.distance-close {
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
}

.distance-value.distance-medium {
    background: linear-gradient(45deg, #FF9800, #FFB74D);
    color: white;
}

.distance-value.distance-far {
    background: linear-gradient(45deg, #FF5722, #FF7043);
    color: white;
}

.distance-value.no-data {
    background: #e0e0e0;
    color: #666;
}

.summary-point {
    margin: 10px 0;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}

.explanation-point {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(240, 147, 251, 0.05);
    border-radius: 6px;
    line-height: 1.4;
}

.explanation-header {
    color: #667eea;
    margin: 15px 0 8px 0;
    font-weight: 600;
    font-size: 1rem;
}

.explanation-text {
    margin: 6px 0;
    line-height: 1.5;
    color: #555;
}

.no-data-message {
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

.program-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-pending {
    background: linear-gradient(45deg, #FFB74D, #FF9800);
    color: white;
}

.status-considering {
    background: linear-gradient(45deg, #64B5F6, #2196F3);
    color: white;
}

.status-interested {
    background: linear-gradient(45deg, #81C784, #4CAF50);
    color: white;
}

.status-applying {
    background: linear-gradient(45deg, #BA68C8, #9C27B0);
    color: white;
}

.status-discarded {
    background: linear-gradient(45deg, #E57373, #F44336);
    color: white;
}

#programSummarySection {
    margin-top: 20px;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
    padding-top: 20px;
}

/* Modal Sub-tabs */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin: 10px 0 0 0;
    padding: 0 20px;
    border-bottom: 2px solid #eee;
}

.modal-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.modal-tab:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fb;
}

.modal-tab-content {
    display: none;
    padding: 20px;
}

.modal-tab-content.active {
    display: block;
}

/* Program title section - full width below tabs */
.program-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px 20px;
    margin: 0;
    margin-top: -1px;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.program-title-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: calc(100% - 120px); /* Leave space for buttons */
}

.program-title-right {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-left: 20px;
    flex-shrink: 0;
}

.program-title-section h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
}

.program-title-section .program-status {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px; /* Align with favorite button */
    max-width: 140px; /* Limit width */
    text-align: center;
}

.favorite-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 1.2rem;
}

.favorite-btn:hover {
    background: #f8f9fa;
    border-color: #f093fb;
    color: #f093fb;
    transform: scale(1.05);
}

.favorite-btn.is-favorite {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-color: #f093fb;
    color: white;
}

.favorite-btn.is-favorite:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.favorite-btn i {
    transition: all 0.2s ease;
}

.favorite-btn.is-favorite i {
    animation: heartPulse 0.3s ease;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Program rating stars styling */
.program-rating-stars {
    display: inline-flex;
    gap: 5px;
    margin-right: 15px;
}

/* Editable text fields styling */
.editable-field {
    position: relative;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.editable-field:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
}

.editable-field:hover::after {
    content: "✏️";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}

/* Research lines editable styling */
#researchLinesList:hover::after {
    content: "✏️ Clic para editar";
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 12px;
    color: #007bff;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Editing mode styles */
.editing-mode input,
.editing-mode textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: 2px solid #007bff;
    border-radius: 3px;
    padding: 4px 8px;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.editing-mode input:focus,
.editing-mode textarea:focus {
    border-color: #0056b3;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* Save indicator integration with editable fields */
.save-indicator-ribbon:not(.hidden) ~ .container .editable-field {
    border-left: 3px solid #ff6b6b;
    padding-left: 8px;
}

.save-indicator-ribbon:not(.hidden) ~ .container .editable-field:hover {
    border-left-color: #ff4757;
}

/* AI Metrics Average Styling - Glassomorphism */
.ai-metrics-average {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 20px rgba(240, 147, 251, 0.15);
    border: 1px solid rgba(240, 147, 251, 0.3);
    backdrop-filter: blur(15px);
    animation: slideInUp 0.6s ease-out;
}

/* City AI Average - Same as Program AI */
.ai-metrics-average.city-ai-average {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(240, 147, 251, 0.3);
}

/* City Criteria Average - Similar glassomorphism style */
.ai-metrics-average.city-criteria-average {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(240, 147, 251, 0.3);
}

/* Program AI Average - Tinted gray glass */
.ai-metrics-average.program-ai-average {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(240, 147, 251, 0.3);
}

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

.ai-metrics-average .average-header {
    text-align: center;
    margin-bottom: 8px;
}

.ai-metrics-average .average-title {
    color: rgba(50, 50, 50, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.2px;
}

.ai-metrics-average .average-content {
    text-align: center;
}

.ai-metrics-average .average-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}

.ai-metrics-average .average-value .average-icon {
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ai-metrics-average .average-value .average-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(50, 50, 50, 0.95);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3px;
}

.ai-metrics-average .average-value .average-scale {
    font-size: 0.9rem;
    color: rgba(80, 80, 80, 0.8);
    font-weight: 500;
}

.ai-metrics-average .average-value.no-data .average-number {
    font-size: 1.2rem;
    color: rgba(100, 100, 100, 0.7);
}

.ai-metrics-average .average-meta {
    text-align: center;
}

.ai-metrics-average .average-count {
    font-size: 0.75rem;
    color: rgba(80, 80, 80, 0.8);
    font-weight: 400;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(240, 147, 251, 0.2);
}

/* Average color variants - Glass effect with performance-based colors */
/* Full Green: 9.4+ */
.ai-metrics-average .average-value.average-excellent {
    background: rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 8px rgba(16, 185, 129, 0.3), 0 0 15px rgba(16, 185, 129, 0.1);
}

/* Yellow to Green: 7.9-9.3 */
.ai-metrics-average .average-value.average-very-good {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(34, 197, 94, 0.15));
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 8px rgba(134, 188, 51, 0.2), 0 0 12px rgba(134, 188, 51, 0.1);
}

/* Yellow to Green: 6-7.8 */
.ai-metrics-average .average-value.average-good {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(34, 197, 94, 0.15));
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 8px rgba(192, 201, 21, 0.2), 0 0 12px rgba(192, 201, 21, 0.1);
}

/* Yellow: 5-5.9 */
.ai-metrics-average .average-value.average-fair {
    background: rgba(250, 204, 21, 0.15);
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 8px rgba(250, 204, 21, 0.2), 0 0 12px rgba(250, 204, 21, 0.1);
}

/* Red: Below 5 */
.ai-metrics-average .average-value.average-poor {
    background: rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 8px rgba(239, 68, 68, 0.2), 0 0 12px rgba(239, 68, 68, 0.1);
}

.ai-metrics-average .average-value.no-data {
    background: rgba(128, 128, 128, 0.08);
    border-radius: 8px;
    padding: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 5px rgba(128, 128, 128, 0.1);
}

/* Enhanced Summary Text Styling */
.summary-text {
    margin: 12px 0;
    line-height: 1.8;
    color: #444;
    font-size: 1rem;
    text-align: justify;
    background: rgba(255, 255, 255, 0.7);
    padding: 18px;
    border-radius: 10px;
    border-left: 4px solid #a8b2ba;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    word-spacing: 1px;
    letter-spacing: 0.2px;
}

.summary-text:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.summary-point {
    margin: 10px 0;
    padding: 15px 18px;
    background: rgba(168, 178, 186, 0.08);
    border-radius: 8px;
    border-left: 3px solid #a8b2ba;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    transition: all 0.3s ease;
    word-spacing: 1px;
    letter-spacing: 0.1px;
}

.summary-point:hover {
    background: rgba(168, 178, 186, 0.12);
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(168, 178, 186, 0.2);
}

.summary-section-header {
    color: #333;
    margin: 20px 0 12px 0;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.summary-highlight {
    color: #333;
    font-weight: 700;
}

.summary-key {
    color: #333;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.summary-emphasis {
    color: #333;
    font-style: normal;
    font-weight: normal;
}

.summary-code {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.no-summary-message {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.05), rgba(245, 87, 108, 0.05));
    border-radius: 15px;
    border: 2px dashed rgba(153, 153, 153, 0.3);
    margin: 20px 0;
}

/* Improved explanation blocks */
.explanation-block {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.explanation-block:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* University and City summary content specific styling */
#universitySummaryContent,
#citySummaryContent {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #f093fb transparent;
}

#universitySummaryContent::-webkit-scrollbar,
#citySummaryContent::-webkit-scrollbar {
    width: 6px;
}

#universitySummaryContent::-webkit-scrollbar-track,
#citySummaryContent::-webkit-scrollbar-track {
    background: transparent;
}

#universitySummaryContent::-webkit-scrollbar-thumb,
#citySummaryContent::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 3px;
}

#universitySummaryContent::-webkit-scrollbar-thumb:hover,
#citySummaryContent::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f5576c, #f093fb);
}