/**
 * Blog Page Styles
 * Modern SEO-optimized blog with animations
 * 
 * @package ATH_ATRAHI_DESIGN
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */
.blog-hero {
    position: relative;
    padding: 180px 0 100px;
    background: var(--atrahi-dark);
    overflow: hidden;
}

.blog-hero .hero-bg-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 70% 20%, rgba(185, 157, 99, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 80%, rgba(185, 157, 99, 0.1) 0%, transparent 40%);
}

.blog-hero .hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b99d63' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-hero h1 .text-gold {
    color: var(--atrahi-gold);
}

.blog-hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

/* Search Box */
.blog-search-box {
    max-width: 500px;
    margin: 0 auto;
}

.blog-search-box form {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid rgba(185, 157, 99, 0.3);
    transition: all 0.3s ease;
}

.blog-search-box form:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--atrahi-gold);
    box-shadow: 0 0 30px rgba(185, 157, 99, 0.2);
}

.blog-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: #fff;
    font-size: 1rem;
}

.blog-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-search-box button {
    background: var(--atrahi-gold);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-search-box button svg {
    color: var(--atrahi-dark);
}

.blog-search-box button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(185, 157, 99, 0.4);
}

/* ==========================================================================
   Category Tabs
   ========================================================================== */
.blog-categories-section {
    padding: 30px 0;
    background: var(--atrahi-gray);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.category-tab:hover {
    border-color: var(--atrahi-gold);
    color: var(--atrahi-gold);
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--atrahi-dark);
    border-color: var(--atrahi-dark);
    color: #fff;
}

.category-tab .tab-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.category-tab.active .tab-count {
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
}

/* ==========================================================================
   Featured Post
   ========================================================================== */
.featured-post-section {
    background: #fff;
    padding: 80px 0;
}

.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
    background: var(--atrahi-gray);
    border-radius: 24px;
    overflow: hidden;
}

.featured-post .fp-image {
    position: relative;
    height: 100%;
    min-height: 400px;
}

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

.featured-post .fp-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-post .fp-content {
    padding: 40px 50px 40px 0;
}

.featured-post .fp-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.featured-post .fp-category {
    background: var(--atrahi-dark);
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.3s;
}

.featured-post .fp-category:hover {
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
}

.featured-post .fp-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 0.9rem;
}

.featured-post .fp-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.featured-post .fp-title a {
    color: var(--atrahi-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.featured-post .fp-title a:hover {
    color: var(--atrahi-gold);
}

.featured-post .fp-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.featured-post .fp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.featured-post .fp-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-post .fp-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.featured-post .fp-author span {
    font-weight: 500;
    color: var(--atrahi-dark);
}

.featured-post .fp-stats {
    display: flex;
    gap: 20px;
}

.featured-post .fp-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #888;
}

/* ==========================================================================
   Blog Main Layout
   ========================================================================== */
.blog-main-section {
    background: #fff;
    padding-bottom: 100px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
}

.blog-main .section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.blog-main .section-header-inline h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--atrahi-dark);
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e9ecef;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #888;
}

.view-btn:hover {
    border-color: var(--atrahi-gold);
    color: var(--atrahi-gold);
}

.view-btn.active {
    background: var(--atrahi-dark);
    border-color: var(--atrahi-dark);
    color: #fff;
}

/* ==========================================================================
   Blog Grid
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

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

.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.blog-card .bc-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.blog-card:hover .bc-image img {
    transform: scale(1.1);
}

.blog-card .bc-image .bc-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--atrahi-gray) 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.blog-card .bc-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s;
}

.blog-card .bc-category:hover {
    background: var(--atrahi-dark);
    color: #fff;
}

.blog-card .bc-content {
    padding: 20px 25px 25px;
}

.blog-card .bc-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.blog-card .bc-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #888;
}

.blog-card .bc-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.blog-card .bc-title a {
    color: var(--atrahi-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card .bc-title a:hover {
    color: var(--atrahi-gold);
}

.blog-card .bc-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-card .bc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.blog-card .bc-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card .bc-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.blog-card .bc-author span {
    font-size: 0.85rem;
    color: var(--atrahi-dark);
    font-weight: 500;
}

.blog-card .bc-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--atrahi-gold);
    text-decoration: none;
    transition: all 0.3s;
}

.blog-card .bc-read-more:hover {
    color: var(--atrahi-dark);
    letter-spacing: 1px;
}

/* List View Styles */
.blog-grid.list-view .blog-card {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.blog-grid.list-view .blog-card .bc-image {
    height: 100%;
    min-height: 200px;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--atrahi-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--atrahi-gray);
}

