/* 
 * Sistema de Gestión Escolar - Estilos Centralizados
 * Adaptado del Sistema SSE existente
 */

/* ===== VARIABLES CSS ===== */

@font-face {
    font-family: "Raleway";
    src: url("/Gestion_Escolar/fuentes/Raleway-Regular.woff") format("woff"),
      url("/Gestion_Escolar/fuentes/Raleway-Regular.woff2") format("woff2");
      font-weight: normal;
      font-style: normal;
  }
  
  @font-face {
    font-family: "Raleway-bolder";
    src: url("/Gestion_Escolar/fuentes/Raleway-Bold.woff") format("woff"),
      url("/Gestion_Escolar/fuentes/Raleway-Bold.woff2") format("woff2");
      font-weight: normal;
      font-style: normal;
  }
  
  @font-face {
    font-family: "Raleway-bold";
    src: url("/Gestion_Escolar/fuentes/Raleway-Semibold.woff") format("woff"),
      url("/Gestion_Escolar/fuentes/Raleway-Semibold.woff2") format("woff2");
      font-weight: normal;
      font-style: normal;
  }
  
  @font-face {
    font-family: "Raleway-semibold";
    src: url("/Gestion_Escolar/fuentes/Raleway-Medium.woff") format("woff"),
      url("/Gestion_Escolar/fuentes/Raleway-Medium.woff2") format("woff2");
      font-weight: normal;
      font-style: normal;
  }

  @font-face {
    font-family: "Raleway-thin";
    src: url("/Gestion_Escolar/fuentes/Raleway-Thin.woff") format("woff"),
      url("/Gestion_Escolar/fuentes/Raleway-Thin.woff2") format("woff2");
      font-weight: normal;
      font-style: normal;
  }
  
  .fw-bolder {
      font-family: "Raleway-bolder", Arial, Helvetica, sans-serif !important;
  }
  
  .fw-bold {
      font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
  }
  
  .fw-semibold {
      font-family: "Raleway-semibold", Arial, Helvetica, sans-serif !important;
  }
  

  * {
      font-family: "Raleway", Arial, Helvetica, sans-serif !important;
      transition: all 0.5s ease-out !important;
  }


