:root {
    --fondo: #f8f5e9;
    --verde-footer: #b0c5a4;
    --verde-claro: #9dc08b;
    --verde-oscuro: #3a7d44;
    --naranja: #df6d14;
    --negro: #222;

    --fuente-poppins: 'Poppins', sans-serif;
    --fuente-nunito: 'Nunito', sans-serif;
}

/* CUERPO */
body{
    display: flex;
    flex-direction: column;
    color: var(--texto-principal);
    background-color: var(--fondo);
    font-family: var(--fuente-nunito);
    font-size: 1em;
    text-align: center;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 2em 4em;
}

.logo-miferia{
    width: 50rem;
}

p{
    font-size: 1.5em;
}

h1{
    color: var(--verde-oscuro);
    font-size: 6em;
}

h2{
    color: var(--verde-oscuro);
    font-size: 4em;
}

h3{
    color: var(--verde-oscuro);
    font-size: 3em;
    margin: 0.2em;
}

h4 {
    color: var(--negro);
    font-size: 2em;
    margin: 0.2em;
    font-weight: 250;
}

.imagen-intermedia {
    max-width: 50%;
}

.paleta-color {
    width: 150px;
    height: 150px;
    margin: 2rem auto;
    border: 1px solid #666;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.youtube-video {
    display: block;
    margin: 2rem auto;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    width: 90%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Colores con las variables que ya tenés definidas en :root */
.paleta-color.fondo {
  background-color: var(--fondo);
}

.paleta-color.verde-footer {
  background-color: var(--verde-footer);
}

.paleta-color.verde-claro {
  background-color: var(--verde-claro);
}

.paleta-color.verde-oscuro {
  background-color: var(--verde-oscuro);
}

.paleta-color.naranja {
  background-color: var(--naranja);
}

.paleta-color.negro {
  background-color: var(--negro);
}




.construccion{
    color: var(--verde-oscuro);
    font-size: 2em;
    font-weight: 800;
}

.texto-naranja {
    color: #df6d14;
}

.texto-verde {
    color: #2e7d32;
}

.lista-busqueda {
  list-style: none;
  padding: 0;
  text-align: center;
  font-size: 1.4em;
  font-weight: 600;
  color: var(--verde-oscuro);
  font-family: var(--fuente-poppins);
}

.lista-busqueda li {
  max-width: 90%;
  margin: 1.5em auto;
}

.bloque-lista {
  max-width: 500px;
  width: 100%;
  padding: 1em;
  text-align: center;
}

/* Formulario */
input[type="text"] {
  width: 90%;
  height: 40px;
  background-color: #d9d9d9;
  border: none;
  border-radius: 5px;
  font-family: var(--fuente-poppins);
  font-size: 1em;
  padding: 0 1em;
  margin-top: 0.5em;
}

.formulario {
  text-align: center;
}



/* grid actividades */
.grid-actividades {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2rem;
}

.card-actividad {
  background-color: var(--verde-claro);
  padding: 1.5rem;
  border-radius: 16px;
  font-family: var(--fuente-poppins);
}

.card-actividad h3 {
  font-size: 1.2em;
  font-weight: 700;
  margin-bottom: 0.5em;
}

.card-actividad ul {
  padding-left: 1em;
  margin: 0;
}

.card-actividad li {
  margin-bottom: 0.5em;
}


/* rectangulo texto con imagen */
.fondo-verde{
    background-color: var(--verde-claro);
    padding: 2em 0;
}

.texto-imagen {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  padding: 1em 2em;
  max-width: 1200px;
  margin: 0 auto;
}

.texto-imagen img, .texto-imagen p, .texto-imagen iframe{
    padding: 1em 1em;
}

.texto-imagen p{
    max-width: 400px;
    line-height: 1.5;
}


.texto-imagen img {
  max-width: 300px;
  width: 100%;
  height: auto;
  object-fit: cover;
}


.texto-imagen iframe{
    height: 50%;
    width: 90%;
}

main .fondo-verde { /* fuerza al fondo a ocupar toda la pantalla */
    width: 100vw;
}

/* footer */
.footer {
  background-color: var(--verde-claro);
  color: var(--texto);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 2em;
  font-family: var(--fuente-poppins);
  font-size: 1em;
}

.footer-logo img {
  max-width: 180px;
  height: auto;
  margin-bottom: 1em;
}

.footer-info {
  flex: 1 1 300px;
  max-width: 600px;
  text-align: right;
}

.footer-info a {
  color: var(--verde-oscuro);
  text-decoration: none;
  font-weight: 600;
}

.footer-info a:hover {
  text-decoration: underline;
}

/* BARRA NAVEGACIÓN */
nav{
    display: flex;
    justify-content: left;
    align-items: center;
    padding: 1em 3em;
}

nav a{
    color: var(--negro);
    margin: 0 0.6em;
    padding: 1em 1.5em;
    font-size: 1em;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.1s ease;
    font-family: var(--fuente-poppins);
    font-weight: 600;
    font-size: 1em;
}

nav a:hover{
    background-color: var(--verde-oscuro);
    color: white;
    transition: background-color 0.1s ease-out;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5em;
}

nav img{
    height: 40px;
}

.seleccionado{
    background-color: var(--verde-oscuro);
    color: white;
}

.menu-toggle {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  color: var(--verde-oscuro);
  cursor: pointer;
}


/* TARJETAS */
.contenedor-integrantes{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2em;
    padding: 2em 1em;
}

.contenedor-integrantes img{
    clip-path: circle();
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.nombre-apellido{
    font-family: var(--fuente-poppins);
    font-weight: 600;
    margin: 0.4em 0 0.2em;
}

.rol{
    font-family: var(--fuente-nunito);
    margin: 0;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 220px;
    min-height: 400px;
    justify-content: space-between;
}

.card a{
    color: var(--fondo);
    background-color: var(--verde-oscuro);
    margin: 0 0.6em;
    padding: 0.7em 1.2em;
    text-decoration: none;
    border-radius: 25px;
    font-family: var(--fuente-poppins);
    font-weight: 400;
    font-size: 1em;
    transition: background-color 0.1s ease;
}

.card a:hover{
    background-color: var(--naranja);
    font-weight: 600;
}

/* BOTON VERDE */
.boton-verde {
    color: var(--fondo);
    background-color: var(--verde-oscuro);
    margin: 2em;
    padding: 0.7em 1.2em;
    text-decoration: none;
    border-radius: 25px;
    font-family: var(--fuente-poppins);
    font-weight: 400;
    font-size: 1.5em;
    transition: background-color 0.1s ease;
    cursor: pointer;

    /* CENTRADO DEL TEXTO */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.boton-verde:hover {
  background-color: var(--naranja);
}


/*  detecta si el usuario activó el modo oscuro */
.toggle-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Es el contenedor visual del switch, el "fondo" del botón deslizante. */
.toggle-slot {
  position: relative;
  height: 30px;
  width: 85px;
  border: 2px solid #e4e7ec;
  border-radius: 32px;
  background-color: white;
  box-shadow: 0px 2px 6px #e4e7ec;
  transition: background-color 250ms;
}

/* Es el círculo que se desliza de un lado a otro al cambiar de modo.*/
.toggle-button {
  transform: translate(2.2em, 0.3em);
  position: absolute;
  height: 30px;
  width: 30px;
  top: -4.9px;
  right: 36px;

  border-radius: 50%;
  background-color: #ffeccf;
  box-shadow: inset 0px 0px 0px 0.22em #ffbb52;
  transition: background-color 250ms, border-color 250ms, transform 500ms cubic-bezier(.26,2,.46,.71);
}

.toggle-checkbox:checked ~ .toggle-slot .toggle-button {
  background-color: #485367;
  box-shadow: inset 0px 0px 0px 0.22em white;
  transform: translate(-18px, 4.5px);
}

.sun-icon,
.moon-icon {
  position: absolute;
  height: 30px;
  width: 30px;
  top: -7.6px;
  left: 15px;
    
}

.sun-icon {
  color: #ffbb52;
}

.sun-icon-wrapper {
  position: absolute;
  height: 1.5em;
  width: 1.5em;
  opacity: 1;
  transform: translate(-15px, 3px) rotate(15deg);
  transform-origin: 50% 50%;
  transition: opacity 150ms, transform 500ms cubic-bezier(.26,2,.46,.71);
}

.toggle-checkbox:checked ~ .toggle-slot .sun-icon-wrapper {
  opacity: 0;
  transform: translate(50px, 20px) rotate(0deg);
}

.moon-icon {
  color: rgb(255, 255, 255);
}

.moon-icon-wrapper {
  position: absolute;
  height: 90px;
  width: 48px;
  right: 35px;
  opacity: 0;
  transform: translate(-15px, 3px) rotate(15deg);
  transform-origin: 50% 50%;
  transition: opacity 150ms, transform 500ms cubic-bezier(.26,2.5,.46,.71);
}

.toggle-checkbox:checked ~ .toggle-slot .moon-icon-wrapper {
  opacity: 1;
  transform: translate(3em, 0.5em) rotate(-15deg);
}

/* SWITCH MODO OSCURO */

.switch-modo {
    position: fixed;
    top: 18px;
    right: 32px;
    z-index: 1000;
}

body.modo-oscuro {
  background-color: #23272f;
  color: #f8f5e9;
  transition: background 0.3s, color 0.3s;
}

body.modo-oscuro .moon-icon {
  color: #494545c7;
}

body.modo-oscuro nav a {
  color: #fff;
}

.fondo-verde.modo-oscuro {
  background-color: #499b5577;
}

.card-actividad.modo-oscuro {
  background-color: #499b5577;
  color: #fff !important;
  border-color: #ffffff !important
}

.card-actividad.modo-oscuro h3 {
  color: #ffba52ba;
}

footer.modo-oscuro {
  background-color: #499b5577;
  color: #f8f5e9;
}

body.modo-oscuro #gd {
  color: #ffba52ba;
}

body.modo-oscuro h4 {
  color: #fff !important;
}

/* RESPONSIVE MEDIA QUERYS  */


@media (max-width: 1100px) {
    main {
        padding: 2em 1em;
    }
    h1 {
        font-size: 4em;
    }
    h2 {
        font-size: 2.5em;
    }
    h3{
        font-size: 2em;
    }
    .contenedor-integrantes {
        gap: 1em;
    }
    .card {
        min-height: 350px;
        max-width: 180px;
    }
    .contenedor-integrantes img {
        width: 150px;
        height: 150px;
    }

    .texto-imagen {
        flex-direction: column;
        align-items: center;
    }

    .texto-imagen img {
        width: 90%;
        max-width: 400px;
        margin-top: 1em;
    }

    .bloque-lista {
        width: 90%;
        max-width: 600px;
    }

    .footer-info {
        text-align: center;
    }

    nav {
    padding: 1em 2em;
    justify-content: space-between;
    }

    nav a {
        font-size: 0.95em;
        padding: 0.8em 1.2em;
    }

    .nav-links {
        gap: 1em;
  }
}
    


@media (max-width: 800px) {
    main {
        padding: 1em 0.5em;
    }
    .contenedor-integrantes {
        flex-wrap: wrap;
        gap: 1em;
    }
    
    .card {
        min-height: 320px;
        max-width: 95vw;
    }
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3{
        font-size:1.3em;
    }
    .grid-actividades {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-info {
        max-width: 100%;
        text-align: center;
    }

    nav {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.8em;
        margin-top: 1em;
    }

    nav img {
        margin-bottom: 1em;
    }

    .menu-toggle {
        display: block;
        align-self: flex-start;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
    }

    .youtube-video {
        width: 80%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 600px) {
    .contenedor-integrantes {
        flex-direction: column;
        align-items: center;
        gap: 1.2em;
        padding: 1em 0.2em;
    }
    .card {
        min-height: unset;
        max-width: 98vw;
        width: 100%;
        padding: 1em 0.5em;
    }
    .contenedor-integrantes img {
        width: 110px;
        height: 110px;
    }
    h1, h2, h3 {
        font-size: 1.2em;
    }
    .texto-imagen {
        flex-direction: column;
        padding: 0.5em;
    }
    .texto-imagen img {
        width: 100%;
        padding: 0.5em 0;
    }
    .texto-imagen p {
        max-width: 100%;
        padding: 0.5em 0;
    }
    .logo-miferia {
        width: 420px ;
        height: 250px ;
    }

    .footer-logo img {
        max-width: 140px;
    }

    .footer {
        padding: 1.5em;
        font-size: 0.95em;
    }

    nav a {
        padding: 0.6em 1em;
        font-size: 0.9em;
    }

    .nav-links {
        gap: 0.6em;
    }

    nav {
        padding: 1em;
    }

    .youtube-video {
        width: 70%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .fondo-verde .texto-imagen {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem;
    }

    .fondo-verde .texto-imagen p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: center;
        padding: 0 0.5rem;
    }

    .fondo-verde .texto-imagen iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 8px;
    }


/* SWITCH MODO OSCURO use el important porque se me tababa cuando lo modificaba*/
    .switch-modo {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        transform: scale(0.7);
        z-index: 2000;
        background: white;
        border-radius: 50px;
        padding: 2px 4px;
        box-shadow: 0 2px 8px #0001;
    }
    .toggle-slot {
        width: 48px;
        height: 18px;
    }
    .toggle-button,
    .sun-icon,
    .moon-icon,
    .sun-icon-wrapper,
    .moon-icon-wrapper {
        width: 16px;
        height: 16px;
    }
}