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

:root {
    --padding-container: 100px 0;
    --color-title: #001A49;
    --very-light-pink: #c7c7c7;
    --white: #FFFFFF;
    --black: #000;
    --text-input-field: #F7F7F7;
    --hospital-green: #ACD9B2;  
    --sm: 14px;
    --md: 16px;
    --lg: 20px;

}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.error {
    color: red;
    font-size: 0.8em;
    height: 1em; /* Asegúrate de que haya espacio para el mensaje de error */
    display: block; /* O cualquier otro display que prefieras */
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--padding-container);
}

.hero {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    position: relative;
    display: grid;
    grid-template-rows: 100px 1fr;
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, #0000008c 0%, #0000008c 100%), url('../images/seguridad.jpg');
    background-size: cover;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 95%, 0 80%);
    z-index: -1;
}
.hero_sensors {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    position: relative;
    display: grid;
    grid-template-rows: 100px 1fr;
    background-color: #b2b8fda1;
    background-size: 20px 20px;
    background-position: 10px 10px, 10px 10px;
    overflow: hidden;
}

/* Nav */

.nav {
    --padding-container: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav__title {
    font-weight: 300;
}

.nav__link{
    margin-left: auto;
    padding: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 2em;
}

.nav__items {
    list-style: none;
}

.nav__links {
    color: #fff;
    text-decoration: none;
}

.nav__menu {
    margin-left: auto;
    cursor: pointer;
    display: none;
}

.nav__img {
    display: block;
    width: 30px;
}

.nav__close {
    display: var(--show, none);
}

/* Hero container */

.hero__container {
    max-width: 800px;
    --padding-container: 0;
    display: grid;
    grid-auto-rows: max-content;
    align-content: center;
    gap: 1em;
    padding-bottom: 100px;
    text-align: center;
}
.hero__title {
    font-size: 3rem;
}

.hero__paragraph {
    margin-bottom: 20px;
}

.cta {
    display: inline-block;
    background-color: #2091F9;
    justify-self: center;
    color: #fff;
    text-decoration: none;
    padding: 13px 30px;
    border-radius: 32px;
}

/* About */

.about {
    text-align: center;
}

.subtitle {
    color: var(--color-title);
    font-size: 45px;
    margin-bottom: 25px;
  
}

.about__paragraph {
    line-height: 1.7;
}

.about__main {
    padding-top: 80px;
    display: grid;
    width: 90%;
    margin: 0 auto;
    gap: 1em;
    overflow: hidden;
    grid-template-columns: repeat(auto-fit, minmax(260px, auto));
}

.about__icons {
    display: grid;
    gap: 1em;
    justify-items: center;
    width: 260px;
    overflow: hidden;
    margin: 0 auto;
}

/*Imágenes */
.about__icon {
    width: 80px;
}

/* Knowledge */

.knowledge {
    background-color: #e5e5f7;
    background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px), radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 50px 50px;
    overflow: hidden;
}

.knowledge__container{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    align-items: center;
}

.knowledge__picture{
    width: 600px;
}

.knowledge__paragraph{
    line-height: 1.7;
    margin-bottom: 15px;
}

.knowledge__img{
    width: 100%;
    display: block;
    margin-left: 100px;
}

/* Knowledge slider*/
.slider {
    width: 100%;
    overflow: hidden;
  }
  
  .slides {
    display: flex;
    transition: transform 0.5s ease;
  }
  
  .slide {
    width: 100%;
    flex: 0 0 auto;
    transition: opacity 0.5s ease;
    margin: 0; /* Remover márgenes predeterminados de figure */
  }
  
  .slide img {
    width: 100%;
    display: block; /* Evita margen debajo de la imagen */
  }
  
  /*Sensores*/

