/* Professional Facebook Dark Mode Clone */

:root {
    --fb-bg: #18191a;
    --fb-card: #242526;
    --fb-hover: #3a3b3c;
    --fb-text-primary: #e4e6eb;
    --fb-text-secondary: #b0b3b8;
    --fb-accent: #2d88ff;
    --fb-divider: #3e4042;
    --fb-font: 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--fb-bg);
    color: var(--fb-text-primary);
    font-family: var(--fb-font);
    font-size: 15px;
    line-height: 1.34;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--fb-text-primary);
}

a {
    color: var(--fb-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Layout --- */
.blog-container {
    max-width: 960px;
    /* FB Desktop standard width */
    margin: 80px auto 20px;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 1fr 360px;
    /* Feed vs Right Sidebar */
    gap: 16px;
}

/* --- Components: Post Card --- */
.blog-card.card {
    background-color: var(--fb-card);
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
    overflow: hidden;
}

/* Header */
.card-header {
    background: transparent;
    border-bottom: none;
    padding: 12px 16px 0 16px;
}

.author-avatar {
    border-radius: 50%;
    cursor: pointer;
}

.author-name {
    color: var(--fb-text-primary);
    font-weight: 600;
    cursor: pointer;
}

.author-name:hover {
    text-decoration: underline;
}

.publish-date {
    color: var(--fb-text-secondary);
    font-size: 13px;
}

.category-badge {
    background-color: var(--fb-hover);
    /* Gray badge */
    color: var(--fb-text-secondary);
    font-weight: 600;
    font-size: 12px;
    border-radius: 4px;
    padding: 4px 8px;
}

/* Post Body (Text above image) */
.card-text {
    padding: 8px 16px;
    color: var(--fb-text-primary);
    font-size: 15px;
    font-weight: 400;
}

/* Content Title (Below Image in Link Preview style) */
.card-body {
    background-color: #242526;
    /* Seamless with card */
    padding: 12px 16px;
    border-left: 4px solid var(--fb-hover);
    /* Subtle indicator for external link/article */
    margin-top: -1px;
    /* Remove gap */
}

.post-title {
    color: var(--fb-text-primary);
    font-weight: 600;
    font-size: 17px;
    display: block;
    margin-bottom: 4px;
}

.post-title:hover {
    text-decoration: underline;
}

/* Image */
.card-image {
    width: 100%;
    background-color: #000;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: cover;
}

/* Action Bar (Footer) */
.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--fb-divider);
    padding: 4px;
    margin: 0 12px;
    display: flex;
    justify-content: space-between;
}

.btn-action {
    background: transparent;
    color: var(--fb-text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    padding: 6px 0;
    margin: 2px 0;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action:hover {
    background-color: var(--fb-hover);
    color: var(--fb-text-secondary);
    /* Text stays gray/white, bg changes */
}

/* --- Comments Section (Facebook Style) --- */
.comment-list {
    padding-top: 8px;
}

.comment-item {
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    margin-right: 8px;
    border-radius: 50%;
}

.comment-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: calc(100% - 40px);
}

.comment-bubble {
    background-color: var(--fb-hover);
    /* #3a3b3c */
    border-radius: 18px;
    padding: 8px 12px;
    position: relative;
    display: inline-block;
    /* Wrap content tightly */
    max-width: 100%;
}

.comment-author-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--fb-text-primary);
    display: block;
    line-height: 1.2;
    text-decoration: none;
}

.comment-author-name:hover {
    text-decoration: underline;
}

.comment-text {
    font-size: 15px;
    color: var(--fb-text-primary);
    line-height: 1.4;
    margin-bottom: 0;
}

.comment-actions {
    margin-top: 2px;
    margin-left: 12px;
    font-size: 12px;
    color: var(--fb-text-secondary);
    display: flex;
    gap: 4px;
    /* Space between items */
    align-items: center;
}

