:root {
    --maxVentana: 1920px;

    --color1: #ffffff;
    --color2: #f8efe1;
    --color3: #f1f1f1;
    --color4: #f4a524;
    --color5: #828287;
    --color6: #c6bfb5;

    --colorTexto1: #1d1e1f;
    --colorTexto2: #858486;

    --espaciosLateral: 10%;
    /* 192px */

    --headerHeight: 92px;
    --headerEspacioLeft: 1.30%;
    --headerEspacioRight: 4.68%;

    --maxHeightCarrusel: 650px;

    /* Tipografía: equivalencias con una raíz de 16px */
    --texto-principal: 1.625rem;
    /* 26px */
    --texto-titulo: 2.34375rem;
    /* 37.5px */
    --texto-tarjeta: 1.25rem;
    /* 20px */
    --texto-leer-mas: 1.375rem;
    /* 22px */
    --texto-boton: 1rem;
    /* 16px */
    --texto-footer: 1rem;
    /* 16px */
    --texto-enlaces-footer: 0.875rem;
    /* 14px */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    max-width: var(--maxVentana);
    margin: 0 auto;

    display: grid;
    grid-template-rows: repeat(3, min-content);
    grid-template-areas: "header" "main" "footer";

    font-family: "Times New Roman", Times, Baskerville, Georgia, serif;
    text-align: left;
    line-height: 1.6;

    font-size: var(--texto-principal);
    font-weight: normal;

    color: var(--colorTexto2);
}

header,
h2 {
    color: var(--colorTexto1);
}

h2 {
    font-size: var(--texto-titulo);
    font-weight: lighter;
}


.btn1 {
    background-color: var(--color4);
    color: white;
    padding: 15px 11px;
    border: none;
    font-size: var(--texto-boton);
}

.btn2 {
    background-color: white;
    border: 1px solid var(--color4);
    color: var(--color4);
    padding: 15px 11px;
    font-size: var(--texto-boton);
}


/*------------
|   HEADER   |
-------------*/
header {
    grid-area: header;
    height: var(--headerHeight);
    padding-left: var(--headerEspacioLeft);
    padding-right: var(--headerEspacioRight);

    display: grid;
    grid-template-columns: 2fr 7fr 1fr;
    grid-template-areas: "logo nav utilidades";
    align-items: center;
}

#hamburguesa{
    grid-area: hamburguesa;
    display: none;
}

header>div:first-child {
    grid-area: logo;

    display: grid;
    align-items: center;
    justify-items: start;
}

header>div:first-child>img {
    width: 150px;
    height: auto;
    object-fit: contain;
}

header>nav {
    grid-area: nav;
}

header>div:last-of-type {
    grid-area: utilidades;
    text-align: center;
}

header>nav>ul {
    display: grid;
    grid-template-columns: repeat(7, auto);
    align-items: center;
    justify-items: end;

    list-style: none;

    align-items: center;
}

/*------------
|    MAIN    |
-------------*/
main {
    grid-area: main;
    display: grid;
    grid-template-rows: repeat(5, max-content);
}

main>*:not(aside) {
    padding: 0 var(--espaciosLateral);
}

/* BANNER */
main>aside {
    position: relative;
    height: var(--maxHeightCarrusel);
    background-color: var(--color2);
}

.carrusel-boton {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--color1);
    color: var(--color5);
    cursor: pointer;
}

/* Dos bordes forman una flecha fina, independiente de la fuente. */
.carrusel-boton::before {
    content: "";
    width: 18px;
    height: 18px;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateX(4px) rotate(45deg);
}

.carrusel-boton--anterior {
    left: 74px;
}

.carrusel-boton--siguiente {
    right: 74px;
}

.carrusel-boton--siguiente::before {
    transform: translateX(-4px) rotate(225deg);
}

.carrusel-boton:focus-visible {
    outline: 2px solid var(--colorTexto1);
    outline-offset: 4px;
}

main>section>* {
    width: fit-content;
    margin: 0 auto;
}

main>section:nth-child(odd) {
    background-color: var(--color3);
}

main>section>button {
    display: block;
}

/* SECTION 1 */


