/* Tipografía y estructura general */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 2.1;
    color: #333;
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1, h3 {
    color: #222;
}

.post-imagen-detalle {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    border-radius: 5px;
}

.post-detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.post-detail-container .post-content img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Reemplaza .page-layout con la clase real de tu base.html */
.page-layout {
    display: flex;
    gap: 20px;
}

/* Regla crítica para la columna de contenido */
.page-layout .content {
    min-width: 0;
    flex-grow: 1;
}

/* Categorías */
.post-categorias a {
    color: #0077cc;
    text-decoration: none;
}

.post-categorias a:hover {
    text-decoration: underline;
}

/* Compartir en redes */
.social-share {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
}

.social-share a {
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-share a:hover {
    color: #0077cc;
}

/* Comentarios raíz */
.comment {
    background-color: #fefefe;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    position: relative;
}

/* Avatar */
.comment img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment strong {
    font-weight: 600;
    font-size: 1rem;
    color: #0077cc;
}

.comment p {
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
    font-size: 0.95rem;
    color: #444;
}

/* Comentarios anidados estilo hilo */
.comment .comment {
    margin-left: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid #cbd5e1;
    background-color: #fcfcfc;
    position: relative;
}

/* Línea decorativa vertical para conexión tipo Reddit */
.comment .comment::before {
    content: "";
    position: absolute;
    top: 0;
    left: -1.5rem;
    bottom: 0;
    width: 2px;
    background: #cbd5e1;
}

/* Link para responder */
.comment-reply-link, .responder-link {
    font-size: 0.9rem;
    color: #0077cc;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: inline-block;
}

.comment-reply-link:hover, .responder-link:hover {
    color: #005fa3;
}

/* Formulario de comentarios */
.comment-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.comment-form h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: #0077cc;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form form input[type="text"],
.comment-form form input[type="email"],
.comment-form form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-form form input[type="text"]:focus,
.comment-form form input[type="email"]:focus,
.comment-form form textarea:focus {
    border-color: #0077cc;
    outline: none;
}

/* Botón enviar unificado */
.btn-enviar {
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #2563eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    max-width: fit-content;
}

.btn-enviar:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Formulario de respuesta oculto */
.reply-form {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-size: 15px;
}

.reply-form p {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2rem;
}

.reply-form label {
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.reply-form textarea,
.reply-form input[type="text"],
.reply-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.reply-form textarea:focus,
.reply-form input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        padding: 0 1rem;
    }

    .social-share {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .comment {
        padding: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .comment img {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }
}

/* Imagenes del post */
.post-content figure.image {
    max-width: 100%;
    margin: 1.5rem auto;
    text-align: center;
}

.post-content figure.image img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    display: inline-block;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* Hace que todos los iframes dentro de post-content sean responsive */
.post-content iframe {
  width: 100%;          /* ancho completo del contenedor */
  max-width: 100%;      /* no se salga del contenedor */
  height: auto;         /* ajusta la altura automáticamente */
  aspect-ratio: 16 / 9; /* mantiene la proporción de video */
  display: block;
  margin: 10px 0;       /* espacio arriba y abajo */
}

/* Anuncios */

.anuncio-header {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 20px;
    padding-top: 10px;
}

.content {
    padding-top: 20px;
}