.widget-title .widget-icon {
    font-size: 1.2rem;
}

/* Popular Posts Widget */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--atrahi-gray);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.popular-post-item:hover {
    background: var(--atrahi-dark);
}

.popular-post-item:hover h4,
.popular-post-item:hover .pp-date {
    color: #fff;
}

.popular-post-item .pp-rank {
    width: 32px;
    height: 32px;
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.popular-post-item .pp-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--atrahi-dark);
    margin-bottom: 3px;
    line-height: 1.4;
    transition: color 0.3s;
}

.popular-post-item .pp-date {
    font-size: 0.75rem;
    color: #888;
    transition: color 0.3s;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.categories-list li a:hover {
    background: var(--atrahi-gray);
    color: var(--atrahi-gold);
    padding-left: 20px;
}

.categories-list li a .cat-count {
    background: var(--atrahi-gray);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.categories-list li a:hover .cat-count {
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 14px;
    background: var(--atrahi-gray);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
    transform: scale(1.05);
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--atrahi-dark) 0%, #2a2a2a 100%);
    text-align: center;
}

.cta-widget .cta-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-widget h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.cta-widget p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.cta-widget .btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.cta-widget .btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.cta-widget .btn-outline:hover {
    background: var(--atrahi-gold);
    border-color: var(--atrahi-gold);
    color: var(--atrahi-dark);
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */
.newsletter-section {
    background: var(--atrahi-gray);
    padding: 80px 0;
}

.newsletter-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: var(--atrahi-dark);
    border-radius: 24px;
    padding: 50px 60px;
}

.newsletter-content .newsletter-badge {
    display: inline-block;
    background: rgba(185, 157, 99, 0.15);
    color: var(--atrahi-gold);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.newsletter-content h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 450px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
}

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

.newsletter-form input:focus {
    outline: none;
    border-color: var(--atrahi-gold);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.blog-pagination a,
.blog-pagination span {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-pagination a {
    background: var(--atrahi-gray);
    color: var(--atrahi-dark);
}

.blog-pagination a:hover {
    background: var(--atrahi-gold);
    color: var(--atrahi-dark);
}

.blog-pagination span.current {
    background: var(--atrahi-dark);
    color: #fff;
}

.blog-pagination .prev,
.blog-pagination .next {
    width: auto;
    padding: 0 18px;
}

/* ==========================================================================
   No Posts
   ========================================================================== */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    background: var(--atrahi-gray);
    border-radius: 16px;
}

.no-posts .no-posts-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-posts h3 {
    font-size: 1.5rem;
    color: var(--atrahi-dark);
    margin-bottom: 10px;
}

.no-posts p {
    color: #888;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Delay classes */
.animate-fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.animate-fade-in-up:nth-child(3) { animation-delay: 0.3s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
    .blog-layout {
        grid-template-columns: 1fr 300px;
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .blog-hero {
        padding: 150px 0 80px;
    }
    
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-post .fp-image {
        min-height: 300px;
    }
    
    .featured-post .fp-content {
        padding: 30px;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cta-widget {
        grid-column: span 2;
    }
    
    .newsletter-box {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }
    
    .newsletter-form {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .category-tabs-wrapper {
        gap: 8px;
    }
    
    .category-tab {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid.list-view .blog-card {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .cta-widget {
        grid-column: span 1;
    }
    
    .featured-post .fp-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .blog-hero {
        padding: 140px 0 60px;
    }
    
    .blog-search-box form {
        flex-direction: column;
        border-radius: 16px;
        padding: 10px;
    }
    
    .blog-search-box button {
        width: 100%;
        border-radius: 10px;
    }
    
    .featured-post .fp-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .view-options {
        display: none;
    }
}
