/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-blue: #0077b6;
    --dark-text-color: #00293d;
    --background-color: #fff;
    --page-background: #f4f4f4;
    --primary-font: 'Montserrat', sans-serif;
    --accent-green: #8bc34a;
    --footer-bg: #2c3e50;

    /* NEW: Define header height variables */
    --header-height-desktop: 90px;
    --header-height-scrolled: 70px;
    --header-height-mobile: 80px; /* Consistent height for mobile */
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--primary-font);
    margin: 0;
    color: var(--dark-text-color);
    background-color: var(--page-background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex-grow: 1;
    overflow: hidden;
}
/* --- ESTILOS GENERALES DE SECCIONES --- */
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
    text-align: center; /* Ensure title is centered */
}

.section-title::after {
    content: '';
    position: absolute;
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-green);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 700px;
    margin: -40px auto 60px auto;
    line-height: 1.7;
}

/* --- BOTONES (CON ANIMACIÓN MEJORADA) --- */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.3rem;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-primary {
    color: #fff;
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.btn-primary:hover {
    background-color: #005f8d;
    border-color: #005f8d;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 119, 182, 0.3);
}
.btn-large { padding: 1rem 2rem; font-size: 1.25rem; }
.btn i { margin-right: 10px; }

/* --- PRELOADER --- */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease; }
.preloader-spinner { border: 4px solid rgba(0, 0, 0, 0.1); width: 50px; height: 50px; border-radius: 50%; border-left-color: var(--primary-blue); animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- HEADER Y NAVEGACIÓN (CON ANIMACIÓN MEJORADA) --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--background-color);
    transition: padding 0.3s ease, box-shadow 0.3s ease, height 0.3s ease; /* Added height transition */
    padding: 15px 0;
    border-bottom: 2px solid var(--primary-blue);
    height: var(--header-height-desktop); /* Use variable for desktop height */
    display: flex;
    align-items: center;
}
.site-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: var(--header-height-scrolled); /* Use variable for scrolled height */
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; } /* Ensure width 100% */
.nav-logo-link img { max-height: calc(var(--header-height-desktop) - 30px); transition: max-height 0.3s ease; } /* Adjusted calc */
.site-header.scrolled .nav-logo-link img { max-height: calc(var(--header-height-scrolled) - 20px); } /* Adjusted calc */

.desktop-nav { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.desktop-nav .nav-link { color: var(--dark-text-color); text-decoration: none; padding: 10px 20px; font-weight: 600; font-size: 1.3em; position: relative; cursor: pointer; transition: color 0.3s ease; }

/* Animación de línea inferior para enlaces de navegación */
.desktop-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}
.desktop-nav .nav-link:hover { color: var(--primary-blue); }
.desktop-nav .nav-link:hover::after {
    transform: scaleX(0.6);
}

.nav-toggle { display: none; }
.mobile-nav-menu { display: none; }

