/* ==========================================================================
   BOTONES DE COMPARTIR
   ========================================================================== */
.rincon-share-container {
    margin-bottom: 30px; margin-top: 0; padding-top: 0;
    border-top: none; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px;
    display: flex; align-items: center; gap: 15px; font-family: var(--font-body);
}
.share-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; color: #999; letter-spacing: 0.5px; }
.share-buttons { display: flex; gap: 10px; }
.share-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; background-color: #f5f5f5;
    color: #555; border: none; cursor: pointer; transition: all 0.2s ease;
    position: relative; text-decoration: none;
}
.share-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:hover { transform: translateY(-3px); color: #fff; }
.share-btn.fb:hover { background-color: #1877F2; }
.share-btn.tw:hover { background-color: #000000; }
.share-btn.wa:hover { background-color: #25D366; }
.share-btn.cp:hover { background-color: #EF6E59; }
.tooltip-copy {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; font-size: 10px; padding: 4px 8px;
    border-radius: 4px; opacity: 0; visibility: hidden; transition: opacity 0.2s;
    margin-bottom: 5px; white-space: nowrap; font-weight: 700;
}
.share-btn.cp.copied .tooltip-copy { opacity: 1; visibility: visible; }
@media (max-width: 600px) { .rincon-share-container { justify-content: center; flex-direction: column; gap: 10px; } }

/* ==========================================================================
   SECCIÓN DE COMENTARIOS (OPTIMIZADO V5.4)
   ========================================================================== */
.section-comments { 
    background-color: #fff; 
    padding: 40px 0; 
    border-top: 1px solid #eee; 
    margin-top: 0; 
    width: 100%; 
    overflow: hidden; 
}
.comments-wrapper { max-width: 800px; margin: 0 auto; }

.comments-title {
    font-family: var(--font-titles); font-size: 1.6rem; color: #1C3D44;
    margin-bottom: 30px; font-weight: 800; border-bottom: 2px solid #f0f0f0; padding-bottom: 15px;
}
.comments-title .count { color: #EF6E59; font-size: 1.2rem; }

.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }

/* Cuerpo del comentario */
.comment-body { 
    position: relative; 
    padding: 20px 0 20px 65px; 
    border-bottom: 1px solid #f9f9f9; 
}

/* Respuestas anidadas */
.comment-list .children { 
    list-style: none; 
    padding-left: 20px; 
    margin-left: 20px; 
    border-left: 2px solid #f0f0f0; 
}

.comment-list .avatar { position: absolute; top: 25px; left: 0; width: 45px; height: 45px; border-radius: 50%; object-fit: cover; background: #eee; }
.comment-meta { margin-bottom: 8px; font-size: 0.85rem; }
.fn { font-family: var(--font-titles); font-weight: 800; font-size: 1rem; color: #1C3D44; margin-right: 10px; font-style: normal; }
.comment-metadata { display: inline-block; color: #999; font-size: 0.75rem; text-transform: uppercase; font-weight: 600; }
.comment-metadata a { color: #999; text-decoration: none; }

.comment-content p { 
    font-family: var(--font-body); 
    font-size: 0.95rem; 
    line-height: 1.6; 
    color: #444; 
    margin: 0 0 10px; 
    /* FIX CRÍTICO: Romper palabras largas */
    overflow-wrap: break-word; 
    word-wrap: break-word;
    word-break: break-word;
}

.reply { text-align: right; }
.comment-reply-link {
    font-size: 0.75rem; text-transform: uppercase; font-weight: 800;
    color: #EF6E59; text-decoration: none; border: 1px solid #EF6E59;
    padding: 3px 10px; border-radius: 20px; transition: all 0.2s;
}
.comment-reply-link:hover { background: #EF6E59; color: #fff; }

/* FIX MÓVIL CRÍTICO PARA COMENTARIOS */
@media (max-width: 767px) {
    /* 1. Padding lateral para que no se pegue a la pantalla */
    .section-comments .comments-wrapper,
    .related-wrapper .comments-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* 2. Reducir padding interno del comentario para ganar espacio */
    .comment-body {
        padding-left: 55px; 
    }
    .comment-list .avatar {
        width: 40px; height: 40px; 
    }

    /* 3. Ajustar respuestas anidadas para que no se salgan */
    .comment-list .children {
        padding-left: 10px; 
        margin-left: 10px;
    }
}

/* Formulario */
.comment-form-container { background: #fdfdfd; padding: 30px; border-radius: 12px; border: 1px solid #eee; }
.comment-reply-title { font-family: var(--font-titles); font-size: 1.3rem; font-weight: 700; color: #1C3D44; margin-bottom: 20px; display: block; }
.comment-reply-title small a { font-size: 0.8rem; color: #d32f2f; margin-left: 10px; font-family: var(--font-body); }
.comment-form { display: flex; flex-direction: column; gap: 15px; }
.comment-inputs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .comment-inputs-row { grid-template-columns: 1fr; gap: 15px; } }
.comment-field-group input, .comment-field-full textarea {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.95rem; outline: none; transition: border-color 0.2s; background: #fff;
}
.comment-field-group input:focus, .comment-field-full textarea:focus { border-color: #1C3D44; }
.btn-submit-comment {
    background-color: #1C3D44; color: #fff; padding: 12px 25px; border: none;
    border-radius: 30px; font-weight: 700; text-transform: uppercase; font-size: 0.85rem;
    cursor: pointer; transition: transform 0.2s, background 0.2s; align-self: flex-start; margin-top: 10px;
}
.btn-submit-comment:hover { background-color: #EF6E59; transform: translateY(-2px); }

/* ==========================================================================
   ARTÍCULOS RELACIONADOS
   ========================================================================== */
.related-wrapper { background-color: #fff; padding: 20px 0 40px; border-top: 1px solid #f0f0f0; }
.related-main-title {
    font-family: var(--font-titles); font-size: 1.6rem; font-weight: 800;
    color: #1C3D44; margin-bottom: 20px; border-left: 4px solid #EF6E59; padding-left: 15px;
}

/* FIX PADDING MÓVIL RELACIONADOS */
@media (max-width: 767px) {
    .related-wrapper .comments-wrapper { 
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Desktop Grid */
@media (min-width: 768px) {
    .related-posts-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .related-item-link { display: block; text-decoration: none; }
    .related-item-media { width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
    .related-item-media img { width: 100%; height: 100%; object-fit: cover; }
    .related-item-title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: #111; margin-bottom: 5px; }
}

/* Móvil Lista */
@media (max-width: 767px) {
    .related-posts-list { display: flex; flex-direction: column; gap: 15px; }
    .related-item { border-bottom: 1px solid #f5f5f5; padding-bottom: 15px; }
    .related-item:last-child { border-bottom: none; }
    .related-item-link { display: flex; gap: 15px; align-items: center; text-decoration: none; }
    .related-item-media { width: 100px; height: 70px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
    .related-item-media img { width: 100%; height: 100%; object-fit: cover; }
    .related-item-info { flex: 1; }
    .related-item-title {
        font-size: 0.9rem; font-weight: 700; line-height: 1.2; color: #111;
        margin: 0 0 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
}
.related-item-link:hover .related-item-title { color: #EF6E59; }

/* ==========================================================================
   C. CONTENEDOR DE MAPA GLOBAL (GOOGLE MAPS IFRAME)
   ========================================================================== */
.global-map-container {
    margin-top: 40px;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    background: #fff;
    scroll-margin-top: 100px; /* Para que al hacer anclaje no se pegue al borde superior */
}
.global-map-container h3 {
    padding: 20px 25px 0;
    margin: 0;
    font-size: 1.4rem;
    color: #1C3D44;
    font-family: var(--font-titles, "Times New Roman", serif);
}
.global-map-container iframe {
    width: 100% !important;
    height: 400px !important;
    display: block;
    border: none;
    margin-top: 15px;
}
html { scroll-behavior: smooth; } /* Habilita el desplazamiento suave global */