/* Variables CSS */
:root {
    --primary-color: #2c5aa0;
    --primary-color-rgb: 44, 90, 160;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
    margin: 0;
    top: 0;
    z-index: 1020;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    border-radius: 8px;
    object-fit: contain;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255,255,255,0.1);
}

/* Hero sections */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4rem 0;
    margin-top: 0;
}

.hero-section-small {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 3rem 0;
    margin-top: 0;
}

/* Tarjetas generales */
.card-custom {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-custom .card-body {
    padding: 20px;
}

/* Tarjetas de estadísticas */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Ranking específico */
.ranking-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.ranking-card:hover {
    transform: translateY(-3px);
}

.ranking-position {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Criterios */
.criteria-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.criteria-card:hover {
    transform: translateY(-5px);
}

.criteria-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
}

/* Botones */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
    color: white;
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background-color: #2F855A;
    border-color: #2F855A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
    color: white;
}

/* Colores de texto */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.text-accent-custom {
    color: var(--accent-color) !important;
}

/* Backgrounds */
.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary-color) !important;
}

.bg-light-custom {
    background-color: var(--light-color) !important;
}

/* Tablas */
.table-primary-custom {
    background-color: var(--primary-color);
    color: white;
}

.table-primary-custom th {
    border-color: rgba(255,255,255,0.2);
}

/* Contacto - Corrección de superposición */
.contact-departments {
    position: relative;
    z-index: 1;
}

.contact-departments .card-custom {
    position: relative;
    z-index: 2;
}

/* Sticky elements */
.sticky-top {
    z-index: 1020;
    position: sticky;
    top: 0;
}

/* Modales */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

.footer a:hover {
    color: white;
}

/* Comparación de universidades */
.comparison-container {
    position: relative;
    z-index: 1;
}

.comparison-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

/* Gráficos */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section-small {
        padding: 1.5rem 0;
    }
    
    .card-custom {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-custom .card-body {
        padding: 15px;
    }
    
    .stats-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .ranking-card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .criteria-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utilidades */
.shadow-custom {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.border-radius-custom {
    border-radius: 15px !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-justify {
    text-align: justify !important;
}

a {
    outline: none;
    text-decoration: none;
    padding-top: 3px;
    padding-bottom: 3px;
    padding-left: 6px;
    padding-right: 6px;
    font-weight:normal;
}