/* --- HERO CAROUSEL --- */
#hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #333;
}
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; }
.carousel-slide.active { opacity: 1; }
.carousel-slide::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0, 20, 30, 0.75), rgba(0, 59, 89, 0.45)); }
.carousel-content { position: relative; z-index: 2; color: #fff; text-align: center; padding: 20px; max-width: 950px; }
.carousel-content h1 { font-family: "Raleway", sans-serif; font-size: 3.8rem; font-weight: 700; margin-bottom: 1.2rem; text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7); animation: fadeInDown 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
.carousel-content p { font-size: 1.4rem; line-height: 1.7; margin-bottom: 2.5rem; max-width: 800px; animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both 0.3s; }
.carousel-content .btn { animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both 0.6s; }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.3); color: #fff; border: none; padding: 12px 18px; font-size: 2.2rem; cursor: pointer; z-index: 3; transition: all 0.3s ease; }
.carousel-control:hover { background-color: rgba(0, 119, 182, 0.8); transform: translateY(-50%) scale(1.1); }
.prev-slide { left: 20px; border-radius: 50%; }
.next-slide { right: 20px; border-radius: 50%; }
.carousel-indicators { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 3; }
.indicator { width: 13px; height: 13px; background-color: rgba(255, 255, 255, 0.4); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 50%; cursor: pointer; transition: all 0.4s ease; }
.indicator.active { background-color: #fff; transform: scale(1.2); }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* --- ABOUT US SECTION (#about) --- */
#about { background-color: #fff; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; align-items: start; }
.about-card { padding: 35px 30px; border: 1px solid #e9ecef; border-radius: 12px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.about-card:hover { transform: translateY(-8px); box-shadow: 0 10px 40px rgba(0, 119, 182, 0.1); border-color: transparent; }
.about-card h3 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; color: var(--primary-blue); margin: 0 0 20px 0; }
.about-card h3 i { font-size: 1.2rem; }
.about-card p { color: #6c757d; line-height: 1.8; margin: 0; }
.values-list { list-style: none; padding: 0; margin: 0; }
.values-list li { display: flex; align-items: center; gap: 10px; color: #6c757d; margin-bottom: 12px; }
.values-list li:last-child { margin-bottom: 0; }
.values-list li i { color: var(--accent-green); font-size: 1.2rem; }

/* --- WHY CHOOSE US SECTION (#why-choose) --- */
#why-choose { background: #fff; }
.why-choose-title { color: var(--dark-text-color); }
.why-choose-title span { color: var(--primary-blue); }
.why-choose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.why-choose-item { text-align: center; background: #fff; padding: 35px 30px; border-radius: 12px; border: 1px solid #f0f0f0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.why-choose-item:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 119, 182, 0.12); }
.icon-wrapper { width: 70px; height: 70px; border-radius: 50%; background-color: #e6f7ff; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px auto; }
.icon-wrapper i { font-size: 2.2rem; color: var(--primary-blue); }
.why-choose-item h4 { font-size: 1.3rem; font-weight: 600; color: var(--dark-text-color); margin: 0 0 15px 0; }
.why-choose-item p { font-size: 1rem; line-height: 1.6; color: #6c757d; margin: 0; }

/* --- SERVICES SECTION (#services) --- */
.services-section-bg { background-color: var(--page-background); }
.services-grid-final { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.service-card-final { display: flex; flex-direction: column; background-color: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); text-decoration: none; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card-final:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 119, 182, 0.15); }
.card-image-container { height: 220px; overflow: hidden; }
.card-image-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-card-final:hover .card-image-container img { transform: scale(1.05); }
.card-icon-wrapper { position: absolute; top: 220px; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background-color: var(--primary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3); border: 3px solid #fff; }
.card-icon-wrapper i { color: #fff; font-size: 1.8rem; }
.card-content { padding: 50px 30px 30px 30px; text-align: center; }
.card-content h3 { font-size: 1.4rem; color: var(--dark-text-color); margin: 0 0 15px 0; }
.card-content p { color: #6c757d; line-height: 1.6; margin-bottom: 25px; }
.card-cta { font-weight: 600; color: var(--primary-blue); text-decoration: none; transition: color 0.3s ease; }
.card-cta i { margin-left: 5px; transition: transform 0.3s ease; }
.service-card-final:hover .card-cta { color: var(--accent-green); }
.service-card-final:hover .card-cta i { transform: translateX(5px); }

/* --- BROCHURE DOWNLOAD SECTION (#brochure-download) --- */
#brochure-download {
    background-color: #fff;
}

.brochure-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.brochure-image {
    flex: 1 1 40%;
    max-width: 400px;
    min-width: 0;
}

.brochure-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.brochure-text {
    flex: 1 1 60%;
    min-width: 0;
}

.brochure-text .section-title {
    text-align: left;
}

.brochure-text .section-title::after {
    left: 0;
    transform: translateX(0);
}

.brochure-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #6c757d;
    margin-bottom: 40px;
}
/* --- PARTNERS SECTION (#partners) --- */
#partners .section-title { color: var(--dark-text-color); }
.partners-logo-grid { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 40px; margin-top: 40px; }
.partner-logo-item { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); border: 1px solid #f0f0f0; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.partner-logo-item:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.partner-logo-item img { max-width: 150px; height: auto; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s ease; }
.partner-logo-item:hover img { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

/* --- CONTACT SECTION (#contact) --- */
#contact .section-title { color: var(--dark-text-color); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.contact-card { display: flex; align-items: center; gap: 20px; padding: 30px; background-color: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); text-decoration: none; transition: all 0.3s ease; }
.contact-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0, 119, 182, 0.12); }
.contact-icon-wrapper { flex-shrink: 0; width: 60px; height: 60px; background-color: #e6f7ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.contact-icon-wrapper i { color: var(--primary-blue); font-size: 1.8rem; }
.contact-text h4 { margin: 0 0 5px 0; font-size: 1.2rem; color: var(--dark-text-color); }
.contact-text p { margin: 0; color: #6c757d; line-height: 1.6; }

/* --- FOOTER --- */
footer { background-color: var(--footer-bg); color: rgba(255, 255, 255, 0.8); padding: 80px 0 40px 0; text-align: center; }
.footer-logo { max-height: 60px; margin-bottom: 15px; opacity: 0.9; }
.footer-tagline { margin: 0 0 30px 0; opacity: 0.8; }
.social-links { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; background-color: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 50%; text-decoration: none; font-size: 1.2rem; transition: all 0.3s ease; }
.social-links a:hover { background-color: var(--primary-blue); transform: translateY(-3px); }
.footer-divider { width: 60px; border-color: rgba(255, 255, 255, 0.2); margin: 0 auto 40px auto; }
.footer-copyright { margin: 0; font-size: 0.9rem; opacity: 0.7; }

/* --- FLOATING SOCIAL BAR (CON ANIMACIÓN MEJORADA) --- */
.floating-social-bar { position: fixed; bottom: 20px; right: 20px; z-index: 1050; display: flex; flex-direction: column; gap: 12px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; font-size: 1.5rem; text-decoration: none; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease; }
.social-icon:hover { transform: scale(1.15) translateY(-5px) rotate(10deg); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
.social-icon.facebook { background-color: #1877F2; }
.social-icon.whatsapp { background-color: #25D366; }
.social-icon.linkedin { background-color: #0A66C2; }
.social-icon.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

/* --- SERVICES MODAL --- */
#services-gallery-container { display: flex; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(44, 62, 80, 0.7); backdrop-filter: blur(8px); z-index: 2000; overflow-y: auto; align-items: flex-start; padding: 5vh 20px; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
#services-gallery-container.visible { opacity: 1; visibility: visible; }
.gallery-content { background-color: white; padding: 40px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.25); max-width: 1400px; width: 100%; margin: 0 auto; position: relative; transform: scale(0.95) translateY(-20px); transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); }
#services-gallery-container.visible .gallery-content { transform: scale(1) translateY(0); }
#close-gallery-btn { position: absolute; top: 15px; right: 15px; font-size: 1.8rem; font-weight: 300; color: #aaa; cursor: pointer; line-height: 1; transition: color 0.3s ease, transform 0.3s ease; }
#close-gallery-btn:hover { color: var(--dark-text-color); transform: rotate(90deg); }
.modal-title { text-align: center; margin-top: 0; margin-bottom: 40px; font-size: 2.2rem; font-weight: 700; color: var(--dark-text-color); }
.roper-layout-wrapper { display: flex; gap: 30px; }
.roper-sidebar { flex: 0 0 250px; }
.sidebar-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 8px; background-color: #f8f9fa; color: var(--dark-text-color); font-size: 1.1em; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; transition: all 0.3s ease; }
.sidebar-btn:hover { border-color: #bbb; background-color: #f1f3f5; }
.sidebar-btn.active { background-color: #fff; color: var(--primary-blue); border-color: var(--primary-blue); border-left: 4px solid var(--primary-blue); }
.sidebar-btn.active i { color: var(--primary-blue); }
.sidebar-btn i { font-size: 1.2rem; width: 25px; text-align: center; color: var(--dark-text-color); }
.roper-grid-content { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; align-content: flex-start; }
.product-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    align-self: start;
}
.product-card.hide { display: none; }
.product-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.item-toggle { display: flex; align-items: center; justify-content: space-between; padding: 20px 15px; cursor: pointer; transition: background-color 0.2s ease; }
.item-toggle:hover { background-color: #f8f9fa; }
.item-toggle span { font-weight: 600; font-size: 1em; }
.item-toggle .chevron { font-size: 1em; color: #ccc; transition: transform 0.4s ease; }
.product-card.open .item-toggle .chevron { transform: rotate(90deg); }
.submenu-list { list-style: none; padding: 0 15px; margin: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out, margin 0.4s ease-out; }
.product-card.open .submenu-list { max-height: 800px; padding-bottom: 15px; }


/* Styles for the submenu-gallery (general/desktop-first) */
.submenu-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.submenu-gallery .submenu-item a {
    display: block;
    text-decoration: none;
    color: var(--dark-text-color);
    border-radius: 8px;
    background-color: #f8f9fa;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.submenu-gallery .submenu-item a:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 119, 182, 0.1);
    color: var(--primary-blue);
}

.submenu-gallery .submenu-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.submenu-gallery .submenu-item .submenu-item-title {
    display: block;
    padding: 12px 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9em;
}

/* --- MEDIA QUERIES PARA ADAPTAR EL MODAL DE SERVICIOS --- */

@media (max-width: 991px) {
    .desktop-nav { display: none; }
    .nav-toggle { display: flex; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; z-index: 1002; }
    .hamburger-bar { width: 30px; height: 3px; background-color: var(--dark-text-color); border-radius: 5px; transition: all 0.3s ease-in-out; }
    
    /* Corrected: Apply hamburger animation based on 'is-active' class on nav-toggle */
    .nav-toggle.is-active .bar-1 { transform: rotate(45deg) translate(7px, 7px); }
    .nav-toggle.is-active .bar-2 { opacity: 0; }
    .nav-toggle.is-active .bar-3 { transform: rotate(-45deg) translate(7px, -7px); }
    
    /* Header adjustments for mobile */
    .site-header {
        height: var(--header-height-mobile); /* Fixed height for mobile header */
        padding: 0; /* Removed padding here to rely fully on height */
    }
    .site-header.scrolled { /* Reset scrolled effect on mobile for consistent height */
        height: var(--header-height-mobile);
        padding: 0; /* Reset padding if it was adjusted */
        box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Consistent mobile shadow */
    }
    .nav-logo-link img {
        max-height: calc(var(--header-height-mobile) - 20px); /* Adjust for mobile header height */
    }
    
    /* Mobile menu positioning */
    .mobile-nav-menu {
        display: flex; /* Always flex on mobile, its visibility handled by .active */
        position: fixed;
        top: var(--header-height-mobile); /* NEW: Start below the header */
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height-mobile)); /* NEW: Adjust height */
        background-color: rgba(0, 41, 61, 0.98);
        backdrop-filter: blur(5px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
        z-index: 1001;
    }
    .mobile-nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .mobile-nav-list { list-style: none; padding: 0; text-align: center; }
    .mobile-nav-list .nav-item { margin-bottom: 20px; }
    .mobile-nav-list .nav-link { color: #fff; font-size: 1.8rem; font-weight: 600; text-decoration: none; cursor: pointer; }

    #hero-carousel { height: 90vh; }
    .carousel-content h1 { font-size: 2.5rem; }
    .carousel-content p { font-size: 1.2rem; }
    .carousel-control { display: none; }

    .brochure-content { flex-direction: column; text-align: center; }
    .brochure-image { margin-bottom: 40px; max-width: 350px; }
    .brochure-text .section-title { text-align: center; }
    .brochure-text .section-title::after { left: 50%; transform: translateX(-50%); }

    /* Modal adjustments for tablets and larger mobiles */
    #services-gallery-container {
        padding: 5vh 15px;
    }
    .gallery-content {
        padding: 30px;
    }
    .modal-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    .roper-layout-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .roper-sidebar {
        flex: 0 0 auto;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .sidebar-btn {
        flex: 1 1 auto;
        max-width: 200px;
        margin-bottom: 0;
        font-size: 1em;
        padding: 12px 10px;
    }
  .roper-grid-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    align-content: flex-start;
    align-items: flex-start;
}
    .product-card img {
        height: 160px;
    }
    /* Submenu gallery adjustments for screens <= 991px (often tablets in portrait) */
    .submenu-gallery {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    .submenu-gallery .submenu-item img {
        height: 80px;
    }
    .submenu-gallery .submenu-item .submenu-item-title {
        font-size: 0.85em;
        padding: 10px 5px;
    }
}

@media (max-width: 768px) {
    .floating-social-bar { right: 15px; bottom: 15px; gap: 10px; }
    .social-icon { width: 45px; height: 45px; font-size: 1.3rem; }
  
    /* Further modal adjustments for most phones (landscape) and small tablets */
    #services-gallery-container {
        padding: 3vh 10px;
    }
    .gallery-content {
        padding: 25px 15px;
    }
    .modal-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    .roper-sidebar {
        justify-content: center;
        gap: 8px;
    }
    .sidebar-btn {
        max-width: 180px;
        font-size: 0.95em;
        padding: 10px 8px;
    }
    .roper-grid-content {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    .product-card img {
        height: 140px;
    }
    .item-toggle {
        padding: 15px 10px;
        font-size: 0.9em;
    }
    /* Submenu gallery adjustments for screens <= 768px */
    .submenu-gallery {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 8px;
    }
    .submenu-gallery .submenu-item img {
        height: 70px;
    }
    .submenu-gallery .submenu-item .submenu-item-title {
        font-size: 0.8em;
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .carousel-content h1 { font-size: 2rem; }
    .carousel-content p { font-size: 1.1rem; }

    /* Modal adjustments for most phones (portrait) */
    #services-gallery-container {
        padding: 2vh 8px;
    }
    .gallery-content {
        padding: 20px 10px;
    }
    .modal-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .roper-sidebar {
        flex-direction: column;
        gap: 5px;
    }
    .sidebar-btn {
        max-width: 100%;
        font-size: 0.9em;
        padding: 8px 6px;
    }
    .roper-grid-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .product-card img {
        height: 120px;
    }
    .item-toggle {
        padding: 12px 8px;
        font-size: 0.85em;
    }
    /* Submenu gallery adjustments for screens <= 480px */
    .submenu-gallery {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 5px;
    }
    .submenu-gallery .submenu-item img {
        height: 60px;
    }
    .submenu-gallery .submenu-item .submenu-item-title {
        font-size: 0.75em;
        padding: 6px 3px;
    }
}

@media (max-width: 360px) {
    /* Modal adjustments for very small phones */
    .gallery-content {
        padding: 15px 8px;
    }
    .modal-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    .roper-sidebar {
        gap: 4px;
    }
    .sidebar-btn {
        font-size: 0.85em;
        padding: 6px 4px;
    }
    /* Submenu gallery adjustments for screens <= 360px */
    .submenu-gallery {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .submenu-gallery .submenu-item img {
        height: 50px;
    }
    .submenu-gallery .submenu-item .submenu-item-title {
        font-size: 0.7em;
        padding: 5px 2px;
    }
}

.acabados-hero {
    background: linear-gradient(rgba(0, 41, 61, .6), rgba(0, 41, 61, .6)), url(https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200) center/cover no-repeat;
    padding: 180px 0 100px;
    color: #fff;
    text-align: center
}

.acabados-hero h1 {
    font-family: Raleway, sans-serif;
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .4)
}

.acabados-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: .9
}

/* Duplicated rule (section-title) - keeping the one defined earlier in style.css for consistency */
/* .section-title {
    font-size: 2.2rem;
    color: var(--dark-text-color);
    margin-bottom: 1rem;
    font-family: Raleway, sans-serif;
    position: relative;
    display: inline-block
} */

/* Duplicated rule (section-title::after) - keeping the one defined earlier in style.css for consistency */
/* .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #8bc34a
} */

/* Duplicated rule (section-subtitle) - keeping the one defined earlier in style.css for consistency */
/* .section-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 750px;
    margin: 30px auto 50px
} */

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px
}

.philosophy-card {
    text-align: center
}

.philosophy-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem
}

.philosophy-card h3 {
    font-size: 1.3rem;
    color: var(--dark-text-color);
    margin: 0 0 .5rem
}

.philosophy-card p {
    color: #6c757d; /* Changed from var(--text-color) which was undefined */
    line-height: 1.6
}

.pricing-section {
    background-color: var(--page-background);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    margin-top: 40px
}

.pricing-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    display: flex;
    flex-direction: column
}

.pricing-card.recommended {
    border: 2px solid var(--primary-blue);
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 119, 182, .15)
}

.pricing-card.recommended .badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-blue);
    color: #fff;
    padding: .4rem 1.2rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 119, 182, .3)
}

.pricing-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    color: var(--dark-text-color);
}

.pricing-description {
    font-size: .95rem;
    color: #6c757d; /* Changed from var(--text-color) which was undefined */
    min-height: 60px;
    margin-bottom: 1.5rem
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left
}

.feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6c757d; /* Changed from var(--text-color) which was undefined */
    font-size: .95rem;
}

.feature-list .fa-check-circle {
    color: #28a745;
    font-size: 1.2rem
}

.btn-pricing {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s ease;
    margin-top: auto
}

.pricing-card:not(.recommended) .btn-pricing {
    border: 2px solid #ddd;
    color: var(--dark-text-color);
}

.pricing-card:not(.recommended) .btn-pricing:hover {
    background-color: var(--dark-text-color);
    border-color: var(--dark-text-color);
    color: #fff
}

.pricing-card.recommended .btn-pricing {
    border: 2px solid var(--primary-blue);
    background-color: var(--primary-blue);
    color: #fff
}

.pricing-card.recommended .btn-pricing:hover {
    filter: brightness(1.1)
}

.gallery-grid-masonry {
    column-count: 3;
    column-gap: 1.5rem;
    margin-top: 40px
}

.gallery-item {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    width: 100%
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .4s ease
}

.gallery-item:hover img {
    transform: scale(1.05)
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 25, 38, .8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transition: opacity .4s ease
}

.gallery-item:hover .gallery-overlay {
    opacity: 1
}

.gallery-overlay-content {
    transform: translateY(10px);
    transition: transform .4s ease
}

.gallery-item:hover .gallery-overlay-content {
    transform: translateY(0)
}

.gallery-overlay h4 {
    margin: 0;
    font-size: 1.2rem
}

.gallery-overlay p {
    margin: .25rem 0 0;
    font-size: .9rem;
    font-weight: 300
}

.gallery-overlay p i {
    margin-right: 5px
}

/* .footer { background-color: var(--footer-bg); padding: 40px 0; color: #fff } */ /* Already defined globally */
/* .footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px } */ /* Already defined globally */
/* .footer-logo { max-height: 50px } */ /* Already defined globally */
/* .footer-tagline { margin: 0; font-size: .9rem; opacity: .8 } */ /* Already defined globally */
/* .social-links { display: flex; gap: 20px; font-size: 1.2rem } */ /* Already defined globally */
/* .social-links a { color: #fff; transition: color .3s ease, transform .3s ease } */ /* Already defined globally */
/* .social-links a:hover { color: #00a8e8; transform: translateY(-3px) } */ /* Already defined globally */
/* .footer-divider { width: 80%; border-color: rgba(255, 255, 255, .1); margin: 10px 0 } */ /* Already defined globally */
/* .footer-copyright { font-size: .85rem; opacity: .7; margin: 0 } */ /* Already defined globally */

.contact-section {
    background-color: var(--page-background);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .05);
    border: 1px solid #e9ecef;
    transition: transform .3s ease, box-shadow .3s ease
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 91, 140, .1)
}

