/* Estilos generales */
:root {
    --bs-primary: #153777;
    --primary-color: #153777;
    --secondary-color: #1a3b6b;
    --accent-color: #7f8c8d;
    --light-color: #ffffff;
    --dark-color: #2c3e50;
    --campus-color: #27ae60;
    --calendar-event-color: #2c3e50;
    --border-color: #e0e0e0;
    --whatsapp-color: #25D366;
}

body {
    font-family: 'Encode Sans', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    background-color: var(--light-color);
    /* Añadir esto para prevenir desbordamientos */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== CONTENEDOR PRINCIPAL AL 90% ========== */
.main-wrapper {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1 0 auto;
}

/* Header con ancho del 90% */
.header-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Footer con ancho del 90% */
.footer-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== MODIFICACIONES PARA EL FOOTER Y COLUMNAS ========== */

/* Contenedor principal que empuja el footer hacia abajo */
.main-container {
    flex: 1 0 auto;
    width: 100%;
    /* Prevenir desbordamientos horizontales */
    max-width: 100%;
    overflow-x: hidden;
}

/* Contenedor de columnas - prevenir desbordamientos */
.columns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    /* Asegurar que no sobresalga */
    max-width: 100%;
    overflow: hidden;
}

/* Columnas principales */
.main-column {
    flex: 1 1 300px;
    min-width: 0; /* Importante: previene desbordamientos */
}

/* Sidebar/columna lateral */
.sidebar-column {
    flex: 0 1 300px;
    min-width: 0; /* Importante: previene desbordamientos */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    padding: 20px;
}

/* Estilos específicos para el contenido de contacto */
.contact-section {
    margin-top: 30px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-item {
    margin-bottom: 15px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.contact-item.checked {
    border-left-color: var(--campus-color);
    background-color: #e8f5e8;
}

.contact-checkbox {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    color: var(--campus-color);
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-title {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.3;
    letter-spacing: 0.10em;
}

.motto {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.highlighted-motto {
    color: #e74c3c;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.img-fluid-logo {
    max-height: 90px;
    width: auto;
}

/* Menú superior */
.top-nav {
    background-color: var(--primary-color);
    font-size: 0.9rem;
}

.top-nav-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.social-icons a {
    color: #ecf0f1;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.social-icons a:first-child {
    margin-left: 0;
}

.social-icons a:hover {
    color: #bdc3c7;
    transform: scale(1.1);
}

/* Barra de navegación principal */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-nav .nav-link {
    color: #ecf0f1;
    font-weight: 500;
}

.dropdown-menu {
    background-color: var(--secondary-color);
    border: none;
}

.dropdown-item {
    color: #ecf0f1;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.dropdown-item i {
    color: rgba(255,255,255,0.7);
}

/* Títulos de secciones */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Div horizontal arriba de Novedades, Agenda y Actividades */
.horizontal-divider {
    background: linear-gradient(90deg, rgba(21, 55, 119, 0.1) 0%, rgba(21, 55, 119, 0.3) 50%, rgba(21, 55, 119, 0.1) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.divider-content {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

/* Galería de carreras */
.image-gallery-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.image-wrapper {
    flex: 1 1 calc(14.2857% - 5px);
    min-width: 120px;
    transition: transform 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-3px);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Cards principales */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    height: 100%;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    font-weight: 600;
    background-color: var(--primary-color) !important;
    color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Carruseles dentro de cards */
.card-carousel {
    position: relative;
}

.card-carousel .carousel-control-prev,
.card-carousel .carousel-control-next {
    width: 30px;
    height: 30px;
    background-color: rgba(21, 55, 119, 0.7);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.card-carousel .carousel-control-prev:hover,
.card-carousel .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(21, 55, 119, 0.9);
}

.card-carousel .carousel-control-prev-icon,
.card-carousel .carousel-control-next-icon {
    width: 15px;
    height: 15px;
    filter: brightness(0) invert(1);
}

/* Contenido desplazable en cards */
.scrollable-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Estilo para la barra de desplazamiento */
.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Campus Virtual */
.campus-card {
    background-color: var(--campus-color) !important;
    color: white;
    border: none;
}

.campus-card-desktop {
    height: 25% !important;
}

.campus-card-sm {
    background-color: var(--campus-color) !important;
    color: white;
    border: none;
}

.campus-icon {
    color: rgba(255,255,255,0.9);
}

.btn-campus {
    background-color: white !important;
    color: var(--campus-color) !important;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    width: 100%;
    position: relative;
    z-index: 10;
}

.footer h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.social-icons-footer .btn {
    min-width: 120px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Botones de carreras en móvil */
.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Contactos simplificados */
.contacto-simple {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.contacto-simple:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.contacto-simple i {
    color: var(--primary-color);
}

/* WhatsApp Box */
.whatsapp-box {
    background-color: var(--whatsapp-color);
    transition: all 0.3s ease;
}

.whatsapp-box:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Botón fijo de WhatsApp */
.whatsapp-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp-color);
    color: white;
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* Estilo para el banner de carreras */
.carreras-banner {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(2px);
    padding: 12px 20px;
    margin: 0 auto;
    text-align: center;
    max-width: 1200px;
    border-radius: 0 0 8px 8px;
    position: relative;
    overflow: hidden;
    width: 90%;
}

.carreras-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
                rgba(21, 55, 119, 0) 0%, 
                rgba(21, 55, 119, 0.3) 50%, 
                rgba(21, 55, 119, 0) 100%);
}

.carreras-banner p {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.4px;
    line-height: 1.5;
    font-family: 'Encode Sans', sans-serif;
    position: relative;
    padding: 2px 0;
    display: inline-block;
}

.carreras-banner p::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    opacity: 0.15;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.carreras-banner:hover p::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========== ESTILOS DE CALENDARIOS ========== */

/* Calendarios principales */
#calendar, #calendarMobile {
    font-size: 0.9rem;
    min-height: 350px;
}

/* Calendario mini con navegación personalizada */
#calendar-mini .fc-header-toolbar {
    display: none !important;
}

#calendar-mini .fc-toolbar {
    display: none !important;
}

#calendar-mini-current-month {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

#calendar-mini .fc-daygrid-day-frame {
    min-height: 18px !important;
    padding: 1px !important;
}

#calendar-mini .fc-daygrid-day-number {
    font-size: 0.65em;
    padding: 1px 2px !important;
}

#calendar-mini .fc-event {
    margin: 1px !important;
    padding: 0 !important;
    font-size: 0 !important;
    min-height: 3px !important;
    height: 3px !important;
    border-radius: 1px !important;
}

