/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #0b2b5e; 
    --secondary-color: #1a4a8f;
    --accent-color: #d4af37; 
    --accent-hover: #b5952f;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; } /* Prevent horizontal scroll */
body { font-family: 'Montserrat', sans-serif; color: var(--text-color); line-height: 1.6; }
html { scroll-behavior: smooth; }
h1, h2, h3, h4 { font-weight: 700; color: var(--primary-color); margin-bottom: 1rem; }
.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }
.w-100 { width: 100%; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.section { padding: 80px 0; }
.section-title { font-size: 2.5rem; position: relative; margin-bottom: 3rem; word-break: break-word; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 3px; background: var(--accent-color); }
.text-center.section-title::after { left: 50%; transform: translateX(-50%); }

.btn-primary {
    display: inline-block; background: var(--accent-color); color: var(--white);
    padding: 12px 25px; text-decoration: none; border-radius: 50px;
    font-weight: 600; transition: var(--transition); border: none; cursor: pointer;
    text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; text-align: center;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3); }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar { position: fixed; top: 0; width: 100%; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); z-index: 1000; box-shadow: 0 2px 15px rgba(0,0,0,0.1); padding: 10px 0; transition: var(--transition); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 70px; width: auto; object-fit: contain; max-width: 200px; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--primary-color); font-weight: 600; font-size: 0.95rem; position: relative; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--accent-color); transition: width 0.3s; }
.nav-links a:hover::after { width: 100%; }
.header-wa { padding: 10px 20px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; transform: translateX(-50%) translateY(-50%); z-index: -2; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 43, 94, 0.7); z-index: -1; }
.hero-content { text-align: center; color: var(--white); max-width: 800px; padding-top: 80px; width: 90%; }
.hero-title { color: var(--white); font-size: 3.5rem; margin-bottom: 0.5rem; text-shadow: 0 2px 10px rgba(0,0,0,0.5); letter-spacing: 2px; word-break: break-word; }
.hero-typing { font-size: 2rem; color: var(--accent-color); margin-bottom: 2rem; min-height: 80px; word-break: break-word; }
.cursor { animation: blink 0.7s infinite; font-weight: 300; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ==========================================================================
   Nosotros
   ========================================================================== */
.nosotros-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.nosotros-text p { margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--text-light); }
.certificaciones { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #eee; }
.cert-logos { display: flex; gap: 20px; margin: 15px 0; }
.cert-logos img { height: 60px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); max-width: 100%; object-fit: contain; }
.nosotros-img img { width: 100%; border-radius: 10px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* ==========================================================================
   Angular Gallery (Estilo Brochure)
   ========================================================================== */
.angular-gallery { padding: 0; overflow: hidden; height: 500px; width: 100%; }
.gallery-container { display: flex; height: 100%; width: 110%; margin-left: -5%; }
.gallery-item { 
    flex: 1; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    position: relative; 
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
    margin: 0 -2%;
    transition: var(--transition);
    cursor: pointer;
}
.gallery-item:hover { flex: 1.2; z-index: 2; transform: scale(1.05); }
.gallery-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 20px 20px;
    background: linear-gradient(transparent, rgba(11,43,94,0.9));
    color: var(--white); text-align: center;
}
.gallery-overlay h3 { color: var(--white); font-size: 1.2rem; }

