/*General*/
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Poppins', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    background-color: #212529;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body{
    height: 100%;
    margin: 0;
}

/* Las anclas del menú no quedan tapadas por el encabezado. */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 2rem; }

/*Header*/

.indexHeader{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 1.25rem 2.5rem;
}

.indexHeader img{
    max-height: 4.5rem;
    height: 4.5rem;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-right: 1rem;
    font-size: 1rem;
}

.listaHeader{
    display: flex;
    gap: 2rem;
    list-style: none;
}

.listaHeader a{
    text-decoration: none;
    color: #023dff;
    font-weight: 500;
}

.btn-contacto{
    background-color: #ff7c02;
    color: #080808;
    padding: 0.6rem 1.6rem;
    border-radius: 1.5rem;
    text-decoration: none;
    font-weight: 500;
}

.btn-contacto:hover{
    background-color: #fca75d;
    transition: 0.3s;
}

/* Acceso al sistema. En azul y no en naranja: el naranja es el botón de
   captar clientes nuevos, y este es para los que ya lo son. Que se
   distingan evita que uno tape al otro. */
.btn-clientes{
    background-color: #023dff;
    color: #ffffff;
    padding: 0.6rem 1.6rem;
    border-radius: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.btn-clientes:hover{
    background-color: #3a68ff;
    transition: 0.3s;
}

.header-nav {
    gap: 1.5rem;
}

/*Inicio*/

body #nosotros,
.inicioBody #nosotros,
section#nosotros {
    background-color: #cfd6dd;
    color: #212529;
    padding: 4rem 1.5rem;
    text-align: center;
}

.seccion-nosotros {
    background-color: #cfd6dd;
    margin: 0;
    padding: 3.75rem 1.25rem;
    text-align: center;
    color: #212529;
}

#nosotros h2,
.seccion-nosotros h2 {
    font-size: 2rem ;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

#nosotros p,
.seccion-nosotros p {
    font-size: 1.4rem;
    max-width: 50rem;
    margin: 0 auto;
    line-height: 1.6;
}

/*Main*/

.contenedorPrincipal img{
    width: 100%;
    height: auto;
    display: block;
    flex: 1;
}

#servicios{
    text-align: center;
    background: #eef4f8;
    padding: 4rem 1rem;
}

#servicios h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #333;
}

.contenedorCards{
    background-color: #eef4f8;
    display: grid;
    /* auto-fit con guion: sin él la regla es inválida y las tres tarjetas
       quedaban una debajo de la otra en vez de en fila. */
    grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
    gap: 2.5rem;
    max-width: 75rem;
    margin: auto;
    padding: 2rem;
}

.card{
    background-color: #eef4f8;
    border-radius: 0.8rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 .25rem .625rem #4e4e4e;
    transition: 0.3s;
}

.card:hover{
    transform: translateY(-0.625rem);
    box-shadow: 0 0.8rem 1.4rem #ffb589;
}

.contenedorCards h3{
    color: #000;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.contenedorCards p{
    color: #333;
    font-size: 1.4rem;
    line-height: 1.6;
}

#empresas{
    background-color: #343a40;
    padding: 3.75rem 1.25rem;
    margin: 0;
    width: 100%;
    font-size: 1.4rem;
    color: #ffffff;
}

#empresas h2{
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
    margin: 0 0 1.25rem 0;
    color: #ffffff;
}

#empresas p{
    font-size: 1.5rem;
    margin: 0 auto;
    max-width: 56.25rem;
    color: #f0f0f0;
    text-align: center;
    line-height: 1.8;
}

/* El acceso al sistema, al final de la sección de empresas. */
.empresas-acceso {
    text-align: center;
    margin-top: 2.5rem !important;
}

.btn-acceso-grande {
    display: inline-block;
    background-color: #ff7c02;
    color: #ffffff !important;
    padding: 1rem 2.8rem;
    border-radius: 3.125rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: 0.3s;
}

.btn-acceso-grande:hover {
    background-color: #fca75d;
    transform: scale(1.04);
}

