body {
    margin: 0%;
}

/* Estilos de la cabecera */

#logo {
    display: flex;
    align-items: center;
    padding: 10px;
    height: auto;
}

#logo img {
    width: 100% !important;
    /* o el valor que prefieras */
    height: auto;
    max-height: 120px;
    /* para limitar si hace falta */
    object-fit: contain;
}


#cabecera {
    height: 120px;
    background-image: url("images/agua.jfif");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
}

#redes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    color: black;
    font-size: 100%;
}

#redes svg {
    margin-right: 5px;
    vertical-align: middle;
}

#redes div {
    display: flex;
    align-items: center;
}

#redes a {
    color: black;
    text-decoration: none;
    margin-left: 5px;
    font-weight: bold;
}

#logo img {
    width: 100px;
}

#titulo {
    font-size: 110%;
    font-weight: bolder;
    color: black;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Estilos del menú */

#menu {
    display: flex;
    justify-content: center;
    background-color: #333;
    padding: 10px;
}

.enlaces {
    text-decoration: none;
    color: white;
}

.menu-item {
    background-color: #444;
    color: white;
    padding: 15px 20px;
    margin: 0 10px;
    text-align: center;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-left: 5%;
}

.menu-item:hover {
    background-color: #555;
}

/* Estilos del subencabezado */

#instaladores {
    text-align: center;
    background-color: #004173;
    min-height: 40px;
    padding: 20px;
}

#instaladores h2 {
    margin: 0;
    color: white;
}

/* Estilos del contenedor principal */

#contendor_principal {
    width: 90%;
    margin: 40px auto;
    text-align: center;
}

#contendor_principal ul {
    padding-left: 1.2em;
    /* Reduce el espacio entre el borde izquierdo y el texto */
    list-style-position: inside;
    /* Hace que los bullets estén alineados con el texto */
}

#contendor_principal h4 {
    margin-bottom: 2%;
    font-size: 1.8em;
    text-align: center;
}

#contenido_inicio {
    display: flex;
    width: 90%;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.columna {
    flex: 1 1 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.columna img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

#texto_inicio1,
#texto_inicio2 {
    text-align: justify;
    padding: 10px 20px;
    max-width: 500px;
    line-height: 1.6;
}

#imagen_oficina img {
    width: 100%;
    max-width: 400px;
    /* Ajusta este valor al tamaño que quieras */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}


/* Aviso legal */

#aviso_legal {
    width: 45%;
    margin-left: 25%;
    margin-bottom: 1%;
}

#aviso_legal h2 {
    text-align: center;
}

/* Pie de página */

#contacto {
    font-size: larger;
    font-weight: bold;
    margin-left: 30%;
    margin-bottom: 4%;
}

#tit {
    margin-left: 5%;
    font-size: large;
    font-weight: bold;
    color: white;
}

#map {
    height: 250px;
    width: 90%;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

#pie {
    background-color: grey;
}

.cont-item {
    margin-left: 2%;
}

.cont-item a {
    text-decoration: none;
    color: black;
}

.footer-item {
    flex: 1;
    margin: 0 10px;
}

.footer-item>div,
.footer-item>a {
    margin-bottom: 10px;
}

.enlace {
    text-decoration: none;
    color: black;
}

#barra-avisos {
    background-color: #2c2c2c;
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid #aaa;
    max-width: 100%;
}


.enlace-legal {
    text-decoration: none;
    color: #ddd;
    transition: color 0.3s ease;
}

.enlace-legal:hover {
    color: white;
}

.contenido-barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    /* <--- clave para evitar que salte de línea */
    gap: 10px;
    /* opcional: añade separación entre izquierda y derecha */
}

.avisos {
    white-space: nowrap;
    /* <--- evita saltos de línea dentro de .avisos */
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 45%;
}

.redes-sociales img {
    width: 10%;
    margin-left: 80%;
    transition: transform 0.3s ease;
}

.redes-sociales img:hover {
    transform: scale(1.1);
}

/* Estilos del formulario (sin cambios necesarios) */

#form {
    margin-top: 2%;
    margin-left: 25%;
    width: 50%;
    max-width: 800px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    margin-left: 36%;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 90%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

textarea {
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: #333;
    outline: none;
}

button[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #555;
}

