/*!
Theme Name: AMPERIA
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.4.0 - FINAL RESTORED (Full Layout + Fixed Calculator)
*/

/*--------------------------------------------------------------
>>> ÍNDICE DE CONTENIDOS:
1.0 - Genérico
2.0 - Base
3.0 - Layout (FIJO)
4.0 - Componentes (NAVEGACIÓN/BOTONES)
5.0 - Secciones de la Página de Inicio
6.0 - Utilidades y Media Queries
--------------------------------------------------------------*/

/*--------------------------------------------------------------
## 1.0 - Genérico
--------------------------------------------------------------*/
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
main { display: block; }
h1 { font-size: 2em; margin: 0.67em 0; }
img { border-style: none; max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: 100%; margin: 0; }
*, *::before, *::after { box-sizing: border-box; }

/*--------------------------------------------------------------
## 2.0 - Base
--------------------------------------------------------------*/
body { 
    color: #333; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 
    font-size: 1rem; 
    line-height: 1.6; 
    padding-top: 8.5rem; 
}
h1, h2, h3, h4, h5, h6 { clear: both; }
p { margin-bottom: 1.5em; }
a { color: #5170FF; text-decoration: none; }
a:hover, a:focus, a:active { opacity: 0.85; color: #5170FF; } 

/*--------------------------------------------------------------
## 3.0 - Layout (ELEMENTOS FIJOS)
--------------------------------------------------------------*/
.section-container { max-width: 1100px; margin: 0 auto; text-align: center; }

/* Header Top Bar (FIJO) */
.top-bar { 
    background-color: #5170FF; 
    color: #ffffff; 
    padding: 0.5rem 2rem; 
    font-size: 0.85rem; 
    position: fixed; 
    top: 0; left: 0; width: 100%; 
    z-index: 9999; 
    display: flex; justify-content: center;
}
.top-bar-container { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; width: 100%; }
.top-bar-contact span { margin-right: 1.5rem; }
.top-bar-social a { color: #fff; margin-left: 0.75rem; transition: opacity 0.3s ease; }
.top-bar-social a:hover { opacity: 0.7; }

.site-header { 
    display: flex; justify-content: space-between; align-items: center; 
    width: 100%; padding: 1rem 2rem; 
    background-color: #ffffff; 
    border-bottom: 1px solid #e0e0e0; 
    box-sizing: border-box; 
    position: fixed; top: 3rem; left: 0; 
    z-index: 9990; 
}
.site-branding img { max-height: 60px; width: auto; }

/* Footer */
.pre-footer-section { background-color: #4CA626; color: #ffffff; padding: 4rem 2rem; } 
.pre-footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.footer-col-title { font-size: 1.1rem; font-weight: bold; color: #ffffff; margin-bottom: 1.5rem; }
.footer-col p, .footer-col ul li a { color: #ffffff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li a:hover { opacity: 0.8; }
.social-icons a { display: inline-block; color: #4CA626; background-color: #fff; width: 40px; height: 40px; border-radius: 50%; text-align: center; line-height: 40px; margin-right: 0.5rem; font-weight: bold; transition: transform 0.3s ease;}
.social-icons a:hover { transform: scale(1.1); }

.site-footer { 
    background-color: #5170FF; color: #aaa; 
    padding: 2rem; text-align: center; 
    font-size: 0.9rem; margin-top: 10px; 
}
.site-footer a { color: #fff; }

/*--------------------------------------------------------------
## 4.0 - Componentes (NAVEGACIÓN/BOTONES)
--------------------------------------------------------------*/
/* Navegación Principal */
.main-navigation ul { display: none; list-style: none; margin: 0; padding: 0; } 
.main-navigation .header-menu-list { display: none; list-style: none; margin: 0; padding: 0; } 

.menu-toggle { 
    display: block; background-color: transparent; border: none; padding: 0; 
    width: 30px; height: 25px; cursor: pointer; position: relative;
    font-size: 0; color: transparent; 
}
.menu-toggle::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 100%; height: 3px;
    background: #5170FF; box-shadow: 0 8px 0 #5170FF, 0 16px 0 #5170FF;
}

.main-navigation.toggled ul { display: block; position: absolute; top: 100%; left: 0; width: 100%; background-color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); padding: 1rem; z-index: 100; } 
.main-navigation.toggled li { margin: 1rem 0; text-align: center; }

.main-navigation a { 
    color: #5170FF; font-weight: bold; position: relative; 
    padding-bottom: 8px; text-decoration: none; 
}
.main-navigation a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: #5170FF; transform: scaleX(0); transition: transform 0.3s ease-in-out; }
.main-navigation a:hover::after { transform: scaleX(1); }

/* Formulario de Búsqueda */
.top-bar .search-form { display: flex; }
.top-bar .search-field { border: none; background-color: #ffffff; color: #333; padding: 0.4rem 0.8rem; border-radius: 5px 0 0 5px; }
.top-bar .search-submit { 
    background-color: #ffffff; border: none; color: #5170FF; 
    padding: 0.4rem 1rem; cursor: pointer; border-radius: 0 5px 5px 0; 
    transition: background-color 0.3s ease;
}
.top-bar .search-submit:hover { background-color: #f0f0f0; }

/* Botones */
.card-button { 
    background-color: #5170FF; color: #ffffff; padding: 0.75rem 1.5rem; 
    border-radius: 5px; font-weight: bold; text-align: center; 
    transition: background-color 0.3s ease, color 0.3s ease; 
    display: inline-block;
}
.card-button:hover { background-color: #5170FF; filter: brightness(0.85); color: #ffffff; }

.cta-button-main { background-color: #ffffff; color: #5170FF; padding: 1rem 3rem; font-weight: bold; border-radius: 50px; font-size: 1.1rem; transition: all 0.3s ease; display: inline-block;}
.cta-button-main:hover { background-color: #ffffff; color: #5170FF; filter: brightness(0.85); transform: scale(1.05); }

/* Títulos de Sección (Reutilizables) */
.section-title { font-size: 2.5rem; font-weight: bold; color: #5170FF; margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: #6c757d; margin-bottom: 3.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }

/*--------------------------------------------------------------
## 5.0 - Secciones de la Página de Inicio
--------------------------------------------------------------*/
/* 5.1 - Hero Carousel Section */
.hero-carousel-section { position: relative; background-color: #f7f7f7; }
.carousel-wrapper { position: relative; width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; height: 70vh; overflow: hidden; }
.carousel-container { display: flex; height: 100%; transition: transform 0.5s ease-in-out; }
.carousel-slide { min-width: 100%; height: 100%; box-sizing: border-box; position: relative; }
.carousel-slide > img { width: 100%; height: 100%; object-fit: cover; }

.slide-card { 
    position: absolute; top: 0; left: 8rem; width: 25%; height: 100%; 
    background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px); 
    display: flex; flex-direction: column; justify-content: center; 
    padding: 3rem; color: #333; text-align: left; z-index: 5; 
}

.client-logo { margin-bottom: 2rem; }
.client-logo img { max-width: 120px; height: auto; }
.slide-text h3 { font-size: 1.8rem; font-weight: bold; color: #5170FF; margin: 0 0 1rem 0; }
.slide-text p { font-size: 1rem; line-height: 1.7; margin: 0 0 1.5rem 0; }
.slide-metrics span { display: inline-block; font-size: 1rem; font-weight: bold; color: #5170FF; border: 1px solid #5170FF; padding: 0.5rem 1rem; border-radius: 5px; }

.carousel-button { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    background: rgba(255, 255, 255, 0.5); color: #333; border: none; 
    height: 50px; width: 50px; cursor: pointer; font-size: 1.5rem; 
    z-index: 10; border-radius: 50%; transition: background-color 0.3s ease; 
    display: flex; justify-content: center; align-items: center; 
}
.carousel-button:hover { background: #fff; }
.carousel-button.prev { left: 4rem; }
.carousel-button.next { right: 2rem; }

.carousel-dots { text-align: center; position: absolute; bottom: 1.5rem; width: 100%; z-index: 10; }
.dot { height: 12px; width: 12px; margin: 0 5px; background-color: rgba(255, 255, 255, 0.5); border-radius: 50%; display: inline-block; transition: background-color 0.3s ease; cursor: pointer; }
.dot.active { background-color: #5170FF; }

/* 5.1.5 - Mission Section */
.mission-section { padding: 5rem 2rem; background-color: #ffffff; text-align: center; }
.mission-text { max-width: 800px; margin: 0 auto 2rem auto; font-size: 1.2rem; color: #555; }
.mission-highlight { font-style: italic; font-size: 1.3rem; font-weight: bold; color: #5170FF; border: 1px dashed #F0F4FF; padding: 1rem; display: inline-block; margin-top: 1rem; }

/* 5.2 - Social Proof Section */
.social-proof-section { background-color: #F0F4FF; padding: 3rem 0; border-top: 1px solid #d8e2ff; overflow: hidden; }
.social-proof-wrapper { max-width: 1100px; margin: 0 auto; text-align: center; padding: 0 2rem; }
.social-proof-section .section-subtitle { color: #6c757d; margin-bottom: 2rem; }
.cert-carousel-container { overflow: hidden; position: relative; width: 100%; }
.cert-logos { display: flex; gap: 3.5rem; align-items: center; justify-content: flex-start; padding: 1rem 0; animation: scroll-logos 30s linear infinite; min-width: fit-content; }
.cert-logos img { max-height: 58.5px; flex-shrink: 0; opacity: 1; filter: none; }
@keyframes scroll-logos { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-100% + 100vw)); } }
.cert-logos:hover { animation-play-state: paused; }

/* 5.3 - Stats Section */
.stats-section { background-color: #5170FF; color: #ffffff; padding: 4rem 2rem; text-align: center; }
.stats-wrapper { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat-item { display: flex; flex-direction: column; }
.stat-item .counter-number { font-size: 3.5rem; font-weight: bold; color: #ffffff; line-height: 1.1; }
.stat-item .counter-label { font-size: 1rem; color: #e0e3ff; margin-top: 0.5rem; }

/* 5.4 - Services Section */
.services-section { padding: 5rem 2rem; background-color: #ffffff; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: left; }
.service-card { background-color: #F0F4FF; border: 1px solid #d8e2ff; border-radius: 8px; padding: 2.5rem 2rem; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(81, 112, 255, 0.15); }
.card-icon { color: #5170FF; margin-bottom: 1.5rem; }
.card-title { font-size: 1.5rem; font-weight: bold; color: #5170FF; margin-bottom: 1rem; }
.card-description { color: #555; flex-grow: 1; margin-bottom: 2rem; }

/* 5.5 - Methodology Section */
.methodology-section { padding: 5rem 2rem; background-color: #F0F4FF; }
.methodology-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; margin-top: 3.5rem; }
.methodology-step { text-align: center; }
.methodology-icon { color: #5170FF; margin-bottom: 1.5rem; }
.methodology-title { font-size: 1.25rem; font-weight: bold; color: #5170FF; margin-bottom: 0.75rem; }
.methodology-description { color: #555; font-size: 0.95rem; line-height: 1.6; }

/* 5.6 - CTA Section */
.cta-section { background-color: #5170FF; color: #ffffff; padding: 4rem 2rem; text-align: center; }
.cta-title { font-size: 2.5rem; font-weight: bold; margin-bottom: 1rem; color: #fff;}
.cta-subtitle { font-size: 1.2rem; margin-bottom: 2.5rem; opacity: 0.9; }

/* 5.6.5 - Partnerships Section */
.partnerships-section { padding: 5rem 2rem; background-color: #ffffff; }
.partners-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.partner-card { background-color: #F0F4FF; padding: 2.5rem; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.partner-card i { color: #5170FF; margin-bottom: 1rem; }
.partner-card h3 { color: #5170FF; font-size: 1.4rem; margin-bottom: 0.75rem; }

/* 5.7 - Testimonials Section */
.projects-section { padding: 5rem 2rem; background-color: #ffffff; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.project-card { background-color: #fff; border-radius: 8px; overflow: visible; box-shadow: 0 4px 15px rgba(37, 70, 217, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(81, 112, 255, 0.12); }
.testimonial-card .project-image { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: -50px auto 1rem auto; position: relative; z-index: 2; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.testimonial-card .project-content { text-align: center; padding: 1rem 1.5rem 1.5rem 1.5rem; }
.testimonial-text { font-style: italic; font-size: 1.1rem; line-height: 1.7; color: #555; margin: 0 0 1.5rem 0; border-left: 3px solid #5170FF; padding-left: 1.5rem; text-align: left; }
.testimonial-author { font-weight: bold; color: #5170FF; display: block; font-style: normal; }
.testimonial-company { font-size: 0.9rem; color: #6c757d; }

/* 5.8 - Blog Section */
.blog-section { padding: 5rem 2rem; background-color: #F0F4FF; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.post-card { background-color: #ffffff; border-top: 4px solid #5170FF; padding: 2rem; box-shadow: 0 4px 15px rgba(37, 70, 217, 0.05); border-radius: 8px; display: flex; flex-direction: column; }
.post-category { font-size: 0.8rem; font-weight: bold; color: #5170FF; text-transform: uppercase; margin-bottom: 0.75rem; }
.post-title a { color: #5170FF; }
.post-title a:hover { opacity: 0.85; color: #5170FF; }
.post-excerpt { color: #555; flex-grow: 1; margin-bottom: 1.5rem; }
.post-read-more { font-weight: bold; color: #5170FF; }
.post-read-more:hover { opacity: 0.85; color: #5170FF; }
.section-full-width-cta { margin-top: 3.5rem; text-align: center; }

/* 5.9 - Contact Section */
.contact-section { padding: 5rem 2rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; text-align: left; margin-top: 3.5rem; }
.contact-details h4, .contact-form-wrapper h4 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #5170FF; }
.contact-details p { margin-bottom: 1rem; line-height: 1.4; }

/*--------------------------------------------------------------
## 5.9.5 - Modales de Soluciones (PILARES)
--------------------------------------------------------------*/
.modal-card { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.7); padding-top: 50px; box-sizing: border-box; }
.modal-content { background-color: #fefefe; margin: 5% auto; padding: 30px; border: 1px solid #888; width: 80%; max-width: 700px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); position: relative; animation: fadeIn 0.3s ease-out; text-align: center; }
.modal-icon { color: #5170FF; margin-bottom: 1rem; }
.modal-content h3 { color: #5170FF; font-size: 1.8rem; margin-top: 0; margin-bottom: 1.5rem; border-bottom: 2px solid #F0F4FF; padding-bottom: 10px; }
.modal-body { text-align: left; margin-bottom: 2rem; line-height: 1.6; }
.modal-body h4 { color: #5170FF; font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.modal-body ul { list-style: disc; padding-left: 20px; }
.modal-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; position: absolute; top: 10px; right: 20px; cursor: pointer; }
.modal-close:hover, .modal-close:focus { color: #333; text-decoration: none; cursor: pointer; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }

/*--------------------------------------------------------------
## 5.10 - CALCULADORA AMPERIA 2025 (CORRECCIÓN CRÍTICA DE CENTRADO)
--------------------------------------------------------------*/
.calculator-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    /* FIX: Centrado absoluto del contenedor padre */
    width: 100%;
    display: block; 
}

/* El Wrapper DEBE heredar el centrado del layout global */
.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.calculator-header { text-align: center; margin-bottom: 40px; }
.calculator-header h2 { font-size: 2.5rem; color: #1a1a1a; margin: 10px 0; font-weight: 800; }
.badge { background: #5170FF; color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.75rem; text-transform: uppercase; font-weight: bold; }

.amperia-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    text-align: left; /* Regresamos el texto interno a la izquierda */
    margin: 0 auto; /* Asegura que la caja esté centrada */
}

.form-body { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.form-column h3 { font-size: 1.1rem; color: #5170FF; margin-bottom: 20px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: #444; }
.amperia-form input { width: 100%; padding: 12px 15px; border: 2px solid #eef1f6; border-radius: 10px; font-size: 1rem; transition: all 0.3s ease; box-sizing: border-box; }
.amperia-form input:focus { border-color: #5170FF; outline: none; box-shadow: 0 0 0 4px rgba(81, 112, 255, 0.1); }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #bdc3c7; }

.form-footer { margin-top: 20px; text-align: center; }
.btn-calculate { width: 100%; background: #5170FF; color: white; padding: 18px; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 15px; transition: transform 0.2s, background 0.3s; margin-top: 0; }
.btn-calculate:hover { background: #3d59e0; transform: translateY(-2px); }

/* RESULTADOS CALCULADORA */
.results-report-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-top: 5px solid #5170FF;
    margin-top: 3rem;
    text-align: center;
}
.results-header { text-align: center; margin-bottom: 2rem; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.result-card { background: #f8faff; padding: 1.5rem; border-radius: 8px; text-align: center; border: 1px solid #e1e8ff; }
.result-card i { color: #5170FF; font-size: 1.5rem; margin-bottom: 10px; display: block; }
.result-card .value { display: block; font-size: 1.8rem; font-weight: 800; color: #1a1a1a; }
.result-card .label { font-size: 0.85rem; color: #666; text-transform: uppercase; letter-spacing: 1px; }

/*--------------------------------------------------------------
## 6.0 - Utilidades y Media Queries
--------------------------------------------------------------*/
@media screen and (min-width: 600px) {
    .menu-toggle { display: none; }
    .main-navigation ul { display: flex; gap: 2.5rem; }
    .main-navigation.toggled ul { position: static; width: auto; box-shadow: none; padding: 0; }
    .main-navigation.toggled li { margin: 0; }
}

@media (max-width: 992px) {
    .services-grid, .projects-grid, .posts-grid, .partners-grid { grid-template-columns: 1fr 1fr; }
    .methodology-grid, .stats-wrapper { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* RESTAURACIÓN DE GRILLAS PARA MÓVIL */
    .services-grid, .projects-grid, .posts-grid, .methodology-grid, .contact-grid, .stats-wrapper, .results-grid { grid-template-columns: 1fr; }
    
    /* Calculadora Móvil */
    .form-body { grid-template-columns: 1fr; }
    
    /* Hero Carousel Móvil */
    .hero-carousel-section .carousel-wrapper { height: auto !important; overflow: hidden !important; position: relative; }
    .hero-carousel-section .carousel-container { display: flex !important; flex-direction: row !important; height: auto !important; }
    .hero-carousel-section .carousel-slide { min-width: 100% !important; display: flex !important; flex-direction: column !important; height: auto !important; }
    .hero-carousel-section .carousel-slide img { width: 100% !important; height: auto !important; max-height: 50vh; object-fit: contain !important; position: relative !important; }
    
    .hero-carousel-section .slide-card { 
        position: relative !important; top: 0 !important; left: 0 !important; width: 100% !important; 
        padding: 2rem 1.5rem !important; background: #ffffff !important; text-align: center !important; 
        margin-top: -5px; 
    }
    
    .hero-carousel-section .carousel-button { top: 25% !important; transform: translateY(-50%) !important; background: rgba(255, 255, 255, 0.7) !important; height: 35px !important; width: 35px !important; font-size: 1.2rem !important; }
    .hero-carousel-section .carousel-button.prev { left: 10px !important; }
    .hero-carousel-section .carousel-button.next { right: 10px !important; }
    
    .hero-carousel-section .carousel-dots { position: relative !important; bottom: 0 !important; padding-top: 0 !important; padding-bottom: 2rem !important; background: #ffffff; margin-top: -1rem; }
    
    /* Header Móvil */
    body { padding-top: 14.5rem !important; overflow-x: hidden; }
    .top-bar { padding: 0.5rem; height: auto !important; }
    .top-bar-container { flex-direction: column !important; align-items: center; width: 100%; }
    .top-bar-contact { width: 100%; justify-content: center; display: flex; margin-bottom: 0.5rem; font-size: 0.75rem; }
    .top-bar-social { width: 100%; justify-content: center; display: flex; margin-bottom: 0.5rem; }
    
    /* Buscador */
    .top-bar .search-form { width: 90% !important; margin: 0 auto; display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; justify-content: center; }
    .top-bar .search-field { flex-grow: 1 !important; max-width: 70% !important; flex-shrink: 1 !important; border-radius: 5px 0 0 5px !important; }
    .top-bar .search-submit { flex-shrink: 0 !important; width: auto !important; border-radius: 0 5px 5px 0 !important; }
    
    .site-header { top: 9rem !important; padding: 1rem 1.5rem !important; width: 100%; position: fixed !important; } 
    
    /* Modales Móvil */
    .modal-content { width: 90% !important; padding: 20px !important; margin: 10% auto !important; }
    .modal-cta { width: 100% !important; padding: 1rem 0.5rem !important; font-size: 0.95rem !important; white-space: normal !important; height: auto !important; display: block !important; box-sizing: border-box !important; margin: 1rem 0 0 0 !important; }
    
    .partners-grid { grid-template-columns: 1fr !important; gap: 1.5rem; padding: 0 1rem; }
    .cert-logos { animation: none !important; display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 15px !important; transform: none !important; justify-content: center !important; padding: 0 1rem !important; }
    .cert-logos img { max-height: 40px !important; margin: 0 auto !important; }
}

@media (max-width: 480px) {
    .top-bar-contact { flex-direction: column; align-items: center; }
    .cert-logos { grid-template-columns: repeat(3, 1fr) !important; }
}

/* =========================================
   CORRECCIÓN DEFINITIVA DEL MENÚ (AMPERIA)
   ========================================= */

/* 1. Asegurar que el contenedor de navegación ocupe espacio */
.main-navigation {
    display: block !important;
    width: 100%;
}

/* 2. Estilizar la lista del menú (Tu clase 'header-menu-list') */
.header-menu-list {
    display: flex !important;       /* Los pone uno al lado del otro */
    flex-wrap: wrap;                /* Si no caben, bajan de línea */
    justify-content: flex-end;      /* Alineados a la derecha */
    list-style: none !important;    /* Sin puntos de lista */
    margin: 0 !important;
    padding: 0 !important;
    gap: 25px;                      /* Espacio entre enlaces */
}

/* 3. Estilo de los enlaces (Texto) */
.header-menu-list li a {
    color: #5170FF !important;      /* Azul Amperia */
    font-weight: 700 !important;    /* Negrita */
    font-size: 0.95rem !important;
    text-transform: uppercase;
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent; /* Preparado para hover */
    transition: all 0.3s ease;
}

/* 4. Efecto al pasar el mouse */
.header-menu-list li a:hover {
    color: #333 !important;
    border-bottom-color: #5170FF;
}

/* =========================================
   AJUSTE PARA MÓVIL (Menos de 768px)
   ========================================= */
@media (max-width: 768px) {
    /* En móvil ocultamos la lista hasta que se pulse el botón */
    .header-menu-list {
        display: none !important; /* Se oculta por defecto */
        flex-direction: column;
        background: #fff;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        text-align: center;
    }

    /* Cuando el JS activa el menú (agrega clase 'toggled') */
    .main-navigation.toggled .header-menu-list {
        display: flex !important;
    }
}

/* =========================================
   DISEÑO FINAL: ARTÍCULO INDIVIDUAL (SINGLE)
   ========================================= */

/* 1. CONTENEDOR PRINCIPAL (La Grilla) */
.single-post-wrapper {
    background-color: #ffffff;
    padding: 60px 20px;
}

.single-layout {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important; /* 2 Partes contenido, 1 parte Sidebar */
    gap: 60px !important;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left !important; /* Forzamos alineación a la izquierda */
    align-items: start; /* Para que la barra lateral no se estire */
}

/* 2. COLUMNA IZQUIERDA (Contenido) */
.single-content {
    min-width: 0; /* Evita desbordamientos */
}

.entry-title {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.entry-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}
.entry-body p { margin-bottom: 1.5em; }

/* Caja de Autor */
.author-box {
    margin-top: 60px;
    padding: 30px;
    background: #f8faff;
    border-left: 5px solid #5170FF;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    align-items: center;
}
.author-avatar img { border-radius: 50%; width: 80px; height: 80px; }

/* 3. COLUMNA DERECHA (Sidebar / Barra Lateral) */
.single-sidebar {
    position: sticky;
    top: 120px; /* Se queda fija al hacer scroll */
}

/* Widget CTA (Calculadora) - Estilo Tarjeta Azul */
.cta-widget {
    background: #5170FF;
    color: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(81, 112, 255, 0.3);
    margin-bottom: 30px;
}

.cta-widget .widget-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.cta-widget h3 {
    color: #ffffff !important;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.cta-widget p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.btn-sidebar {
    background: #ffffff;
    color: #5170FF;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    width: 100%;
    transition: transform 0.2s;
    text-decoration: none;
}
.btn-sidebar:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: #5170FF;
}

/* Widget Contacto - Estilo Gris */
.contact-widget {
    background: #f4f6f9;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
}
.contact-widget h4 {
    color: #1a1a1a;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}
.contact-widget p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}
.contact-widget i { color: #5170FF; }

/* RESPONSIVIDAD (Móvil) */
@media (max-width: 900px) {
    .single-layout {
        grid-template-columns: 1fr !important; /* Una sola columna en tablet/móvil */
        gap: 40px !important;
    }
    .cta-widget {
        margin-top: 20px;
    }
}

/* =================================================================
   CORRECCIONES FINALES DE DISEÑO (FONDOS Y ESTILO FLAT)
   ================================================================= */

/* --- 1. ALTERNANCIA VISUAL DE SECCIONES --- */

/* Sección de Alianzas (Partners): Fondo Gris Técnico */
.partnerships-section {
    background-color: #F8FAFC !important; /* Gris muy suave */
    border-top: 1px solid #eef1f5;       /* Línea sutil de separación */
    border-bottom: 1px solid #eef1f5;
}

/* Sección de Testimonios (Clientes): Fondo Blanco Puro */
/* Esto genera el ritmo: CTA (Azul) -> Alianzas (Gris) -> Clientes (Blanco) -> Blog (Gris) */
.projects-section {
    background-color: #FFFFFF !important;
}

/* --- 2. CALCULADORA: ELIMINAR DEGRADADOS (FLAT DESIGN) --- */

/* A. En la Home Page (El fondo de la sección) */
.calculator-section {
    background: #F0F4FF !important;      /* Azul grisáceo sólido muy claro */
    background-image: none !important;   /* ELIMINA EL DEGRADADO */
}

/* B. En la Home Page (La caja del formulario) */
.amperia-form {
    /* Sombra mucho más suave y limpia (Flat) */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important; 
    border: 1px solid #dbeafe !important;
}

/* C. En la Página de Noticia (El Widget de la barra lateral) */
.cta-widget {
    background: #5170FF !important;      /* Azul sólido corporativo */
    background-image: none !important;   /* ELIMINA EL DEGRADADO */
    box-shadow: none !important;         /* Eliminamos la sombra difusa */
    border: 1px solid #5170FF;
}

/* Ajuste opcional: Botón de la barra lateral más limpio */
.btn-sidebar {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important; /* Sombra pequeña y nítida */
}

/* =======================================================
   RITMO VISUAL (ZEBRA STRIPING) - ALTERNANCIA DE FONDOS
   ======================================================= */

/* 1. CALCULADORA (Fondo Gris Técnico) 
   Sirve para que el formulario blanco "flote" y resalte. */
.calculator-section {
    background-color: #F4F6F9 !important; /* Gris técnico muy suave */
    border-top: 1px solid #eef1f5;
    border-bottom: 1px solid #eef1f5;
}

/* 2. INGENIERÍA / METODOLOGÍA (Fondo Blanco)
   Limpieza total para que los iconos y el texto respiren. */
.methodology-section {
    background-color: #FFFFFF !important;
}

/* 3. PARTNERS / ALIANZAS (Fondo Gris Técnico)
   (Ya lo teníamos, pero aseguramos que coincida el tono) */
.partnerships-section {
    background-color: #F4F6F9 !important;
}

/* 4. TESTIMONIOS (Fondo Blanco) */
.projects-section {
    background-color: #FFFFFF !important;
}

/* 5. BLOG / NOTICIAS (Fondo Gris Técnico)
   Para cerrar con contraste respecto a los testimonios. */
.blog-section {
    background-color: #F4F6F9 !important;
}

/* =========================================
   SECCIÓN DE CONTACTO SIMÉTRICA
   ========================================= */

/* 1. La Grilla Maestra (50% - 50%) */
.contact-symmetrical-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 40px;
    align-items: stretch; /* Estira las cajas para que tengan la MISMA ALTURA */
    margin-top: 40px;
}

/* 2. Estilo Común para las Tarjetas (Izquierda y Derecha) */
.contact-info-card, 
.contact-form-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); /* Sombra suave 'Flat' */
    border: 1px solid #eef1f5;
    height: 100%; /* Ocupar toda la altura disponible */
}

/* 3. Estilos Específicos: Columna Izquierda (Info) */
.contact-info-card h3 {
    color: #5170FF; /* Azul Amperia */
    font-size: 1.2rem;
    margin-bottom: 20px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-block {
    margin-bottom: 15px;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
}
.info-block strong { color: #1a1a1a; display: block; margin-bottom: 2px; }
.info-block a { color: #5170FF; text-decoration: none; font-weight: 500; }
.address-text { font-size: 0.9rem; color: #777; margin-top: 5px; }
.address-text i { color: #ccc; margin-right: 5px; }

.divider-line {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

/* 4. Estilos Específicos: Columna Derecha (Formulario) */
.contact-form-card h3 {
    color: #1a1a1a;
    font-size: 1.4rem;
    margin-bottom: 25px;
    margin-top: 0;
}

.amperia-form-clean {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group-clean label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group-clean input,
.form-group-clean textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fcfcfc;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group-clean input:focus,
.form-group-clean textarea:focus {
    background: #fff;
    border-color: #5170FF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(81, 112, 255, 0.1);
}

.btn-send-clean {
    background: #1a1a1a; /* Botón negro elegante */
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.btn-send-clean:hover {
    background: #5170FF; /* Azul al pasar el mouse */
}

/* 5. RESPONSIVIDAD (Móvil) */
@media (max-width: 900px) {
    .contact-symmetrical-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 20px;
    }
}

/* =======================================================
   AJUSTES FINALES: IDENTIDAD CORPORATIVA Y ALINEACIÓN
   ======================================================= */

/* 1. CENTRAR TÍTULOS (Con Iconos) */
/* Al ser elementos flex (icono + texto), necesitamos 'justify-content' */
.contact-info-card h3,
.contact-form-card h3 {
    justify-content: center !important; 
    text-align: center !important;
    width: 100%;
    margin-bottom: 30px !important;
    color: #5170FF !important; /* Títulos en Azul Brillante */
}

/* 2. FORMULARIO EN AZUL CORPORATIVO */
/* Las etiquetas (Labels) */
.form-group-clean label {
    color: #5170FF !important; /* Azul Amperia */
}

/* El texto que escribe el usuario dentro de los inputs */
.form-group-clean input,
.form-group-clean textarea {
    color: #0f172a !important;      /* Azul Marino Oscuro (Más legible que el brillante) */
    border: 1px solid #bfdbfe !important; /* Borde azul muy suave */
}

/* Al hacer clic en el input */
.form-group-clean input:focus,
.form-group-clean textarea:focus {
    border-color: #5170FF !important;
    box-shadow: 0 0 0 4px rgba(81, 112, 255, 0.1) !important;
}

/* 3. TEXTO DE INFORMACIÓN (Oficinas) - ADIÓS AL NEGRO */
/* Usamos un tono "Navy Blue" (Azul Marino) para el texto general.
   Es "Azul Corporativo" pero oscuro para que se lea bien. */
.info-block, 
.info-block p, 
.info-block strong,
.address-text {
    color: #0f172a !important; /* Azul Marino Profundo (Corporate Navy) */
}

.address-text i {
    color: #5170FF !important; /* Iconos de ubicación en Azul Brillante */
}

/* 4. ENLACES (Emails) */
.info-block a {
    color: #5170FF !important;
    font-weight: 700 !important;
}

/* =========================================
   BOTÓN DE CONTACTO: AZUL CORPORATIVO
   ========================================= */

.btn-send-clean {
    background: #5170FF !important;  /* Azul Amperia (Base) */
    color: #ffffff !important;       /* Texto Blanco */
    border: 1px solid #5170FF !important;
    font-weight: 800 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(81, 112, 255, 0.2); /* Sombra sutil azulada */
}

/* Efecto al pasar el mouse */
.btn-send-clean:hover {
    background: #0f172a !important;  /* Azul Marino Oscuro (Contraste) */
    border-color: #0f172a !important;
    transform: translateY(-2px);     /* Pequeña elevación */
    box-shadow: 0 6px 15px rgba(15, 23, 42, 0.3); /* Sombra más profunda */
}

/* =======================================================
   AJUSTE DE SIMETRÍA Y COMPACTACIÓN (CONTACTO)
   ======================================================= */

/* 1. FORZAR EQUILIBRIO VERTICAL EN LAS TARJETAS */
.contact-info-card, 
.contact-form-card {
    padding: 30px !important; /* Reducimos el padding general (antes 40px) */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* Centra el contenido verticalmente */
}

/* 2. COMPACTAR COLUMNA IZQUIERDA (Info "Sobrespaciada") */
.contact-info-card h3 {
    margin-bottom: 15px !important; /* Reducimos drásticamente (antes 30px) */
    margin-top: 0 !important;
    font-size: 1.1rem !important;   /* Texto un poco más fino */
}

.info-block {
    margin-bottom: 8px !important;  /* Menos espacio entre bloques */
    line-height: 1.4 !important;    /* Líneas de texto más juntas */
}

.divider-line {
    margin: 15px 0 !important;      /* Línea divisoria más pegada */
}

/* 3. AJUSTAR COLUMNA DERECHA (Formulario) */
.contact-form-card h3 {
    margin-bottom: 20px !important;
    font-size: 1.3rem !important;
}

.amperia-form-clean {
    gap: 15px !important; /* Menos espacio entre inputs (antes 20px) */
    width: 100%;
}

/* Hacemos que el Área de Texto sea flexible para llenar huecos si es necesario */
.form-group-clean textarea {
    min-height: 100px; /* Altura base más contenida */
}

/* Botón pegado al final pero sin flotar en la nada */
.btn-send-clean {
    margin-top: 5px !important;
    padding: 12px !important; /* Botón un poco más esbelto */
}

/* =========================================
   CORRECCIONES MÓVIL (V6 - ESPACIADO Y CENTRADO)
   ========================================= */

@media (max-width: 768px) {

    /* --- 1. BARRA DE BÚSQUEDA (CON AIRE PARA LA LUPA) --- */
    
    .search-form {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 90% !important;
        margin: 15px auto !important;
        height: 45px !important; /* Altura cómoda */
        
        border: 1px solid #ccc !important;
        background-color: #ffffff !important;
        border-radius: 25px !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .search-field {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 0 0 20px !important;
        color: #333 !important;
        box-shadow: none !important;
    }

    /* EL BOTÓN LUPA (AJUSTE DE ESPACIO) */
    .search-submit {
        width: 60px !important; /* Más ancho para poder dar padding */
        height: 100% !important;
        background-color: transparent !important;
        color: #5170FF !important; /* Lupa Azul */
        border: none !important;
        margin: 0 !important;
        cursor: pointer;
        
        display: flex !important;
        align-items: center !important;
        
        /* AQUÍ ESTÁ EL TRUCO DEL ESPACIO: */
        justify-content: flex-end !important; /* Alinea icono a la derecha */
        padding-right: 20px !important;       /* Lo empuja hacia la izquierda */
    }


    /* --- 2. HEADER PRINCIPAL (FORZAR CENTRADO VERTICAL) --- */
    
    /* Paso A: Asegurar que el contenedor tenga altura suficiente para centrar */
    .site-header-main, 
    .header-main-container, 
    header .container { 
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important; /* Esto debería centrar verticalmente */
        
        min-height: 80px !important;    /* <--- FORZAMOS ALTURA MÍNIMA */
        padding: 0 20px !important;     /* Solo padding lateral */
    }
    
    /* Paso B: Empujar físicamente los elementos si se resisten */
    .site-branding { 
        flex: 0 1 auto; 
        margin-right: auto;
        text-align: left !important;
        
        margin-top: 10px !important; /* <--- EMPUJE MANUAL HACIA ABAJO */
    }
    
    .main-navigation, .menu-toggle { 
        margin-left: auto !important; 
        display: block !important;
        
        margin-top: 10px !important; /* <--- EMPUJE MANUAL HACIA ABAJO */
    }

    /* Aseguramos que el logo respete límites */
    .site-branding img, .custom-logo {
        max-height: 50px !important; 
        width: auto !important;
        display: block;
    }


    /* --- 3. MANTENEMOS EL CENTRADO DE TOP BAR --- */
    .top-header, .header-top, .top-bar-content {
        width: 100% !important;
        text-align: center !important;
        padding: 10px 0 !important;
    }
    .top-header ul, .header-top ul, .top-bar-content ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    .top-header li, .header-top li {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 5px 0 !important;
        float: none !important;
    }
}
/* --- 4. FORZAR SEPARACIÓN VISUAL ENTRE SECCIONES --- */

    /* ESTRATEGIA 1: Poner una línea gruesa al final del primer bloque (Carrusel) */
    /* Usamos selectores genéricos para atinarle al contenedor del slider */
    main > section:first-of-type,
    div[id*="slider"],     /* Cualquier ID que contenga la palabra 'slider' */
    div[class*="hero"],    /* Cualquier clase que contenga la palabra 'hero' */
    header + div,          /* El primer div justo después del header */
    article:first-of-type {
        border-bottom: 8px solid #F4F6F9 !important; /* Una barra gris gruesa */
        padding-bottom: 30px !important; /* Aire antes de la barra */
    }

    /* ESTRATEGIA 2: Colorear la SEGUNDA sección (lo que sigue al carrusel) */
    /* Si el carrusel es blanco, hacemos que la siguiente sección sea GRIS TÉCNICO */
    main > section:nth-of-type(2),
    .site-main > section:nth-child(2) {
        background-color: #F4F6F9 !important; /* Fondo Gris Técnico */
        border-top: 1px solid #d1d5db !important; /* Línea sutil arriba */
        padding-top: 40px !important;
    }
    /* --- 5. BARRERA FÍSICA (Separador Slider/Contenido) --- */
    
    .mobile-section-breaker {
        display: block !important;
        width: 100% !important;
        height: 20px !important; /* Grosor de la separación */
        background-color: #F4F6F9 !important; /* Gris Técnico (el mismo de la calculadora) */
        border-top: 1px solid #e2e8f0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        margin-bottom: 30px !important; /* Empuja el contenido de abajo */
        margin-top: 20px !important;    /* Empuja el carrusel de arriba */
    }
    /* Ocultar el separador móvil en pantallas grandes */
@media (min-width: 769px) {
    .mobile-section-breaker {
        display: none !important;
    }
}
/* =========================================
   CORRECCIÓN TÍTULO CALCULADORA
   ========================================= */

/* Forzamos el color Azul Corporativo en el título de esta sección específica */
#calculadora h2, 
#calculadora .section-title {
    color: #5170FF !important; /* Azul Amperia Brillante */
}

/* Opcional: Si el subtítulo también se puso negro y lo quieres gris/azul oscuro */
#calculadora p, 
#calculadora .section-subtitle {
    color: #64748b !important; /* Gris azulado (más elegante que el negro puro) */
}
/* =========================================
   PÁGINA DE RESULTADOS DE BÚSQUEDA
   ========================================= */

.search-entry-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); /* Sombra ultra suave */
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease;
}

.search-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.search-entry-card h2 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.search-entry-card h2 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.search-entry-card h2 a:hover {
    color: #5170FF;
}

.entry-summary {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more-link {
    color: #5170FF;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Navegación de páginas (Siguiente / Anterior) */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}
.nav-links a {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #5170FF;
    border-radius: 4px;
}
.nav-links a:hover {
    background: #5170FF;
    color: #fff;
}
/* =========================================
   PÁGINA ERROR 404 (CORREGIDO V2)
   ========================================= */

/* Contenedor principal */
.error-404-container {
    background-color: #F4F6F9;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Tarjeta Central */
.error-content-card {
    background: #ffffff;
    max-width: 600px;
    width: 100%;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

/* Icono */
.error-icon {
    font-size: 5rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

/* Títulos */
.error-title {
    font-size: 4rem;
    font-weight: 900;
    color: #5170FF; /* Azul Amperia */
    margin: 0;
    line-height: 1;
    letter-spacing: -2px;
}

.error-subtitle {
    font-size: 1.5rem;
    color: #0f172a;
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: 700;
}

.error-text {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* --- ESTILO DEL BUSCADOR (CENTRADO Y AZUL) --- */

.error-search-box {
    margin-bottom: 40px;
    width: 100%;
    display: flex;           /* Flexbox para el contenedor padre */
    justify-content: center; /* Centra todo el bloque horizontalmente */
}

/* El formulario en sí */
.error-search-box .search-form {
    display: flex;
    justify-content: center; /* Centra el input y el botón entre sí */
    align-items: center;
    gap: 10px;               /* Espacio entre la caja y el botón */
    width: 100%;
    max-width: 480px;        /* Ancho máximo para que no se vea eterno */
}

/* La caja de texto (Input) */
.error-search-box .search-field {
    flex-grow: 1;            /* Ocupa todo el espacio disponible */
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #f8fafc;
    color: #333;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.error-search-box .search-field:focus {
    border-color: #5170FF;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(81, 112, 255, 0.1); /* Brillo suave al escribir */
}

/* El Botón de Búsqueda (AHORA AZUL) */
.error-search-box .search-submit {
    background-color: #5170FF !important; /* <--- AZUL CORPORATIVO */
    color: #ffffff !important;
    border: none;
    padding: 12px 25px;      /* Tamaño cómodo */
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
    height: auto;            /* Asegura altura automática */
}

.error-search-box .search-submit:hover {
    background-color: #0f172a !important; /* Se oscurece al pasar el mouse */
}


/* --- CORRECCIÓN BOTÓN "REINICIAR AL HOME" --- */
.btn-return-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    
    background-color: #5170FF; /* 1. AHORA ES AZUL POR DEFECTO */
    color: #ffffff !important; /* Texto Blanco forzado */
    
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(81, 112, 255, 0.2); /* Sombra azul suave */
}

/* ESTADO HOVER (AL PASAR EL MOUSE) */
.btn-return-home:hover {
    background-color: #0f172a; /* 2. SE OSCURECE A AZUL MARINO */
    color: #ffffff !important; /* 3. EL TEXTO SE MANTIENE BLANCO */
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(15, 23, 42, 0.2);
}

/* Icono dentro del botón */
.btn-return-home i {
    font-size: 1rem;
}

/* MÓVIL */
@media (max-width: 768px) {
    .error-search-box .search-form {
        flex-direction: column; /* Input arriba, botón abajo en pantallas muy chicas */
    }
    .error-search-box .search-submit {
        padding: 12px; /* Botón más alto para dedo */
    }
}
/* =========================================
   PÁGINAS LEGALES (PRIVACIDAD Y TÉRMINOS)
   ========================================= */

.legal-document-container {
    max-width: 800px; /* Ancho de lectura ideal */
    margin: 60px auto;
    padding: 0 20px;
    color: #334155; /* Gris oscuro legible */
    line-height: 1.8; /* Buen espaciado entre líneas */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.legal-document-container h1 {
    color: #0f172a;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.legal-document-container .last-updated {
    display: block;
    text-align: center;
    color: #64748b;
    font-style: italic;
    margin-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.legal-document-container h2 {
    color: #5170FF; /* Azul Amperia */
    font-size: 1.4rem;
    margin-top: 40px;
    margin-bottom: 15px;
    border-left: 4px solid #5170FF;
    padding-left: 15px;
}

.legal-document-container h3 {
    color: #0f172a;
    font-size: 1.1rem;
    margin-top: 25px;
    font-weight: 700;
}

.legal-document-container p {
    margin-bottom: 20px;
    text-align: justify;
}

.legal-document-container ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-document-container li {
    margin-bottom: 10px;
}

.legal-document-container strong {
    color: #0f172a;
}
/* =========================================
   CORRECCIÓN COLOR EMAIL - BARRA LATERAL (V2)
   ========================================= */

/* Usamos la clase EXACTA de tu diseño (.single-sidebar) */
.single-sidebar a[href^="mailto:"],
.single-sidebar .contact-widget a,
.contact-widget a {
    color: #5170FF !important; /* Azul Amperia */
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Efecto al pasar el mouse */
.single-sidebar a[href^="mailto:"]:hover,
.single-sidebar .contact-widget a:hover {
    color: #0f172a !important; /* Azul Oscuro */
    text-decoration: underline !important;
}