/* ==========================================================================
   Fonts
   ========================================================================== */
@font-face {
    font-family: "Ubuntu Sans";
    src: url("fonts/ubuntu-sans-latin.woff2") format("woff2");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --mainBlue: rgb(0, 140, 209);
    --mainGreen: rgb(160, 235, 150);
    --contactGreen: rgb(0, 199, 90);
    --mainWhite: rgb(255, 255, 255);
    --mainGrey: #eeeeee;
    --heroOverlay: rgba(29, 30, 32, 0.27);
    --bs-body-font-family: "Ubuntu Sans", sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
html {
    scroll-padding-top: 80px;   /* about your navbar's height */
}

/* ==========================================================================
   Header
   ========================================================================== */
header.navbar {
    --bs-navbar-color: var(--mainWhite);
    --bs-navbar-hover-color: var(--mainGreen);
    --bs-navbar-active-color: var(--mainGreen);
    --bs-navbar-nav-link-padding-x: 0.75rem;
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    --bs-navbar-toggler-border-color: transparent;
    --bs-navbar-toggler-focus-width: 0;
    background: var(--mainBlue);
    padding: 14px 12px;
}

header .container {
    max-width: 1240px;
}

header .navbar-brand {
    padding: 0;
}

header .navbar-brand img {
    width: 205px;
    height: auto;
}

header .nav-link {
    font-size: 1rem;
    text-transform: uppercase;
}

header .nav-link:hover,
header .nav-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 7px;
}

@media (min-width: 992px) {
    header.navbar {
        padding: 9px 0;
    }

    header .navbar-brand img {
        width: 156px;
    }

    header .nav-link {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */
#hero {
    min-height: 546px;
    padding: 64px 0;
    background:
        linear-gradient(var(--heroOverlay), var(--heroOverlay)),
        url("../img/hero.avif") center top / cover no-repeat;
    text-transform: uppercase;
}

#hero h1 {
    font-weight: 800;
    font-size: 2.5rem;       /* 40px */
    line-height: 1;
    max-width: 20.5rem;      /* 360px, same as the live site */
    margin-inline: auto;     /* keep it centered */
}

#hero p {
    font-size: 0.875rem;     /* 14px */
    padding-block: 0.5rem;
}

@media (min-width: 921px) {
    #hero {
        min-height: 687px;
    }

    #hero h1 {
        font-size: 3.3125rem;  /* 53px */
        line-height: 1.3;
        max-width: none;
    }

    #hero p {
        font-size: 1.3125rem;  /* 21px */
        line-height: 1.3;
        padding-block: 0;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-contact {
    --bs-btn-color: var(--mainWhite);
    --bs-btn-bg: var(--contactGreen);
    --bs-btn-hover-color: var(--mainWhite);
    --bs-btn-hover-bg: rgba(0, 199, 90, 0.44);
    --bs-btn-active-color: var(--mainWhite);
    --bs-btn-active-bg: var(--contactGreen);
    --bs-btn-font-weight: 700;
    --bs-btn-font-size: 0.75rem;   /* 12px */
    --bs-btn-padding-y: 13px;
    --bs-btn-padding-x: 24px;
    letter-spacing: 0.22em;
}

@media (min-width: 921px) {
    .btn-contact {
        --bs-btn-font-size: 0.875rem;  /* 14px */
        --bs-btn-padding-y: 14px;
        --bs-btn-padding-x: 28px;
    }
}

/* ==========================================================================
   Services (shared by #disenio and #instalacion)
   ========================================================================== */
.services {
    padding: 48px 0;
}

section h2 {
    font-weight: 700;
    font-size: 2rem;             /* 32px */
    text-transform: uppercase;
}

.intro {
    max-width: 20.5rem;          /* 328px */
    margin: 0 auto 4rem;
    font-size: 0.875rem;         /* 14px */
}

.services .cards {
    display: grid;
    gap: 3rem 1.5rem;
    max-width: 22rem;
    margin-inline: auto;
}

.services .boxed {
    gap: 1.5rem;
}

.services .boxed article {
    padding: 1.5rem;
    background: rgba(0, 140, 209, 0.54);
}

.services article > * {
    max-width: 17rem;
    margin-inline: auto;
}

.services h3 {
    font-weight: 700;
    font-size: 1rem;             /* 16px */
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--mainGreen);
}

.services article p {
    font-size: 0.875rem;         /* 14px */
    text-align: justify;
}

@media (min-width: 921px) {
    section h2 {
        font-size: 2.6875rem;    /* 43px */
    }

    .intro {
        max-width: 50rem;
        font-size: 1.3125rem;    /* 21px */
        line-height: 1.3;
    }

    .services .cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 68rem;
    }

    .services h3 {
        font-size: 1.125rem;     /* 18px */
        min-height: 3em;         /* align 1- and 2-line titles */
        display: grid;
        place-items: center;
    }

    .services article p {
        font-size: 1rem;         /* 16px */
        line-height: 1.38;
    }
}

