/* TODO: Variables globales de CSS */
:root {
    /* *Paleta de colores */
    --blanco: #fff;
    --oscuro: #212121;
    --primario: #ffc107;
    --secundario: #0097a7;
    --gris: #757575;
    --gris-claro: #dfe9f3;

    /* *Fuente y tipografia */
    --fuente: "Krub", sans-serif;
}

/* *Globales */
html {
    font-size: 62.5%; /* TODO: Hack para que 1rem = 10px */
    box-sizing: border-box; /* TODO: Hack para box model */
    scroll-snap-type: y mandatory;
}

*, *:before, *:after {
  box-sizing: inherit; /* TODO: Hack para box model */
}

.contenedor {
    max-width: 120rem;
    margin: 0 auto;
}

.sombra {
    box-shadow: 0px 5px 15px 0px rgba(0,0,0,0.54);
    -webkit-box-shadow: 0px 5px 15px 0px rgba(0,0,0,0.54);
    -moz-box-shadow: 0px 5px 15px 0px rgba(0,0,0,0.54);
    background-color: var(--blanco);
    padding: 2rem;
    border-radius: 1rem;
}

/* *Tipografia */
body {
    font-size: 16px; /* TODO: Hack para que 1rem = 10px */
    font-family: var(--fuente);
    background-image: linear-gradient(to top, var(--gris-claro) 0%, var(--blanco) 100%);
}

h1 {
    font-size: 3.8rem;
}

h2 {
    font-size: 2.8rem;
}

h3 {
    font-size: 1.8rem;
}

h1, h2, h3 {
    text-align: center;
}

/* *Boton */
.boton {
    background-color: var(--secundario);
    color: var(--blanco);
    padding: 1rem 3rem;
    margin-top: 1rem;
    font-size: 2rem;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: .5rem;
    width: 90%;
    border: none;
}

@media (min-width: 768px) {
    .boton {
        width: auto;
        cursor: pointer;
    }
}

/* *Utilidades */
.flex {
    display: flex;
}

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

.w-100 {
    width: 100%;
}

@media (min-width: 768px) {
    .w-100 {
        width: auto;
    }
}

/* *Header */
.titulo span {
    font-size: 2rem;
}

/* *Navegacion */
.nav-bg {
    background-color: var(--secundario);
}

.navegacion-principal {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) { /* Cel 480,  Tablet 768, PC 1140, Max: 1400 */
    .navegacion-principal {
        flex-direction: row;
        justify-content: space-between;
    }
}

.navegacion-principal a {
    padding: 1rem;
    color: var(--blanco);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
}

.navegacion-principal a:hover {
    background-color: var(--primario);
    color: var(--oscuro);
}

/* *Hero */
.hero {
    background-image: url(../img/hero.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    height: 45rem;
    position: relative;
    margin-bottom: 2rem;
}

.contenido-hero {
    position: absolute;
    background-color: rgb(0 0 0 / 70%);
    width: 100%;
    height: 100%;

    /* ?Alinear vertical y horizontalmente */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contenido-hero h2,
.contenido-hero p {
    color: var(--blanco);
}

.contenido-hero .ubicacion {
    display: flex;
    align-items: flex-end;
}

/* *Scroll snap */
.navegacion-principal,
.servicios,
.formulario {
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* *Servicios */
@media (min-width: 768px) {
    .servicios {
        display: grid;
        grid-template-columns: repeat(3 , 1fr);
        column-gap: 1rem;
    }
}

.servicio {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.servicio h3 {
    color: var(--secundario);
    font-weight: 400;
}

.servicio .iconos {
    background-color: var(--primario);
    height: 15rem;
    width: 15rem;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    border-radius: 50%;
}

.servicio p {
    line-height: 2;
    text-align: center;
}

/* *Contacto */
.formulario {
    background-color: var(--gris);
    width: min(70rem, 100%); /* Toma le valor mas pequeño */
    margin: 0 auto;
    padding: 2rem;
    border-radius: 1rem;
}

.formulario fieldset{
    border: none;
}

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

@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:last-child {
        grid-column: 1 / 3;
    }
}

.campo {
    margin-bottom: 1rem;
}

.campo label {
    display: block;
    color: var(--blanco);
    margin-bottom: .5rem;
    font-weight: 700;
}

.campo textarea {
    height: 20rem;
}

.input-text {
    border: none;
    width: 100%;
    border-radius: .5rem;
    padding: 1.5rem;
}

/* *Footer */
.footer {
    text-align: center;
}