/*
Theme Name: Universal FastBlog Pro
Theme URI: https://atalwebsolution.com
Author: Atal Web Solution
Description: A highly customizable, ultra-fast, and fully responsive multi-domain blogging theme.
Version: 2.9.0
License: GNU General Public License v2 or later
Text Domain: universal-fastblog
*/

/* --- 1. GLOBAL VARIABLES & LIGHT COLORS --- */
:root {
    --primary-color: #6366f1;
    --accent-color: #f43f5e;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: #ffffff;
    --header-bg: #1e293b;
    --border-color: #e2e8f0;
}

/* --- 2. BASE RESET & GENERAL SETUP --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: 'Inter', -apple-system, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: var(--primary-color); }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

/* Layout Containers */
.site-container { margin: 0 auto; padding: 0 20px; width: 80%; }
.site-container.full-width { max-width: 100% !important; padding: 0 30px; }

/* --- 3. DESKTOP HEADER & GLOBAL NAVIGATION --- */
header { background: var(--header-bg); color: #fff; padding: 15px 0; position: sticky; top: 0; z-index: 999; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }

/* STRICT HEADER ALIGNMENT (Logo Left - Menu Right) */
.header-wrap { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    flex-direction: row !important;
}

.logo h1 a { color: #fff; font-size: 24px; font-weight: 700; }
.header-right { display: flex; align-items: center; }
nav ul { display: flex; list-style: none; gap: 20px; }
nav ul li a { color: #cbd5e1; font-weight: 500; font-size: 15px; }
nav ul li a:hover { color: #fff; }

/* --- 4. HAMBURGER BUTTON STRUCTURE --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
}
.mobile-menu-toggle .bar { width: 100%; height: 3px; background-color: #fff; border-radius: 2px; transition: 0.3s; }

/* --- 5. MAIN STRUCTURE & GRID LAYOUTS (PEHLE WALA LAYOUT) --- */
.main-wrapper { display: flex; gap: 30px; margin: 40px auto; }
.main-content { flex: 3; min-width: 0; }
.sidebar { flex: 1; background: var(--card-bg); border: 1px solid var(--border-color); padding: 25px; border-radius: 12px; height: fit-content; }

/* Trending / Featured Section */
.trending-section { margin-bottom: 40px; }
.section-title { font-size: 22px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; border-left: 4px solid var(--primary-color); padding-left: 10px; font-weight: 700; }
.trending-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.trending-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.02); position: relative; }
.trending-img { height: 200px; background: #ddd; background-size: cover; background-position: center; }
.trending-info { padding: 20px; }

/* Post Cards (Latest Feed Layout) */
.main-feed { display: flex; flex-direction: column; gap: 25px; margin-bottom: 30px; }
.post-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; display: flex; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.post-card .thumb { width: 300px; min-width: 300px; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.post-details { padding: 25px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.post-title { margin-bottom: 10px; }
.post-title a { color: var(--text-color); font-size: 22px; font-weight: 700; }
.post-title a:hover { color: var(--primary-color); }
.post-meta { font-size: 13px; color: #64748b; margin-bottom: 8px; }

/* Categories Grid Bar */
.categories-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.cat-btn { background: var(--primary-color); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: bold; }

/* --- 6. VIEW ALL & FOOTER BLOCK --- */
.view-all-container { text-align: center; margin: 40px 0; }
.btn-view-all { background: var(--primary-color); color: #fff; padding: 12px 35px; border-radius: 8px; font-weight: 600; display: inline-block; box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2); }
.btn-view-all:hover { opacity: 0.9; transform: translateY(-2px); }

footer { background: var(--header-bg); color: #94a3b8; padding: 30px 0; text-align: center; font-size: 14px; border-top: 1px solid var(--border-color); margin-top: 50px; }

/* ========================================================
   🎯 7. COMPLETE RESPONSIVE ENGINES (NO REMOVALS)
   ======================================================== */
@media (max-width: 992px) {
    .main-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-card .thumb { width: 240px; min-width: 240px; }
    .post-title a { font-size: 19px; }
}

@media (max-width: 768px) {
    /* FIXED HEADER ALIGNMENT FOR MOBILE (Logo Left Side Strict) */
    .header-wrap { 
        display: flex !important;
        flex-direction: row !important; 
        justify-content: space-between !important; 
        align-items: center !important;
        padding: 5px 0;
    }

    /* Force hamburger layout switch right */
    .mobile-menu-toggle { display: flex !important; }

    /* Collapsed Nav Container settings */
    .header-right {
        display: none !important; 
        flex-direction: column !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border-color);
        gap: 15px;
    }
    .header-right.active { display: flex !important; }

    nav ul { flex-direction: column; width: 100%; text-align: center; gap: 15px; }
    nav ul li a { display: block; font-size: 17px; padding: 8px 0; }

    /* Cross X bar conversion icons */
    .mobile-menu-toggle.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-toggle.open .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Responsive Stacking layouts */
    .post-card { flex-direction: column; }
    .post-card .thumb { width: 100%; min-width: 100%; height: 210px; }
    .post-details { padding: 20px; }
    .post-title a { font-size: 18px; }
    .site-container { padding: 0 15px; }
}

@media (max-width: 480px) {
    .btn-view-all { width: 100%; text-align: center; }
}