/* ===========================================
   MEXICANO - Blog Styles
   Blog listing, single post, sidebar, and related components
   =========================================== */

/* ===========================================
   BLOG LAYOUT
   =========================================== */

.blog-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
    align-items: start;
}

.blog-main {
    min-width: 0; /* Prevent grid blowout */
}

.blog-sidebar {
    position: sticky;
    top: 100px;
}

/* ===========================================
   FEATURED POST
   =========================================== */

.featured-post {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.featured-post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-post-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 10, 18, 0.95) 0%,
        rgba(10, 10, 18, 0.5) 50%,
        transparent 100%
    );
}

.featured-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
}

.featured-post .post-category {
    margin-bottom: var(--space-md);
}

.featured-post .post-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.featured-post .post-excerpt {
    max-width: 600px;
    margin-bottom: var(--space-md);
}

/* ===========================================
   BLOG POST CARDS
   =========================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: var(--border-light);
    transition: var(--transition-normal);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-primary);
}

.post-card-image {
    position: relative;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: var(--space-lg);
}

/* Post Category Badge */
.post-category {
    display: inline-block;
    background: rgba(255, 179, 0, 0.15);
    color: var(--gold-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-category.recipes { background: rgba(76, 175, 80, 0.15); color: var(--green-light); }
.post-category.houston { background: rgba(211, 47, 47, 0.15); color: var(--red-light); }
.post-category.events { background: rgba(156, 39, 176, 0.15); color: #CE93D8; }
.post-category.tips { background: rgba(33, 150, 243, 0.15); color: #64B5F6; }

/* Post Title */
.post-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.3;
    margin: var(--space-md) 0;
    transition: var(--transition-fast);
}

.post-card:hover .post-title {
    color: var(--gold-primary);
}

.post-title a {
    color: inherit;
}

/* Post Excerpt */
.post-excerpt {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.post-meta-item i {
    font-size: var(--text-xs);
    color: var(--gold-primary);
}

/* Read More Link */
.post-read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gold-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    margin-top: var(--space-md);
    transition: var(--transition-fast);
}

.post-read-more:hover {
    color: var(--gold-light);
    gap: var(--space-md);
}

/* ===========================================
   SIDEBAR COMPONENTS
   =========================================== */

.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border: var(--border-light);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--gold-primary);
    display: inline-block;
}

/* Categories Widget */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: var(--space-sm);
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.category-list a:hover {
    color: var(--gold-primary);
    padding-left: var(--space-sm);
}

.category-list .count {
    background: var(--bg-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
}

/* Popular Posts Widget */
.popular-posts {
    list-style: none;
}

.popular-post-item {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.popular-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-title a {
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.popular-post-title a:hover {
    color: var(--gold-primary);
}

.popular-post-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    transition: var(--transition-fast);
}

.tag:hover {
    background: var(--gold-primary);
    color: var(--bg-dark);
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--gradient-primary);
    text-align: center;
}

.newsletter-widget .sidebar-title {
    color: var(--text-primary);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.newsletter-text {
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.newsletter-form input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: none;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--bg-secondary);
}

/* ===========================================
   SINGLE POST LAYOUT
   =========================================== */

.single-post {
    max-width: 800px;
    margin: 0 auto;
}

/* Article Header */
.article-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.article-category {
    margin-bottom: var(--space-md);
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.article-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.article-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Featured Image */
.article-featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

/* Article Content */
.article-content {
    font-size: var(--text-lg);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
}

.article-content h2 {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-2xl) 0 var(--space-md);
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-xl) 0 var(--space-md);
}

.article-content p {
    margin-bottom: var(--space-lg);
}

.article-content a {
    color: var(--gold-primary);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--gold-light);
}

.article-content ul,
.article-content ol {
    margin: var(--space-lg) 0;
    padding-left: var(--space-xl);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

.article-content blockquote {
    border-left: 4px solid var(--gold-primary);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
    font-style: italic;
    color: var(--text-primary);
    font-size: var(--text-xl);
}

.article-content img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

.article-content figure {
    margin: var(--space-xl) 0;
}

.article-content figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* Code blocks */
.article-content pre {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

.article-content code {
    font-family: 'Fira Code', monospace;
    font-size: var(--text-sm);
}

.article-content p code {
    background: var(--bg-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* ===========================================
   AUTHOR BOX
   =========================================== */

.author-box {
    display: flex;
    gap: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
    border: var(--border-light);
}

.author-box-image {
    flex-shrink: 0;
}

.author-box-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-primary);
}

.author-box-content {
    flex: 1;
}

.author-box-name {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.author-box-title {
    color: var(--gold-primary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.author-box-bio {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-md);
}

.author-box-social {
    display: flex;
    gap: var(--space-md);
}

.author-box-social a {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    transition: var(--transition-fast);
}

.author-box-social a:hover {
    color: var(--gold-primary);
}

/* ===========================================
   SOCIAL SHARE
   =========================================== */

.social-share {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-top: var(--border-light);
    border-bottom: var(--border-light);
    margin: var(--space-xl) 0;
}

.social-share-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.social-share-buttons {
    display: flex;
    gap: var(--space-sm);
}

.social-share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.social-share-btn.facebook { background: #1877F2; }
.social-share-btn.twitter { background: #1DA1F2; }
.social-share-btn.pinterest { background: #E60023; }
.social-share-btn.linkedin { background: #0A66C2; }
.social-share-btn.whatsapp { background: #25D366; }

.social-share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ===========================================
   RELATED POSTS
   =========================================== */

.related-posts {
    margin-top: var(--space-3xl);
}

.related-posts-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.related-post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: var(--border-light);
    transition: var(--transition-normal);
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.related-post-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post-card-content {
    padding: var(--space-md);
}

.related-post-card .post-title {
    font-size: var(--text-base);
    margin: var(--space-sm) 0;
}

/* ===========================================
   COMMENTS SECTION
   =========================================== */

.comments-section {
    margin-top: var(--space-3xl);
}

.comments-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

.comment {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: var(--border-light);
}

.comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-sm);
}

.comment-reply {
    color: var(--gold-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

.comment-reply:hover {
    text-decoration: underline;
}

/* Nested comments */
.comment-replies {
    margin-left: var(--space-2xl);
    margin-top: var(--space-lg);
}

/* Comment Form */
.comment-form {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
}

.comment-form-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.comment-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

/* ===========================================
   PAGINATION
   =========================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.pagination-item:hover,
.pagination-item.active {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--bg-dark);
}

.pagination-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===========================================
   RESPONSIVE BLOG
   =========================================== */

@media (max-width: 1199px) {
    .blog-container {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 991px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .sidebar-widget {
        margin-bottom: 0;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        grid-template-columns: 1fr;
    }

    .featured-post-image {
        height: 280px;
    }

    .featured-post .post-title {
        font-size: var(--text-2xl);
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-box-social {
        justify-content: center;
    }

    .social-share {
        flex-direction: column;
        gap: var(--space-md);
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .comment-form-row {
        grid-template-columns: 1fr;
    }

    .article-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 575px) {
    .post-card-image img {
        height: 180px;
    }

    .featured-post-image {
        height: 220px;
    }

    .featured-post-content {
        padding: var(--space-md);
    }

    .featured-post .post-title {
        font-size: var(--text-xl);
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-content {
        font-size: var(--text-base);
    }

    .comment {
        flex-direction: column;
        gap: var(--space-md);
    }

    .comment-replies {
        margin-left: var(--space-md);
    }
}