#contacto{
    background-color: #eef4f8;
    padding: 3.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

.titForm{
    color: #8f8f8f;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 50rem;
}

.contenedor-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    width: 100%;
    max-width: 62.5rem;
}

#contacto label{
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 500;
    font-size: 1.2rem;
}

.grupo-input{
    margin-bottom: 1.5625rem;
}

#contacto input,
#contacto textarea{
    width: 100%;
    background-color: transparent;
    border: .0625rem solid #dadada;
    border-radius: .5rem;
    padding: .75rem;
    font-size: 1.3rem;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

#contacto input:focus,
#contacto textarea:focus{
    border-color: #ff7c02;
    box-shadow: 0 0 .5rem #ff7c024d;
}

.col-derecha {
    display: flex;
    flex-direction: column;
}

#comentarios{
    flex-grow: 1;
    resize: none;
    min-height: 12.5rem;
}

#boton{
    background-color: #ff7c02;
    color: white;
    border: none;
    padding: .9375rem 3.125rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 3.125rem;
    cursor: pointer;
    margin-top: 2.5rem;
    transition: 0.3s;
}

#boton:hover{
    background-color: #f0c39b;
    transform: scale(1.05);
}

.piePagina{
    background-color: #212529;
    color: #adb5bd;
    padding: 3.125rem 1.25rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-top: 0;
}

.piePagina article {
    max-width: 37.5rem;
    margin: 0 auto;
}

a{
    color: #ff7c02;
}

.piePagina h3 {
    color: #8f8f8f;
    font-size: 2.2rem;
    margin-bottom: .9375rem
}

.contactoComercial {
    font-size: 1.3rem;
    color: #ccc;
    margin-top: .625rem;
}

.copyright {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: .0625rem solid #ffffff1a;
    font-size: 0.8rem;
    color: #d3d3d3;
}

@media (min-width: 1024px) and (max-width: 1440px) {
    .indexHeader {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .indexHeader img:first-child {
        max-width: 220px;
        height: auto;
    }

    .header-nav ul {
        display: flex;
        gap: 0.7rem;
        padding: 0;
    }

    .header-nav ul li a {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .btn-contacto, .btn-clientes, #boton {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: auto;
    }
}

@media (min-width: 320px) and (max-width: 768px){

    .indexHeader {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
        padding: 1rem 1.25rem;
    }

    .indexHeader img:first-child{
        max-width: 220px;
        height: auto;
    }

    .header-nav{
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.9rem;
        width: 100%;
    }

    .header-nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.9rem 1.4rem;
        padding: 0;
    }

    .header-nav ul li a {
        font-size: 0.95rem;
        white-space: nowrap;
    }

    /* Los dos botones en fila, para no comerse la pantalla a lo alto. */
    .header-nav > a {
        display: inline-block;
    }

    .contenedorCards {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .contenedor-grid {
        grid-template-columns: 1fr;
    }

    .titForm {
        font-size: 1.5rem;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    section, #contacto, .piePagina {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .seccion-nosotros p {
        font-size: 1.28rem;
        line-height: 1.5;
    }

    #empresas p{
        font-size: 1rem;
    }

    .contenedorCards p{
        font-size: 1rem;
    }

    #nosotros p{
        font-size: 1rem;
    }

    h1{
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.7rem;
        text-align: center;
    }

    p {
        font-size: 1.2rem;
    }

    .btn-contacto, .btn-clientes, #boton{
        display: inline-block;
        width: auto;
        min-width: 150px;
        padding: 8px 15px;
        margin-top: 5px;
        text-align: center;
        border-radius: 20px;
        font-size: .90rem;
    }

    .btn-acceso-grande {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 400px){

    .indexHeader img:first-child{
        max-width: 170px;
    }

    .header-nav > a {
        width: 100%;
        max-width: 220px;
        text-align: center;
    }

    .header-nav ul {
        gap: 0.7rem 1rem;
    }

    .header-nav ul li a {
        font-size: 0.88rem;
    }
}