.contact-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #eaf6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-blue);
    flex-shrink: 0
}

.contact-text h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    color: var(--dark-text-color);
}

.contact-text p {
    margin: 0;
    color: #6c757d; /* Changed from var(--text-color) which was undefined */
}

@media (max-width:991px) {
    .philosophy-grid,
    .pricing-grid,
    .contact-grid {
        grid-template-columns: 1fr
    }
    .pricing-card {
        margin-bottom: 40px;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto
    }
    .gallery-grid-masonry {
        column-count: 2
    }
    /* Keeping the specific mobile title adjustments here */
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle { /* Ensure subtitle is also centered by default mobile title behavior */
        text-align: center;
    }
    .brochure-text .section-title { /* Override specific to brochure text */
        text-align: center;
    }
    .brochure-text .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width:768px) {
    .gallery-grid-masonry {
        column-count: 1
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width:576px) {
    .acabados-hero h1 {
        font-size: 2.5rem;
    }
    .acabados-hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .philosophy-icon {
        font-size: 2rem;
    }
    .philosophy-card h3 {
        font-size: 1.2rem;
    }
    .pricing-card {
        padding: 2rem 1.5rem;
    }
    .pricing-icon {
        font-size: 2.5rem;
    }
    .pricing-title {
        font-size: 1.3rem;
    }
    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .contact-icon-wrapper {
        margin-bottom: 10px;
    }
}
.hero-doors {
    background: linear-gradient(rgba(0, 41, 61, .6), rgba(0, 41, 61, .6)), url(img/puertas/puerta.png) center/cover no-repeat; /* Cambia a tu imagen de hero para puertas */
    padding: 180px 0 100px;
    color: #fff;
    text-align: center;
}

.hero-doors h1 {
    font-family: Raleway, sans-serif;
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .4);
}

