/* Estilos generales */
* {
    box-sizing: border-box;
}
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    zoom: 0.97;
}
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    box-shadow: none;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    height: auto;
    transition: background-color 0.4s, box-shadow 0.4s;
}
.navbar-logo {
    display: none;
}
.navbar-links {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    margin-left: auto;
    margin-right: 80px;
}
.navbar-links li a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    padding: 8px 18px;
    border-radius: 50px;
    display: inline-block;
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: background-color 0.3s, border-color 0.3s;
}
.navbar-links li a:hover {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: none;
}

/* Navbar Scrolled State */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.navbar.scrolled .navbar-links a {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}
.navbar.scrolled .navbar-links a:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.4);
}
.navbar.scrolled .hamburger i {
    color: #333;
}

/* Hero Section */
.hero {
    background:
        linear-gradient(rgba(11, 12, 12, 0.059), rgba(0, 0, 0, 0.55)),
        url('bannerlogo.png') center center/cover no-repeat;
    background-size: cover;
    text-align: center;
    padding: 180px 20px 90px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 50vh;
    width: 100%;
    overflow-x: hidden;
    height: 600px;
}
.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 15px;
    display: inline-block;
    background: rgba(0,0,0,0.55);
    padding: 0.3em 0.7em;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.hero p {
    font-size: 1.1rem;
    color: #ffffff;
    display: inline-block;
    background: rgba(0,0,0,0.38);
    padding: 0.2em 0.7em;
    border-radius: 8px;
    margin-top: 18px;
}

/* Common Container & Intro Text */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}
.intro-text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px auto;
    font-size: 1.08rem;
}

/* Card Containers */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 20px 18px;
    flex: 1 1 auto;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 6px 24px rgba(0,64,128,0.13);
}
.card h3 {
    font-size: 1.2rem;
}
.card-icon {
    font-size: 2rem;
    color: #0074d9;
    margin-bottom: 15px;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #fff;
    padding: 10px;
    z-index: 101;
}

/* Specialized Services Grid */
.specialized-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
    padding: 0 10px;
    width: 100%;
}
.specialized-card {
    background-color: #e6f2ff;
    border: 2px solid #b3e0ff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.specialized-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.specialized-icon-container {
    background-color: #e6f2ff;
    border: 1px solid #cceeff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}
.specialized-icon-container i {
    color: #0074d9;
    font-size: 2.2rem;
}
.specialized-card h3 {
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 10px;
}
.specialized-card p {
    color: #555;
    font-size: 0.95rem;
}

/* Process Grid */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
    width: 100%;
}
.process-step {
    background-color: #f8f0f8;
    border: 1px solid #e0cff0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.process-icon-container {
    background-color: #f5f0f5;
    border: 2px solid #a872a8;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.process-icon-container i {
    color: #8a2be2;
    font-size: 1.8rem;
}
.process-step h3 {
    color: #4b0082;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.process-step p {
    color: #666;
    font-size: 0.95rem;
}

/* Secciones específicas de color y estilo */
#valvulas.valves-section {
    background-color: #d8cde3;
    padding-top: 50px;
    padding-bottom: 50px;
}
.valves-title .highlight {
    color: #925C8F;
}
.valves-intro {
    font-size: 1.05rem;
    max-width: 900px;
    margin: 0 auto 30px auto;
    text-align: center;
}
.valves-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-direction: row;
}
.valves-list-unstyled {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 48%;
}
.valves-list-item {
    background-color: #e6f2ff;
    border: 2px solid #0074d9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.15rem;
    color: #004080;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.valves-list-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.valves-image-container {
    width: 48%;
    text-align: center;
}
.valves-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.valves-footer-text {
    text-align: center;
    margin-top: 30px;
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
}

/* --- ESTILOS PARA LA GALERÍA CON CARRUSEL --- */
.galeria-section {
    background-color: #f0f0f5;
    padding: 60px 20px;
    text-align: center;
}
.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    overflow: hidden;
    padding: 0 40px;
}
.carousel-track-container {
    overflow: hidden;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}
