/* ============================================
   Blog Page Styles
   ============================================ */

/* Blog Hero */
.blog-hero {
    position: relative;
    padding: 10rem 0 6rem;
    margin-top: 0;
    min-height: 50vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.blog-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.hero-slide .hero-img.loaded {
    opacity: 1;
}

.blog-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(65, 65, 66, 0.9) 0%, rgba(210, 174, 52, 0.7) 100%);
    z-index: 2;
}

.blog-hero .container {
    position: relative;
    z-index: 3;
}

.blog-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    text-align: center;
}

.blog-hero .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0 6rem;
    background: var(--white);
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--gray-dark);
    background: var(--white);
    color: var(--dark);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
    text-decoration: none;
    display: inline-block;
}

.category-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.category-btn.active {
    background: var(--gradient-gold);
    color: var(--white);
    border-color: var(--gold);
}

/* Featured Blog Card - Special Layout */
.featured-blog-card {
    display: block;
    margin-bottom: 4rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    transition: all 0.4s ease;
    cursor: pointer;
}

.featured-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.featured-blog-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
    min-height: 450px;
}

.featured-blog-image {
    position: relative;
    overflow: hidden;
}

.featured-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0;
}

.featured-blog-image img.loaded {
    opacity: 1;
}

.featured-blog-card:hover .featured-blog-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--gradient-gold);
    color: var(--white);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.featured-blog-text {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-category {
    display: inline-block;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.featured-excerpt {
    font-size: 1.15rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.featured-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #666;
}

.featured-meta > span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-meta svg {
    color: var(--gold);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-gold);
    color: var(--white);
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    width: fit-content;
    transition: all 0.3s ease;
}

.featured-blog-card:hover .featured-read-more {
    gap: 1.25rem;
    padding-right: 2.5rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--gray-dark);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.blog-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0;
}

.blog-image img.loaded {
    opacity: 1;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-gold);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.blog-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 149, 0, 0.95);
    color: var(--white);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.blog-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--dark-light);
    flex-wrap: wrap;
}

.blog-date,
.blog-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-date svg,
.blog-read-time svg {
    color: var(--gold);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.blog-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 3.8rem; /* Ensures consistent title height for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    color: var(--dark-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 5.1rem; /* 3 lines * 1.7 line-height */
}

.blog-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.blog-link:hover {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--gray-dark);
    background: var(--white);
    color: var(--dark);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
    text-decoration: none;
    display: inline-block;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
}

.page-btn.active {
    background: var(--gradient-gold);
    color: var(--white);
    border-color: var(--gold);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Blog Detail Page Styles
   ============================================ */

.blog-detail-hero {
    position: relative;
    padding: 12rem 0 8rem;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.blog-detail-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blog-detail-hero .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(212, 175, 55, 0.6) 100%);
    z-index: 2;
}

.blog-detail-hero .container {
    position: relative;
    z-index: 3;
}

.post-category-badge {
    display: inline-block;
    background: var(--gradient-gold);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.post-meta-hero {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.post-meta-hero > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta-hero svg {
    color: var(--gold);
    flex-shrink: 0;
}

/* Blog Detail Content */
.blog-detail-content {
    padding: 4rem 0 6rem;
    background: var(--white);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.article-main {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1.5rem;
    color: var(--dark);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
}

/* Article Tags */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.article-tags h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark);
}

.tags-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag-badge {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: var(--dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.tag-badge:hover {
    background: var(--gold);
    color: var(--white);
}

/* Author Card */
.author-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar svg {
    color: var(--white);
}

.author-details h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.author-details p {
    color: #666;
    font-size: 0.95rem;
}

/* Share Section */
.share-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.share-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Vertical Share Buttons (Sidebar) */
.share-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--white);
    transition: all var(--transition);
    justify-content: center;
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0077b5;
}

.share-whatsapp {
    background: #25d366;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

/* Related Posts */
.related-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.related-post-card {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all var(--transition);
    border-radius: 8px;
    overflow: hidden;
}

.related-post-card:hover {
    transform: translateX(5px);
}

.related-post-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-post-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-post-date {
    font-size: 0.85rem;
    color: #666;
}

/* Back to Blog Button */
.btn-back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--gradient-gold);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-back-to-blog:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
    }
    
    /* Featured Blog Card - Tablet */
    .featured-blog-content {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .featured-blog-image {
        height: 350px;
    }
    
    .featured-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 8rem 0 4rem;
    }
    
    .blog-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .category-filter {
        gap: 0.75rem;
    }
    
    .category-btn {
        font-size: 0.85rem;
        padding: 0.625rem 1.25rem;
    }
    
    /* Featured Blog Card - Mobile */
    .featured-blog-card {
        margin-bottom: 3rem;
    }
    
    .featured-blog-content {
        grid-template-columns: 1fr;
    }
    
    .featured-blog-image {
        height: 280px;
    }
    
    .featured-blog-text {
        padding: 2rem 1.5rem;
    }
    
    .featured-title {
        font-size: 1.75rem;
    }
    
    .featured-excerpt {
        font-size: 1rem;
    }
    
    .featured-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .featured-read-more {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .blog-detail-hero {
        padding: 8rem 0 4rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-meta-hero {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .article-main {
        padding: 2rem 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-image {
        height: 220px;
    }
    
    .featured-blog-image {
        height: 220px;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .featured-excerpt {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .featured-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}