.hero-doors p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: .9;
}

/* Ajustes responsivos para el hero de puertas */
@media (max-width: 991px) {
    .hero-doors {
        padding: 150px 0 80px;
    }
    .hero-doors h1 {
        font-size: 2.8rem;
    }
    .hero-doors p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-doors {
        padding: 120px 0 60px;
    }
    .hero-doors h1 {
        font-size: 2.2rem;
    }
    .hero-doors p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-doors {
        padding: 100px 0 50px;
    }
    .hero-doors h1 {
        font-size: 1.8rem;
    }
    .hero-doors p {
        font-size: 0.9rem;
    }
}

/* --- Estilos específicos para la página de Fachadas --- */
.hero-facades {
    background: linear-gradient(rgba(0, 41, 61, .6), rgba(0, 41, 61, .6)), url(img/fachadas/1.jpg) center/cover no-repeat; /* Cambia a tu imagen de hero para fachadas */
    padding: 180px 0 100px;
    color: #fff;
    text-align: center;
}

.hero-facades h1 {
    font-family: Raleway, sans-serif;
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .4);
}

.hero-facades p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: .9;
}

/* Ajustes responsivos para el hero de fachadas */
@media (max-width: 991px) {
    .hero-facades {
        padding: 150px 0 80px;
    }
    .hero-facades h1 {
        font-size: 2.8rem;
    }
    .hero-facades p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-facades {
        padding: 120px 0 60px;
    }
    .hero-facades h1 {
        font-size: 2.2rem;
    }
    .hero-facades p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-facades {
        padding: 100px 0 50px;
    }
    .hero-facades h1 {
        font-size: 1.8rem;
    }
    .hero-facades p {
        font-size: 0.9rem;
    }
}

/* --- Estilos específicos para la página de Cubiertas --- */
.hero-roofing {
    background: linear-gradient(rgba(0, 41, 61, .6), rgba(0, 41, 61, .6)), url(img/cubiertas/wallpaper2.jpg) center/cover no-repeat; /* Cambia a tu imagen de hero para cubiertas */
    background-size: cover;
    background-position: center;
    padding: 180px 0 100px;
    color: #fff;
    text-align: center;
}

.hero-roofing h1 {
    font-family: Raleway, sans-serif;
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .4);
}

.hero-roofing p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: .9;
}

/* Ajustes responsivos para el hero de cubiertas */
@media (max-width: 991px) {
    .hero-roofing {
        padding: 150px 0 80px;
    }
    .hero-roofing h1 {
        font-size: 2.8rem;
    }
    .hero-roofing p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-roofing {
        padding: 120px 0 60px;
    }
    .hero-roofing h1 {
        font-size: 2.2rem;
    }
    .hero-roofing p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-roofing {
        padding: 100px 0 50px;
    }
    .hero-roofing h1 {
        font-size: 1.8rem;
    }
    .hero-roofing p {
        font-size: 0.9rem;
    }
}
/* ==========================================================================
   Mantenimientos.html - Estilos Específicos
   ========================================================================== */

/* --- HERO SECTION --- */
.hero-maintenance {
    /* Usando una imagen de inspección como fondo */
    background: linear-gradient(rgba(0, 41, 61, .75), rgba(0, 41, 61, .4)), url(img/fondoinspeccion.png) center/cover no-repeat;
    padding: 180px 0 100px;
    color: #fff;
    text-align: center;
    background-attachment: fixed; /* Efecto Parallax sutil */
}

.hero-maintenance h1.page-title {
    font-family: 'Raleway', sans-serif;
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .4);
}

.hero-maintenance p.page-subtitle {
    font-size: 1.2rem;
    max-width: 750px;
    margin: 0 auto;
    opacity: .9;
}

/* --- APPROACH SECTION (MANTENIMIENTO) --- */
.approach-grid {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-top: 40px;
}

.approach-text, .approach-image {
    flex: 1 1 50%;
}

.approach-list {
    list-style: none;
    padding-left: 0;
    margin-top: 30px;
}

.approach-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--dark-text-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

.approach-list i {
    color: var(--accent-green);
    font-size: 1.3rem;
    padding-top: 3px;
    flex-shrink: 0;
}

/* --- PROCESS SECTION (TIMELINE) --- */
.process-section {
    background-color: var(--background-color);
}

.process-timeline {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    margin-top: 80px;
    padding-top: 50px;
}

/* Línea horizontal del timeline */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    margin: 0 5%;
}

.timeline-item {
    flex: 1;
    text-align: center;
    position: relative;
    padding-top: 20px;
}

.timeline-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-blue);
    color: #fff;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 5px solid var(--background-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item h4 {
    margin-top: 60px;
    font-size: 1.3rem;
    color: var(--dark-text-color);
}

.timeline-item p {
    color: #6c757d;
    line-height: 1.6;
}

/* --- GALLERY SECTION (MANTENIMIENTO) --- */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
    width: 100%;
    break-inside: avoid-column;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item .gallery-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-content {
    opacity: 1;
}

