html, body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  font-size: 12px;
  height: 100%;
}

.page-wrapper {
  min-height: 100vh; /* que abarque siempre toda la pantalla */
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;      /* ocupa todo el espacio disponible */
}



/* LOGIN */
.login {
  /* display: flex; */
  height: 100vh;
}

.login-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* Columna izquierda con imagen */
.login-image {
  flex: 1.2;
  background: url("../img/banner.jpg") no-repeat center center;
  background-size: cover;
}

/* Columna derecha con login */
.login-side {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* SVG decorativo */
.login-decor {
  width: 100%;
  display: block;
  height: 80px;
}

.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 60px; /* controla el margen lateral */
  max-width: 500px; /* para que no se estire demasiado en pantallas grandes */
  margin: 0 auto; /* lo centra sin dar tanto espacio */
}

.login-content h3 {
  margin-bottom: 20px;
  text-align: center;
}
.login-content h3 {
  font-size: 27px;
}

.login-content input,
.login-content button {
  font-size: 12px;
}

/* Responsivo */
@media (max-width: 992px) {
  body {
    font-size: 25px;
  }
  .login-container {
    flex-direction: column;
  }
  .login-image {
    height: 300px;
    flex: none;
  }
  .login-side {
    flex: none;
  }
  .login-content {
    max-width: 100%;
    padding: 0 20px; /* menos padding en pantallas chicas */
  }
  .login-content h3 {
    font-size: 45px;
  }

  .login-content input,
  .login-content button {
    font-size: 20px;
  }
}

/* --- LOGIN LINKS --- */
.login-links {
  font-size: 1.3em;
}

.login-links .link-small {
  color: #6c757d;
  font-size: 0.9em;
  text-decoration: none;
  transition: color 0.3s;
}
.login-links .link-small:hover {
  color: #0d6efd;
}

