/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    --primary: #1a1a1a;
    --accent: #d4af37;
    /* Gold */
    --accent-glow: rgba(212, 175, 55, 0.4);
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-light: #6c757d;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    /* Better mobile padding */
}

/* Header */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    /* Adjustable for mobile */
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    background: linear-gradient(45deg, var(--primary), #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding-bottom: 5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--accent);
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Mobile Menu Adjustments */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }

    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0 0.8rem;
    }

    .logo {
        font-size: 2rem;
    }
}

/* Hero / Homepage Cards */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
    justify-items: center;
    /* Force center alignment for Cards */
}

@media (min-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 3rem 0;
    }
}

@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* Ad Containers - Responsive Fixes */
.ad-container {
    width: 100%;
    max-width: 100%;
    margin: 2.5rem auto;
    text-align: center;
    background: #f8f9fa;
    border: 1px dashed #e9ecef;
    padding: 1.5rem;
    color: #adb5bd;
    font-size: 0.8rem;
    box-sizing: border-box;
    overflow: hidden;
    /* Prevent overflow on mobile */
    border-radius: 8px;
}

.ad-slot img,
.ad-slot iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.home-ad {
    grid-column: 1 / -1;
}

.post-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    text-align: center;
    /* Center text */
    width: 100%;
    max-width: 400px;
    /* Limit width */
    margin: 0 auto;
    /* Center card itself if grid allows */
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.read-more span {
    margin-left: 5px;
    transition: var(--transition);
}

.post-card:hover .read-more span {
    margin-left: 10px;
}

/* Ad Containers */
.ad-container {
    width: 100%;
    margin: 2rem 0;
    text-align: center;
    background: #f1f1f1;
    border: 1px dashed #ccc;
    padding: 1rem;
    color: #999;
    font-size: 0.9rem;
    box-sizing: border-box;
    /* Ensure padding doesn't break width */
}

.home-ad {
    grid-column: 1 / -1;
}

/* Single Post */
.article-header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(to bottom, #f8f9fa, #fff);
}

.article-header h1 {
    font-size: 2.5rem;
    /* Responsive font size */
    max-width: 800px;
    margin: 0 auto 1rem;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
}

.article-meta {
    color: var(--text-light);
    font-style: italic;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
}

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

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

/* Read Also Box */
.read-also-box {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border-left: 4px solid var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 0 8px 8px 0;
}

.read-also-box span {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.read-also-box a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.read-also-box a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Related Posts */
.related-section {
    background: #f9f9f9;
    padding: 4rem 0;
    margin-top: 4rem;
}

.related-title {
    text-align: center;
    margin-bottom: 3rem;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    opacity: 0.7;
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1rem;
}

/* Removed gap to control spacing with margin */
.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Add Separator " | " */
.footer-links a:not(:last-child)::after {
    content: "|";
    margin: 0 15px;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive Grid/Images */
img {
    max-width: 100%;
    height: auto;
}

/* Cookie Consent GDPR Styles */
.cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: bottom 0.5s ease;
    z-index: 1000;
    border-top: 4px solid #d4af37;
    /* Gold accent */
}

.cookie-consent.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cookie-content h3 {
    margin-top: 0;
    color: #333;
}

.cookie-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.btn-accept {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

.btn-reject {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .cookie-buttons {
        margin-top: 0;
    }
}