.comment-actions a {
    color: var(--fb-text-secondary);
    /* Gray text for links */
    font-weight: 600;
    /* Bold links */
    text-decoration: none;
    cursor: pointer;
}

.comment-actions a:hover {
    text-decoration: underline;
}

.comment-actions .dot {
    margin: 0 2px;
}

/* Comment Input */
.comment-input-container {
    display: flex;
    align-items: flex-start;
    padding-top: 8px;
}

.comment-input-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.comment-input-wrapper {
    flex-grow: 1;
    background-color: var(--fb-hover);
    border-radius: 18px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

.comment-input-field {
    background: transparent;
    border: none;
    color: var(--fb-text-primary);
    width: 100%;
    resize: none;
    outline: none;
    font-size: 15px;
    min-height: 20px;
    /* Adjust based on rows */
    overflow: hidden;
}

.comment-input-field::placeholder {
    color: var(--fb-text-secondary);
}

/* Sidebar Widgets */
.sidebar .widget {
    background-color: var(--fb-card);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.widget h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--fb-text-secondary);
    margin-bottom: 12px;
}

.search-widget input,
.newsletter-widget input {
    background-color: var(--fb-hover);
    /* Input looks like search bar */
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--fb-text-primary);
    width: 100%;
    outline: none;
}

.search-widget input::placeholder {
    color: var(--fb-text-secondary);
}

.search-widget button {
    display: none;
}

.categories-widget ul {
    list-style: none;
    padding: 0;
}

.categories-widget li a {
    display: block;
    padding: 8px;
    color: var(--fb-text-primary);
    border-radius: 6px;
    font-weight: 600;
}

.categories-widget li a:hover {
    background-color: var(--fb-hover);
    text-decoration: none;
}

.btn-sub {
    width: 100%;
    margin-top: 10px;
    background-color: var(--fb-accent);
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-sub:hover {
    background-color: #1a6fd6;
    /* Darker blue */
}

/* Mobile */
@media (max-width: 900px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* Often hidden on mobile feeds, or move to bottom */
    }
}

/* Hero (Cover Photo) */
.blog-hero {
    height: 300px;
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid var(--fb-divider);
    position: relative;
    background-image: url('https://pascualitofer.com/admin/Vistas/img/galeria/Gal256.jpg');
}

.blog-hero .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.blog-hero h1 {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.blog-hero p {
    font-size: 15px;
    color: #ccc;
}

/* Footer */
footer {
    background: transparent;
    text-align: center;
    color: var(--fb-text-secondary);
    padding: 20px;
    font-size: 13px;
}

/* Login Widget (Facebook Style) */
.login-widget {
    text-align: center;
    padding: 20px;
}

.login-content h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--fb-text-primary);
}

.login-content p {
    font-size: 14px;
    color: var(--fb-text-secondary);
    margin-bottom: 20px;
}

.btn-fb-login {
    width: 100%;
    background-color: var(--fb-accent);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-fb-login:hover {
    background-color: #1877f2;
}

.login-separator {
    border-bottom: 1px solid var(--fb-divider);
    margin: 20px 0;
}

.btn-fb-create {
    background-color: #42b72a;
    /* Facebook Green */
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
}

.btn-fb-create:hover {
    background-color: #36a420;
}

/* --- Fixed Comments Section Layout --- */
#comentarios {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    align-items: stretch !important;
    padding: 8px 16px !important;
}

.comment-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 8px;
}

.comment-item {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
}

.comment-input-container {
    width: 100%;
    display: flex;
    align-items: flex-start;
    padding-top: 8px;
    margin-bottom: 16px;
}

/* --- Reaction Bubble (Inline Style) --- */
.reaction-container-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    cursor: pointer;
    vertical-align: middle;
}

.reaction-icon-inline {
    background: linear-gradient(to bottom, #2d88ff, #1a6fd6);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 8px;
}

.reaction-count-inline {
    font-size: 12px;
    color: var(--fb-text-secondary);
    font-weight: 400;
}