/* ==========================================================================
   INDEX.H.A.R.T.P - ESTILOS UNIFICADOS Y AUTOCONTENIDOS
   Versión: 3.0 - Optimizada, sin conflictos y con corrección de desbordamiento
   ========================================================================== */

/* === 1. RESET ESPECÍFICO DEL INDEX === */
.index-page html,
.index-page body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === 2. FONDO Y ESTRUCTURA BASE === */
body {
    background-color: #f9fafb;
    background-image: none;
    color: #1f2937;
}

.main-content {
    padding-top: 7rem;
    padding-bottom: 4rem;
    padding-left: 1rem;
    padding-right: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@media (min-width: 768px) {
    .main-content {
        padding: 1.5rem 2rem;
        padding-top: 7rem;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

a {
    text-decoration: none;
    color: inherit;
}

/* === 3. HERO SECTION === */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title span {
    color: #1e3a8a;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-title { font-size: 3rem; }
    .hero-buttons { flex-direction: row; }
}

/* === 4. BOTONES GENERALES === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.btn-primary {
    background-color: #F97316;
    color: #ffffff;
}
.btn-primary:hover { 
    background-color: #EA580C; 
    color: #ffffff; 
}

.btn-outline {
    background-color: #ffffff;
    border: 2px solid #1e3a8a;
    color: #1e3a8a;
}
.btn-outline:hover { 
    background-color: #eff6ff; 
    color: #1e3a8a; 
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: white;
}

/* === 5. SECCIÓN DIVIDIDA (Servicios / Urgencias) === */
.split-section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .split-section { 
        flex-direction: row; 
        gap: 4rem; 
    }
}

/* SOLUCIÓN CLAVE: Permite que la columna se encoja y respete los saltos de línea */
.split-col { 
    flex: 1; 
    min-width: 0; 
    width: 100%;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .section-title { font-size: 2.25rem; }
}

.section-subtitle {
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Lista global de servicios */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.service-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #374151;
}

.service-list li p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.service-list li span {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.icon-orange { 
    color: #f97316; 
    font-size: 1.25rem; 
    flex-shrink: 0; 
    margin-top: 0.125rem;
}

/* === 6. CAJA DE URGENCIAS (UNIFICADA Y OPTIMIZADA) === */
.urgency-box {
    background-color: #fef2f2; /* Tono de alerta suave */
    border-left: 4px solid #ef4444; /* Borde rojo distintivo */
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    
    /* SOLUCIONES ANTI-DESBORDAMIENTO */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .urgency-box { padding: 2rem; }
}

.urgency-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7f1d1d;
    margin-top: 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .urgency-title { font-size: 1.5rem; }
}

.urgency-badge {
    display: inline-block;
    background-color: #fee2e2;
    color: #991b1b;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-align: center;
}

/* Sobrescribe la lista global SOLO dentro de la caja de urgencias */
.urgency-box .service-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.25rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.urgency-box .service-list li {
    display: flex !important;
    align-items: flex-start !important; /* Alinea arriba si el texto ocupa 2 líneas */
    gap: 0.75rem !important;
    color: #374151 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important; /* El gap se encarga del espacio */
}

/* Fija el icono para que NUNCA se aplaste o desaparezca */
.urgency-box .service-list li .icon-orange {
    flex-shrink: 0 !important;
    font-size: 1.1rem !important;
    margin-top: 0.15rem !important;
    line-height: 1 !important;
}

/* Asegura que el texto ocupe todo el espacio restante a la derecha del icono */
.urgency-box .service-list li span:last-child {
    flex: 1 !important;
}

.urgency-info {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #374151;
}

.urgency-info p { 
    margin: 0.5rem 0; 
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Botón de urgencia unificado (sin duplicados) */
.btn-urgency {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: #dc2626;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    text-align: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.btn-urgency:hover { 
    background-color: #b91c1c; 
    color: #ffffff !important; 
    transform: translateY(-2px);
}

.phone-box {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.phone-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.phone-link {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}
.phone-link:hover { color: #f97316; }

/* === 7. SEPARADOR DE SECCIÓN === */
.text-divider {
    display: flex;
    align-items: center;
    margin: 4rem 0;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.text-divider hr {
    flex: 1;
    border: 0;
    border-top: 1px solid #d1d5db;
}

.text-divider span {
    margin: 0 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #f3f4f6;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    white-space: nowrap;
}

/* === 8. PAREJAS DE SERVICIOS (GRID) === */
.pareja-servicios {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .pareja-servicios {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

.service-entry {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {
    .service-entry { padding: 2rem; }
}

.service-entry:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #1e3a8a;
}

.service-entry h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .service-entry h2 { font-size: 1.5rem; }
}

.service-entry img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    background-color: #f3f4f6;
    display: block;
}

.service-entry p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.plus-d-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e3a8a;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, gap 0.2s ease;
    align-self: flex-start;
    margin-top: auto;
    background-color: #bfdbfe;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

@media (min-width: 768px) {
    .plus-d-info {
        padding: 0.5rem 1.25rem;
        font-size: 1rem;
    }
}

.plus-d-info:hover { 
    color: #ea580c; 
    background-color: #93c5fd;
    gap: 0.75rem; 
}

.plus-d-info::after {
    content: '→';
    font-weight: 700;
}

/* === 9. SECCIÓN SOCIO (Mora Clean) === */
.partner-section {
    padding: 3rem 1rem;
    background-color: #f9fafb;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    width: 100%;
}

@media (min-width: 768px) {
    .partner-section { padding: 4rem 1.5rem; }
}

.partner-box {
    max-width: 48rem;
    margin: 0 auto;
}

.partner-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.partner-desc {
    color: #4b5563;
    margin-bottom: 1.25rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.partner-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.partner-logo {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    border-radius: 9999px;
    border: 2px solid #fed7aa;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.partner-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.partner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 2px solid #f97316;
    color: #f97316;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.partner-btn:hover {
    background-color: #f97316;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* === 10. MODO OSCURO === */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }
    
    .main-content {
        background-color: #1e293b;
    }
    
    .hero-title { color: #f1f5f9; }
    .hero-subtitle { color: #cbd5e1; }
    
    .section-title { color: #f1f5f9; }
    .section-subtitle { color: #93c5fd; }
    
    .service-list li p { color: #cbd5e1; }
    
    .service-entry {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    .service-entry h2 { color: #93c5fd; }
    .service-entry p { color: #cbd5e1; }
    .service-entry img { background-color: #334155; }
    
    .plus-d-info {
        background-color: #1e40af;
        color: white;
    }
    
    .plus-d-info:hover {
        background-color: #2563eb;
    }
    
    .partner-section {
        background-color: #1e293b;
        border-top-color: #334155;
    }
    
    .partner-title { color: #93c5fd; }
    .partner-desc { color: #cbd5e1; }
    .partner-name { color: #e2e8f0; }
    
    .partner-btn {
        background-color: #1e293b;
        border-color: #f97316;
        color: #f97316;
    }
    
    .partner-btn:hover {
        background-color: #f97316;
        color: white;
    }
    
    .text-divider span {
        background-color: #334155;
        color: #cbd5e1;
    }
    
    .text-divider hr {
        border-top-color: #475569;
    }
    
    .urgency-box {
        background-color: #451a1a;
        border-left-color: #ef4444;
    }
    
    .urgency-title { color: #fca5a5; }
    .urgency-box .service-list li { color: #e2e8f0 !important; }
    .urgency-info {
        background-color: rgba(30, 41, 59, 0.7);
        color: #cbd5e1;
    }
    
    .phone-box {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    .phone-label { color: #94a3b8; }
    .phone-link { color: #f1f5f9; }
    
    .btn-outline {
        background-color: #1e293b;
        border-color: #93c5fd;
        color: #93c5fd;
    }
    
    .btn-outline:hover {
        background-color: #334155;
    }
}

/* === 11. REDUCIR MOVIMIENTO === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    button:hover,
    a:hover,
    .service-entry:hover,
    .btn-urgency:hover,
    .partner-btn:hover {
        transform: none !important;
    }
}

/* === 12. ANIMACIONES === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-entry {
    animation: fadeIn 0.4s ease-out forwards;
}

.service-entry:nth-child(1) { animation-delay: 0.05s; }
.service-entry:nth-child(2) { animation-delay: 0.1s; }
.service-entry:nth-child(3) { animation-delay: 0.15s; }
.service-entry:nth-child(4) { animation-delay: 0.2s; }

    /* Selector de idioma */
    .lang-selector {
      position: fixed;
      bottom: 20px;
      left: 20px;
      background: white;
      border-radius: 50px;
      padding: 8px 16px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      z-index: 9998;
      font-size: 0.875rem;
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .lang-selector a {
      color: #6b7280;
      text-decoration: none;
      padding: 2px 6px;
      border-radius: 4px;
      transition: all 0.2s;
    }
    .lang-selector a.active {
      background: #1E3A8A;
      color: white;
      font-weight: 600;
    }
    .lang-selector a:hover:not(.active) {
      background: #f3f4f6;
    }

    /* Breadcrumb */
    .breadcrumb-visible {
      background: #f8fafc;
      padding: 0.75rem 0;
      font-size: 0.875rem;
      color: #64748b;
    }
    .breadcrumb-visible ol {
      list-style: none;
      display: flex;
      gap: 0.5rem;
      margin: 0;
      padding: 0;
    }
    .breadcrumb-visible a {
      color: #1E3A8A;
      text-decoration: none;
    }
    .breadcrumb-visible a:hover {
      text-decoration: underline;
    }

    /* Sección zonas */
    .zones-section {
      background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
      padding: 3rem 1rem;
      margin: 3rem 0;
      border-radius: 16px;
    }
    .zones-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 0.75rem;
      margin-top: 1.5rem;
    }
    .zone-item {
      background: white;
      padding: 0.75rem 1rem;
      border-radius: 8px;
      text-align: center;
      font-weight: 500;
      color: #1E3A8A;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
      transition: transform 0.2s;
    }
    .zone-item:hover {
      transform: translateY(-2px);
    }

    /* Sección confianza */
    .trust-section {
      background: #0f172a;
      color: white;
      padding: 3rem 1rem;
      margin: 3rem 0;
      border-radius: 16px;
    }
    .trust-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 2rem;
      margin-top: 2rem;
      text-align: center;
    }
    .trust-item {
      padding: 1rem;
    }
    .trust-icon {
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
    }
    .trust-number {
      font-size: 2rem;
      font-weight: 800;
      color: #fb923c;
      display: block;
      margin-bottom: 0.25rem;
    }
 