/* ==========================================================================
   Diseño
   ========================================================================== */
#disenio {
    position: relative;
    background: var(--heroOverlay);
}

#disenio video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

#disenio img {
    display: block;
    height: 120px;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Instalación
   ========================================================================== */
#instalacion {
    padding-bottom: 204px;
    background: url("../img/instalacion.jpg") center / cover fixed;
}

@media (min-width: 921px) {
    #instalacion {
        padding-bottom: 520px;
    }

    #instalacion .intro {
        margin-bottom: 15rem;
    }
}

/* ==========================================================================
   Servicio técnico
   ========================================================================== */
#servicio-tecnico {
    padding-bottom: 110px;
    background: url("../img/servicio-tecnico.jpg") center top / cover fixed;
}

#servicio-tecnico article p {
    text-align: center;
}

@media (min-width: 921px) {
    #servicio-tecnico {
        padding-bottom: 395px;
    }

    #servicio-tecnico .intro {
        margin-bottom: 17rem;
    }
}

/* ==========================================================================
   Quienes somos
   ========================================================================== */
#quienes-somos {
    padding: 56px 0 96px;
    background: url("../img/quienes-somos.jpg") center top / cover fixed;
}

#quienes-somos p {
    max-width: 16.5rem;          /* 264px */
    margin: 5rem auto 0;
    font-size: 0.875rem;         /* 14px */
    line-height: 1.5;
}

@media (min-width: 921px) {
    #quienes-somos {
        padding: 216px 0 372px;
    }

    #quienes-somos p {
        max-width: 35.5rem;      /* 568px */
        margin-top: 1.25rem;
        font-size: 1rem;         /* 16px */
    }
}

/* ==========================================================================
   Contacto
   ========================================================================== */
#contacto {
    padding: 48px 0 64px;
    background:
        linear-gradient(rgba(29, 30, 32, 0.31), rgba(29, 30, 32, 0.31)),
        url("../img/contacto.jpg") center bottom / cover fixed;
}

#contacto .intro {
    max-width: 11rem;            /* 2 lines on mobile, like the live site */
}

#contacto form {
    max-width: 19.5rem;          /* 312px */
    margin-inline: auto;
    text-align: start;
}

#contacto .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;        /* 15px */
    font-weight: 500;
    text-transform: uppercase;
}

#contacto .form-control {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 21px;
    font-size: 0.625rem;         /* 10px */
    font-weight: 500;
    color: #1a1a1a;
}

#contacto .form-control::placeholder {
    color: inherit;
    opacity: 0.5;
}

#contacto .form-control:hover,
#contacto .form-control:focus {
    background-color: var(--mainBlue);
    color: var(--mainGreen);
    box-shadow: none;
}

#contacto .btn-contact {
    --bs-btn-bg: var(--mainBlue);
    --bs-btn-hover-bg: var(--mainGreen);
    --bs-btn-active-bg: var(--mainBlue);
    --bs-btn-padding-y: 5px;
    --bs-btn-padding-x: 40px;
    display: block;
    margin-inline: auto;
}

#contacto .hp-field {
    position: absolute;
    left: -9999px;
}

#contacto .form-status {
    margin: 1rem 0 0;
    text-align: center;
}

#contacto .form-status:empty {
    display: none;
}

@media (min-width: 921px) {
    #contacto {
        padding-bottom: 144px;
    }

    #contacto .intro {
        max-width: none;         /* one line on desktop */
    }

    #contacto .form-label {
        font-size: 0.8125rem;    /* 13px */
    }

    #contacto .form-control {
        font-size: 0.75rem;      /* 12px */
    }

    #contacto .btn-contact {
        --bs-btn-font-size: 0.9375rem;  /* 15px */
    }    
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    padding: 48px 0;
    background: var(--mainBlue);
    font-size: 0.9375rem;        /* 15px */
    font-weight: 500;
}

footer a {
    color: inherit;
    text-decoration: none;
}

.footer-top,
footer address {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
    margin: 0;
}

.footer-logo {
    width: 143px;
}

.credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin: 2.5rem 0 0;
    font-size: 0.6875rem;        /* 11px */
    font-weight: 400;
}

.credits span {
    max-width: 250px;
}

@media (min-width: 921px) {
    footer {
        padding-bottom: 80px;
        font-size: 0.8125rem;    /* 13px */
    }

    .footer-top,
    footer address {
        flex-direction: row;
    }

    .footer-top {
        justify-content: space-between;
        max-width: 64rem;
        margin-inline: auto;
    }

    footer address {
        gap: 4rem;
    }

    .footer-logo {
        width: 114px;
    }

    .credits {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        margin-top: 4.5rem;
        font-size: 0.75rem;      /* 12px */
    }

    .credits span {
        max-width: 64rem;
}

}

/* ==========================================================================
   WhatsApp button
   ========================================================================== */
.whatsapp {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 1030;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--contactGreen);
    color: var(--mainWhite);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
