/* blog-styles.css - The "Goan Element" Master Theme */

/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Core Palette - Dark Luxury */
    --color-bg-dark: #0A0A0A;
    --color-bg-card: #141414;
    --color-primary: #C69B58;
    /* Gold */
    --color-text-main: #EDEDED;
    --color-text-muted: #888888;
    --color-border: #333333;

    /* Functional Colors */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-info: #17a2b8;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* --- 2. GLOBAL RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

ul {
    list-style: none;
}

/* --- 3. HEADER (Sticky) --- */
.site-header {
    background: rgba(10, 10, 10, 0.95);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.logo-area img {
    height: 45px;
    width: auto;
}

.main-nav a {
    margin-left: 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-main);
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--color-primary);
}

/* Search Bar (Global) */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 15px 8px 35px;
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-body);
    outline: none;
    width: 200px;
    transition: width 0.3s ease;
}

.header-search input:focus {
    border-color: var(--color-primary);
    width: 250px;
}

.header-search i {
    position: absolute;
    left: 12px;
    color: #666;
    font-size: 0.8rem;
}

/* --- 4. MASTER PAGE (blog.html) COMPONENTS --- */

/* Hero Section */
.blog-hero {
    text-align: center;
    padding: 5rem 1rem;
    background: #111;
    border-bottom: 1px solid var(--color-border);
}

.blog-hero span {
    letter-spacing: 3px;
    font-size: 0.75rem;
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: bold;
}

.blog-hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: #fff;
    margin: 1rem 0;
    line-height: 1.1;
}

.blog-hero p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Layout Grid (Sidebar + Content) */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
}

/* Blog Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Blog Cards */
.blog-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.card-image {
    height: 220px;
    width: 100%;
    background-color: #222;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cat-badge {
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
    display: inline-block;
    font-weight: 700;
    background: rgba(198, 155, 88, 0.1);
    padding: 4px 10px;
    border-radius: 2px;
    width: fit-content;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #fff;
}

.card-content p {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.read-btn {
    margin-top: auto;
    font-size: 0.75rem;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid var(--color-primary);
    display: inline-block;
    width: fit-content;
    padding-bottom: 2px;
}

.read-btn:hover {
    color: var(--color-primary);
}

/* Sidebar */
.sidebar-section {
    margin-bottom: 3rem;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #fff;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

/* Sidebar Dropdown */
.select-wrapper {
    position: relative;
}

.cat-dropdown {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    appearance: none;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    font-family: var(--font-body);
    font-size: 1rem;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-primary);
}

/* Popular Posts Widget */
.popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

.pop-img {
    width: 80px;
    height: 80px;
    background: #333;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.pop-content h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    line-height: 1.3;
    color: #fff;
    font-family: var(--font-heading);
}

.view-count {
    font-size: 0.75rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- 5. SINGLE BLOG POST LAYOUT --- */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

.blog-meta-header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.blog-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #fff;
}

.blog-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

/* Content Typography */
.blog-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin: 3.5rem 0 1.5rem;
}

.blog-content h3 {
    color: #fff;
    margin: 2.5rem 0 1rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.blog-content p {
    margin-bottom: 1.5rem;
    color: #ccc;
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content strong {
    color: #fff;
    font-weight: 600;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 2rem;
    padding-left: 20px;
    color: #ccc;
}

.blog-content li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

/* --- 6. UTILITY CLASSES (For Custom Widgets) --- */
/* These ensure your custom tables/boxes work even if page-specific CSS fails */

.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    border: 1px solid #333;
    margin: 2rem 0;
}

th {
    background-color: #1a1a1a;
    color: var(--color-primary);
    padding: 15px;
    text-align: left;
}

td {
    padding: 15px;
    border-bottom: 1px solid #333;
    color: #ccc;
    vertical-align: top;
}

tr:hover td {
    background-color: #111;
}

.cta-wrapper {
    margin-top: 5rem;
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #0d0d0d;
}

.cta-title {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.redirect-btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: #000;
    padding: 16px 35px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.redirect-btn:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* --- 7. FOOTER & COOKIE --- */
footer {
    background: #111;
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid #333;
}

footer p {
    color: #666;
    font-size: 0.9rem;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    border-top: 1px solid var(--color-primary);
}

.cookie-btn {
    background: var(--color-primary);
    border: none;
    padding: 10px 25px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
}

/* --- 8. RESPONSIVE --- */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .sidebar {
        order: -1;
    }

    /* Sidebar moves to top on mobile */
}

@media (max-width: 768px) {
    .blog-title {
        font-size: 2.2rem;
    }

    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .header-search input {
        width: 150px;
    }

    .header-search input:focus {
        width: 180px;
    }
}