@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

:root {
    --primary-color-rgb: 166, 218, 247; /* RGB values of --primary-color */
    --secondary-color-rgb: 108, 175, 221; /* RGB values of --secondary-color  */
    --tertiary-color-rgb: 69, 139, 186; /* RGB values of --tertiary-color */
    --quaternary-color-rgb: 19, 77, 109; /* RGB values of --quaternary-color */
    --quinternary-color-rgb: 4, 42, 58; /* RGB values of ----quinternary-color   */
    --primary-color: #A6DAF7;
    --secondary-color: #6CAFDD;
    --tertiary-color: #458BBA;
    --quaternary-color: #134D6D;
    --quinternary-color: #042A3A;
}

html {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto; /* Solo el HTML tiene scroll vertical */
}

body {
    height: 100%;
    background: linear-gradient(135deg, rgba(166, 218, 247, 0.1) 0%, rgba(108, 175, 221, 0.2) 50%, rgba(69, 139, 186, 0.3) 100%);
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: hidden; /* Body NO tiene scroll, solo HTML */
}

/* Padding para el navbar fixed-top */
body {
    padding-top: 90px;
}

@media (max-width: 991.98px) {
    body {
        padding-top: 70px;
    }
}

/* ============================================
   LAYOUT PRINCIPAL CON SIDEBAR
   ============================================ */
#wrapper {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 90px); /* Altura menos header */
    position: relative;
    overflow-x: hidden;
    overflow-y: visible; /* Permite que el contenido fluya sin crear scroll interno */
}

#wrapper .container {
    padding: 0;
    max-width: 100%;
}

/* Main content con margen para sidebar */
#main-content {
    flex: 1;
    width: 100%;
    margin-left: 310px; /* sidebar width (280px) + gap (30px) */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

#content-wrapper {
    width: 100%;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: visible; /* Sin scroll interno, usa el del HTML */
}

#content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow-x: hidden;
    overflow-y: visible; /* Sin scroll interno */
}

/* Asegurar que todos los containers respeten el ancho */
#content .container,
#content .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

#content .row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

#content .col,
#content [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

.chart-container {
      position: relative;
      /* height: 200px; /* Ajusta la altura según sea necesario */
    }

.card {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(166, 218, 247, 0.3);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-body {
    padding: 1.5rem;
    background-color: transparent;
    color: #2c3e50;
    border: none;
    border-radius: 0 0 12px 12px;
}

.card .card-header {
    padding: 1.25rem 1.5rem;
    color: #ffffff;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, var(--quaternary-color) 0%, var(--tertiary-color) 100%);
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
}

.card-title {
    color: var(--quaternary-color);
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.card-text {
    color: #2c3e50;
    line-height: 1.7;
    font-size: 0.95rem;
}

#tecsa-logo {
  width: 100px;
  height: 100px;
}
.tecsa-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 60px; /* Adjust the height as needed */
    margin-right: 20px;
    margin-left: 30px;
    max-height: 50px;
}

.login-card {
    background-color: var(--secondary-color-rgb); /* Semi-transparent blue */
}

.mtop-navbar {
    margin-top:  60px; /* Ajusta este valor según la altura de tu navbar */
    padding-top: 10px;
}

#page-top {
    background-image: url("/static/assets/img/tecsas3/tecsas3-bg-ecosystem.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: transparent;
}

.login-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.clean-hero {
    margin: 40px;
    height: 100vh; /* Ensure the section takes the full viewport height */
    width: 80%;
    padding: 50px; /* Adjust the padding as needed */
    overflow: hidden; /* Ensure content fits within rounded corners */


}

.avatar {
    max-width: 100%;
    height: auto;
    cursor: pointer; /* Add pointer cursor on hover */
    width: 200px;
    border-radius: 50%;
    object-fit: cover;
}

.persona-image {
    position: relative;
    right: 2px;
    top: 2px;
    align-items: center;
}

.mt-navbar {
  margin-top:  80px;
}

.alert-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: calc(100% - 40px);
}

.semi-transparent-bg {
  background-color: rgba(255, 255, 255, 0.8); /* White background with 80% opacity */
  padding: 20px;
  border-radius: 10px;
}

#loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

#loading-spinner .spinner-border {
  width: 6rem;
  height: 6rem;
  border-width: 0.5rem;
}

#loading-spinner .spinner-border {
  width: 6rem;
  height: 6rem;
  border-width: 0.5rem;
  color: #3498db; /* Semi-transparent white */
}

#loading-spinner .loading-text {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9); /* Blanco semi-transparente */
    background-color: rgba(0, 0, 0, 0.5); /* Negro semi-transparente */
    font-size: 1.5rem;
    text-align: center;
    padding: 10px; /* Añade relleno para mejorar la legibilidad */
    border-radius: 10px; /* Esquinas redondeadas */
    display: inline-block; /* Asegura que el fondo se ajuste al contenido */
    animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.landing-page {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh; /* Ensure it takes the full viewport height */
 }