/* ==========================================================================
   Especialidades (Process Hover)
   ========================================================================== */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card {
    background: var(--white); padding: 40px 30px; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: var(--transition);
    position: relative; overflow: hidden; z-index: 1; display: flex; flex-direction: column;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1; opacity: 0; transition: var(--transition);
}
.service-card:hover { transform: translateY(-10px); }
.service-card:hover::before { opacity: 1; }
.service-card:hover h3, .service-card:hover ul, .service-card:hover .service-icon svg { color: var(--white); }
.service-icon {
    width: 60px; height: 60px; background: rgba(212, 175, 55, 0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: var(--transition);
}
.service-icon svg { width: 30px; height: 30px; color: var(--accent-color); }
.service-card:hover .service-icon { background: rgba(255,255,255,0.2); }
.service-list { list-style: none; margin-bottom: 25px; flex-grow: 1; }
.service-list li { margin-bottom: 10px; font-size: 0.95rem; position: relative; padding-left: 20px; }
.service-list li::before { content: '•'; position: absolute; left: 0; color: var(--accent-color); font-weight: bold; }
.btn-service { text-decoration: none; color: var(--primary-color); font-weight: 600; font-size: 0.9rem; border: 2px solid var(--accent-color); padding: 10px 20px; border-radius: 5px; text-align: center; transition: var(--transition); background: transparent; }
.service-card:hover .btn-service { background: var(--white); color: var(--primary-color); border-color: var(--white); }
.btn-service:hover { background: var(--accent-color) !important; color: var(--white) !important; border-color: var(--accent-color) !important; }

/* ==========================================================================
   Procesos Nodos Hover
   ========================================================================== */
.process-timeline { display: flex; justify-content: space-between; position: relative; margin-top: 50px; }
.process-line { position: absolute; top: 25px; left: 0; width: 100%; height: 4px; background: var(--primary-color); z-index: 1; }
.process-node { flex: 1; text-align: center; position: relative; z-index: 2; padding: 0 15px; transition: var(--transition); cursor: pointer; }
.node-circle {
    width: 54px; height: 54px; background: var(--white); border: 4px solid var(--primary-color);
    border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: bold; color: var(--primary-color); transition: var(--transition);
    box-shadow: 0 0 0 rgba(212, 175, 55, 0);
}
.process-node:hover .node-circle {
    background: var(--accent-color); border-color: var(--accent-color); color: var(--white);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); transform: scale(1.1);
}
.process-node:hover h4 { color: var(--accent-color); }
.node-content h4 { font-size: 1.1rem; transition: var(--transition); }
.node-content p { font-size: 0.9rem; color: var(--text-light); }

/* ==========================================================================
   Stats Ribbon
   ========================================================================== */
.stats-ribbon { background: url('../assets/fotos/Imagen22.png') center/cover fixed; position: relative; padding: 60px 0; color: var(--white); }
.stats-ribbon::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 43, 94, 0.85); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; position: relative; z-index: 1; text-align: center; }
.stat-number { font-size: 3.5rem; font-weight: 700; color: var(--accent-color); }
.stat-item span:not(.stat-number) { font-size: 3rem; color: var(--accent-color); font-weight: 700; }

/* ==========================================================================
   Clientes
   ========================================================================== */
.clients-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; align-items: center; }
.clients-grid img { height: 80px; object-fit: contain; filter: grayscale(100%); opacity: 0.6; transition: var(--transition); max-width: 150px; }
.clients-grid img:hover { filter: grayscale(0%); opacity: 1; }

/* ==========================================================================
   Reseñas Google
   ========================================================================== */
