/*
Theme Name: BlogVista Advanced
Theme URI: https://yourdomain.com
Author: Custom Build
Description: A modern magazine theme with inbuilt Advanced SEO, Schema, GSC, and GA4 tracking. No extra plugins needed.
Version: 1.0
Text Domain: blogvista
*/

/* CSS styling hum frontend files ke sath add karenge */

/* --- SINGLE POST STYLING --- */
.single-post-area { background: #fff; padding: 30px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-top: 30px; }
.single-post-header { margin-bottom: 20px; }
.single-post-title { font-size: 32px; line-height: 1.3; margin: 15px 0; color: #111625; }
.single-post-meta { font-size: 14px; color: #777; margin-bottom: 25px; }
.single-post-thumbnail img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 30px; }
.single-post-content { font-size: 17px; line-height: 1.8; color: #444; }
.single-post-content h2, .single-post-content h3 { color: #111; margin-top: 30px; margin-bottom: 15px; }
.single-post-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 20px 0; }
.single-post-tags { margin-top: 30px; padding-top: 15px; border-top: 1px solid #eee; }
.tag-link { background: #f0f2f5; padding: 4px 10px; border-radius: 4px; font-size: 13px; margin-right: 5px; display: inline-block; }

/* Author Box */
.author-bio-box { display: flex; gap: 20px; background: #f9fafb; padding: 25px; margin-top: 40px; border-radius: 6px; border-left: 4px solid #ff2e63; }
.author-bio-avatar img { border-radius: 50%; width: 80px; height: 80px; }
.author-bio-text h4 { margin: 0 0 10px 0; font-size: 18px; }
.author-bio-text p { margin: 0; font-size: 15px; color: #555; }

/* --- LAYOUT CONFIG --- */
body { font-family: 'Segoe UI', Arial, sans-serif; background-color: #f7f9fa; color: #333; margin: 0; padding: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
a { text-decoration: none; color: inherit; }

/* Top bar & Header */
.top-bar { display: flex; justify-content: space-between; background: #fff; padding: 10px 50px; border-bottom: 1px solid #eee; font-size: 13px; }
.trending span { background: #ff2e63; color: #fff; padding: 2px 6px; font-weight: bold; margin-right: 10px; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 50px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.main-navigation ul { display: flex; list-style: none; gap: 20px; font-weight: 600; text-transform: uppercase; font-size: 14px; }

/* Hero Section Grid */
.hero-sectionGrid { display: grid; grid-template-columns: 2fr 1fr; gap: 15px; margin-top: 20px; height: 500px; }
.hero-main-post { position: relative; background-size: cover; background-position: center; border-radius: 6px; padding: 30px; display: flex; align-items: flex-end; color: #fff; }
.hero-sidebar-posts { display: grid; grid-template-rows: repeat(3, 1fr); gap: 10px; }
.hero-small-post { position: relative; background-size: cover; background-position: center; border-radius: 6px; padding: 15px; display: flex; align-items: flex-end; color: #fff; }
.category-badge { background: #ff2e63; color:#fff; font-size:11px; padding:3px 8px; font-weight:bold; border-radius:3px; text-transform:uppercase; }

/* Category Row */
.category-icon-row { display: flex; justify-content: space-between; background: #fff; padding: 20px; border-radius: 6px; margin: 20px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.category-icon-item { text-align: center; flex: 1; font-size: 13px; font-weight: 600; }
.icon-circle { width: 50px; height: 50px; background: #fff3f5; color: #ff2e63; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 20px; }

/* Main Columns */
.main-layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-top: 30px; }
.section-title { font-size: 18px; border-left: 4px solid #ff2e63; padding-left: 10px; text-transform: uppercase; margin-bottom: 20px; font-weight: bold; }

/* Post Cards */
.post-card-horizontal { display: flex; gap: 20px; background: #fff; padding: 15px; border-radius: 6px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.post-card-horizontal img { width: 240px; height: 160px; object-fit: cover; border-radius: 4px; }
.cat-tag a { color: #ff2e63; font-weight: bold; font-size: 12px; text-transform: uppercase; }

/* Sidebar & Widgets */
.widget { background: #fff; padding: 20px; border-radius: 6px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.author-avatar { width: 100px; height: 100px; border-radius: 50%; display: block; margin: 0 auto 15px; }
.widget-about-me { text-align: center; }
.read-more-btn, .newsletter-form button { background: #ff2e63; color: #fff; padding: 8px 20px; border: none; border-radius: 4px; cursor: pointer; display: inline-block; margin-top: 10px; width: 100%; font-weight: bold;}
.newsletter-form input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }

/* Editor's Picks */
.editors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 20px; }
.editor-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.editor-thumb-wrapper { position: relative; }
.editor-thumb-wrapper img { width: 100%; height: 150px; object-fit: cover; }
.video-play-btn { position: absolute; top: 10px; left: 10px; background: rgba(255,46,99,0.9); color: #fff; padding: 5px 10px; border-radius: 50%; font-size: 12px; }
.editor-card-content { padding: 15px; }

/* Footer */
.site-footer { background: #111625; color: #a3a9b7; padding: 60px 0 20px; margin-top: 50px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-col h3 { color: #fff; font-size: 16px; margin-bottom: 20px; border-bottom: 2px solid #ff2e63; display: inline-block; padding-bottom: 5px; }
.footer-logo { color: #fff; margin-bottom: 15px; font-size: 24px; }
.footer-bottom-bar { border-top: 1px solid #22293f; margin-top: 40px; padding-top: 20px; font-size: 13px; }
.bottom-flex { display: flex; justify-content: space-between; }

/* --- SINGLE POST DESIGN FIXES & OPTIMIZATIONS (New) --- */

/* Main layout grid adjustment for single posts */
.single-post-main.main-layout-grid {
    grid-template-columns: 2fr 1fr;
    gap: 40px; /* Thoda zyada space post aur sidebar ke beech */
    margin-top: 40px;
}

/* Constraining the single post container and making it clean */
.single-post-area-fix {
    background: #fff;
    padding: 0; /* Removing padding from outer container */
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.single-article-content-fix {
    padding: 30px; /* Padding inside the article for clean padding */
}

/* Formatting Content for better readability (The impressive structure) */
.single-post-content-wrap-fix {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    max-width: 780px; /* Impressive, contained width for readability */
    margin: 0 auto; /* Centered content */
}

/* Fix for large main image */
.single-post-thumbnail-fix img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Soft shadow */
}

/* Post Header elements within article */
.single-post-title-fix {
    font-size: 36px;
    line-height: 1.3;
    margin: 15px 0;
    color: #111625;
}

.single-post-meta-fix {
    font-size: 14px;
    color: #777;
    margin-bottom: 25px;
}

.category-badge-fix {
    background: #ff2e63;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
}

/* General single post elements styling */
.single-post-content-wrap-fix h2, .single-post-content-wrap-fix h3 { color: #111; margin-top: 35px; margin-bottom: 15px; }
.single-post-content-wrap-fix img { max-width: 100%; height: auto; border-radius: 4px; margin: 20px 0; }
.single-post-tags-fix { margin-top: 30px; padding-top: 15px; border-top: 1px solid #eee; text-align: center;} /* Centered tags */
.tag-link { background: #f0f2f5; padding: 4px 10px; border-radius: 4px; font-size: 13px; margin: 0 3px; display: inline-block; }

/* Author Box (Updated design) */
.author-bio-box-fix {
    display: flex;
    gap: 20px;
    background: #f9fafb;
    padding: 25px;
    margin-top: 40px;
    border-radius: 6px;
    border-top: 1px solid #eee; /* Top border for distinction */
}

.author-bio-avatar img { border-radius: 50%; width: 80px; height: 80px; }
.author-bio-text h4 { margin: 0 0 10px 0; font-size: 18px; }
.author-bio-text p { margin: 0; font-size: 15px; color: #555; }

/* Comment box design update */
.post-comments-fix {
    margin-top: 40px;
    padding: 0 30px 30px 30px; /* Padding for entire comment section */
}

/* --- SIDEBAR BIO BUTTON OVERFLOW FIX (CRITICAL) --- */
.widget-about-me .read-more-btn {
    background: #ff2e63;
    color: #fff;
    padding: 10px 20px; /* Added more vertical padding for look */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    font-size: 14px; /* Slightly larger text */
    text-align: center;
    box-sizing: border-box; /* IMPORTANT: Keeps padding within width */
    max-width: 100%; /* IMPORTANT: Constrains button to its widget box */
}

/* =========================================================
   FIXES: SINGLE POST IMAGE & BIO BUTTON OVERFLOW
   ========================================================= */
.single-post-thumbnail-fix img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.widget-about-me .read-more-btn {
    width: 100%; /* Force button to stay inside box */
    box-sizing: border-box; /* Padding doesn't add to width */
    padding: 10px;
    margin-top: 15px;
    display: block;
    text-align: center;
    overflow: hidden;
}


/* =========================================================
   MOBILE RESPONSIVENESS (Media Queries for Mobile & Tablets)
   ========================================================= */
@media only screen and (max-width: 768px) {
    
    /* 1. Stack all Grids into a Single Column */
    .main-layout-grid,
    .single-post-main.main-layout-grid,
    .hero-sectionGrid,
    .footer-grid,
    .editors-grid {
        grid-template-columns: 1fr; /* Sab kuch ek ke niche ek aayega */
        gap: 20px;
    }

    /* 2. Top Bar & Header Adjustments */
    .top-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 10px;
    }
    .site-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        margin-top: 15px;
        gap: 10px;
    }

    /* 3. Hero Section Fixes */
    .hero-sectionGrid {
        height: auto; /* Remove fixed height */
    }
    .hero-main-post {
        min-height: 300px; /* Give it enough space on mobile */
    }

    /* 4. Latest Posts Horizontal Card Fix */
    .post-card-horizontal {
        flex-direction: column; /* Image upar, text niche */
    }
    .post-card-horizontal img {
        width: 100%;
        height: auto;
    }

    /* 5. Category Icons Fix */
    .category-icon-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .category-icon-item {
        flex: 0 0 30%; /* 3 icons in a row on mobile */
    }

    /* 6. Single Post Padding Adjustments */
    .single-article-content-fix {
        padding: 15px;
    }
    .single-post-title-fix {
        font-size: 26px; /* Smaller title on mobile */
    }
    .author-bio-box-fix {
        flex-direction: column; /* Bio image and text stack vertically */
        text-align: center;
    }
}