.landing-page .semi-transparent-card {
  background-color: rgba(19, 77, 109, 0.8); /* Semi-transparent blue */
  color: #ffffff; /* White text */
  margin: 20px;
  border-radius: 20px 20px 0 0;
  border-color: var(--secondary-color);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

.landing-page .card-body {
  background-color: rgba( 108, 175, 22, 0.2); /* Semi-transparent blue */
  color: #ffffff; /* White text */
  border-radius: 20px 20px 0 0;
  border-color: var(--secondary-color);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}


/* Contenedor de contenido - ya definido arriba, eliminamos duplicado */

caption {
    caption-side: top; /* Position the caption above the table */
    text-align: left; /* Align the caption text to the left */
    font-size: 1.5em; /* Adjust the font size as needed */
    margin-bottom: 10px; /* Add some space between the caption and the table */
}

/* Responsive design para la tabla Bootstrap Table */
/* Custom styles for the Bootstrap table */
.table thead th {
    background-color: #343a40; /* Dark background for the header */
    color: #ffffff; /* White text color */
    font-weight: bold; /* Bold text */
    text-align: center; /* Center align text */
}

.table tbody tr:hover {
    background-color: #f1f1f1; /* Light gray background on hover */
}

.table td, .table th {
    padding: 15px; /* Increase padding for better readability */
    border-radius: 5px; /* Add border radius to cells */
    text-align: left; /* Center align text */
}

.table-container {
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateZ(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin: 30px;
    background-color: #d0e7ff; /* Azul claro */
}

.pagination {
    display: flex;
    justify-content: center; /* Center align pagination controls */
    padding: 10px 0;
}

.pagination .page-item .page-link {
    color: #343a40; /* Dark text color */
    border: 1px solid #343a40; /* Dark border */
    margin: 0 5px; /* Add margin between pagination items */
}

.pagination .page-item.active .page-link {
    background-color: #343a40; /* Dark background for active page */
    border-color: #343a40; /* Dark border for active page */
    color: #ffffff; /* White text color for active page */
}

.table-title {
  margin: 0;
  font-size: 1.5em;
}

.table-toolbar {
  display: flex;
  align-items: center;
}


/* Custom styles for the buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--quaternary-color) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(69, 139, 186, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--quaternary-color) 0%, var(--quinternary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(69, 139, 186, 0.4);
    color: #ffffff;
}

/* Custom styles for the images */
.img-fluid {
    max-width: 100%; /* Ensure images are responsive */
    height: auto; /* Maintain aspect ratio */
    border: 1px solid #ddd; /* Light border */
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add box shadow */
}

/* Custom styles for the container */
.container-sm {
    /* margin-top: 30px;  Add top margin */
    /* padding: 20px;  Add padding */
    border-radius: 10px; /* Rounded corners */
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);  Add box shadow */
}

/* Custom styles for the enviar_mensaje form */
.enviar-email .card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow */
    border-radius: 10px; /* Rounded corners */
    overflow: hidden; /* Ensure content fits within rounded corners */
    transition: transform 0.2s; /* Smooth transition for hover effect */
}

.enviar-email .card:hover {
    transform: translateY(-5px); /* Lift card on hover */
    filter: brightness(0.9);
}

.enviar-email .card-header {
    padding: 15px; /* Increase padding */
}

.enviar-email .card-body {
    padding: 20px; /* Increase padding */
}

.enviar-email .form-group {
    margin-bottom: 1.5rem; /* Add spacing between form groups */
}

.enviar-email .btn-success {
    background-color: #28a745; /* Custom button color */
    border-color: #28a745; /* Custom button border color */
}

/* static/css/custom.css */
.card-intro {
    background-color: rgba(69, 139, 186, 0.8); /* Fondo semi oscuro */
    padding: 20px; /* Añade relleno para mejorar la legibilidad */
    border-radius: 0.5rem; /* Añade bordes redondeados */
}

@media (min-width: 768px) {
    .card-body {
        padding: 10rem; /* Aumenta el relleno para dispositivos más grandes */
    }
}


.main-content {
    margin-left: 250px; /* Ajusta este valor según el ancho del sidebar */
    padding: 20px; /* Añade un poco de relleno para el contenido principal */
}


.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.logo-large {
    max-width: 300px;
    margin-bottom: 2rem;
}