.google-reviews-header { margin-bottom: 40px; }
.google-rating-summary h2 { font-size: 4rem; margin: 0; color: var(--text-color); line-height: 1; }
.google-stars svg { width: 30px; height: 30px; }
.google-reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.google-card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.08); border: 1px solid #eee; }
.google-card-header { display: flex; align-items: center; margin-bottom: 15px; position: relative; }
.reviewer-avatar { width: 45px; height: 45px; border-radius: 50%; margin-right: 15px; }
.reviewer-info h4 { margin: 0; font-size: 1rem; color: var(--text-color); }
.reviewer-info p { margin: 0; font-size: 0.8rem; color: var(--text-light); }
.google-logo-small { width: 20px; position: absolute; right: 0; top: 10px; }
.google-stars-small { color: #fbbc04; font-size: 1.2rem; margin-bottom: 10px; letter-spacing: 2px; }
.google-text { font-size: 0.95rem; color: var(--text-color); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid #eee; margin-bottom: 15px; border-radius: 8px; overflow: hidden; }
.faq-question { padding: 20px; font-weight: 600; color: var(--primary-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); }
.faq-question:hover { background: var(--bg-light); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out, padding 0.3s ease; color: var(--text-light); }
.faq-item.active .faq-answer { padding: 20px; border-top: 1px solid #eee; }
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-details p { margin-bottom: 15px; font-size: 1.1rem; word-break: break-word; }
.contact-form { background: var(--white); padding: 40px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.form-group { margin-bottom: 20px; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; font-size: 1rem; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--primary-color); color: var(--white); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { height: 90px; margin-bottom: 20px; background-color: var(--white); padding: 10px 20px; border-radius: 8px; object-fit: contain; max-width: 100%; }
.footer-seo h3 { color: var(--accent-color); }
.footer-seo ul { list-style: none; }
.footer-seo ul li { margin-bottom: 10px; opacity: 0.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.9rem; opacity: 0.7; }
.krea-credits { margin-top: 10px; font-size: 0.95rem; }
.krea-link { color: #ffff00; font-weight: bold; text-decoration: none; transition: var(--transition); }
.krea-link:hover { text-decoration: underline; color: #fff; }

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.wa-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background-color: #25d366; border-radius: 50px; text-align: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: bounce 2s infinite; }
.wa-float img { width: 35px; height: 35px; z-index: 2; }
.halo-effect { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; border-radius: 50%; background: var(--accent-color); z-index: 1; animation: halo 1.5s infinite ease-out; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } }
@keyframes halo { 0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; } 100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }

/* ==========================================================================
   Dinamismo UX - Animations (Intersection Observer Classes)
   ========================================================================== */
.reveal { opacity: 0; visibility: hidden; transition: all 1s cubic-bezier(0.5, 0, 0, 1); }
.reveal.fade-up { transform: translateY(50px); }
.reveal.fade-in { transform: translateY(0); }
.reveal.scale-in { transform: scale(0.9); }
.reveal.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }
.delay-4 { transition-delay: 0.7s; }

/* ==========================================================================
   Responsive (Mobile fixes)
   ========================================================================== */
@media (max-width: 992px) {
    /* Mantenemos la galería horizontal (row) en mobile como solicitó el usuario */
    .angular-gallery { height: 350px; padding: 0; }
    .gallery-container { flex-direction: row; width: 110%; margin-left: -5%; height: 100%; }
    .gallery-item { height: 100%; clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%); margin: 0 -2%; }
    .gallery-overlay h3 { font-size: 0.8rem; }
    .gallery-overlay { padding: 20px 10px 10px; }
    .gallery-item:hover { transform: scale(1.02); z-index: 10; }
    
    /* Proceso Fixes - move line to the left */
    .process-timeline { flex-direction: column; align-items: flex-start; padding-left: 20px; }
    .process-line { width: 4px; height: 100%; left: 45px; top: 0; transform: none; }
    .process-node { display: flex; text-align: left; align-items: flex-start; margin-bottom: 30px; width: 100%; padding: 0; }
    .node-circle { margin: 0 20px 0 0; flex-shrink: 0; }
    .node-content { padding-top: 10px; }
}

@media (max-width: 768px) {
    .container { width: 95%; }
    .nosotros-grid, .contact-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .header-wa { font-size: 0.8rem; padding: 8px 15px; }
    .logo img { height: 50px; } /* Smaller logo on very small screens to fit header */
    
    .hero-title { font-size: 2.2rem; }
    .hero-typing { font-size: 1.2rem; min-height: 60px; }
    .section-title { font-size: 2rem; }
    
    .grid-3 { grid-template-columns: 1fr; gap: 20px; }
    .stat-number { font-size: 2.5rem; }
    
    .contact-form { padding: 20px; }
}