.gallery-content h4 {
    margin: 0;
    font-size: 1.1rem;
}

.gallery-content p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- BENEFITS SECTION --- */
.benefits-section {
    background-color: var(--page-background);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-item {
    display: flex;
    gap: 20px;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.feature-item h4 {
    margin: 0 0 10px;
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.feature-item p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* ==========================================================================
   MEDIA QUERIES (AÑADIDOS AL BLOQUE EXISTENTE)
   ========================================================================== */

/* --- Ajuste para Tablets (<= 991px) --- */
@media (max-width: 991px) {
    /* ... (otros estilos existentes) ... */

    /* Hero Mantenimiento */
    .hero-maintenance h1.page-title {
        font-size: 2.8rem;
    }
    .hero-maintenance p.page-subtitle {
        font-size: 1.1rem;
    }

    /* Approach Section */
    .approach-grid {
        flex-direction: column;
        gap: 40px;
    }

    /* Process Timeline */
    .process-timeline {
        flex-direction: column;
        padding-top: 0;
        margin-top: 40px;
        padding-left: 20px; /* Espacio para la línea vertical */
    }

    /* Línea vertical para el timeline en móvil */
    .process-timeline::before {
        height: 100%;
        width: 3px;
        top: 0;
        left: 20px;
        right: auto;
        margin: 0;
    }

    .timeline-item {
        text-align: left;
        padding-top: 40px;
        padding-left: 30px;
    }

    .timeline-icon-wrapper {
        top: 20px;
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-item h4 {
        margin-top: 0;
    }

    /* Gallery Grid */
    .gallery-grid {
        column-count: 2;
    }
}

/* --- Ajuste para Móviles (<= 768px) --- */
@media (max-width: 768px) {
    /* ... (otros estilos existentes) ... */

    /* Hero Mantenimiento */
    .hero-maintenance h1.page-title {
        font-size: 2.2rem;
    }
    .hero-maintenance p.page-subtitle {
        font-size: 1rem;
    }

    /* Gallery Grid */
    .gallery-grid {
        column-count: 1;
    }
}

/* --- Ajuste para Móviles Pequeños (<= 576px) --- */
@media (max-width: 576px) {
    /* ... (otros estilos existentes) ... */
    
    /* Hero Mantenimiento */
    .hero-maintenance h1.page-title {
        font-size: 1.8rem;
    }

    /* Approach Section */
    .approach-list li {
        font-size: 1rem;
    }

    /* Benefits Section */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .feature-icon {
        margin: 0 auto 10px;
    }
}

/* ==========================================================================
   Pergolas.html - Estilos Específicos
   ========================================================================== */

/* --- HERO SECTION --- */
.pergolas-hero {
    background: linear-gradient(rgba(0, 41, 61, 0.7), rgba(0, 119, 182, 0.6)), url(img/pergolas/3.jpg) no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 180px 20px 100px;
}
.pergolas-hero h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    margin-top: 0;
    font-family: 'Raleway', sans-serif;
}
.pergolas-hero p { 
    font-size: 1.4rem; 
    max-width: 850px; 
    margin: 15px auto 30px; 
    opacity: 0.95; 
    line-height: 1.7;
}

/* --- BENEFITS SECTION --- */
.benefits-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 60px;
}
.benefit-card { 
    background-color: #fff; 
    border-radius: 12px; 
    padding: 35px 30px; 
    text-align: center; 
    border: 1px solid #e9ecef; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.benefit-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 12px 28px rgba(0, 119, 182, 0.15); 
}
.benefit-icon { 
    font-size: 3rem; 
    color: var(--primary-blue);
    margin-bottom: 20px; 
    transition: transform 0.3s ease; 
}
.benefit-card:hover .benefit-icon { 
    transform: scale(1.1) rotate(-5deg); 
}
.benefit-card h3 { 
    color: var(--dark-text-color);
    margin-bottom: 15px; 
    font-weight: 700;
}
.benefit-card p {
    color: #6c757d;
    line-height: 1.7;
}

/* --- PLANS SECTION (Pricing) --- */
.plans-section { 
    background-color: var(--page-background);
}
.plans-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    align-items: stretch;
    margin-top: 60px;
}
.plan-card { 
    background-color: #fff; 
    border-radius: 15px; 
    padding: 40px; 
    display: flex; 
    flex-direction: column; 
    border: 2px solid #e9ecef; 
    transition: all 0.3s ease; 
    position: relative; 
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05); 
}
.plan-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--primary-blue); 
}
.plan-popular { 
    border-color: var(--accent-green); 
    transform: scale(1.05); 
    z-index: 10; 
    box-shadow: 0 10px 40px rgba(139, 195, 74, 0.25); 
}
.plan-popular:hover { 
    transform: scale(1.07) translateY(-5px); 
}
.popular-badge { 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: linear-gradient(45deg, var(--accent-green), #689f38); 
    color: #fff; 
    padding: 8px 20px; 
    border-radius: 50px; 
    font-size: 0.9rem; 
    font-weight: 700; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); 
}
.plan-card h3 { 
    font-size: 1.8rem; 
    color: var(--primary-blue); 
    text-align: center; 
    margin-bottom: 10px; 
    font-weight: 800;
}
.plan-card .plan-description { 
    font-size: 1rem; 
    color: #6c757d; 
    text-align: center; 
    min-height: 60px; 
    line-height: 1.6;
}
.plan-features { 
    list-style: none; 
    padding: 0; 
    margin: 30px 0; 
    flex-grow: 1; 
}
.plan-features li { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 15px; 
    font-size: 1rem; 
    color: var(--dark-text-color);
}
.plan-features i { 
    color: var(--primary-blue);
    font-size: 1.2rem; 
    flex-shrink: 0;
}
.plan-popular .plan-features i { 
    color: var(--accent-green); 
}
.btn-plan { 
    display: block; 
    width: 100%; 
    text-align: center; 
    background-color: #555; 
    color: #fff; 
    padding: 15px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 700; 
    transition: all 0.3s ease; 
    margin-top: auto; 
}
.plan-card:hover .btn-plan { 
    background-color: var(--primary-blue); 
}
.plan-popular .btn-plan { 
    background: linear-gradient(45deg, var(--accent-green), #689f38); 
    color: #fff; 
}
.plan-popular .btn-plan:hover {
    filter: brightness(1.1);
}

/* --- CTA WITH BROCHURE --- */
.detailed-cta-section { 
    background: linear-gradient(rgba(0, 41, 61, 0.85), rgba(0, 119, 182, 0.8)), url(img/pergolas/1.jpg) no-repeat center center/cover; 
    color: #fff; 
    text-align: center; 
    background-attachment: fixed;
    padding: 100px 20px;
}
.detailed-cta-section .section-title { 
    color: #fff; 
    padding-bottom: 0;
    margin-bottom: 20px;
}
.detailed-cta-section .section-title::after {
    display: none;
}
.detailed-cta-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}
.btn-brochure { 
    display: inline-flex; 
    align-items: center; 
    gap: 12px; 
    background-color: #d9534f;
    color: #fff; 
    padding: 15px 30px; 
    font-size: 1.1rem; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    border-radius: 50px;
    font-weight: 700;
}
.btn-brochure:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); 
    background-color: #c9302c; 
}

