* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: #f8f9fa; color: #333; overflow-x: hidden; scroll-behavior: smooth; }

.whatsapp-float {
    position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px;
    background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center;
    font-size: 30px; box-shadow: 2px 2px 3px #999; z-index: 1000;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    transition: all 0.3s ease;
}
.whatsapp-float span {
    position: absolute; right: 70px; background: #333; padding: 5px 15px;
    font-size: 14px; border-radius: 5px; opacity: 0; transition: 0.3s; pointer-events: none;
    white-space: nowrap;
}
.whatsapp-float:hover span { opacity: 1; }
.whatsapp-float:hover { transform: scale(1.1); background-color: #128C7E; }

header {
    background: #fff; padding: 10px 50px; display: flex;
    justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.logo img { 
    height: 140px; width: auto; transition: 0.4s;
    animation: flotarLogo 4s ease-in-out infinite; 
}
.logo img:hover { 
    transform: scale(1.05) translateY(-2px); 
    filter: drop-shadow(0 6px 10px rgba(0, 102, 204, 0.15)); 
    animation-play-state: paused;
}
@keyframes flotarLogo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

nav ul { list-style: none; display: flex; gap: 20px; }
nav ul li a { text-decoration: none; color: #333; font-weight: 600; transition: color 0.3s;}
nav ul li a:hover { color: #003366; }

#inicio {
    position: relative; height: 90vh; color: white;
    display: flex; align-items: center; justify-content: center; text-align: center;
    overflow: hidden;
}
/* Altura modificada para las páginas internas */
.hero-interno { height: 60vh !important; }

#video-fondo {
    position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%;
    width: auto; height: auto; z-index: -2; transform: translate(-50%, -50%);
    object-fit: cover;
}
.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: -1;
}
.contenido-hero h2 { font-size: 4rem; text-transform: uppercase; margin-bottom: 10px; }
.contenido-hero p { font-size: 1.5rem; margin-bottom: 30px; max-width: 700px; color: #eee;}

.btn-principal {
    background-color: #003366; color: white; padding: 15px 40px;
    text-decoration: none; font-weight: bold; border-radius: 5px;
    transition: 0.3s; display: inline-block; border: none; cursor: pointer; font-size: 1rem;
}
.btn-principal:hover { background-color: #0055aa; transform: translateY(-3px); }

#servicios { padding: 80px 5%; text-align: center; }
#servicios h2 { font-size: 2.5rem; color: #1a1a1a; }
.contenedor-servicios { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-top: 40px; }
.servicio { background: white; padding: 40px; border-radius: 10px; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.05); position: relative; }
.servicio i { font-size: 3rem; color: #003366; margin-bottom: 15px; }
/* Estilos nuevos para hacer las tarjetas clicables */
.servicio.clicable { cursor: pointer; border: 1px solid transparent; }
.servicio.clicable:hover { transform: translateY(-10px); border-color: #003366; box-shadow: 0 10px 25px rgba(0, 51, 102, 0.15); }
.btn-leer-mas { display: inline-block; margin-top: 15px; color: #003366; font-weight: bold; font-size: 0.9rem; transition: 0.3s; }
.servicio.clicable:hover .btn-leer-mas { transform: translateX(5px); color: #0055aa; }

#galeria { padding: 80px 5%; background: #f0f0f0; text-align: center; }
#galeria h2 { font-size: 2.5rem; color: #1a1a1a; }
.cuadricula-galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; margin-top: 30px; }
.item-galeria { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; }
.item-galeria img { width: 100%; height: 300px; object-fit: cover; transition: 0.5s; }
.capa-galeria { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 51, 102, 0.85); display: flex; align-items: center;
    justify-content: center; opacity: 0; transition: 0.5s; color: white;
}
.item-galeria:hover img { transform: scale(1.1); }
.item-galeria:hover .capa-galeria { opacity: 1; }

.lightbox {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);
    justify-content: center; align-items: center; flex-direction: column;
}
.contenido-lightbox { max-width: 80%; max-height: 70%; border: 3px solid white; }
#caption { color: white; margin-top: 20px; font-size: 1.2rem; text-align: center; max-width: 80%; }
.cerrar { position: absolute; top: 30px; right: 50px; color: white; font-size: 40px; cursor: pointer; }

#contacto-form { padding: 80px 5%; background: white; }
#contacto-form h2 { font-size: 2.5rem; color: #1a1a1a; }
.contenedor-formulario { max-width: 600px; margin: 0 auto; text-align: center; }
form { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; }
form input, form select, form textarea {
    padding: 15px; border: 1px solid #ddd; border-radius: 5px; font-size: 1rem; outline: none; transition: 0.3s;
}
form input:focus, form select:focus, form textarea:focus { border-color: #003366; box-shadow: 0 0 8px rgba(0, 51, 102, 0.2); }

/* --- SECCIONES DE LAS PÁGINAS INTERNAS (Mantenimiento, CCTV, etc.) --- */
.detalle-servicio { padding: 80px 5%; background: #fff; text-align: center; }
.contenedor-centrado { max-width: 1000px; margin: 0 auto; }
.detalle-servicio h2 { font-size: 2.5rem; color: #003366; margin-bottom: 20px; }
.intro-servicio { font-size: 1.2rem; color: #555; margin-bottom: 50px; }
.grid-caracteristicas { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.caracteristica { padding: 30px; background: #f8f9fa; border-radius: 10px; border-top: 4px solid #003366; text-align: left;}
.caracteristica i { font-size: 2.5rem; color: #003366; margin-bottom: 15px; }
.caracteristica h4 { font-size: 1.3rem; margin-bottom: 10px; }

.proceso-trabajo { padding: 80px 5%; background: #003366; color: white; text-align: center; }
.proceso-trabajo h2 { font-size: 2.5rem; margin-bottom: 50px; }
.pasos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto; }
.paso { position: relative; }
.numero-paso { width: 60px; height: 60px; background: #fff; color: #003366; font-size: 1.5rem; font-weight: bold; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.paso h3 { margin-bottom: 10px; }

.seccion-faq { padding: 80px 5%; background: #f0f0f0; }
.seccion-faq h2 { text-align: center; font-size: 2.5rem; color: #1a1a1a; margin-bottom: 40px; }
.contenedor-faq { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.item-faq { background: white; border-radius: 5px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.pregunta-faq { padding: 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: bold; transition: 0.3s; }
.pregunta-faq:hover { background: #f8f9fa; color: #003366; }
.respuesta-faq { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: #fff; }
.respuesta-faq p { padding-bottom: 20px; color: #555; }
.item-faq.activo .respuesta-faq { max-height: 200px; } /* Altura suficiente para el texto */
.item-faq.activo .pregunta-faq i { transform: rotate(180deg); transition: 0.3s; }
.item-faq:not(.activo) .pregunta-faq i { transform: rotate(0deg); transition: 0.3s; }

footer { background: #111; color: white; padding: 60px 20px; text-align: center; }
.redes-sociales { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }
.btn-social.complejo { color: white; text-decoration: none; display: flex; flex-direction: column; align-items: center; transition: 0.3s; }
.btn-social i { font-size: 2rem; margin-bottom: 10px; transition: 0.3s; }
.btn-social.complejo span { font-size: 0.9rem; font-weight: 600; text-transform: uppercase;}
.btn-social.complejo:hover { transform: translateY(-5px); }
.complejo.whatsapp:hover i { color: #25D366; }
.complejo.instagram:hover i { color: #e4405f; }
.complejo.youtube:hover i { color: #FF0000; }
.complejo.tiktok:hover i { color: #000000; text-shadow: 0 0 5px rgba(255,255,255,0.5); }
.copyright { margin-top: 30px; font-size: 0.9rem; color: #666; border-top: 1px solid #333; padding-top: 20px;}

.btn-volver { margin-bottom: 30px; background-color: #333; }
.btn-volver:hover { background-color: #111; }
.capa-galeria i { margin-right: 10px; font-size: 1.2em; }
#vista-imagenes { animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    header { padding: 10px 20px; flex-direction: column; }
    .logo img { height: 100px; }
    nav ul { margin-top: 15px; gap: 10px; flex-wrap: wrap; justify-content: center; }
    .contenido-hero h2 { font-size: 2.5rem; }
    .contenido-hero p { font-size: 1.1rem; }
}