main>*:nth-child(2)>h2 {
    margin-top: 90px;
    margin-bottom: 38px;
}

main>*:nth-child(2)>p{
    text-align: center;
}

main>*:nth-child(2)>div {
    margin-top: 68px;
    margin-bottom: 42px;

    width: 100%;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.services-type {
    flex: 0 1 22rem;
    min-width: 0;

    display: grid;
    grid-template-columns: min-content minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;

    text-align: center;
}

main>*:nth-child(2)>div>div>div:first-child {
    color: var(--color4);
}

main>*:nth-child(2)>div>div>div {
    display: inline-block;
}

main>*:nth-child(2)>button {
    margin-bottom: 108px;
}

/* SECTION 2 */
main>*:nth-child(3)>h2 {
    margin-top: 120px;
    margin-bottom: 38px;
}

main>*:nth-child(3)>div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    justify-items: center;
    margin-bottom: 70px;
}

.cardNews {
    background-color: white;
    display: grid;
    grid-template-rows: repeat(2, 1fr) max-content;
    width: 100%;
    max-height: 624px;
    padding-bottom: 34px;
    font-size: var(--texto-tarjeta);
}

.cardNews>img {
    width: 100%;
    max-height: 312px;
    object-fit: cover;
    margin-bottom: 25px;
}

.cardNews>*:not(img) {
    margin: 0 30px;
    width: fit-content;
}

.cardNews>div {
    display: grid;
    grid-template-rows: repeat(2, max-content);
    align-content: space-evenly;
    gap: 36px;
}

.cardNews>div>strong {
    display: block;
    color: black;
    line-height: 1.2;

}

.cardNews>div>p {
    width: 70%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.cardNews>button {
    margin-top: 24px;
    align-content: end;
}

.btnReadmore {
    height: fit-content;
    background-color: unset;
    border: none;
    font-family: inherit;
    font-size: var(--texto-leer-mas);
    font-weight: bolder;
    color: var(--colorTexto2);
}


/* SECTION 3 */
main>*:nth-child(4) {
    display: grid;

    grid-template-columns: 38% 30%;
    justify-content: center;
    padding-top: 57px;
    padding-bottom: 58px;
    gap: 7%;
}

main>*:nth-child(4)>div {
    margin-top: 35px;
}

main>*:nth-child(4)>img {
    width: 100%;
    max-height: 475px;
    object-fit: cover;
}

main>*:nth-child(4)>div>button {
    margin-top: 60px;
}

/* SECTION 4 */
main>*:nth-child(5) {
    padding-top: 98px;
    padding-bottom: 48px;
}

main>*:nth-child(5)>h2 {
    margin-bottom: 56px;
}

main>*:nth-child(5)>button {
    margin-top: 18px;
}

/*-------------
|    FOOTER    |
---------------*/

footer {
    grid-area: footer;
    background-color: var(--color2);
    display: grid;
    justify-items: end;
    font-size: var(--texto-footer);
    padding: 40px var(--espaciosLateral);
    font-family: Arial, Helvetica, sans-serif;
}

footer>nav {
    width: 75%;
}

footer a {
    text-decoration: none;
    color: var(--colorTexto2);
}

footer strong {
    display: block;
}


/* ENLACES */
.footer-enlaces {
    border-bottom: 1px solid var(--colorTexto1);
    padding-bottom: 6px;
}

.footer-enlaces strong {
    color: var(--colorTexto1);
}

.footer-enlaces {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    list-style: none;
}

.footer-enlaces>li>strong {
    margin-bottom: 32px;
}

.footer-enlaces>li>ul {
    list-style: none;
    font-size: var(--texto-enlaces-footer);
    line-height: 1.3;
    display: grid;
}

.footer-enlaces>li>ul>li {
    padding: 10px 0;
}

/* REDES */
footer>nav>strong {
    margin-top: 16px;
    display: block;
    color: var(--colorTexto1);
}

.footer-redes {
    list-style: none;
}

.footer-redes ul {
    list-style: none;
}

.footer-redes>li {
    display: grid;
    grid-template-columns: 1fr 6fr;
    align-items: center;
    padding: 16px 0;

}

.footer-redes>li>ul {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;

}