:root {
    --blanco: #FFF;
    --negro: #111111;
    --gris: #343A40;

    --fuentePrincipal: 'Raleway', sans-serif;
}

html {
    font-size: 62.5%;
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: var(--fuentePrincipal);
    font-size: 1.6rem;
    line-height: 1.8;
}
h1, h2, h3 {
    font-weight: 900;
    line-height: 1.2;
    margin: 1rem 0 4rem 0;
}

h1{
    font-size: 4.8rem;
}
h2 {
    font-size: 5.8rem;
}
h3 {
    font-size: 5rem;
}
a {
    text-decoration: none;
}
img {
    max-width: 100%;
    display: block;
}
.contenedor {
    max-width: 120rem;
    margin: 0 auto;
    width: 90%;
}
.btn {
    color: var(--gris);
    background-color: var(--blanco);
    border: 1px solid var(--gris);
    padding: .5rem 2rem;
    transition: background-color .3s;
}
.btn:hover {
    background-color: var(--gris);
    color: var(--blanco);
}

/** Utilidades **/
.text-center {
    text-align: center;
}
.mt-5 {
    margin-top: 5rem;
}

/** Header */
.header {
    min-height: 60rem;
    background-image: url(../img/hero.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position:  center;
    padding: 5rem 0;
}
.contenido-header {
    display: flex;
    flex-direction: column;
    height: calc(60rem - 4rem);
    justify-content: space-between;
    color: var(--blanco);
}
.nombre-sitio {
    font-weight: 300;
    text-align: center;
    font-size: 3rem;
}
@media (min-width: 768px) { 
    .nombre-sitio {
        font-size: 5rem;
    }
}

.nombre-sitio span {
    font-weight: 900;
}

@media (min-width: 768px) { 
    .barra {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

.contacto {
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (min-width: 768px) { 
    .contacto {
        align-items: flex-end;
    }
}
.telefono {
    display: flex;
}
.telefono::before {
    content: '';
    display: block;
    width: 4rem;
    height: 4rem;
    background-image: url(../img/telefono.png);
    background-repeat: no-repeat;
    background-position: center center;
    margin-right: 1rem;
}

.header a {
    color: var(--blanco);
    font-size: 2rem;
}

.navegacion {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
}
@media (min-width: 768px) { 
    .navegacion {
        flex-direction: row;
    }
}
.navegacion a {
    padding: .5rem;
    transition: background-color 300ms;
    width: 100%;
    text-align: center;
}
@media (min-width: 768px) { 
    .navegacion a {
        padding: 1rem 2rem;
    }
}
.navegacion a:hover {
    background-color: rgb( 255 255 255 / .5 );
    color: var(--negro);
}

.slogan {
    text-align: center;
}
@media (min-width: 768px) { 
    .slogan {
        text-align: right;
    }
}
.slogan h1 {
    font-size: 3rem;
    margin: 0;
}
@media (min-width: 768px) { 
    .slogan h1 {
        font-size: 5rem;
    }
}
.slogan p {
    margin: 0;
    line-height: 1;
}

/** Nosotros **/
.nosotros {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    background-image: url(../img/nosotros.jpg);
    background-repeat: no-repeat;
    background-position: bottom center;
}
@media (min-width: 992px) { 
    .nosotros {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contenido-nosotros {
    background-color: var(--blanco);
    padding: 5rem;
}
@media (min-width: 992px) { 
    .contenido-nosotros {
        grid-column: 2 / 4;
    }
}
.contenido-nosotros h2, 
.contenido-nosotros p {
    margin-bottom: 1rem;
}


/** Modelos **/

.modelo {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    background-repeat: no-repeat;
    background-position: bottom center;
    margin-bottom: 5rem;
}
.modelo:last-of-type {
    margin-bottom: 0;
}

@media (min-width: 768px) { 
    .modelo {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contenido-modelo {
    padding: 5rem;
    background-color: var(--blanco);
}

.basico {
    background-image: url(../img/modelo_basico.jpg);
}
@media (min-width: 768px) { 
    .basico {
        background-position: top right;
    }
    .basico .contenido-modelo {
        grid-row: 2 / 3;
        padding: 2rem 2rem 2rem 0;
    }
}
.premier {
    background-image: url(../img/modelo_premier.jpg);
}
@media (min-width: 768px) { 
    .premier {
        background-position: top left;
    }
    .premier .contenido-modelo {
        grid-column: 2 / 3;
        padding: 2rem ;
    }
}
.elite {
    background-image: url(../img/modelo_elite.jpg);
}

@media (min-width: 768px) { 
    .elite {
        background-position: top right;
    }
    .elite .contenido-modelo {
        padding: 2rem 2rem 2rem 0;
    }
}

#modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center; 
    align-items: center;
}

/* Contenido del modal */
#modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    display: none; 
    position: relative;
}

/* Botón cerrar (X) */
.cerrar {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: black;
    cursor: pointer;
}

/* Botón de cierre */
#close-modal {
    cursor: pointer;
    background: red;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 16px;
}

/** Galeria */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    justify-items: center;
}

.imagen img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.imagen img:hover {
    transform: scale(1.05);
}

/* .galeria {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
} */
@media (min-width: 768px) { 
    .galeria {
        grid-template-columns: repeat(3, 1fr);
    }
}
.galeria img {
    object-fit: cover;
    height: 100%;
}
.galeria .imagen:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}
@media (min-width: 768px) { 
    .galeria .imagen:nth-child(2) {
        grid-column: 1 / 2;
        grid-row: 2 / 4;
    }
}
.galeria .imagen:nth-child(3) {
    grid-row: 3 / 5;
    grid-column: 2 / 3;
}
@media (min-width: 768px) { 
    .galeria .imagen:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
}

.galeria .imagen:nth-child(6) {
    grid-row: 2 / 4;
}
@media (min-width: 768px) { 
    .galeria .imagen:nth-child(6) {
        grid-column: 3 / 4;
        grid-row: 1 / 3;
    }
}

/* Modal de galería */
#modal-galeria {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#imagen-modal-galeria {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
}

/* Botón de cerrar */
#cerrar-modal-galeria {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}



.footer {
    height: 50rem;
    background-image: url(../img/footer_bg.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    color: var(--blanco);
}
.footer a {
    color: var(--blanco);
    font-size: 2rem;
}

.copyright {
    background-color: var(--negro);
    text-align: center;
    margin: 5rem 0 0 0;
    font-size: 2rem;
    padding: 1rem;
}

.barPortfolio{
    /* height: 10rem; */
    display: flex;
    gap: 1rem;
    background-color: var(--blanco);

    font-size: 2rem;
    justify-content: center;
}

.logoPortfolio{
    width: 15rem;

}