.sensor-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #b2b8fda1; /* Color del fondo */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Sombra suave para dar profundidad */
    border-radius: 10px; /* Bordes redondeados */
  }
  
  .sensor-info {
    width: 50%;
    padding: 40px;
    margin: 0; /* Remueve el margen si es que lo hay */
  }
  
  .sensor-info h2 {
    color: #003366; /* Un color oscuro para el título */
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  .sensor-info p, .sensor-info ul {
    color: #333333;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  
  .sensor-info ul {
    list-style-type: disc; /* Estilo de viñeta */
    margin-left: 20px;
    padding-left: 20px;
  }
  
  .sensor-image {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center; /* Asegura que la imagen esté centrada en su contenedor */
  }
  
  .sensor-image img {
    width: 100%; /* La imagen ocupa todo el ancho de su contenedor */
    height: auto;
    border-radius: 0; /* Remueve el borde redondeado si es necesario */
  }
  
  @media (max-width: 768px) {
    .sensor-detail {
      flex-direction: column;
    }
  
    .sensor-info, .sensor-image {
      width: 100%; /* Ocupa el 100% del ancho en dispositivos móviles */
    }
  
    .sensor-image {
      order: -1; /* Coloca la imagen encima del texto en dispositivos móviles */
    }
  }
  
  
/* Footer */

.footer{
    background-color: #1D293F;
}

.footer__title{
    font-weight: 300;
    font-size: 2rem;
    margin-bottom: 30px;
}

.footer__title, .footer__newsletter{
    color: #fff;
}


.footer__container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #fff;
    padding-bottom: 60px;
}

.nav--footer{
    padding-bottom: 20px;
    display: grid;
    gap: 1em;
    grid-auto-flow: row;
    height: 100%;
}

.nav__link--footer{
    display: flex;
    margin: 0;
    margin-right: 20px;
    flex-wrap: wrap;
}

.footer__inputs{
    margin-top: 10px;
    display: flex;
    overflow: hidden;
}

.footer__input{
    background-color: #fff;
    height: 50px;
    display: block;
    padding-left: 10px;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    border: none;
    margin-right: 16px;
}

.footer__submit{
    margin-left: auto;
    display: inline-block;
    height: 50px;
    padding: 0 20px ;
    background-color: #2091F9;
    border: none;
    font-size: 1rem;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.footer__copy{
    --padding-container: 30px 0;
    text-align: center;
    color: #fff;
}

.footer__copyright{
    font-weight: 300;
}

.footer__icons{
    margin-bottom: 10px;
}

.footer__img{
    width: 30px;
}

/* Login */
.login {
    /* Ajusta la posición verticalmente hacia arriba */
    position: relative;
    top: -600px; /* Ajusta este valor según sea necesario */
    width: 100%;
    height: 100vh;
    display: grid;
    place-items: center;
  }

.form-container {
    background-color: rgba(255, 255, 255, 0.8); /* Blanco con transparencia */
    padding: 80px; 
    border-radius: 10px;
    margin-top: -20%; /* Sube el formulario hacia arriba */
    transition: margin-top 1s; /* Para una transición suave al cargar */
}
  .logo {
    width: 100px;
    margin-bottom: 40px;
    justify-self: center;
    display: block;
    align-items: center;
  }
  .form {
    display: flex;
    flex-direction: column;
  }

  .form a{
      color: var(--black);
      font-size: var(--sm);
      text-align: center;
      text-decoration: none;
      margin-bottom: 25px;
  }
  .label, .text {
    font-size: var(--sm);
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--black);
  }
  .input {
    background-color: var(--text-input-field);
    border: none;
    border-radius: 8px;
    height: 30px;
    font-size: var(--md);
    padding: 6px;
    margin-bottom: 12px;
  }
  .primary-button {
    border-radius: 8px;
    border: none;
    color: var(--white);
    width: 100%;
    cursor: pointer;
    font-size: var(--md);
    font-weight: bold;
    height: 40px;
    transition: background-color 0.3s ease; /* Suaviza el cambio de color */
  }
  .primary-button.login-button {
    background-color: #2091F9; /* Un azul oscuro para el botón de inicio de sesión */
    color: #ffffff; /* Texto blanco para contraste */
}

.primary-button.login-button:hover {
    background-color:rgb(81, 200, 255); /* Un tono ligeramente más claro para el efecto hover */
    color: #ffffff;
}

.secondary-button {
    display: block;
    background-color: #007bff;
    color: white;
    width: 100%;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: var(--md);
    height: 40px;
    transition: background-color 0.3s ease;
    padding: 10px 0; /* Padding uniforme en top/bottom */    
    margin-bottom: 12px;
}

.secondary-button.signup-button {
    background-color: #2091F9;
    color: #ffffff;
}

.secondary-button.signup-button:hover {
    background-color: white;
    color: rgb(0, 0, 0);
}

.button-container {
    display: flex;
    justify-content: center; /* Asegura que el botón esté centrado horizontalmente */
}

  .login-button {
    margin-top: 14px;
    margin-bottom: 30px;
  }

  /*Login admin*/
  .admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4; /* Cambia este color según tu diseño */
}

.admin-form-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.admin-form-container .logo {
    display: block; /* Convierte el logo en un bloque para aplicar margin auto */
    margin-left: auto; /* Establece los márgenes laterales en automático para centrar */
    margin-right: auto;
    width: 100px; /* Ajusta el tamaño según necesites */
    margin-bottom: 20px; /* Espacio debajo del logo */
}

.admin-form-container .admin-form {
    display: flex;
    flex-direction: column;
    font-weight: bold;
    text-align: left;
}

.admin-form-container .admin-input-group {
    margin-bottom: 20px;
    font-weight: bold;
    text-align: left;
}

.admin-form-container .admin-input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333; /* Cambia este color según tu diseño */
}

.admin-form-container .admin-input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.admin-form-container .admin-submit-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #2091F9;
    color: #fff;
    margin-top: 20px;
    cursor: pointer;
}

.admin-form-container .switch-user {
    display: block;
    margin-top: 20px;
    color: #2091F9;
    text-decoration: none;
}

.admin-form-container .switch-user:hover {
    text-decoration: underline;
}

  /* Register */

  /* Estilos para el contenedor de registro */