/* --- GALLERY SECTION --- */
.gallery-section {
    background-color: #fff;
}
.pergolas-gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px;
    margin-top: 60px;
}
.gallery-item { 
    display: block; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); 
    position: relative;
    text-decoration: none;
}
.gallery-item img { 
    width: 100%; 
    height: 280px; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.4s ease; 
}
.gallery-item:hover img { 
    transform: scale(1.05); 
}
.gallery-item .overlay { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: linear-gradient(to top, rgba(0, 59, 89, 0.9), transparent); 
    color: #fff; 
    padding: 40px 20px 20px; 
    text-align: center; 
    opacity: 0; 
    transition: opacity 0.4s ease; 
    height: 100%;
    display: flex; 
    justify-content: center; 
    align-items: flex-end;
}
.gallery-item:hover .overlay { 
    opacity: 1; 
}
.gallery-item .overlay h4 {
    margin: 0;
    font-size: 1.5rem;
    font-family: 'Raleway', sans-serif;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* ==========================================================================
   MEDIA QUERIES - Ajustes para la página de Pérgolas
   ========================================================================== */

@media (max-width: 991px) { 
    .pergolas-hero { 
        padding: 150px 20px 80px;
    }
    .pergolas-hero h1 { 
        font-size: 2.8rem; 
    }
    .pergolas-hero p {
        font-size: 1.2rem;
    }
    .plans-grid { 
        grid-template-columns: 1fr;
    } 
    .plan-popular { 
        transform: scale(1); 
        order: -1;
    } 
    .plan-popular:hover { 
        transform: scale(1.02) translateY(-5px);
    }
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    .pergolas-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .gallery-item img {
        height: 240px;
    }
}
@media (max-width: 768px) {
    .pergolas-hero h1 { 
        font-size: 2.2rem; 
    }
    .pergolas-hero p {
        font-size: 1rem;
    }
    .pergolas-hero .btn-primary {
        padding: 12px 28px;
        font-size: 1rem;
    }
    .detailed-cta-section {
        background-attachment: scroll;
    }
    .pergolas-gallery {
        grid-template-columns: 1fr;
    }
    .gallery-item img {
        height: 200px;
    }
}
@media (max-width: 480px) { 
    .pergolas-hero h1 { 
        font-size: 1.9rem; 
    }
    .pergolas-hero p {
        font-size: 0.9rem;
    }
    .plan-card {
        padding: 30px 20px;
    }
    .plan-card h3 {
        font-size: 1.5rem;
    }
    .plan-card .plan-description {
        min-height: auto;
    }
}
/* Estilos para la nueva sección de servicios de remodelación */
.remodeling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #0077b6;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.service-icon {
    font-size: 2.5rem;
    color: #0077b6;
    margin-bottom: 1rem;
}

.service-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.service-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-subtitle {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #555;
}

.service-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.service-list li i {
    color: #28a745;
    margin-right: 0.75rem;
}
/* --- Estilos para la sección de Mantenimiento de Piscinas --- */
.maintenance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.maintenance-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.maintenance-content p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Responsive para la sección de mantenimiento */
@media (max-width: 768px) {
    .maintenance-grid {
        grid-template-columns: 1fr;
    }
    .maintenance-image {
        margin-bottom: 2rem;
    }
    .maintenance-content .section-title {
        text-align: center !important;
    }
}


/* --- Mejoras para el diseño de la Galería --- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    transition: transform 0.4s ease-in-out;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay-content h4 {
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
    font-family: 'Raleway', sans-serif;
}

.gallery-overlay-content p {
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Estilos específicos para la página de Piscinas --- */
.piscinas-hero { 
    background: linear-gradient(rgba(0, 41, 61, 0.7), rgba(0, 119, 182, 0.6)), url('img/piscinas/piscinas logo.png') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 180px 20px 100px;
}
.piscinas-hero h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    margin-top: 0;
    font-family: 'Raleway', sans-serif;
}
.piscinas-hero p { 
    font-size: 1.4rem; 
    max-width: 850px; 
    margin: 15px auto 30px; 
    opacity: 0.95; 
    line-height: 1.7;
}

/* --- Approach Grid --- */
.approach-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 60px;
}
.approach-card { 
    background-color: #fff; 
    padding: 35px 30px; 
    text-align: center; 
    border-radius: 12px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.approach-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 12px 28px rgba(0, 119, 182, 0.15); 
}
.approach-icon { 
    font-size: 3rem; 
    color: var(--primary-blue);
    margin-bottom: 20px; 
}
.approach-card h3 { 
    font-size: 1.5rem; 
    color: var(--dark-text-color); 
    margin-bottom: 10px; 
    font-weight: 700;
}
.approach-card p {
    color: #6c757d;
    line-height: 1.7;
}

/* --- Services Section (Piscinas) --- */
.services-p-section { 
    background-color: var(--page-background);
}
.services-p-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 60px;
}
.service-p-card { 
    background-color: #fff; 
    border-radius: 15px; 
    padding: 40px; 
    display: flex; 
    flex-direction: column; 
    border: 2px solid #e9ecef; 
    transition: all 0.3s ease; 
    position: relative; 
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05); 
    text-align: center;
}
.service-p-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--primary-blue); 
}
.service-p-icon { 
    font-size: 3rem; 
    color: var(--primary-blue); 
    margin-bottom: 20px; 
}
.service-p-title { 
    font-size: 1.8rem; 
    color: var(--primary-blue); 
    margin-bottom: 10px; 
    font-weight: 800;
}
.service-p-card .pricing-description {
    font-size: 1rem; 
    color: #6c757d; 
    min-height: 60px; 
    line-height: 1.6;
}
.service-p-card .feature-list {
    list-style: none; 
    padding: 0; 
    margin: 30px 0; 
    flex-grow: 1; 
    text-align: left;
}
.service-p-card .feature-list li { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 15px; 
    font-size: 1rem; 
    color: var(--dark-text-color);
}
.service-p-card .feature-list i { 
    color: var(--accent-green);
    font-size: 1.2rem; 
    flex-shrink: 0;
}
.service-p-card .btn-primary {
    display: block; 
    width: 100%; 
    text-align: center; 
    background-color: var(--primary-blue); 
    color: #fff; 
    padding: 15px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 700; 
    transition: all 0.3s ease; 
    margin-top: auto; 
}
.service-p-card .btn-primary:hover {
    background-color: #005f94;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 119, 182, 0.3);
}

/* --- Gallery Section (Piscinas) --- */
/* The .gallery-grid-masonry and .gallery-item styles are largely handled by existing global gallery styles from pergolas.html */
/* We just need to ensure the overlay and content look good */

/* --- Contact Section (Piscinas) --- */
/* The .contact-section and its child elements are largely handled by existing global contact styles from pergolas.html */
.contact-section {
    background-color: var(--primary-blue);
    color: #fff;
}
.contact-section .section-title,
.contact-section .section-subtitle {
    color: #fff;
}
.contact-section .contact-card {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.contact-section .contact-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}
.contact-section .contact-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
}
.contact-section .contact-text h4 {
    color: #fff;
}
.contact-section .contact-text p {
    color: rgba(255, 255, 255, 0.8);
}


/* ==========================================================================
   MEDIA QUERIES - Ajustes para la página de Piscinas
   ========================================================================== */

@media (max-width: 991px) { 
    .piscinas-hero { 
        padding: 150px 20px 80px;
    }
    .piscinas-hero h1 { 
        font-size: 2.8rem; 
    }
    .piscinas-hero p {
        font-size: 1.2rem;
    }
    .approach-grid { 
        grid-template-columns: 1fr;
    } 
    .services-p-grid { 
        grid-template-columns: 1fr;
    } 
    .service-p-card { 
        padding: 30px 20px;
    }
    .service-p-card .pricing-description {
        min-height: auto;
    }
}
@media (max-width: 768px) {
    .piscinas-hero h1 { 
        font-size: 2.2rem; 
    }
    .piscinas-hero p {
        font-size: 1rem;
    }
    .piscinas-hero .btn-primary {
        padding: 12px 28px;
        font-size: 1rem;
    }
    .approach-card {
        padding: 25px 20px;
    }
    .approach-icon {
        font-size: 2.5rem;
    }
    .approach-card h3 {
        font-size: 1.3rem;
    }
    .service-p-title {
        font-size: 1.5rem;
    }
    .service-p-icon {
        font-size: 2.5rem;
    }
}
@media (max-width: 480px) { 
    .piscinas-hero h1 { 
        font-size: 1.9rem; 
    }
    .piscinas-hero p {
        font-size: 0.9rem;
    }
    .service-p-card {
        padding: 25px 15px;
    }
    .service-p-title {
        font-size: 1.3rem;
    }
    .service-p-icon {
        font-size: 2rem;
    }
    .service-p-card .feature-list li {
        font-size: 0.9rem;
    }
}

