/* Blog Page Styles - Masonry Grid Layout */

/* ==============================
   BLOG HERO – MATCHES EDITORIAL THEME
============================== */

.blog-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 4rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255, 215, 0, 0.03) 50px, rgba(255, 215, 0, 0.03) 51px);
    pointer-events: none;
}

.blog-hero-overlay {
    position: relative;
    z-index: 1;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Blog Badge */
.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

/* Title */
.blog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Subtitle */
.blog-hero p {
    font-size: 1.2rem;
    color: #ddd;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Entrance animation */
.blog-hero-content {
    animation: fadeUp 0.6s ease-out both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Blog Container */
.blog-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 3rem 5%;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
}

/* Blog Filters */
.blog-filters {
    grid-column: 1 / -1;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.filter-controls {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.filter-group label i {
    color: #FFD700;
}

.filter-select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    color: #333;
}

.filter-select:hover {
    border-color: #FFD700;
}

.filter-select:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
        min-width: auto;
    }
}

/* Blog Grid Wrapper */
.blog-grid-wrapper {
    grid-column: 1;
}

/* Masonry Grid */
.blog-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: 2rem;
    grid-auto-flow: dense;
}

.masonry-blog-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.masonry-blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.masonry-blog-card.featured {
    grid-row: span 2;
}

.masonry-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.masonry-blog-card.featured .masonry-card-image {
    height: 350px;
}