.login-links .link-btn {
  font-weight: 600;
  color: #0d6efd;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}
.login-links .link-btn:hover {
  border-bottom: 2px solid #0d6efd;
}

.login-links .link-return {
  display: inline-block;
  margin-top: 15px;
  font-size: 0.95em;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s;
}
.login-links .link-return:hover {
  color: #0d6efd;
  transform: translateX(-3px); /* leve movimiento */
}

/* Responsivo */
@media (max-width: 992px) {
  .login-links {
    font-size: 0.9em;
  }
}



/* REGISTER */
/* Estilo específico para el registro */
.login-content.register-form {
  max-width: 550px; /* un poco más ancho para campos adicionales */
  padding: 0 40px;
  margin: 0 10px;
}

/* Filas para tipo de doc + número de doc */
.row-doc {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* se adapta si la pantalla es muy pequeña */
}

.col-doc {
  flex: 1; /* misma proporción */
  min-width: 150px; /* evita que se achiquen demasiado */
}



/* Ajustes de font-size específicos para register */
.register-page .login-decor {
  height: 34px;
}
body.register-page {
  font-size: 10px;
}
.login-content.register-form input,
.login-content.register-form select,
.login-content.register-form button {
  font-size: 10px;

}
.login-content.register-form button {
  padding: 7px 25px;
}
/* Ajuste de padding de alert-custom solo dentro del registro */
.login-content.register-form .alert-custom {
    padding: 0.5rem 0.7rem; /* menos que el padding general */
}

.login-content.register-form .login-links {
    font-size: 1.2em;
}
.login-content.register-form .login-links p{
    margin-bottom: -5px;
}

/* En pantallas grandes se ponen en la misma fila */
@media (min-width: 992px) {
  .row-doc {
    flex-direction: row;
  }
  .login-content.register-form .alert-container {
    margin: 0 auto 0rem;
  }
  .input-equal {
    height: 28px !important; /* altura uniforme */
  }
}

/* Pantallas pequeñas: una columna */
@media (max-width: 991px) {
  .row-doc {
    flex-direction: column;
  }
  .login-content.register-form {
    padding: 0 20px;
    max-width: 100%;
  }
  body.register-page {
    font-size: 18px; /* más grande para mobile */
  }
  .login-content.register-form input,
  .login-content.register-form select,
  .login-content.register-form button {
    font-size: 16px;

  }
  .register-page .login-decor {
    height: 60px;
  }

}















/* --- TOPBAR --- */
.topbar {
  background-color: #08213b; /* azul más oscuro */
  color: #fff;
  font-size: 14px;
  padding: 5px 0;
}

.topbar span {
  margin-right: 20px;
}

.topbar i {
  margin-right: 6px;
  color: #fff;
}
.topbar-link {
  color: #fff;
  text-decoration: none;
}

.topbar-link:hover {
  color: #ddd;
  text-decoration: none;
}


/* --- NAVBAR personalizada --- */
.nav-eoftalmo {
  background-color: #0e2c54; /* azul principal del footer */
}

.logo-nav {
  max-height: 45px;
  width: 8em;
}

.nav-link {
  /* color: #02305e; */
}

/* HERO del home */
.hero {
  background-image: url("../img/header.webp");
  background-size: cover; /* mantener cover para que ocupe todo */
  background-repeat: no-repeat;
  background-position: center 40%; /* <-- desplaza la imagen hacia abajo (ajustar 50% -> 70% según caso) */
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* HERO superior con imagen */
.footer-hero {
  position: relative;
  background: url("../img/footer.webp") center/cover no-repeat;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.footer-hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.footer-hero-content {
  position: relative;
  z-index: 1;
}

.footer-hero-content h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: #fff;
  color: #0e2c54;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #f0f0f0;
}

/* Franja azul con información */
.footer-main {
  background-color: #0e2c54;
  color: #fff;
  padding: 50px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  text-decoration: none;
  color: #d1d1d1;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.brand .logo {
  max-width: 150px;
  margin-bottom: 10px;
}

.phone {
  margin: 15px 0;
  font-size: 14px;
}

.btn-area {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 15px;
  border: 1px solid #fff;
  border-radius: 5px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-area:hover {
  background: #fff;
  color: #0e2c54;
}

/* Franja inferior */
.footer-bottom {
  background: #08213b;
  color: #ccc;
  padding: 15px 20px;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.socials a {
  color: #fff;
  margin-right: 15px;
  font-size: 18px;
  transition: color 0.3s;
}

.socials a:hover {
  color: #ccc;
}

/* Responsivo */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom-container {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .socials {
    justify-content: center;
  }
}















/* TURNOS */
.lista-turnos-container {
  width: 95%;
  margin: auto;
  padding: 1rem;
}

/* Tabla con estilo Bootstrap pero mejorada */
.turnos-table {
  border-radius: 10px;
  overflow: hidden;
  word-break: break-word; /* permite cortar nombres largos */
  white-space: normal;
}

/* Responsividad */
@media (max-width: 900px) {
  .turnos-table thead {
    display: none; /* Ocultar encabezados */
  }

  .turnos-table,
  .turnos-table tbody,
  .turnos-table tr,
  .turnos-table td {
    display: block;
    width: 100%;
    overflow-wrap: anywhere;
  }

  .turnos-table tr {
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 0.8rem;
  }

  .turnos-table td {
    text-align: left;
    padding: 0.5rem 0.8rem;
    position: relative;
  }

  .turnos-table td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
    color: #3274d6;
  }
}

.btn-cancelar {
  border: 1px solid #dc3545; /* rojo suave */
  color: #dc3545;
  background: transparent;
  font-size: 0.85rem;
  padding: 2px 8px;
  transition: all 0.3s;
}

.btn-cancelar:hover {
  background: #dc3545;
  color: #fff;
}


.icon-contacto {
  color: #10a2c0;
}

.bg-info{
  background-color: #10a2c0 !important;
}

/* Bloque de confirmación inline */
.confirmacion-cancelar {
  background: #fff3f3;
  border: 1px solid #dc3545;
  border-radius: 6px;
  padding: 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
  color: #721c24;
  animation: fadeIn 0.3s ease-in-out;
}

.confirmacion-cancelar p {
  margin: 0 0 0.5rem;
}

.confirmacion-cancelar .btn {
  font-size: 0.8rem;
  margin: 0 0.3rem;
  padding: 3px 10px;
}

.confirmacion-cancelar .btn-confirmar {
  background: #dc3545;
  color: #fff;
  border: none;
}

.confirmacion-cancelar .btn-cancelar-accion {
  background: #6c757d;
  color: #fff;
  border: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}











/* Alertas */
.alert-container {
  max-width: 900px;
  margin: 0 auto 1rem;
  outline: none; /* necesario para que focus sea discreto */
}

.alert-custom {
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease-in-out;
}

.alert-success-custom {
  background: #e6f7f1;
  border: 1px solid #28a745;
  color: #155724;
}

.alert-error-custom {
  background: #f8d7da;
  border: 1px solid #dc3545;
  color: #721c24;
}










/* ESTUDIOS */
.lista-estudios-container {
  width: 95%;
  margin: auto;
  padding: 1rem;
}

.estudios-table {
  border-radius: 10px;
  overflow: hidden;
  word-break: break-word; /* permite cortar nombres largos */
  white-space: normal;
}

/* Versión mobile */
@media (max-width: 900px) {
  .estudios-table thead {
    display: none;
  }
  .estudios-table,
  .estudios-table tbody,
  .estudios-table tr,
  .estudios-table td {
    display: block;
    width: 100%;
    overflow-wrap: anywhere;
  }
  .estudios-table tr {
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 0.8rem;
  }
  .estudios-table td {
    text-align: left;
    padding: 0.5rem 0.8rem;
    position: relative;
  }
  .estudios-table td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
    color: #3274d6;
  }
}

/* BOTONES VER  */
/* Botón personalizado "Ver" */
.btn-ver {
  background-color: #17a2b8; /* mismo color que btn-info */
  color: #fff;
  border: none;
  font-size: 0.85rem;
  padding: 4px 10px;
  transition: background 0.3s;
}

.btn-ver:hover {
  background-color: #138496; /* tono más oscuro al pasar */
  color: #fff;
}









/* LOADER */
/* Overlay del loader */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(59 56 56 / 80%); /* fondo semi-transparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* que tape todo */
}

/* Loader bouncing */
.bouncing-loader {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bouncing-loader div {
  width: 20px;
  height: 20px;
  margin: 4px;
  background: #10a2c0;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.bouncing-loader div:nth-child(2) {
  animation-delay: 0.2s;
  background: #0e2c54;
}

.bouncing-loader div:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  to {
    opacity: 0.8;
    transform: translateY(-12px);
  }
}


/* Oculto por defecto */
.d-none {
  display: none !important;
}














/* --- MODAL ESTILOS --- */
.custom-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.custom-modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  animation: fadeInScale 0.3s ease;
  display: flex;
  flex-direction: column;
}

.custom-modal-body {
  flex: 1;
  overflow: auto;
  min-height: 300px;
  padding: 10px;
  text-align: center;
}

.custom-modal-body iframe,
.custom-modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.custom-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: #dc3545;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 35px; height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.custom-close:hover {
  background: #b02a37;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9);}
  to   { opacity: 1; transform: scale(1);}
}

.iframe-pdf{
  width:100% !important;
  min-height:80vh !important;
  height: 100% !important;
}