:root {
  --fuenteHeading: "PT Sans", sans-serif;
  --fuenteParrafo: "Open Sans", sans-serif;
  --fuentePrincipal: "PT Sans", sans-serif;

  --blanco: #ffffff;
  --oscuro: #212121;
  --primario: #eeff07;
  --secundario: #0097a7;
  --gris: #757575;
  --grisClaro: #dfe9f3;
  --adminclinica: #2e80d3;
  --doctor: #8143f5;
  --paciente: #00c251;
  --tabla: #f66363;
}
/* Globales */
html {
  font-size: 62.5%; /* Hack para Box Model */
  box-sizing: border-box;
  scroll-snap-type: y mandatory;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}
body {
  font-family: var(--fuenteParrafo);
  font-size: 1.6rem;
  line-height: 2;
}

/* Globales */
.contenedor {
  max-width: 120rem;
  width: 90%;
  margin: 0 auto;
}
a {
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  font-family: var(--fuenteHeading);
  line-height: 1.2;
}
h1 {
  font-size: 4.8rem;
}
h2 {
  font-size: 4.2rem;
}
h3 {
  font-size: 3.2rem;
}
h4 {
  font-size: 3.2rem;
}
p{
    font-size: 2.3rem;
}
img {
  max-width: 100%;
}

.sombra {
  box-shadow: 0px 5px 15px 0px rgba(112, 112, 112, 0.48);
  background-color: var(--blanco);
  padding: 2rem;
  border-radius: 1rem;
}
.boton {
  background-color: var(--grisClaro);
  color: var(--oscuro);
  padding: 1rem 3rem;
  margin-top: 1rem;
  font-size: 2rem;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 0.5rem;
  width: 90%;
  text-align: center;
  border: none;
}
@media (min-width: 768px) {
  .boton {
    width: auto;
  }
}
.boton:hover {
  cursor: pointer;
}

/* Header */
.header {
  display: flex;
  justify-content: center;
}
.header__logo {
  margin: 1rem 0;
  height: 20rem;
  width: auto;
}

