/**
 * =====================================================
 * IBSATEL - Mejoras SEO y Visuales
 * Archivo: seo-improvements.css
 * 
 * IMPORTANTE: Este archivo debe cargarse DESPUÉS de style.css
 * para sobrescribir correctamente los estilos
 * =====================================================
 */

/* Reset específico para evitar conflictos */
.hero-intro *,
.intro-section * {
    box-sizing: border-box;
}

/* =====================================================
 * 1. HERO SECTION (H1 después del slider - FONDO BLANCO)
 * ===================================================== */

.hero-intro {
    background: #ffffff;
    padding: 80px 20px;
    text-align: center;
    color: #1f2937;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}

.hero-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="%235e0d8b" stroke-width="1" opacity="0.03"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 1;
}

.hero-intro .row {
    position: relative;
    z-index: 2;
}

.hero-intro h1 {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #1f2937;
}

.hero-intro .lead {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
    color: #4b5563;
}

.hero-intro .cta-buttons {
    margin-top: 30px;
}

.hero-intro .btn-primary,
.hero-intro .btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    margin: 10px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.hero-intro .btn-primary {
    background: #5e0d8b;
    color: white;
    box-shadow: 0 4px 6px rgba(94, 13, 139, 0.3);
}

.hero-intro .btn-primary:hover {
    background: #4a0a6e;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(94, 13, 139, 0.4);
}

.hero-intro .btn-secondary {
    background: #f3f4f6;
    color: #5e0d8b;
    border: 2px solid #5e0d8b;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-intro .btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-intro {
        padding: 60px 20px;
    }
    
    .hero-intro h1 {
        font-size: 2em;
    }
    
    .hero-intro .lead {
        font-size: 1.1em;
    }
    
    .hero-intro .btn-primary,
    .hero-intro .btn-secondary {
        display: block;
        margin: 10px auto;
        max-width: 280px;
    }
}

/* =====================================================
 * 2. ALTERNATIVA SUTIL (H1 integrado)
 * ===================================================== */

.intro-section {
    background: #f9fafb;
    padding: 60px 20px;
    border-bottom: 3px solid #5e0d8b;
}

.intro-text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.intro-text h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    line-height: 1.3;
}

.intro-text .subtitle {
    font-size: 1.2em;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .intro-text h1 {
        font-size: 1.8em;
    }
    
    .intro-text .subtitle {
        font-size: 1em;
    }
}

/* =====================================================
 * 3. H2 MEJORADOS (más descriptivos)
 * ===================================================== */

/* Sobrescribir estilos del theme solo para páginas específicas */
.theme-page h2.box-header {
    font-size: 2em !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 15px !important;
    line-height: 1.3 !important;
}

.theme-page .box-header.with-subtitle {
    margin-bottom: 10px !important;
}

.theme-page .section-subtitle {
    font-size: 1.1em;
    color: #6b7280;
    margin-top: 10px;
    font-weight: 400;
    display: block;
}

/* =====================================================
 * 4. SERVICIOS CON SCHEMA.ORG
 * ===================================================== */

/* NO TOCAR el comportamiento por defecto de services-list */
/* Solo ajustes de padding y centrado si es necesario */

.theme-page .services-list {
    margin-top: 50px !important; /* Añadir espacio entre descripción e imágenes */
}

.theme-page .services-list li {
    margin-bottom: 60px !important; /* Separación entre filas de servicios */
}

.theme-page .services-list h3,
.theme-page .services-list h4 {
    text-align: center !important; /* Asegurar que esté centrado */
    font-size: 16px !important; /* Títulos más pequeños */
    line-height: 24px !important;
    margin-top: 20px !important; /* Espacio entre imagen y título */
}

/* Ajustar tamaño del texto de descripción */
.theme-page .services-list p.description.t1 {
    font-size: 13px !important; /* Texto más pequeño */
    line-height: 22px !important;
    margin-top: 10px !important; /* Más cerca de la línea decorativa */
    padding: 0 20px !important; /* Padding lateral */
}