.whatsapp-boton {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.whatsapp-boton a {
    display: flex;
    align-items: center;
    background-color: #25D366;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.whatsapp-boton a:hover {
    background-color: #1ebe5b;
}

.whatsapp-boton img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

/* ESTILOS PARA LOS CHECKBOXES (NUEVOS) */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Checkbox personalizado */
.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #004173;
    border-radius: 4px;
}

/* Al pasar el ratón */
.checkbox-group:hover input ~ .checkmark {
    background-color: #f1f1f1;
}

/* Cuando está marcado */
.checkbox-group input:checked ~ .checkmark {
    background-color: #004173;
}

/* La marca de verificación (hidden cuando no está marcado) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Mostrar la marca cuando está marcado */
.checkbox-group input:checked ~ .checkmark:after {
    display: block;
}

/* Estilo de la marca de verificación */
.checkbox-group .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.checkbox-group label {
    color: #333;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 0;
}

.checkbox-group a {
    color: #004173;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* ESTILOS PARA EL MENSAJE DE INTRODUCCIÓN */
#form-intro {
    width: 90%;
    max-width: 700px;
    margin: 20px auto 10px auto;
    text-align: center;
    padding: 15px;
}

#form-intro p {
    margin: 0;
    color: #333;
    font-size: 1.05em;
    line-height: 1.5;
}

/* css novedades */

#novedades {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fdfdfd;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
}

#novedades figure {
    margin: 0;
}

#novedades figure figcaption {
    text-align: center;
}

#novedades h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.novedad {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid #ddd;
}

#novedades>div {
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.novedad:last-child {
    border-bottom: none;
}