/* --- Estilos específicos para la página de Fachadas Kingspan --- */
.hero-facades {
    background: linear-gradient(rgba(0, 41, 61, .7), rgba(122, 129, 133, 0.6)), url(img/fachadas/1.jpg) no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 180px 20px 100px;
    position: relative;
}

.hero-facades h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    margin-top: 0;
    font-family: 'Raleway', sans-serif;
}
.hero-facades p { 
    font-size: 1.4rem; 
    max-width: 850px; 
    margin: 15px auto 30px; 
    opacity: 0.95; 
    line-height: 1.7;
}

.kingspan-logo-hero {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 150px;
    opacity: 0.8;
}

.kingspan-logo-hero img {
    width: 100%;
    height: auto;
}

/* Media queries for hero-facades */
@media (max-width: 991px) { 
    .hero-facades { 
        padding: 150px 20px 80px;
    }
    .hero-facades h1 { 
        font-size: 2.8rem; 
    }
    .hero-facades p {
        font-size: 1.2rem;
    }
    .kingspan-logo-hero {
        width: 120px;
        bottom: 10px;
        right: 10px;
    }
}
@media (max-width: 768px) {
    .hero-facades {
        padding: 120px 20px 60px;
    }
    .hero-facades h1 { 
        font-size: 2.2rem; 
    }
    .hero-facades p {
        font-size: 1rem;
    }
    .kingspan-logo-hero {
        width: 100px;
        bottom: 5px;
        right: 5px;
    }
}
@media (max-width: 480px) { 
    .hero-facades {
        padding: 100px 15px 50px;
    }
    .hero-facades h1 { 
        font-size: 1.9rem; 
    }
    .hero-facades p {
        font-size: 0.9rem;
    }
    .kingspan-logo-hero {
        display: none;
    }
}


/* =================================================================== */
/*         ESTILOS PARA LA SECCIÓN DE PRODUCTOS KINGSPAN (Reemplaza pricing-section) */
/* =================================================================== */
.products-kingspan-section {
    background-color: var(--page-background);
}

.products-kingspan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.kingspan-product-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.kingspan-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.product-header {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.kingspan-product-card:hover .product-card-image {
    transform: scale(1.05);
}

.product-icon {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-blue);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid #fff;
    transition: bottom 0.3s ease;
}

.kingspan-product-card:hover .product-icon {
    bottom: -20px;
}

.kingspan-product-card .product-icon.icon-kingwall-agro {
    background-color: var(--accent-green);
}
.kingspan-product-card .product-icon.icon-lana-mineral {
    background-color: #e74c3c;
}


.product-body {
    padding: 40px 30px 30px;
    text-align: center;
    flex-grow: 1;
}

.product-title {
    font-size: 1.6rem;
    color: var(--dark-text-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.product-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    min-height: 80px;
    margin-bottom: 20px;
}

.product-subtitle {
    font-size: 1.1rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 600;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    text-align: left;
    flex-grow: 1;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 10px;
}

.product-features i {
    color: var(--accent-green);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.kingspan-product-card .btn-primary {
    width: 100%;
    margin-top: auto;
}

/* =================================================================== */
/*         SECCIÓN: DETALLE DE LAS SOLUCIONES DE SERVICIOS (FACHADAS KINGSPAN) */
/* =================================================================== */

.service-details {
    background-color: var(--background-color);
}

.service-details .section-spacing-bottom {
    margin-bottom: 4rem;
}

.service-details .service-detail-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

.service-details .service-detail-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* En pantallas más grandes (tablets y escritorio), layout de dos columnas */
@media (min-width: 768px) {
    .service-details .service-detail-item {
        grid-template-columns: 1fr 1.2fr;
        gap: 4rem;
    }
    
    /* Alternar la posición de la imagen para un diseño más dinámico */
    .service-details .service-detail-item:nth-child(even) .service-detail-image {
        order: 2;
    }
}

.service-details .service-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    max-height: 400px;
}

.service-details .service-detail-content h3 {
    font-size: 2rem;
    color: var(--dark-text-color);
    margin-bottom: 1rem;
    font-family: 'Raleway', sans-serif;
}

.service-details .service-detail-content h4 {
    font-size: 1.2rem;
    color: #495057;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.service-details .service-detail-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #6c757d;
}

.service-details .service-detail-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.service-details .service-detail-content ul li {
    padding-left: 1.8em;
    position: relative;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #6c757d;
}

.service-details .service-detail-content ul li::before {
    content: '✓';
    color: var(--accent-green);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

/* Specific Finishes Grid */
.finishes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.finishes-grid .finish-item {
    text-align: center;
    max-width: 100px;
}

.finishes-grid .finish-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.finishes-grid .finish-item span {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-text-color);
}

/* =================================================================== */
/*         GALERÍA DE PROYECTOS KINGSPAN */
/* =================================================================== */
.gallery-kingspan-section {
    background-color: var(--page-background);
}
.gallery-kingspan-section .gallery-grid-masonry {
    /* Styles are mostly inherited, but ensures section specific styles */
}


/* =================================================================== */
/*         MEDIA QUERIES ESPECÍFICAS PARA PRODUCTOS KINGSPAN Y DETALLES */
/* =================================================================== */
@media (max-width: 768px) {
    .products-kingspan-grid {
        grid-template-columns: 1fr;
    }
    .product-description {
        min-height: auto;
    }
    .product-title {
        font-size: 1.4rem;
    }
    .product-icon {
        font-size: 2.5rem;
    }

    .service-details .service-detail-content h3 {
        font-size: 1.6rem;
    }
    .service-details .service-detail-content h4 {
        font-size: 1.1rem;
    }
    .service-details .service-detail-content p, .service-details .service-detail-content ul li {
        font-size: 0.95rem;
    }
    .finishes-grid {
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .product-body {
        padding: 30px 20px 20px;
    }
    .product-title {
        font-size: 1.3rem;
    }
    .product-description {
        font-size: 0.85rem;
        min-height: auto;
    }
    .product-subtitle {
        font-size: 1rem;
    }
    .product-features li {
        font-size: 0.85rem;
    }
    .service-details .service-detail-content h3 {
        font-size: 1.4rem;
    }
    .service-details .service-detail-content h4 {
        font-size: 1rem;
    }
    .service-details .service-detail-content p, .service-details .service-detail-content ul li {
        font-size: 0.9rem;
    }
    .service-details .service-detail-content ul li::before {
        font-size: 1em;
    }
    .finishes-grid {
        gap: 10px;
    }
    .finishes-grid .finish-item {
        max-width: 80px;
    }
    .finishes-grid .finish-item img {
        height: 60px;
    }
}


/* --- Estilos específicos para la página de Obras Civiles --- */

/* Hero Section */
.hero-civil-works {
    background: linear-gradient(rgba(0, 41, 61, 0.7), rgba(0, 119, 182, 0.6)), url(img/obrasciviles/hero-obras-civiles.jpg) no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 180px 20px 100px;
}
.hero-civil-works .page-title {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    margin-top: 0;
    font-family: 'Raleway', sans-serif;
}
.hero-civil-works .page-subtitle { 
    font-size: 1.4rem; 
    max-width: 850px; 
    margin: 15px auto 30px; 
    opacity: 0.95; 
    line-height: 1.7;
}

/* Media Queries for hero-civil-works */
@media (max-width: 991px) { 
    .hero-civil-works { 
        padding: 150px 20px 80px;
    }
    .hero-civil-works .page-title { 
        font-size: 2.8rem; 
    }
    .hero-civil-works .page-subtitle {
        font-size: 1.2rem;
    }
}
@media (max-width: 768px) {
    .hero-civil-works {
        padding: 120px 20px 60px;
    }
    .hero-civil-works .page-title { 
        font-size: 2.2rem; 
    }
    .hero-civil-works .page-subtitle {
        font-size: 1rem;
    }
}
@media (max-width: 480px) { 
    .hero-civil-works {
        padding: 100px 15px 50px;
    }
    .hero-civil-works .page-title { 
        font-size: 1.9rem; 
    }
    .hero-civil-works .page-subtitle {
        font-size: 0.9rem;
    }
}

/* Project Types Grid */
.project-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.project-type-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-type-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(0, 119, 182, 0.1);
    border-color: var(--primary-blue);
}

.project-type-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.project-type-card h3 {
    font-size: 1.4rem;
    color: var(--dark-text-color);
    margin: 0 0 15px 0;
    font-weight: 700;
}

.project-type-card p {
    color: #6c757d;
    line-height: 1.7;
    margin: 0;
}

/* =================================================================== */
/*         SECCIÓN: DETALLE DE LAS SOLUCIONES DE OBRA CIVIL            */
/* =================================================================== */
.civil-work-details {
    background-color: var(--page-background);
}

.civil-work-details .section-spacing-bottom {
    margin-bottom: 4rem;
}

.civil-detail-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

.civil-detail-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* En pantallas más grandes (tablets y escritorio), layout de dos columnas */
@media (min-width: 768px) {
    .civil-detail-item {
        grid-template-columns: 1fr 1.2fr;
        gap: 4rem;
    }
    
    /* Alternar la posición de la imagen para un diseño más dinámico */
    .civil-detail-item:nth-child(even) .civil-detail-image {
        order: 2;
    }
}

.civil-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    max-height: 400px;
}