/* Asegurar que la línea decorativa esté centrada */
.theme-page .services-list h3.box-header:after,
.theme-page .services-list h4.box-header:after {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 13px !important;
    margin-bottom: 0 !important;
}

/* Centrar línea de H3 con clase align-center */
.theme-page h3.box-header.align-center:after,
.theme-page h2.box-header.align-center:after {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =====================================================
 * 5. FEATURES LIST MEJORADA
 * ===================================================== */

.theme-page .features-list li {
    margin-bottom: 30px;
}

.theme-page .features-list h3,
.theme-page .features-list h4 {
    font-size: 1.4em !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
}

.theme-page .features-list p {
    font-size: 1em !important;
    color: #4b5563 !important;
    line-height: 1.6 !important;
}

/* =====================================================
 * 6. MEJORAS GENERALES DE TIPOGRAFÍA
 * ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
}

h1 {
    font-weight: 700;
    text-transform: uppercase; /* H1 en mayúsculas */
}

h2 {
    font-weight: 600;
}

h3, h4 {
    font-weight: 600;
}

/* =====================================================
 * 7. SECCIÓN "SOBRE NOSOTROS" MEJORADA
 * ===================================================== */

.about-section {
    padding: 80px 0;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.about-section .description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1em;
    color: #4b5563;
}

.about-image-wrapper {
    position: relative;
}

.about-image-wrapper::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    background: #5e0d8b;
    border-radius: 8px;
    z-index: -1;
    opacity: 0.1;
}

/* =====================================================
 * 8. LOGOS DE MARCAS MEJORADOS
 * ===================================================== */

.our-clients-list li {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.our-clients-list li:hover {
    transform: scale(1.05);
    opacity: 1;
}

.our-clients-list img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.our-clients-list li:hover img {
    filter: grayscale(0%);
}

/* =====================================================
 * 9. BADGES Y ETIQUETAS
 * ===================================================== */

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: #5e0d8b;
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-left: 10px;
}

.badge.success {
    background: #10b981;
}

.badge.warning {
    background: #f59e0b;
}

/* =====================================================
 * 10. CALL TO ACTION MEJORADO
 * ===================================================== */

.cta-section {
    background: linear-gradient(135deg, #5e0d8b 0%, #4a0a6e 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
    border-radius: 10px;
    margin: 40px 0;
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.cta-section .btn {
    background: white;
    color: #5e0d8b;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    background: #f9fafb;
}

/* =====================================================
 * 11. BREADCRUMBS MEJORADOS
 * ===================================================== */

.bread-crumb {
    font-size: 0.95em;
}

.bread-crumb li a {
    color: #4b5563;
    transition: color 0.3s ease;
}

.bread-crumb li a:hover {
    color: #5e0d8b;
}

/* =====================================================
 * 12. UTILIDADES
 * ===================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

.text-highlight {
    color: #5e0d8b;
    font-weight: 600;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: #5e0d8b;
    margin: 20px auto;
    border-radius: 2px;
}

/* =====================================================
 * 13. ANIMACIONES SUTILES
 * ===================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* =====================================================
 * 14. MEJORAS DE ACCESIBILIDAD
 * ===================================================== */

a:focus,
button:focus {
    outline: 2px solid #5e0d8b;
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* =====================================================
 * 15. RESPONSIVE GENERAL
 * ===================================================== */

@media (max-width: 1024px) {
    .hero-intro h1,
    .intro-text h1 {
        font-size: 2.2em;
    }
    
    .box-header {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .hero-intro h1,
    .intro-text h1 {
        font-size: 1.6em;
    }
    
    .hero-intro .lead {
        font-size: 1em;
    }
    
    .box-header {
        font-size: 1.5em;
    }
}

/* =====================================================
 * 16. FIX PARA FONDOS GRISES - ELIMINADO
 * ===================================================== */

/* 
 * La solución correcta es modificar el HTML para usar la estructura:
 * <div class="row gray full-width">
 *   <div class="row">
 *     contenido
 *   </div>
 * </div>
 * 
 * En lugar de intentar forzarlo con CSS
 */