#calendar-mini .fc-event-title {
    display: none !important;
}

#calendar-mini .fc-view-harness {
    height: 160px !important;
}

#calendar-mini .fc-col-header-cell {
    font-size: 0.65em !important;
    padding: 3px 1px !important;
    font-weight: 600;
}

/* Estilos comunes para todos los calendarios */
.fc-event {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
}

.fc-event:hover {
    opacity: 0.9;
}

.fc-daygrid-event-dot {
    border-color: white !important;
}

.fc-daygrid-dot-event:hover {
    background-color: rgba(0,0,0,0.05);
}

.fc-toolbar-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.fc-button {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    font-size: 0.8rem !important;
}

.fc-today-button {
    text-transform: capitalize !important;
}

/* Botones de navegación personalizados */
.calendar-nav {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Card body personalizado */
.card-body2 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card-body2 img {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* ========== UTILIDADES PARA PREVENIR DESBORDAMIENTOS ========== */

.no-overflow {
    overflow: hidden !important;
}

.max-width-100 {
    max-width: 100% !important;
}

.min-width-0 {
    min-width: 0 !important;
}

/* Aplicar a elementos que puedan causar problemas */
.card,
.row,
.col {
    max-width: 100%;
}

/* ========== CUSTOM STYLES FOR CAREER PAGES ========== */

/* Remover bordes del card de contacto */
.col-lg-4 .card:last-child {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

.col-lg-4 .card:last-child .card-header,
.col-lg-4 .card:last-child .card-body {
    border: none !important;
    background-color: transparent !important;
}

/* Footer sticky */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main.container {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* Inline styles moved from HTML */
.carousel-item img {
    object-fit: contain;
    max-height: 300px;
}

.carousel-item iframe {
    border: none;
    border-radius: 0.375rem;
}


/* Force card header styles */
.card-header.bg-primary {
    background-color: #153777 !important;
    color: white !important;
}

/* Additional responsive improvements for unma.html */
@media (max-width: 991px) {
    .carreras-banner {
        font-size: 0.9rem;
        padding: 1rem;
    }
    .image-gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .col-lg-4 .section-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .image-gallery-container {
        grid-template-columns: 1fr;
    }
    .card-body p {
        font-size: 0.9rem;
    }
    .col-lg-4 .section-title {
        font-size: 0.9rem;
    }
}

/* Card heights */
.campus-card-desktop {
    height: 25% !important;
}

.tramites-card {
    height: 45% !important;
}

/* Mission Institutional Page Styles */
.mission-header-card {
    background: linear-gradient(135deg, #153777 0%, #4a90e2 100%);
    color: white;
}

.mission-title {
    font-size: 2.5rem;
    font-weight: bold;
}

.mission-icon {
    opacity: 0.9;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 992px) {
    .image-wrapper {
        flex: 1 1 calc(25% - 5px);
    }
    
    .header-title {
        font-size: 1.2rem;
    }

    .dropdown-menu {
        background-color: var(--primary-color);
    }
    
    .horizontal-divider {
        padding: 10px 15px;
    }
    
    .divider-content {
        font-size: 1rem;
    }
    
    /* Ajustar ancho al 95% en tablets */
    .main-wrapper,
    .header-container,
    .footer-container,
    .top-nav-container,
    .navbar-container,
    .carreras-banner {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 1.1rem;
        text-align: center;
        margin-top: 10px;
    }
    
    .motto {
        text-align: center;
    }
    
    .img-fluid-logo {
        display: block;
        margin: 0 auto;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }

    .section-title {
        font-size: 1rem;
    }
    
    .horizontal-divider {
        margin: 0 -15px 20px;
        border-radius: 0;
        padding: 8px 15px;
    }
    
    .divider-content {
        justify-content: center;
        font-size: 0.95rem;
    }

    /* Mover calendario debajo de todo en móviles */
    .order-mobile-last {
        order: 99;
    }
    
    /* Columnas responsivas */
    .columns-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-column,
    .sidebar-column {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .sidebar-column {
        order: 2; /* Mover sidebar después del contenido principal en móviles */
    }
    
    .contact-item {
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    
    /* Ajustar ancho al 98% en móviles */
    .main-wrapper,
    .header-container,
    .footer-container,
    .top-nav-container,
    .navbar-container,
    .carreras-banner {
        width: 98%;
    }
}

@media (max-width: 576px) {
    .image-wrapper {
        flex: 1 1 calc(50% - 5px);
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .motto {
        font-size: 0.8rem;
    }
    
    .highlighted-motto {
        font-size: 0.85rem;
    }
    
    .horizontal-divider {
        padding: 6px 10px;
        margin: 0 -10px 15px;
    }
    
    .divider-content {
        font-size: 0.9rem;
    }

    .social-icons-footer .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0 !important;
    }

    .social-icons-footer .btn:last-child {
        margin-bottom: 0;
    }

    .campus-card-sm {
        padding: 15px;
    }

    .campus-card-sm h5 {
        font-size: 1.2rem;
    }

    .card-body .row > div {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Calendario móvil más compacto */
    #calendarMobile {
        min-height: 300px;
    }
    
    #calendarMobile .fc-toolbar-title {
        font-size: 0.9rem;
    }
    
    #calendarMobile .fc-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem !important;
    }
    
    /* Botón de WhatsApp más pequeño en móviles */
    .whatsapp-fixed {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
    
    /* Columnas en móviles pequeños */
    .columns-container {
        gap: 10px;
    }
    
    .sidebar-column {
        padding: 15px;
    }
    
    .contact-item {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    
    /* Asegurar que las imágenes no causen desbordamiento */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Ajustar ancho al 100% en móviles pequeños */
    .main-wrapper,
    .header-container,
    .footer-container,
    .top-nav-container,
    .navbar-container,
    .carreras-banner {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}