.civil-detail-content h3 {
    font-size: 2rem;
    color: var(--dark-text-color);
    margin-bottom: 1rem;
    font-family: 'Raleway', sans-serif;
}

.civil-detail-content h4 {
    font-size: 1.2rem;
    color: #495057;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.civil-detail-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #6c757d;
}

.civil-detail-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.civil-detail-content ul li {
    padding-left: 1.8em;
    position: relative;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #6c757d;
}

.civil-detail-content ul li::before {
    content: '✓';
    color: var(--accent-green);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

/* Gallery Section (Obras Civiles) */
.gallery-civil-works {
    background-color: var(--background-color);
}
.gallery-civil-works .gallery-grid-masonry {
    /* Existing gallery-grid-masonry styles apply */
}
/* Ensure gallery item overlay is consistent */
.gallery-container .gallery-item {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    width: 100%;
    break-inside: avoid-column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
}

.gallery-container .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-container .gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-container .gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 25, 38, .8) 100%);
    opacity: 0;
    transition: opacity .4s ease;
}

.gallery-container .gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-container .gallery-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: #fff;
    text-align: left;
    transform: translateY(10px);
    transition: transform .4s ease, opacity .4s ease;
    opacity: 0;
    z-index: 2;
}

.gallery-container .gallery-item:hover .gallery-item-content {
    transform: translateY(0);
    opacity: 1;
}

.gallery-container .gallery-item-content h3 {
    margin: 0;
    font-size: 1.2rem;
    font-family: 'Raleway', sans-serif;
}

.gallery-container .gallery-item-content p {
    margin: .25rem 0 0;
    font-size: .9rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 5px;
}
.gallery-container .gallery-item-content p i {
    margin-right: 0;
}

/* Tech Section */
.tech-section {
    background-color: var(--page-background);
}
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.tech-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 35px 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(0, 119, 182, 0.1);
}

.tech-icon {
    flex-shrink: 0;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-top: 5px;
}

.tech-item h3 {
    font-size: 1.4rem;
    color: var(--dark-text-color);
    margin: 0 0 10px 0;
    font-weight: 700;
}

.tech-item p {
    color: #6c757d;
    line-height: 1.7;
    margin: 0;
}

/* Commitment Section */
.commitment-section {
    background-color: var(--background-color);
}
.commitment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.commitment-item {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.commitment-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(0, 119, 182, 0.1);
    border-color: var(--primary-blue);
}

.commitment-icon {
    font-size: 3rem;
    color: var(--accent-green);
    margin-bottom: 20px;
}

.commitment-item h3 {
    font-size: 1.4rem;
    color: var(--dark-text-color);
    margin: 0 0 15px 0;
    font-weight: 700;
}

.commitment-item p {
    color: #6c757d;
    line-height: 1.7;
    margin: 0;
}

/* Contact Section (Obras Civiles) - Reusing general contact styles */
.contact-section {
    background-color: var(--page-background);
}
.contact-section .section-title,
.contact-section .section-subtitle {
    color: var(--dark-text-color);
}
.contact-section .contact-card {
    background-color: #fff;
    color: var(--dark-text-color);
    border: 1px solid #e9ecef;
}
.contact-section .contact-card:hover {
    background-color: #fff;
    box-shadow: 0 15px 40px rgba(0, 119, 182, 0.12);
}
.contact-section .contact-icon-wrapper {
    background-color: #e6f7ff;
    color: var(--primary-blue);
}
.contact-section .contact-text h4 {
    color: var(--dark-text-color);
}
.contact-section .contact-text p {
    color: #6c757d;
}

/* Media Queries for Project Types Grid */
@media (max-width: 768px) {
    .project-types-grid {
        grid-template-columns: 1fr;
    }
    .project-type-card {
        padding: 30px 20px;
    }
    .project-type-icon {
        font-size: 2.5rem;
    }
    .project-type-card h3 {
        font-size: 1.2rem;
    }
    
    .civil-detail-content h3 {
        font-size: 1.6rem;
    }
    .civil-detail-content h4 {
        font-size: 1.1rem;
    }
    .civil-detail-content p, .civil-detail-content ul li {
        font-size: 0.95rem;
    }

    .tech-grid, .commitment-grid {
        grid-template-columns: 1fr;
    }
    .tech-item, .commitment-item {
        padding: 30px 20px;
    }
    .tech-icon, .commitment-icon {
        font-size: 2.5rem;
    }
    .tech-item h3, .commitment-item h3 {
        font-size: 1.2rem;
    }
}
@media (max-width: 480px) {
    .project-type-card {
        padding: 25px 15px;
    }
    .project-type-icon {
        font-size: 2rem;
    }
    .project-type-card h3 {
        font-size: 1.1rem;
    }

    .civil-detail-content h3 {
        font-size: 1.4rem;
    }
    .civil-detail-content h4 {
        font-size: 1rem;
    }
    .civil-detail-content p, .civil-detail-content ul li {
        font-size: 0.9rem;
    }
    .civil-detail-content ul li::before {
        font-size: 1em;
    }

    .tech-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 15px;
    }
    .tech-icon {
        margin-top: 0;
    }
    .tech-item h3 {
        font-size: 1.1rem;
    }
    .commitment-icon {
        font-size: 2.5rem;
    }
    .commitment-item h3 {
        font-size: 1.1rem;
    }
}