.masonry-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.masonry-blog-card:hover .masonry-card-image img {
    transform: scale(1.15) rotate(2deg);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.category-badge {
    background: #FFD700;
    color: #1a1a1a;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.masonry-card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.masonry-blog-card.featured .masonry-card-content {
    padding: 2rem;
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.author-avatar {
    color: #FFD700;
    font-size: 1.5rem;
}

.author-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.post-date {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
}

.masonry-card-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.masonry-blog-card.featured .masonry-card-content h3 {
    font-size: 1.6rem;
}

.masonry-card-content p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.stats {
    display: flex;
    gap: 1.5rem;
}

.stats span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.stats i {
    color: #FFD700;
    font-size: 1rem;
}

.blog-read-btn {
    display: none;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background-color: #fff;
    border: 3px solid #FFD700;
    color: #1a1a1a;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.load-more-btn:hover {
    background: #FFD700;
    color: #1a1a1a;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.load-more-btn i {
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: rotate(180deg);
}

/* Blog Sidebar */
.blog-sidebar {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-section h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3 i {
    color: #FFD700;
}

/* Trending List */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.trending-item:hover {
    background-color: #f8f9fa;
}

.trending-rank {
    font-size: 1.8rem;
    font-weight: 900;
    color: #FFD700;
    min-width: 35px;
    text-align: center;
}

.trending-thumb {
    width: 70px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-item:hover .trending-thumb img {
    transform: scale(1.1);
}

.trending-info {
    flex: 1;
}

.trending-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-views {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

.trending-views i {
    color: #FFD700;
}

/* Categories Widget */
.category-pills {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pill-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
    transform: translateX(5px);
}

.pill-icon {
    width: 40px;
    height: 40px;
    background: #FFD700;
    color: #1a1a1a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.pill-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}

.pill-count {
    background-color: #e0e0e0;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.95rem;
    color: #999;
    margin: 0;
}

/* Subscribe Widget */
.subscribe-widget {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    text-align: center;
}

.subscribe-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.subscribe-icon i {
    font-size: 2rem;
    color: #fff;
}

.subscribe-widget h3 {
    color: #fff;
    justify-content: center;
}

.subscribe-widget h3 i {
    color: #FFD700;
}

.subscribe-widget p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.subscribe-form input {
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    outline: none;
}

.subscribe-form button {
    background-color: #FFD700;
    color: #000;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-form button:hover {
    background-color: #FFA500;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    .blog-grid-wrapper {
        grid-column: 1;
    }

    .blog-sidebar {
        grid-column: 1;
        position: static;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 3rem 5%;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-container {
        padding: 2rem 5%;
        gap: 2rem;
        grid-template-columns: 1fr;
    }

    .blog-grid-wrapper {
        grid-column: 1;
    }

    .blog-filters {
        padding: 1.2rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
        min-width: auto;
    }

    .filter-tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .blog-masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .masonry-blog-card.featured {
        grid-row: span 1;
    }

    .masonry-card-image {
        height: 180px;
    }

    .masonry-blog-card.featured .masonry-card-image {
        height: 200px;
    }

    .masonry-card-content {
        padding: 1rem;
    }

    .masonry-blog-card.featured .masonry-card-content {
        padding: 1rem;
    }

    .masonry-card-content h3 {
        font-size: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .masonry-blog-card.featured .masonry-card-content h3 {
        font-size: 1.1rem;
        -webkit-line-clamp: 2;
    }

    .masonry-card-content p {
        font-size: 0.85rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

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

    .sidebar-section {
        padding: 1.5rem;
    }

    .blog-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-dropdown select {
        width: 100%;
    }

    .load-more-section {
        margin-top: 2rem;
    }

    .load-more-btn {
        width: 100%;
        padding: 1rem 2rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .blog-hero {
        padding: 2rem 5%;
    }

    .blog-hero h1 {
        font-size: 1.5rem;
    }

    .blog-hero p {
        font-size: 0.9rem;
    }

    .blog-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }

    .blog-container {
        padding: 1.5rem 5%;
        grid-template-columns: 1fr;
    }

    .blog-grid-wrapper {
        grid-column: 1;
    }

    .blog-filters {
        padding: 1rem;
    }

    .filter-group label {
        font-size: 0.85rem;
    }

    .filter-select {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .blog-masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .masonry-card-image {
        height: 140px;
    }

    .masonry-blog-card.featured .masonry-card-image {
        height: 160px;
    }

    .masonry-card-content {
        padding: 0.8rem;
    }

    .masonry-card-content h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
    }

    .masonry-blog-card.featured .masonry-card-content h3 {
        font-size: 1rem;
        -webkit-line-clamp: 2;
    }

    .masonry-card-content p {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .card-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .author-text {
        font-size: 0.8rem;
    }

    .post-date {
        font-size: 0.75rem;
    }

    .category-badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.6rem;
        border-radius: 12px;
        letter-spacing: 0.3px;
    }

    .stats {
        gap: 0.8rem;
    }

    .stats span {
        font-size: 0.75rem;
    }

    .blog-read-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        width: 100%;
        justify-content: center;
    }

    .blog-sidebar {
        grid-column: 1;
    }

    .sidebar-section {
        padding: 1.2rem;
    }

    .sidebar-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .trending-rank {
        font-size: 1.3rem;
        min-width: 25px;
    }

    .trending-thumb {
        width: 50px;
        height: 40px;
    }

    .trending-info h4 {
        font-size: 0.8rem;
    }

    .trending-views {
        font-size: 0.7rem;
    }

    .load-more-btn {
        font-size: 0.85rem;
        padding: 0.9rem 1.8rem;
    }
}

/* Newsletter Box Styling - Blog Style */
.sidebar-section.newsletter-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    padding: 2.5rem 2rem !important;
    border-radius: 12px !important;
    text-align: center !important;
    color: #1a1a1a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    margin-top: 0 !important;
    border: 2px solid #FFD700 !important;
    position: relative !important;
    overflow: hidden !important;
}

.sidebar-section.newsletter-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 100%;
    animation: slide-shine 3s linear infinite;
}

@keyframes slide-shine {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.sidebar-section.newsletter-box .newsletter-icon {
    width: 70px !important;
    height: 70px !important;
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1.5rem !important;
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4) !important;
    position: relative !important;
    z-index: 10 !important;
    transition: all 0.3s ease;
}

.sidebar-section.newsletter-box .newsletter-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.6) !important;
}

.sidebar-section.newsletter-box .newsletter-icon i {
    font-size: 2rem !important;
    color: #1a1a1a !important;
}

.sidebar-section.newsletter-box h3 {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.7rem !important;
    color: #1a1a1a !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    gap: 0 !important;
}

.sidebar-section.newsletter-box h3 i {
    display: none !important;
}

.sidebar-section.newsletter-box p {
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem !important;
    color: #6c757d !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    position: relative !important;
    z-index: 1 !important;
}

.sidebar-section.newsletter-box .newsletter-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
    position: relative !important;
    z-index: 1 !important;
}

.sidebar-section.newsletter-box .newsletter-form input {
    width: 100% !important;
    padding: 1rem 1.3rem !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 50px !important;
    font-size: 0.95rem !important;
    background: white !important;
    color: #1a1a1a !important;
    font-weight: 400 !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.sidebar-section.newsletter-box .newsletter-form input::placeholder {
    color: #adb5bd !important;
}

.sidebar-section.newsletter-box .newsletter-form input:focus {
    border-color: #FFD700 !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15) !important;
    transform: none !important;
}

.sidebar-section.newsletter-box .newsletter-form button {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #1a1a1a !important;
    border: none !important;
    width: 100% !important;
    padding: 1rem !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3) !important;
}

.sidebar-section.newsletter-box .newsletter-form button:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5) !important;
}

.sidebar-section.newsletter-box .newsletter-form button:active {
    transform: translateY(0) !important;
}

.sidebar-section.newsletter-box .newsletter-note {
    font-size: 0.85rem !important;
    color: #6c757d !important;
    font-weight: 400 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Newsletter Responsive */
@media (max-width: 768px) {
    .sidebar-section.newsletter-box .newsletter-icon {
        margin-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .sidebar-section.newsletter-box .newsletter-form {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }

    .sidebar-section.newsletter-box .newsletter-form button {
        width: 100% !important;
        height: 50px !important;
        border-radius: 50px !important;
        padding: 1rem !important;
    }

    .sidebar-section.newsletter-box {
        padding: 2rem 1.5rem !important;
    }

    .sidebar-section.newsletter-box h3 {
        font-size: 1.5rem !important;
    }

    .sidebar-section.newsletter-box .newsletter-icon {
        width: 65px !important;
        height: 65px !important;
    }

    .sidebar-section.newsletter-box .newsletter-icon i {
        font-size: 2rem !important;
    }
}