:root {
    --primary-gradient: linear-gradient(135deg, #03155c 0%, #051e80 100%);
    --secondary-gradient: linear-gradient(135deg, #6c757d 0%, #8d98a3 100%);
    --success-gradient: linear-gradient(135deg, #198754 0%, #20ad6b 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #ffd107 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #ff3d43 100%);
    --info-gradient: linear-gradient(135deg, #17a2b8 0%, #1bc3de 100%);
    --dark-gradient: linear-gradient(135deg, #020d3aff 0%, #031560 100%);
    
    --primary-color: #0627a9;
    --secondary-color: #ffd700;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --border-radius: 15px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ===== ESTILOS GENERALES ===== */
body {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
    
}

.modal-title {
    font-family: "Raleway-bolder", Arial, Helvetica, sans-serif !important;
}
.bg-primary, .btn-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.bg-success, .btn-success {
    background: var(--success-gradient) !important;
    color: white !important;
}
.bg-warning, .btn-warning {
    background: var(--warning-gradient) !important;
    color: white !important;
}

.bg-danger, .btn-danger {
    background: var(--danger-gradient) !important;
    color: white !important;
}

.bg-info, .btn-info {
    color: white !important;
    background: var(--info-gradient) !important;
}

.bg-secondary, .btn-secondary {
    background: var(--secondary-gradient) !important;
    color: white !important;
}

.nav-tabs {
  border-bottom: 1px solid #0627a9 !important;
  color: #0627a9 !important;
  
}

.nav-tabs .nav-link {
  color: #0627a9 !important;
  border-radius: 0.75rem 0.75rem 0 0 !important;
}

.clickable-card{
    cursor: pointer;
}

.clickable-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-3px);
}


.clickable-alert{
    cursor: pointer;
    border: #0627a9 1px solid !important;
}

.clickable-alert:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-3px);
}


.nav-tabs .nav-link.active {
  font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
  border-top: 1px solid #0627a9 !important;
  border-left: 1px solid #0627a9 !important;
  border-right: 1px solid #0627a9 !important;
  border-radius: 0.75rem 0.75rem 0 0 !important;
}


.nav-tabs .nav-link:hover {
  border-color: #0627a941 !important;
}

.estudiante-success {
    background: var(--success-gradient);
}


.card {
    border: #0627a9 0.5px solid;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

.card-header{
    border-radius: var(--border-radius);
}

.card-footer{
    border-radius: var(--border-radius);
}

.table-dark{
    background: linear-gradient(135deg, #020d3aff 0%, #031560 100%);
    color: white;
}


/* ===== NAVBAR PERSONALIZADO ===== */
 @keyframes navbarSlideOut {
    0%   { top: 0rem;     opacity: 1; }
    100% { top: -5rem; opacity: 1; }
  }
  
  @keyframes navbarSlideIn {
    0%   { top: -5rem; opacity: 1; }
    100% { top: 0rem;      opacity: 1; }
  }
  
  @keyframes navbarItemsSlideOut {
    from { opacity: 1; transform: translateY(0);}
    to   { opacity: 0; transform: translateY(-20px);}
  }
  
  @keyframes navbarItemsSlideIn {
    from { opacity: 0; transform: translateY(-20px);}
    to   { opacity: 1; transform: translateY(0);}
  }
  
  .navbar-initial,
  .navbar-initial .collapse,
  .navbar-initial .navbar-collapse,
  .navbar-initial .nav-item {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .navbar-show .collapse,
  .navbar-show .navbar-collapse {
    animation: navbarItemsSlideIn 0.2s ease-in-out forwards;
  }
  .navbar-show {
    animation: navbarSlideIn 0.2s ease-in-out forwards;
  }
  
  .navbar-hide .collapse,
  .navbar-hide .navbar-collapse {
    animation: navbarItemsSlideOut 0.2s ease-in-out forwards;
  }
  .navbar-hide {
    animation: navbarSlideOut 0.2s ease-in-out forwards;
  }

.navbar-custom-header .d-lg-flex {
  display: flex !important;

}

.navbar-custom {
  background: linear-gradient(90deg, #03155c 0%, #051e80 100%);
  min-height: 4.5rem;
  border-radius: 0rem;
  margin: 0rem;
  position: sticky;
  -webkit-position: sticky;
  top: 0rem;
  z-index: 1000;
  transition: none; /* Desactiva el transition para usar solo animación */
  z-index: 1050;
  display: flex;
  align-items: center;
}

@media (min-width: 992px) {
/* Asegurar que el botón del perfil esté por encima de otros elementos */
.navbar-custom button[data-bs-toggle="modal"] {
  position: relative;
  z-index: 1050;
}
/* Asegurar que el contenedor del perfil esté por encima de la navegación fija */
.navbar-custom .d-flex.align-items-center.order-lg-2 {
  position: relative;
  z-index: 1051;
  height: 100%;
  min-height: 3.75rem;
  display: flex;
  align-items: center;
}
}

.navbar-custom {
    background: var(--primary-gradient);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.65rem 0;
}

.navbar-custom .navbar-toggler {
    border: none;
    color: white;
}

.navbar-custom .offcanvas {
    background: var(--primary-gradient);
}

.navbar-custom .navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-custom .nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: var(--transition);
}

.navbar-custom .nav-link.active {
    font-family: "Raleway-bold", Arial, Helvetica, sans-serif !important;
      background: rgba(255,255,255,0.15);
  color: #ffd700 !important;
  border-radius: 0.5rem;
}

.navbar-custom .nav-link:hover {
          background: rgba(255,255,255,0.15);
  color: #ffd700 !important;
  border-radius: 0.5rem;
    transform: translateY(-2px);
    text-shadow: 0 0px 10px #ffd700 !important;
}

/* ===== TARJETAS DEL DASHBOARD ===== */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* ===== TARJETAS DE ESTADÍSTICAS ===== */
.stat-card {
    border: #0627a9 0.5px solid;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 10px;
    text-align: center;
    margin-bottom: 10px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.stat-number {
    font-size: 2rem;
    font-family: "Raleway-bolder", Arial, Helvetica, sans-serif !important;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== TARJETAS DE FUNCIONALIDADES ===== */
.feature-card {
    border: #0627a9 1px solid;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.feature-card a {
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.feature-card a:hover {
    color: #ffd700 !important;
    transform: translateY(-2px);
    text-shadow: 0 0px 10px #ffd700 !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ===== CONTENEDORES DE ESCANEO ===== */
.scanner-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.estudiante-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

/* ===== FORMULARIOS ===== */
.form-control {
    border-radius: 8px;
    border: 1px solid #5c6fbe;
    padding: 8px 12px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #5c6fbe;
    padding: 8px 12px;
    font-size: 14px;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ===== BOTONES ===== */
.btn-login {
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}


/* ===== INPUTS ESPECIALES ===== */
.qr-input {
    font-size: 1.2rem;
    padding: 15px;
    border-radius: 10px;
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background: var(--success-gradient);
    color: white;
}

.alert-danger {
    background: var(--danger-gradient);
    color: white;
}

.alert-warning {
    background: var(--warning-gradient);
    color: white;
}

.alert-info {
    background: var(--info-color);
    color: white;
}

/* ===== BADGES ===== */
.badge {
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 500;
}

/* ===== LOGIN ===== */
.login-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

/* ===== UTILIDADES ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-secondary {
    background: var(--secondary-gradient);
}

.bg-gradient-success {
    background: var(--success-gradient);
}

.bg-gradient-warning {
    background: var(--warning-gradient);
}

.bg-gradient-danger {
    background: var(--danger-gradient);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
    
    .scanner-container {
        padding: 20px;
    }
    
    .login-container {
        margin: 20px;
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== ESTILOS PARA TABLAS ===== */
.table-custom {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.table-custom th {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table-custom td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ===== ESTILOS PARA MODALES ===== */
.modal-custom .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-custom .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-hover);
}

/* ===== ESTILOS PARA PAGINACIÓN ===== */
.pagination-custom .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 2px solid #e9ecef;
    color: var(--primary-color);
    transition: var(--transition);
}

.pagination-custom .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-custom .page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

/* ===== ESTILOS PARA CARDS DE ESTUDIANTES ===== */
.estudiante-info-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.estudiante-foto {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--box-shadow);
}

.estudiante-foto-placeholder {
    width: 120px;
    height: 120px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: var(--box-shadow);
}

/* ===== ESTILOS PARA ESTADÍSTICAS AVANZADAS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

/* ===== ESTILOS PARA FORMULARIOS AVANZADOS ===== */
.form-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 20px;
}

.form-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

/* ===== ESTILOS PARA NOTIFICACIONES ===== */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ===== ESTILOS PARA LOADING ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ESTILOS PARA TOOLTIPS ===== */
.tooltip-custom .tooltip-inner {
    background: var(--dark-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
}

.tooltip-custom .arrow::before {
    border-top-color: var(--dark-color);
}

/* ===== ESTILOS PARA DROPDOWNS ===== */
.dropdown-menu-custom {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    border: none;
    padding: 10px 0;
}

.dropdown-item-custom {
    padding: 10px 20px;
    transition: var(--transition);
    border-radius: 6px;
    margin: 0 10px;
}

.dropdown-item-custom:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* ===== ESTILOS PARA SCROLLBARS ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #031560;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background:  #051e80;
}


/* ===== ESTILOS PARA EL FOOTER ===== */
footer {
    background: linear-gradient(45deg, #021252 0%, #04196b 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

footer a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

/* Haz que el backdrop del modal tenga fondo semitransparente y desfoque */
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.4) !important; /* Ajusta opacidad según preferencia */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* Compatibilidad Safari */
  opacity: 1 !important; /* Requerido para que el blur sea visible */
}