.carousel-slide {
    min-width: calc(100% / 3 - 20px * 2 / 3);
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 0;
}
.gallery-item {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: #333;
    border: none;
    padding: 12px 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    z-index: 10;
    transition: color 0.3s ease, transform 0.3s ease;
}
.carousel-button:hover {
    background-color: transparent;
    color: #007bff;
    transform: translateY(-50%) scale(1.2);
}
.carousel-button.prev {
    left: 0;
}
.carousel-button.next {
    right: 0;
}
.carousel-button:disabled {
    color: #ccc;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}
.carousel-button i {
    pointer-events: none;
}

/* Contact Section */
.contact-section {
    background-color: #f0f0f5;
    padding: 50px 20px;
    text-align: center;
}
.contact-intro-text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px auto;
    font-size: 1.15rem;
    font-weight: 500;
    color: #444;
}
.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
.contact-info {
    flex: 1 1 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    padding-left: 20px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: #555;
}
.contact-item i {
    color: #007bff;
    font-size: 1.5rem;
}
.cta-button {
    display: block;
    margin: 20px auto 0 auto;
    padding: 12px 24px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: fit-content;
    max-width: 300px;
}
.cta-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}
.contact-map {
    flex: 1 1 500px;
    max-width: 650px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    aspect-ratio: 16 / 9;
}
.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: #004080;
    color: #fff;
    width: 100%;
}
.footer-social-media {
    margin-bottom: 15px;
}
.footer-social-media a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.2s;
}
.footer-social-media a:hover {
    color: #0074d9;
}
.footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* MODAL DE IMÁGENES */
.modal-bg {
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.modal-bg.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    position: relative;
    padding: 0;
    background: transparent;
    box-shadow: none;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.modal-imagen {
    max-width: 100vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
}
.modal-close {
    color: #fff;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    line-height: 1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 210;
}
.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.modal-nav-btn.prev { left: 10px; }
.modal-nav-btn.next { right: 10px; }

/* Animación de aparición (fade-in) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries para Responsividad */
@media (max-width: 900px) {
    .navbar {
        justify-content: space-between;
        padding: 10px 20px;
    }
    .navbar-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 15px 0;
        margin-right: 0;
        text-align: center;
        border-radius: 0 0 10px 10px;
        transform: translateY(-100%);
        transition: transform 0.4s ease-in-out;
    }
    .navbar-links.active {
        display: flex;
        transform: translateY(0);
    }
    .navbar-links li a {
        color: #333;
        font-size: 1.1rem;
        padding: 10px 0;
        background-color: transparent;
        border: none;
        border-radius: 0;
    }
    .navbar-links li a:hover {
        color: #007bff;
        background-color: transparent;
        border: none;
    }
    .hamburger {
        display: block;
        margin-left: 10px;
    }
    .navbar.scrolled .hamburger i {
        color: #333;
    }
    .navbar.scrolled .navbar-links {
        background-color: rgba(255, 255, 255, 0.98);
    }
    .hero {
        height: 450px;
        padding: 120px 15px 60px 15px;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .container {
        padding: 30px 15px;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .intro-text {
        font-size: 1rem;
    }
    .cards-container,
    .specialized-services-grid,
    .process-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .card, .specialized-card, .process-step {
        width: 100%;
        max-width: 350px;
        flex-basis: auto;
        margin: 0 auto;
    }
    .valves-section {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .valves-title {
        font-size: 1.8rem;
    }
    .valves-content {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    .valves-list-unstyled,
    .valves-image-container {
        width: 100%;
        max-width: 450px;
    }
    .valves-list-item {
        font-size: 1rem;
        padding: 15px;
    }
    .valves-footer-text {
        font-size: 0.85rem;
    }
    .carousel-container {
        padding: 0 20px;
    }
    .carousel-slide {
        min-width: calc(100% - 20px);
    }
    .gallery-item img {
        height: 200px;
    }
    .carousel-button {
        padding: 8px 12px;
        font-size: 1.5rem;
    }
    .contact-section {
        padding: 30px 15px;
    }
    .contact-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .contact-info {
        width: 100%;
        text-align: center;
        padding-left: 0;
    }
    .contact-item {
        justify-content: center;
        font-size: 1rem;
    }
    .cta-button {
        width: 80%;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
    .contact-map {
        width: 100%;
        max-width: none;
        height: 300px;
    }
    .contact-map iframe {
        height: 100%;
    }
    .footer {
        padding: 20px 15px;
        font-size: 0.8rem;
    }
    .footer-social-media a {
        font-size: 1.3rem;
    }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .navbar-links {
        margin-right: 20px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .valves-content {
        flex-direction: column;
        align-items: center;
    }
    .valves-list-unstyled,
    .valves-image-container {
        width: 80%;
        max-width: 600px;
    }
    .carousel-slide {
        min-width: calc(100% / 2 - 20px / 2);
    }
}