@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary: #8bc34a;
    --accent: #8bc34a;
    --bg-dark: #111111;
    --bg-card: #1a1a1a;
    --text-light: #f5f5f5;
    --text-gray: #b0b0b0;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- HEADER --- */
header {
    background: rgba(0, 0, 0, 0.95);
    padding: 15px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 50px;
    height: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    font-weight: 400;
    font-size: 1rem;
    text-transform: none;
}

nav a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    height: 50vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    margin-top: 80px;
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin-bottom: 30px;
    color: #e0e0e0;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* --- BLOG GRID --- */
.container {
    max-width: 1200px;
    margin: 120px auto 40px;
    /* Increased to ensure clearance below fixed header */
    padding: 0 20px;
}

/* --- ARTICLE HEADER --- */
.article-header {
    margin-top: 20px;
    /* Small gap between container top and title */
    margin-bottom: 30px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

.article-main-title {
    font-size: 3rem;
    margin-bottom: 20px;
    /* Increased margin to separate from date */
    color: var(--primary);
    text-transform: uppercase;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    order: 1;
}

.article-meta {
    color: var(--text-gray);
    font-size: 1.1rem;
    display: block;
    width: 100%;
    text-align: right;
    margin-top: 10px;
    font-weight: 300;
    order: 2;
}

/* --- ARTICLE BODY TYPOGRAPHY (Matches Editor) --- */
.article-body h2 {
    font-size: 2rem !important;
    color: var(--primary) !important;
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.article-body h3 {
    font-size: 1.5rem;
    color: #ddd;
    margin-top: 25px;
    margin-bottom: 10px;
}

.article-body p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.article-body ul {
    list-style: disc !important;
    margin-left: 20px;
    margin-bottom: 15px;
    padding-left: 20px;
}

.article-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
    list-style: decimal !important;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    border-left: 4px solid #555;
    padding-left: 15px;
    color: #aaa;
    font-style: italic;
    margin: 20px 0;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
}


.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
}

.blog-grid {
    display: grid;
    /* Use auto-fill to keep column sizes consistent even with few items */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    justify-items: center;
    /* Center cards in their grid cells */
}

.article-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    /* Remove underline from card text */
    color: inherit;
    /* Inherit text color */
    width: 100%;
    max-width: 400px;
    /* Limit width as requested */
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(139, 195, 74, 0.2);
    border-color: var(--primary);
}

.card-img {
    width: 100%;
    /* Increase height for better aspect ratio */
    height: 240px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-date {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: block;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-excerpt {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-link {
    padding: 10px 15px;
    background: var(--bg-card);
    color: var(--text-light);
    border: 1px solid #333;
    border-radius: 4px;
    transition: 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* --- FOOTER --- */
footer {
    background: #000;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
    border-top: 2px solid var(--accent);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-gray);
}

.social-links a:hover {
    color: var(--primary);
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    nav ul {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* --- NEW FEATURES --- */

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 30px auto 10px;
    width: 100%;
}

.search-form {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 30px;
    border: 1px solid #444;
}

.search-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 20px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.search-form button {
    background: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button:hover {
    transform: scale(1.1);
    background: #aed581;
}

/* Share Buttons */
/* Share Buttons */
.share-section {
    margin: 50px auto;
    padding: 30px;
    background: #1e1e1e;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 800px;
}

.share-section h3 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-share {
    padding: 12px 25px;
    border-radius: 50px;
    color: #fff !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-decoration: none !important;
}

.btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    opacity: 1;
    filter: brightness(1.1);
}

.btn-share i {
    font-size: 1.3rem;
}

.btn-share.fb {
    background: linear-gradient(135deg, #1877f2 0%, #0d47a1 100%);
}

.btn-share.wa {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.btn-share.copy {
    background: linear-gradient(135deg, #757575 0%, #424242 100%);
}

/* Related Articles */
.related-section {
    margin-top: 60px;
}

.section-title-small {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary);
    padding-left: 15px;
}

.related-grid .card-content {
    padding: 15px;
}

.related-grid .card-title {
    font-size: 1.2rem;
}

/* --- FIXES --- */
/* Prevent image overflow in article body and cards */
.article-body img,
.card-img {
    max-width: 100%;
    height: auto;
}