.btn-primary-custom {
    background-color: var(--tertiary-color);
    color: white;
    border: 2px solid var(--tertiary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--quaternary-color);
    border-color: var(--quaternary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-custom {
    background-color: transparent;
    color: var(--tertiary-color);
    border: 2px solid var(--tertiary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: var(--tertiary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Make button text more visible */
.btn-primary-custom h4,
.btn-outline-custom h4 {
    color: inherit;
    margin: 0;
    font-weight: 600;
}

/* Ensure proper spacing between icon and text */
.btn-primary-custom i,
.btn-outline-custom i {
    margin-right: 0.5rem;
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Estilos para Usuario */
/* static/css/custom.css */
.card-body.aprobado {
  background-image: url('{% static "assets/img/device-interface-background.webp" %}');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(var(--quaternary-color-rgb), 0.7);
  opacity: 0.8; /* Ajusta la opacidad según sea necesario */
}

/* Contenido de Markdown */
.markdown-content {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
  color: #0056b3;
}

.markdown-content a {
  color: #007bff;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}
/* Contenido en JSON */
pre.language-json {
background-color: #f5f5f5;
padding: 10px;
border-radius: 5px;
font-size: 14px;
overflow-x: auto;
}


/* ============================================
   ESTILOS PROFESIONALES ADICIONALES
   ============================================ */

/* Tablas mejoradas */
.table {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.table thead th {
    background: linear-gradient(135deg, var(--quaternary-color) 0%, var(--tertiary-color) 100%);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    border: none;
}

.table tbody tr {
    border-bottom: 1px solid rgba(166, 218, 247, 0.3);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(166, 218, 247, 0.1);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #2c3e50;
}

/* Botones secundarios */
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--quaternary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 175, 221, 0.4);
    color: #ffffff;
}

/* Botones de éxito */
.btn-success {
    background: linear-gradient(135deg, #6CCB7A 0%, #51B968 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #51B968 0%, #3E9C50 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 203, 122, 0.4);
    color: #ffffff;
}

/* Botones de peligro */
.btn-danger {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #EE5A52 0%, #DC4C45 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    color: #ffffff;
}

/* Formularios mejorados */
.form-control, .form-select {
    border: 2px solid rgba(166, 218, 247, 0.5);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus, .form-select:focus {
    border-color: var(--tertiary-color);
    box-shadow: 0 0 0 0.2rem rgba(69, 139, 186, 0.25);
    background-color: #ffffff;
}

.form-label {
    font-weight: 600;
    color: var(--quaternary-color);
    margin-bottom: 0.5rem;
}

/* Badges profesionales */
.badge {
    padding: 0.5em 1em;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--quaternary-color) 100%);
    color: #ffffff;
}

.badge-success {
    background: linear-gradient(135deg, #6CCB7A 0%, #51B968 100%);
    color: #ffffff;
}

.badge-danger {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
    color: #ffffff;
}

.badge-warning {
    background: linear-gradient(135deg, #FFD93D 0%, #FFC312 100%);
    color: #333333;
}

.badge-info {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: #ffffff;
}

/* Spinners y loaders */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Mejoras de accesibilidad */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Contraste mejorado para enlaces */
a {
    color: var(--tertiary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--quaternary-color);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--tertiary-color);
    outline-offset: 2px;
}

/* Estilos para modales */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--quaternary-color) 0%, var(--tertiary-color) 100%);
    color: #ffffff;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid rgba(166, 218, 247, 0.3);
    padding: 1rem 2rem;
}

/* Tooltips mejorados */
.tooltip-inner {
    background-color: var(--quaternary-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--quaternary-color);
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: var(--quaternary-color);
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--quaternary-color);
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: var(--quaternary-color);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Desktop Large (>1200px) */
@media (min-width: 1200px) {
    #main-content {
        margin-left: 310px; /* sidebar width + gap */
    }
}

/* Tablet (768px - 1200px) */
@media (max-width: 1200px) and (min-width: 768px) {
    #main-content {
        margin-left: 270px; /* sidebar width reducido (240px) + gap (30px) */
    }

    .card-body {
        padding: 1.25rem;
    }
}

/* Mobile (<768px) - Sidebar oculto */
@media (max-width: 768px) {
    html {
        overflow-y: auto; /* Mantener scroll solo en HTML */
    }

    body {
        overflow-y: hidden; /* Sin scroll en body */
    }

    #main-content {
        margin-left: 0 !important; /* Sin margen cuando sidebar está oculto */
        width: 100%;
    }

    #content-wrapper {
        padding: 15px;
        overflow-y: visible;
    }

    #wrapper {
        flex-direction: column;
        overflow-y: visible;
    }

    .hero {
        text-align: center;
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .btn-container {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary-custom, .btn-outline-custom {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .tecsa-logo {
        max-width: 200px;
        width: 200px;
    }

    .card-body {
        padding: 1rem;
    }

    .alert-container {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }

    .table {
        font-size: 0.875rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-danger {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.7em;
    }
}
