/* TripLanka Blog Stylesheet */
:root {
    --blog-surface: #ffffff;
    --blog-text: #334155;
    --blog-text-light: #64748b;
    --blog-border: #e2e8f0;
}

/* Base Adjustments */
body.blog-page {
    background-color: #f8fafc;
}

/* Blog Header */
.blog-hero {
    padding: 180px 0 100px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)), url('../Images/Site Photos/Wild Animals/Elephant Sri Lanka Photo by SB Bandara.jpg') center/cover no-repeat;
    text-align: center;
    color: white;
    position: relative; /* For photo attribution */
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}
.blog-hero h1 span { color: var(--secondary); }
.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Filter Dropdown */
.blog-filter-section {
    display: flex;
    justify-content: center;
    margin: -30px auto 3rem;
    position: relative;
    z-index: 100;
}

.blog-filter-dropdown {
    position: relative;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-selected {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
    font-size: 1rem;
}

.filter-selected i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.blog-filter-dropdown.active .filter-selected i {
    transform: rotate(180deg);
}

.filter-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    list-style: none;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.blog-filter-dropdown.active .filter-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-options li {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s ease;
}

.filter-options li:hover {
    background: #f8fafc;
    color: var(--primary);
}

.filter-options li.active {
    background: var(--primary);
    color: white;
}

/* Filtering Animation */
.blog-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card.filtered-out {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    display: none;
}

/* Feature Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding-bottom: 5rem;
}

/* Extended Card for Featured Post */
.blog-card.featured {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.blog-card.featured .blog-img {
    flex: 1;
    height: 400px;
}

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

.blog-card.featured h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

/* Standard Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-img img {
    transform: scale(1.08);
}

.blog-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: var(--secondary);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
}

.blog-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 0.8rem;
    color: var(--blog-text-light);
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.blog-meta i {
    color: var(--primary);
}

.blog-content h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-content p {
    color: var(--blog-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    text-align: justify;
}

.read-more {
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 0.8rem;
    color: var(--secondary);
}

/* Article Page (The Document View) */
.article-header {
    padding: 180px 0 80px;
    background: var(--primary);
    color: white;
    text-align: center;
    position: relative; /* For photo attribution */
}

/* Photo Attribution Hover for Blog */
.blog-hero:hover .photo-attribution,
.article-header:hover .photo-attribution {
    opacity: 1;
    transform: translate(-50%, -5px);
}

.article-header .blog-badge {
    position: relative;
    top: 0; left: 0;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 3rem;
    max-width: 1100px;
    margin: 0 auto 1.5rem;
    line-height: 1.3;
}

.article-content {
    max-width: 800px;
    margin: -50px auto 4rem;
    background: white;
    padding: 4rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    position: relative;
    z-index: 5;
}

.article-body p {
    text-align: justify;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #475569;
}

.article-body h2 {
    font-size: 2rem;
    color: var(--primary);
    margin: 3rem 0 1.5rem;
    font-weight: 800;
}

.article-body h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 2rem 0 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body img {
    width: 100%;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-body ul, .article-body ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.8rem;
}

/* Responsive */
@media(max-width: 768px) {
    .blog-card.featured {
        flex-direction: column;
    }
    .blog-card.featured .blog-img {
        width: 100%;
        height: 250px;
    }
    .blog-card.featured .blog-content {
        padding: 2rem;
    }
    .article-content {
        padding: 2rem;
        margin-top: -30px;
    }
    .article-header h1 {
        font-size: 2rem;
    }
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    .blog-tabs {
        flex-wrap: wrap;
        border-radius: 20px;
    }
}