.novedad img {
    width: 250px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.novedad ul {
    margin: 0;
    padding: 0;
    list-style-type: disc;
    padding-left: 20px;
    color: #333;
    font-size: 1em;
    line-height: 1.6;
}

.imagenes-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Nueva estructura para dividir galería y texto */
.fila-servicio {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    /* Responsive para pantallas pequeñas */
    gap: 40px;
    margin-top: 20px;
}

/* Texto a la derecha */
.texto-servicio {
    flex: 1 1 300px;
    max-width: 600px;
    text-align: left;
    font-size: 1rem;
}

.texto-servicio img {
    width: 20%;
}

/*fonatenria*/

.imagen-font {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    flex: 1 1 300px;
}

.fila-imagenes {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.fila-imagenes img {
    width: 100%;
    max-width: 49%;
    /* Para que quepan dos imágenes por fila */
    height: auto;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Galería (sin cambios necesarios) */

.gallery-container {
    position: relative;
    width: 80%;
    max-width: 600px;
    height: 500px;
    overflow: hidden;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

.gallery-container img {
    width: 100%;
    height: auto;
    max-height: 500px;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease-in-out;
}

.navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.navigation .prev,
.navigation .next {
    cursor: pointer;
    font-size: 2rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    user-select: none;
    transition: background-color 0.3s ease;
}

.navigation .prev:hover,
.navigation .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Adaptador para pantallas de mobiles */

/* ========================
   ADAPTACIÓN RESPONSIVE
   ======================== */

@media (max-width: 768px) {

    /* Cabecera */
    #cabecera {
        flex-direction: column;
        align-items: center;
        height: auto;
        text-align: center;
    }

    #logo img {
        max-height: 80px;
        width: auto;
    }

    #redes {
        align-items: center;
    }

    #titulo {
        font-size: 100%;
        text-align: center;
    }

    /* Menú: cambia a columna o hamburguesa si lo prefieres */
    #menu {
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }

    .menu-item {
        width: 90%;
        margin: 5px 0;
        text-align: center;
    }

    /* Contenedor principal y contenido en columnas */
    #contenido_inicio {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .columna {
        width: 100%;
    }

    /* Novedades */
    .novedad {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .novedad img {
        width: 90%;
    }

    .novedad ul {
        text-align: left;
        padding-left: 1.5em;
    }

    /* Formulario */
    #form,
    form {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 15px;
        box-sizing: border-box;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        width: 100%;
        box-sizing: border-box;
    }

    button[type="submit"] {
        width: 100%;
    }

    /* Aviso legal */
    #aviso_legal {
        width: 90%;
        margin: 0 auto 20px auto;
    }

    /* Footer */
    footer {
        flex-direction: column;
        align-items: center;
    }

    .footer-item {
        margin: 10px 0;
        width: 90%;
    }

    #contacto,
    #tit {
        margin-left: 0;
        text-align: center;
    }

    /* Barra de avisos */
    .contenido-barra {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .avisos {
        margin-left: 0;
        justify-content: center;
    }

    .redes-sociales img {
        margin-left: 0;
        width: 40px;
    }

    /* Galería y texto de servicios */
    .fila-servicio,
    .fila-imagenes {
        flex-direction: column;
        align-items: center;
    }


    .fila-imagenes img {
        max-width: 100%;
    }

    /* WhatsApp botón */
    .whatsapp-boton {
        flex-direction: column;
    }

    .whatsapp-boton a {
        width: 90%;
        justify-content: center;
    }

    /* Galería de imágenes */
    .gallery-container {
        width: 100%;
        height: auto;
    }

    .gallery-container img {
        max-height: 300px;
        position: static;
    }

    .navigation {
        position: static;
        flex-direction: row;
        justify-content: space-around;
        margin-top: 10px;
    }

    .navigation .prev,
    .navigation .next {
        position: static;
        transform: none;
        padding: 8px;
    }
    /* Estilos para el mensaje introductorio */
    #form-intro {
        width: 95%;
        padding: 12px 10px;
        margin: 15px auto 5px auto;
    }
    
    #form-intro p {
        font-size: 0.95em;
        line-height: 1.4;
    }
    
    /* Ajustes para los checkboxes */
    .checkbox-group {
        padding-left: 25px;
        margin: 12px 0;
    }
    
    .checkmark {
        height: 18px;
        width: 18px;
        top: 1px;
    }
    
    .checkbox-group .checkmark:after {
        left: 5px;
        top: 1px;
        width: 4px;
        height: 9px;
    }
    
    .checkbox-group label {
        font-size: 0.85em;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    /* Cabecera */
    #cabecera {
        flex-direction: column;
        height: auto;
        text-align: center;
    }

    #logo img {
        max-height: 90px;
    }

    #titulo {
        font-size: 1.2rem;
    }

    /* Menú */
    #menu {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }

    .menu-item {
        margin: 5px 10px;
        padding: 10px 15px;
    }

    /* Contenido */
    #contenido_inicio {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .columna {
        width: 100%;
    }

    /* Formulario */
    #form,
    form {
        width: 90%;
        max-width: 700px;
        margin: 0 auto;
        padding: 20px;
        box-sizing: border-box;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        width: 100%;
        box-sizing: border-box;
    }

    /* Aviso legal */
    #aviso_legal {
        width: 90%;
        margin: 0 auto 20px auto;
    }

    /* Footer */
    footer {
        flex-direction: column;
        align-items: center;
    }

    .footer-item {
        width: 100%;
        margin-bottom: 20px;
    }

    #contacto,
    #tit {
        text-align: center;
        margin-left: 0;
    }

    /* Galería y texto */
    .fila-servicio {
        flex-direction: column;
        align-items: center;
    }

    .fila-imagenes {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .fila-imagenes img {
        max-width: 90%;
    }

    .novedad {
        flex-direction: column;
        align-items: center;
    }

    .novedad img {
        width: 90%;
    }

    /* WhatsApp botón */
    .whatsapp-boton a {
        width: 100%;
        justify-content: center;
    }

    /* Galería */
    .gallery-container {
        width: 100%;
        max-width: 100%;
    }

    .redes-sociales a img {
        margin-left: 79%;
        width: 20%;
    }

     /* Estilos para el mensaje introductorio */
    #form-intro {
        width: 95%;
        max-width: 650px;
    }
    
    /* Ajustes menores para los checkboxes */
    .checkbox-group {
        margin: 14px 0;
    }
}

.glider-contain {
    flex: 1 1 400px;
    max-width: 600px;
    max-height: 600px;
}

.glider {
    max-height: 600px;
    overflow: hidden;
    /* para que no se salga contenido */
}

.glider img {
    height: 100%;
    max-height: 500px;
    width: 100%;
    /* mantiene la proporción */
    display: block;
    object-fit: contain;
    /* para que no se distorsionen */
}

.galeria-carrusel {
    position: relative;
    max-width: 90%;
    margin: auto;
    overflow: hidden;
}

.galeria-carrusel .glider>div {
    padding: 0.5rem;
}

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

.glider-prev,
.glider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 0.5rem 0.5rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
}

.glider-prev {
    left: 10px;
}

.glider-next {
    right: 10px;
}