.register-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #f4f4f4; /* Fondo del body */
}

/* Estilos para el box del registro */
.register-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px; /* Tamaño máximo del box */
}

/* Estilos para el logo en el registro */
.register-logo {
    width: 120px; /* Tamaño del logo */
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos para el título del formulario */
.register-title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

/* Estilos para las etiquetas de los campos del formulario */
.register-label {
    display: block;
    font-size: 16px;
    color: #777;
    margin-bottom: 10px;
}

/* Estilos para los inputs del registro */
.register-input {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Asegura que padding no aumente el ancho */
}

/* Estilos para el botón de registro */
.register-button {
    width: 100%;
    padding: 12px 20px;
    background-color: #5cb85c; /* Color de botón */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

.register-button:hover {
    background-color: #4cae4c; /* Color al hacer hover */
}

/* Estilos para el enlace de 'Inicia sesión' */
.register-login-link {
    display: block;
    text-align: center;
    color: #2091F9; /* Color del enlace */
    margin-top: 20px;
}

/* Media query para pantallas grandes */
@media (min-width: 768px) {
    .register-box {
        padding: 50px;
    }
}

  /* Cierre de menú para celular*/
  @media (max-width:800px){
    .nav__menu{
        display: block;
    }

    .nav__link--menu{
        position: fixed;
        background-color: var(--black);
        top: 0; 
        left: 0;
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        z-index: 100;
        opacity: 0;
        pointer-events: none;
        transition: .7s opacity;
    }

    .nav__link--show{
        --show: block;
        opacity:1 ;
        pointer-events: unset;
    }

    /* Esto oculta el botón de cerrar por defecto */
.nav__close {
    display: none;
    position: absolute;
    top: 30px;
    right: 30px;
    width: 30px;
    cursor: pointer;
    z-index: 101; /* Asegúrate de que el z-index sea superior al del menú para que aparezca encima */
}
.nav__link--show .nav__close {
        display: block; 
    }

/* Cierre de menú para ordenadores */
@media (min-width: 801px) {
    /* Siempre oculto en dispositivos no móviles */
    .nav__close {
        display: none;
    }
}

    .about__main{
        gap: 2em;
    }

    .about__icons:last-of-type{
        grid-column: 1/-1;
    }

/* Knowledge */
.knowledge {
    background-color: #e5e5f7;
    background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px), radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 50px 50px;
    overflow: hidden;
}

.knowledge__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2em;
    align-items: center;
    padding: 2em;
}

.knowledge__texts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2em;
}

@media (min-width: 768px) {
    .knowledge__texts {
        grid-template-columns: 1fr 1fr;
    }
}

.knowledge__paragraph {
    line-height: 1.7;
    margin-bottom: 15px;
}

.knowledge__list {
    margin: 0;
    padding-left: 1em;
    list-style-type: disc;
}

.knowledge__subtitle {
    margin-top: 0;
}

.knowledge__img {
    width: 100%;
    display: block;
    margin: 0 auto;
}

/* Nueva sección: Cómo Funciona Nuestro Sistema IoT */

.sensor-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f4f4f4;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin: 2em 0;
    padding: 2em;
}

.sensor-info {
    width: 50%;
    padding: 20px;
}

.sensor-info h2 {
    color: #003366;
    font-size: 2rem;
    margin-bottom: 20px;
}

.sensor-info h3 {
    color: #003366;
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.sensor-info p, .sensor-info ul {
    color: #333333;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.sensor-info ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 20px;
}

.sensor-image {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sensor-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .sensor-detail {
        flex-direction: column;
    }

    .sensor-info, .sensor-image {
        width: 100%;
    }

    .sensor-image {
        order: -1;
    }
}


    .footer__container{
        flex-wrap: wrap;
    }

    .nav--footer{
        width: 100%;
        justify-items: center;
    }

    .nav__link--footer{
        width: 100%;
        justify-content: space-evenly;
        margin: 0;
    }

    .footer__form{
        width: 100%;
        justify-content: space-evenly;
    }

    .footer__input{
        flex: 1;
    }

}

@media (max-width:600px){
    .hero__title{
        font-size: 2rem;
    }

    .hero__paragraph{
        font-size: 1rem;
    }

    .subtitle{
        font-size: 1.8rem;
    }

    .footer__title{
        justify-self: start;
        margin-bottom: 15px;
    }

    .nav--footer{
        padding-bottom: 60px;
    }

    .nav__link--footer{
        justify-content: space-between;
    }

    .footer__inputs{
        flex-wrap: wrap;
    }

    .footer__input{
        flex-basis: 100%;
        margin: 0;
        margin-bottom: 16px;
    }

    .footer__submit{
        margin-right: auto;
        margin-left: 0;
    }
}

  /* Media queries para diseños responsivos */
  @media (max-width: 768px) {
    .sensor-slide {
      flex-direction: column;
    }
    
    .sensor-content, .sensor-image {
      width: 100%;
    }
  }  
 
  html, body {
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  }