/* Estilos generales */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 2.8rem;
}
.contenedor{
    max-width: 1400px;
    margin: 0 auto;
}
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-image: url(fondo2.webp);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Header */
.header {
    text-align: center;
    padding: 20px;
    background: #1c1c1c;
}

.header__logo img {
    width: 10vw;
    max-width: 250px;
    min-width: 100px;
    height: auto;
    animation: logoAnimation 5s ease-in-out infinite alternate;
}
@keyframes logoAnimation {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Menú */
.menu {
    position: sticky;
    top: 0;
    background: #333;
    padding: 1rem 0;
    text-align: center;
    z-index: 1000;
}

.menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.menu__item {
    margin: 0 15px;
}

.menu__link {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 10px;
    display: block;
    transition: all 0.5s;
}
.menu__link:hover{
    color:yellow;
    text-decoration: underline;
}

.menu__toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
}

/* Ícono del menú hamburguesa */
.menu__toggle::before {
    content: "☰"; /* Icono hamburguesa */
    font-size: 2rem;
}

/* Cuando el menú está activo, cambia el ícono */
.menu.active .menu__toggle::before {
    content: "✖"; /* Icono de cruz */
}

/* Secciones */
.section {
    padding: 2.5rem;
    text-align: center;
}
.section__title{
    font-size:clamp(1.5rem,4vw,2.5rem) ;
    margin-bottom: 1.5rem;
}
.section__title--sub{
    font-size:clamp(1.3rem,3.5vw,2rem) ;
    margin-bottom: 1.5rem;
}
.section__text{
    font-size:clamp(1.2rem,3vw,1.4rem);
    margin-bottom: 1rem;
}
.section--inicio {
    position: relative;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(to bottom,rgba(255, 255, 255, 0.394),rgba(253, 0, 0, 0.437)),
                url('fondo_inicio.jpg'); 
    background-position:center center ;
    background-repeat: no-repeat  ;
    background-size:cover ;
}

.section--inicio h2,
.section--inicio h1 {
    position: relative;
    color: white;
    margin: 0;
    padding: 10px;
    color:yellow;
    text-shadow: 4px 4px 2px rgba(0, 0, 0, 1);
}

.section--inicio h2 {
    font-size: clamp(3rem,5vw,5rem);
}

.section--inicio h1 {
    font-size: clamp(2rem,4vw,4rem);
}

/* Historia/Nosotros */
.section--nosotros{
    background-image: linear-gradient(to bottom, rgba(146, 201, 230, 0.85),rgba(39, 162, 228, 0.85));
}
.historia__grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.historia__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 5px 2px -1px rgba(0, 0, 0, 0.847);
    transition: all 0.5s;
}
.historia__image:hover{
    transform: scale(1.05);
}

/* Galería */
.section--galeria{
    background-image: linear-gradient(to bottom, rgba(39, 162, 228, 0.85),rgba(22, 93, 131, 0.85));
}
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.galeria__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 1rem;
    box-shadow: 0 5px 2px -1px rgba(0, 0, 0, 0.847);
    transition: all 0.5s;
}
.galeria__image:hover{
    transform: scale(1.07);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
}

.modal__content {
    width: 80%;
    max-width: 600px;
    transition: 0.3s;
    position: relative;
    top:50%;
    transform: translateY(-50%);
    border:2px solid white;
}

.modal__close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.modal__prev,
.modal__next {
    position: absolute;
    top: 50%;
    font-size: 30px;
    color: white;
    cursor: pointer;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    transition: 0.3s;
}

.modal__prev {
    left: 15px;
}

.modal__next {
    right: 15px;
}

.modal__prev:hover,
.modal__next:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Contacto */
.section--contacto{
    background-color: #adadad;
    border-top: 2px solid rgb(60, 60, 60);
    border-bottom: 2px solid rgb(220, 220, 220);
    background-image: url(grua2.png);
    background-repeat: no-repeat;
    background-position: 98% ;
    background-size: 10vw;
}

.phone-link{
    display:block;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color:rgb(255, 59, 59);
    font-weight: bold;
    letter-spacing: 0.1em;
    cursor: pointer;
}
.mapa{
    margin-bottom: 1rem;
    border-radius: 1rem;
    box-shadow: 0 5px 2px -1px rgba(0, 0, 0, 0.847);
}
/* Footer */
.footer {
    background: #1c1c1c;
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.footer__text {
    font-size: 1.2rem;
    margin: 1rem;
}
.footer__link{
    color:rgb(213, 213, 213);
}
.footer__link-img{
    width:3rem;
    vertical-align: middle;
    margin-left: 0.5rem;
}
/* Redes Sociales */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    filter: drop-shadow(0 2px 2px black);
}

.social-icons img {
    width: 3vw;
    min-width: 50px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}
.whatsapp {
    position: fixed;
    bottom: 20px; /* Distancia desde la parte inferior */
    right: 20px;  /* Distancia desde la parte derecha */
    z-index: 1000; /* Asegura que el logo esté por encima de otros elementos */
    transition: all 0.3s ease; /* Transición suave */
}

.whatsapp__logo {
    width: 60px; /* Tamaño inicial del logo */
    height: auto;
}
/* Responsive */
@media (max-width: 768px) {
    .menu__list {
        display: none;
        flex-direction: column;
        background: #333;
        width: 100%;
        position: absolute;
        top: 50px;
        left: 0;
        text-align: center;
    }

    .menu__item {
        padding: 10px;
    }

    .menu__toggle {
        display: block;
        
    }
    /* Activación del menú */
    .menu__list.active {
        display: flex;
    }
    .section--contacto{
        background-image: none;
    }
}
