:root{
    --blanco: #ffffff;
    --oscuro: #212121;
    --primario: #ffc107; /*ES EL COLOR QUE MAS SE VA A UTILIZAR*/
    --secundario: #0097A7;  
    --gris: #757575;
    --dorado: rgb(137, 142,29);
    --verde: rgb(30,99,49);
    --negrito: #3a3737;
}

html{
    font-size: 62.5%;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body{
    font-size: 16px;    /*1 rem = 10px*/
    font-family: "Arimo", sans-serif;
    background-image: linear-gradient(to top, #DFE9F3 0%, var(--blanco) 100%);
    margin: 0;
    padding: 0;
}

a{
    text-decoration: none;
    color: black;
}

header{
    position: relative; /* para el logo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem 4rem 2rem;
    text-align: center;
}
header img{
    position: absolute;
    top: .5rem;
    left: 2rem;
    width: clamp(8rem, 15vw, 25rem); 
    height: auto;     
}
@media (max-width: 792px) { 
    header img{ 
        position: relative; 
    } 
}
h1{
    font-size: 3em;
    text-align: center
}

header p{
    font-size: 1.3em;
    margin: 0 0 2rem 0;
}
.contenedor{
    max-width: 100rem;
    margin: 0 auto 0 auto;
    margin-bottom: 2rem;
}
.sombra{
    -webkit-box-shadow: 0px 5px 15px 0px rgba(128,128,128,0.54);
    -moz-box-shadow: 0px 5px 15px 0px rgba(128,128,128,0.54);
    box-shadow: 0px 5px 15px 0px rgba(128,128,128,0.54);
    background-color: var(--blanco);
    padding: 2rem;
    border-radius: 5rem;
}

/* Secciones */
section {
    margin: auto;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2em;
}

/*Navegacion principal*/
.nav-bg{
    background-color: var(--negrito); /*Para el fondo*/
    border-radius: 2rem;
}

.navegacion-principal{
    display: flex; /*habilita el flexbox*/
    flex-direction: column;
}

/*PAGINA RESPONSIVA CON MEDIA QUERIES*/
@media (min-width: 768px) { 
      .navegacion-principal{
        flex-direction: row;
        justify-content: space-around;
    } 
}

.navegacion-principal a{
    display: block;
    text-align: center;
    color: var(--blanco);
    text-decoration: none; /*text tiene varias funcionalidades*/
    font-size: 2rem;
    font-weight: bold; /*Para hacerlo en negritas*/
    padding: 1rem; /*Lo interpreta como si fueran 4 veces */
}

.navegacion-principal a:hover{ /*Damos otro efecto es una pseudoclase*/
    background-color: #807e7e;
    border-radius: 10rem;
    color: #222;
}
 
/* Botón hamburguesa */
.menu-btn {
  background: none;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  color: #222;
  position: absolute;
  top: 1rem;
  right: 2rem;
  z-index: 1000;
}

/* Ocultar menú en móvil */
#nav {
  display: none;
}

#nav.active {
  display: block;
}

/* En pantallas grandes mostrar nav siempre */
@media (min-width: 768px) {
  #nav {
    display: block;
  }
    .nav-bg{
        border-radius: 50rem;
    }
  .menu-btn {
    display: none;
  }
}


.parrafo {
    text-align: center;
    max-width: 70rem;
    padding: 2rem; 
    font-style: italic;
    font-size: 1.8rem;          /* Tamaño de letra más cómodo */
    line-height: 1.8;           /* Mejor legibilidad */
    color: var(--gris);         /* Usa tu paleta de colores */
    background: #f9f9f9;        /* Fondo sutil */
    border-left: 5px solid #df0000; /* Detalle tipo cita */
    border-radius: 1rem;        /* Bordes redondeados */
    margin: 2rem auto;          /* Espaciado centrado */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Sombra suave */
    transition: transform 0.3s ease;
}

.parrafo:hover {
    transform: scale(1.02);     /* Efecto al pasar el cursor */
    color: var(--oscuro);       /* Oscurece el texto */
}


/* utilidades*/
.w-100{
    width: 100%;
}
@media (min-width:768px) {
    .w-100{
        width: auto; /* despues de ese tamaño esto se acomodara automaticamente*/
    }
}

.flex{
    display: flex;
}
.alinear-derecha{
    justify-content: flex-end;
}


.boton{
    background-color: #ffffff;
    color: var(--oscuro);
    padding: 1rem 3rem;
    margin-top: 1rem;
    font-size: 2rem;
    text-decoration: none;
    text-transform: uppercase; /*asi se transforma en mayusculas*/
    font-weight: bold;
    border-radius: 5rem;
    width: 90%;
    text-align: center;
    border: none;
}
@media (min-width:768px) {
    .boton{
        width: auto;
    }
}
.boton:hover{
    cursor: pointer; 
    background-color: #c7c5c5;
    color: black;
}

/* contacto*/
.formulario{
    background-color: var(--negrito) ;
    width: min( 60rem, 100% ); /*min toma 2 parametros(valores), utiliza el valor mas pequeño, esto dependera del tamaño de la pantalla*/
    margin: 0 auto; 
    padding: .5rem;
    border-radius: 3rem;
}

.formulario fieldset{ /*el fieldset por default se coloca una linea asi que con esto se la quitamos */
    border: none;
}

.formulario legend{
    text-align: center;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2rem;
    color: white;
}

@media (min-width:768px) {

    .formulario{
        padding: 2rem;
    }
    .contenedor-campos{
        display: grid; /*distribucion del layout*/   
        grid-template-columns: repeat(2,1fr); /* cuanto se va a dividir */
        grid-template-rows: auto auto 20rem;
        column-gap: 4rem; /*separacion de las columnas*/
    }
    .campo:nth-child(3), 
    .campo:nth-child(4){ /* que hace esto? si tenemos 4 div con campos podemos elegir uno a modificar, esto inicia desde 1*/
        /* nos evitamos crear una clase extra*/
        grid-column: 1 / 3;/*para posicionar un elemento, asi le decimos que vaya de la 1 a la 3*/
    }
    .input-text{
        padding: 1rem;
    }

    .boton{
        margin-top: 5rem;
    }

}

.campo{
    margin-bottom: 1rem; /*separacion hacia abajo*/
}

.campo label{
    color: var(--blanco);
    font-weight: bold; /* lo hace mas negro*/
    margin-bottom: .5rem;
    display: block; /*cada label tomara el espacio disponible*/
}

.campo textarea{
    height: 20rem; /* altura */
}

.input-text{
    width: 100%; /* que tome todo el espacio disponible*/
    border: none; /* quitamos los bordes, todos los input tienen un border*/
    padding: .5rem;
    border-radius: 2rem;
}

footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}


.campo {
  margin-bottom: 1.5rempx;
}
.error-text {
  color: #d32f2f;
  font-size: 1.2rem;
  margin-top: .5rem;
}

.campo input,
.campo textarea {
  width: 100%;
  padding: 0.8rem;
}

.error {
  color: #d32f2f;
  font-size: 1.2rem;
}

.error-campo input,
.error-campo textarea {
  border: 0.1rem solid #d32f2f;
}

/*Ventana flotante*/
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  min-width: 26rem;
  padding: 1.5rem 2rem;
  border-radius: 0.8rem;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0rem .6rem 2rem rgba(0,0,0,.15);
  z-index: 9999;
  animation: slideIn .4s ease;
}

.toast.exito {
  background: #2e7d32;
}

.toast.error {
  background: #c62828;
}

.oculto {
  display: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(4rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