/* navegacion */
.navegacion {
  background-color: var(--secundario);
  padding: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.navegacion__enlace {
  font-family: var(--fuentePrincipal);
  color: var(--blanco);
  font-size: 3rem;
}
.navegacion__enlace--activo,
.navegacion__enlace:hover {
  color: var(--primario);
}

.navegacion__gral {
  background-color: var(--gris);
  padding: 1rem 0;
  display: flex;
  justify-content: right;
  gap: 10rem;
}

.navegacion__admin-clini {
  background-color: var(--adminclinica);
  padding: 1rem 0;
  display: flex;
  justify-content: right;
  gap: 10rem;
}

.navegacion__doctor {
  background-color: var(--doctor);
  padding: 1rem 0;
  display: flex;
  justify-content: right;
  gap: 10rem;
}

.navegacion__paciente {
  background-color: var(--paciente);
  padding: 1rem 0;
  display: flex;
  justify-content: right;
  gap: 10rem;
}

/* ============================
   RESPONSIVE MENU
   ============================ */
@media (max-width: 768px) {

    .navegacion,
    .navegacion__gral,
    .navegacion__admin-clini,
    .navegacion__doctor,
    .navegacion__paciente {
        flex-direction: column;       /* Se apilan */
        align-items: center;          /* Centrar enlaces */
        gap: 1rem;                    /* Menos espacio */
    }
}


/* nosotros */
.nosotros {
  display: grid;
  grid-template-rows: repeat(2, auto);
}
@media (min-width: 768px) {
  .nosotros {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
  }
}
.nosotros__imagen {
  grid-row: 1 / 2;
  width: 100%; /* se adapta al ancho */
  max-width: 800px; /* controla qué tan grande llega */
  height: auto; /* mantiene proporción */
  display: block;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .nosotros__imagen {
    grid-column: 2 / 3;
  }
}

/* bloques */
.bloques {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
@media (min-width: 768px) {
  .bloques {
    grid-template-columns: repeat(4, 1fr);
  }
}
.bloque {
  text-align: center;
}
.bloque__titulo {
  margin: 0;
}

/* Footer */
.footer {
  background-color: var(--secundario);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer__gral {
  background-color: var(--gris);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer__admin-clinica {
  background-color: var(--adminclinica);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer__doctor {
  background-color: var(--doctor);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer__paciente {
  background-color: var(--paciente);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer__logo {
  margin: 1rem 0;
  height: 15rem;
  width: auto;
}

.footer__p {
  color: var(--blanco);
}

/* Formulario */
.formulario {
  background-color: var(--gris);
  width: min(60rem, 100%); /* Utilizar el valor mas pequeño */
  margin: 0 auto; /* centrar en formulario */
  padding: 2rem;
  border-radius: 1rem;
}

.formulario fieldset {
  border: none;
}

.formulario legend {
  text-align: center;
  font-size: 1.8rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primario);
}

@media (min-width: 768px) {
  .contenedor-campos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto 20rem;
    column-gap: 1rem;
  }
  .campo:nth-child(3),
  .campo:nth-child(4) {
    grid-column: 1 /3;
    overflow: hidden;
  }
}

.campo {
  margin-bottom: 1rem;
}

.campo label {
  color: var(--blanco);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

.campo textarea {
  height: 20rem;
}

.input-text {
  width: 100%;
  border: none;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

/* Footer */
.footer {
  text-align: center;
}

/* Formulario de inicio de sesión */
.formulario__inicio {
  background-color: var(--gris);
  width: min(40rem, 100%);
  margin: 5rem auto;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

.formulario__inicio fieldset {
  border: none;
}

.formulario__inicio legend {
  display: flex; /* activar flex */
  justify-content: center; /* centrar horizontalmente */
  align-items: center; /* centrar verticalmente */
  font-size: 2rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primario);
}

/* Campos individuales centrados */
.formulario__inicio .campo {
  margin-bottom: 1.5rem;
}

.formulario__inicio .campo label {
  color: var(--blanco);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

.formulario__inicio .input-text {
  width: 100%;
  border: none;
  padding: 1.5rem;
  border-radius: 0.5rem;
  font-size: 1.6rem;
}

.formulario__inicio .boton {
  display: block;
  width: 100%;
  margin: 2rem auto 1rem auto;
}

.formulario__inicio .registro {
  text-align: center;
  color: var(--blanco);
}

.formulario__inicio .registro a {
  color: var(--primario);
  text-decoration: none;
  font-weight: bold;
}

.formulario__inicio .registro a:hover {
  text-decoration: underline;
}

.formulario__inicio .contenedor-campos {
  grid-template-columns: 1fr;
}

/* Ver usuarios */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}
th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--doctor);
}
th {
  background-color: var(--tabla);
  color: white;
  text-transform: uppercase;
}
tr:hover {
  background-color: #f1f1f1;
}
.volver {
  display: block;
  text-align: center;
  margin-top: 2rem;
}
.volver a {
  text-decoration: none;
  color: white;
  background-color: var(--gris);
  padding: 10px 20px;
  border-radius: 6px;
}
.volver a:hover {
  background-color: var(--primario);
}

.volver__registro {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.volver__registro a {
  text-decoration: none;
  color: white;
  background-color: var(--secundario);
  padding: 10px 20px;
  border-radius: 6px;
}
.volver__registro a:hover {
  background-color: var(--primario);
}

.volver__tabla_gral {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.volver__tabla_gral a {
  text-decoration: none;
  color: white;
  background-color: var(--tabla);
  padding: 10px 20px;
  border-radius: 6px;
}
.volver__tabla_gral a:hover {
  background-color: var(--primario);
}

/* Tabla de admin clinica */
.tabla-admin {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 1.6rem;
  background-color: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.tabla-admin th {
  background-color: var(--adminclinica);
  color: white;
  padding: 1.2rem;
  text-align: left;
  text-transform: uppercase;
}

.tabla-admin td {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.tabla-admin tr:nth-child(even) {
  background-color: #f6f6f6;
}

.tabla-admin tr:hover {
  background-color: #e8e8e8;
  transition: 0.2s;
}

.volver__tabla_admin_clinica {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.volver__tabla_admin_clinica a {
  text-decoration: none;
  color: white;
  background-color: var(--adminclinica);
  padding: 10px 20px;
  border-radius: 6px;
}
.volver__tabla_admin_clinica a:hover {
  background-color: var(--primario);
}

/* Tabla visualizar doctor */
.tabla-doctor {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 1.6rem;
  background-color: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.tabla-doctor th {
  background-color: var(--doctor);
  color: white;
  padding: 1.2rem;
  text-align: left;
  text-transform: uppercase;
}

.tabla-doctor td {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.tabla-doctor tr:nth-child(even) {
  background-color: #f6f6f6;
}

.tabla-doctor tr:hover {
  background-color: #e8e8e8;
  transition: 0.2s;
}

.volver__doctor {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.volver__doctor a {
  text-decoration: none;
  color: white;
  background-color: var(--doctor);
  padding: 10px 20px;
  border-radius: 6px;
}
.volver__volver__doctor a:hover {
  background-color: var(--primario);
}

/* Botones de cerrar sesion  */

.botoncer__doctor {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.botoncer__doctor a {
  text-decoration: none;
  color: white;
  background-color: var(--doctor);
  padding: 10px 20px;
  border-radius: 6px;
}
.botoncer__doctor a:hover {
  background-color: var(--primario);
}

.botoncer__general {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.botoncer__general a {
  text-decoration: none;
  color: white;
  background-color: var(--gris);
  padding: 10px 20px;
  border-radius: 6px;
}
.botoncer__general a:hover {
  background-color: var(--primario);
}

.botoncer__clinica {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.botoncer__clinica a {
  text-decoration: none;
  color: white;
  background-color: var(--adminclinica);
  padding: 10px 20px;
  border-radius: 6px;
}
.botoncer__clinica a:hover {
  background-color: var(--primario);
}

.botoncer__paciente {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.botoncer__paciente a {
  text-decoration: none;
  color: white;
  background-color: var(--paciente);
  padding: 10px 20px;
  border-radius: 6px;
}
.botoncer__paciente a:hover {
  background-color: var(--primario);
}

/* Formulario historial medico */
.formulario__historialmedico {
  background-color: var(--gris);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  margin: 2rem auto;
  max-width: 600px;
  display: block;
}

.formulario__historialmedico legend {
  color: yellow;
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.formulario__historialmedico .campo {
  margin-bottom: 1.5rem;
}

.formulario__historialmedico .campo label {
  color: var(--blanco);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

.formulario__historialmedico .input-text {
  width: 100%;
  border: none;
  padding: 1.5rem;
  border-radius: 0.5rem;
  font-size: 1.6rem;
}

.formulario__historialmedico .boton {
  display: block;
  width: 100%;
  margin: 2rem auto 1rem auto;
}

.formulario__historialmedico .registro {
  text-align: center;
  color: var(--blanco);
}

.formulario__historialmedico .registro a {
  color: var(--primario);
  text-decoration: none;
  font-weight: bold;
}

.formulario__historialmedico .registro a:hover {
  text-decoration: underline;
}

.formulario__historialmedico .contenedor-campos {
  grid-template-columns: 1fr;
}

/* Tabla administrador clinica */
.tabla-adminClini {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 1.6rem;
  background-color: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.tabla-adminClini th {
  background-color: var(--adminclinica);
  color: white;
  padding: 1.2rem;
  text-align: left;
  text-transform: uppercase;
}

.tabla-adminClini td {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.tabla-adminClini tr:nth-child(even) {
  background-color: #f6f6f6;
}

.tabla-adminClini tr:hover {
  background-color: #e8e8e8;
  transition: 0.2s;
}

/* Estilos para la página de modificar citas */
.seleccion-cita {
  margin-bottom: 2rem;
}

.citas-lista {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.cita-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  background: #f9f9f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cita-info p {
  margin: 0.5rem 0;
}

.boton-modificar {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.5rem;
}

.boton-modificar:hover {
  background-color: #45a049;
}

.boton-cancelar {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.5rem;
  margin-left: 1rem;
}

.boton-cancelar:hover {
  background-color: #5a6268;
}

.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

#formulario-modificar {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.volver__paciente {
  text-align: center; /* Centra el botón */
  margin-top: 3rem; /* Espacio arriba */
  margin-bottom: 4rem; /* Separa del footer */
}
.volver__paciente a {
  text-decoration: none;
  color: white;
  background-color: var(--paciente);
  padding: 10px 20px;
  border-radius: 6px;
}
.volver__volver__paciente a:hover {
  background-color: var(--primario);
}

.tabla-paciente {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 1.6rem;
  background-color: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.tabla-paciente th {
  background-color: var(--paciente);
  color: white;
  padding: 1.2rem;
  text-align: left;
  text-transform: uppercase;
}

.tabla-paciente td {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.tabla-paciente tr:nth-child(even) {
  background-color: #f6f6f6;
}

.tabla-paciente tr:hover {
  background-color: #e8e8e8;
  transition: 0.2s;
}

/*hero*/
.hero {
    background-image: url('../img/hero2.jpg'); /* Cambia la imagen por la tuya */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 70vh; /* Altura del hero */
    display: flex;
    align-items: center; /* Centra vertical */
    color: #fff;
    position: relative;
}

/* Oscurecer fondo para mejor lectura */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hero__contenido {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__titulo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero__texto {
    font-size: 2.3rem;
    margin-bottom: 2rem;
}

.hero__boton {
    background-color: #0097A7;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    border-radius: .5rem;
    display: inline-block;
    transition: .3s;
}

.hero__boton:hover {
    background-color: #007C8A;
}

/* Servicios */
@media (min-width: 768px) {
    .servicios{
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Dividir por fracciones */
        column-gap: 1rem;
    }
}

.servicio{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.servicio h3{
    color: var(--secundario);
    font-weight: normal;
}

.servicio p{
    line-height: 2;
    text-align: center;
}
.servicio .iconos{
    height: 15rem;
    width: 15rem;
    background-color: var(--primario);
    border-radius: 50%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.iconos svg {
    width: 44px;
    height: 44px;
}


