/*
Theme Name: MicroByte Minimal (Formerly GooExam)
Theme URI: https://microbyteinc.com/
Author: MicroByte Team
Description: Optimized for Tier 1 Countries (USA/UK). High Speed. Ad-Free Layout.
Version: 5.0.0 (Master Update)
*/

/* ============================================================
   1. CORE VARIABLES (BRAND IDENTITY)
   ============================================================ */
:root {
    /* --- NEW BRAND COLORS (Electric Tech Look) --- */
    --brand-blue: #425df5;        /* Electric Blue (Primary) */
    --brand-dark: #1e293b;        /* Deep Slate (Headings) */
    --brand-gray: #64748b;        /* Muted Text */
    
    /* --- ACTION COLORS --- */
    --btn-color: #fc6805;         /* Vibrant Orange (Buttons) */
    --btn-hover: #e65c00;         /* Darker Orange on Hover */
    
    /* --- BACKGROUNDS (Google Clean Style) --- */
    --bg-body: #f8fafc;           /* Lightest Blue-Grey */
    --bg-card: #ffffff;           /* Pure White */
    --border-color: #e2e8f0;      /* Light Border */
    
    /* --- FONTS --- */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
   2. BASE RESET & TYPOGRAPHY
   ============================================================ */
* { box-sizing: border-box; }

body { 
    font-family: var(--font-stack); 
    margin: 0; padding: 0; 
    line-height: 1.6; 
    font-size: 16px;
    background: var(--bg-body);
    color: var(--brand-dark);
    transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: var(--brand-blue); transition: 0.2s; }
a:hover { color: var(--btn-color); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   3. HEADER & NAVIGATION
   ============================================================ */
.site-header { 
    background: var(--bg-card); 
    border-bottom: 1px solid var(--border-color); 
    padding: 15px 0; 
    position: sticky; top: 0; z-index: 1000; 
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }

/* Logo Styling */
.logo-text { font-size: 24px; font-weight: 700; color: var(--brand-dark); letter-spacing: -0.5px; }
.logo-text span { color: var(--brand-blue); }

.header-controls { display: flex; gap: 15px; align-items: center; }

/* Menu Reset & Dropdown Fix (From Additional CSS) */
.main-navigation ul { display: flex; list-style: none; gap: 25px; margin: 0; padding: 0; }
.main-navigation li { position: relative; display: inline-block; }
.main-navigation li a { color: var(--brand-gray); font-weight: 500; font-size: 14px; }
.main-navigation li a:hover { color: var(--brand-blue); }

/* Sub-Menu Styling */
.main-navigation ul ul, ul.sub-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #ffffff; min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 10px 0; z-index: 9999; margin: 0;
    border-radius: 8px; border: 1px solid var(--border-color);
}
.main-navigation ul li:hover > ul, li.menu-item-has-children:hover > ul.sub-menu {
    display: block; animation: fadeIn 0.2s ease-in-out;
}
ul.sub-menu li { display: block; width: 100%; }
ul.sub-menu li a { padding: 10px 20px; display: block; color: #333; }
ul.sub-menu li a:hover { background-color: #f8f9fa; color: var(--brand-blue); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; width: 30px; background: none; border: none; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 3px; background: var(--brand-dark); border-radius: 2px; transition: 0.3s; }
.mobile-menu-container { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: var(--bg-body); z-index: 999; padding: 20px; overflow-y: auto; }
.mobile-menu-container.open { display: block; }
.mobile-menu-inner ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu-inner li { border-bottom: 1px solid var(--border-color); }
.mobile-menu-inner a { display: block; padding: 15px 0; font-size: 18px; font-weight: 600; color: var(--brand-dark); }

/* ============================================================
   4. BUTTONS & UI ELEMENTS
   ============================================================ */
button, .wp-block-button__link {
    background-color: var(--btn-color) !important;
    color: white !important;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 12px 24px;
    border: none; cursor: pointer;
}
button:hover, .wp-block-button__link:hover {
    background-color: var(--btn-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 104, 5, 0.3); /* Orange Glow */
}

/* Tool Cards */
.hp-tool-grid, .news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px; overflow: hidden; transition: 0.2s;
    padding: 20px;
}
.tool-card:hover {
    border-color: var(--brand-blue) !important;
    box-shadow: 0 10px 25px -5px rgba(66, 93, 245, 0.15); /* Blue Shadow */
    transform: translateY(-4px);
}

/* ============================================================
   5. POST CONTENT STYLING (The "Additional CSS" Fixes)
   ============================================================ */
.entry-content { font-family: 'Inter', system-ui; color: var(--brand-dark); line-height: 1.8; font-size: 17px; }

/* Headings */
.entry-content h2 {
    font-size: 28px; color: var(--brand-dark); font-weight: 800;
    margin-top: 50px; padding-bottom: 15px;
    border-bottom: 3px solid var(--brand-blue);
}
.entry-content h3 { font-size: 24px; color: var(--brand-dark); font-weight: 700; margin-top: 35px; }

/* Tables */
.entry-content table {
    width: 100%; border-collapse: collapse; margin: 40px 0;
    border: 1px solid var(--border-color); box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 8px; overflow: hidden;
}
.entry-content thead th {
    background-color: var(--brand-dark); color: #fff; padding: 18px 20px;
    text-transform: uppercase; font-size: 14px;
}
.entry-content tbody td { padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.entry-content tbody tr:nth-child(even) { background-color: var(--bg-body); }

/* Lists with Checks */
.entry-content ul { list-style: none; padding-left: 0; margin-left: 0; }
.entry-content ul li { position: relative; padding-left: 35px; margin-bottom: 14px; }
.entry-content ul li::before {
    content: "✔"; position: absolute; left: 0; top: 2px;
    width: 24px; height: 24px; background-color: rgba(66, 93, 245, 0.1);
    color: var(--brand-blue); border-radius: 50%;
    text-align: center; line-height: 24px; font-size: 14px; font-weight: bold;
}

/* Quotes */
.entry-content blockquote {
    background: rgba(66, 93, 245, 0.05);
    border-left: 5px solid var(--brand-blue);
    padding: 25px; margin: 35px 0; border-radius: 0 8px 8px 0;
    font-style: italic; color: var(--brand-dark);
}

/* ============================================================
   6. RANK MATH FAQ STYLING
   ============================================================ */
.rank-math-block .rank-math-list-item {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: 8px; margin-bottom: 15px !important; overflow: hidden;
    transition: transform 0.2s;
}
.rank-math-block .rank-math-list-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); border-color: var(--brand-blue);
}
.rank-math-block .rank-math-question {
    font-size: 18px; font-weight: 600; padding: 18px 20px;
    background-color: var(--bg-body); color: var(--brand-dark);
    cursor: pointer; position: relative;
}
.rank-math-block .rank-math-question::after {
    content: "▼"; position: absolute; right: 20px; color: var(--brand-gray); font-size: 12px;
}
.rank-math-block .rank-math-answer {
    padding: 20px; font-size: 16px; color: var(--brand-gray); background: #fff;
}

/* ============================================================
   7. TOOL INTEGRATION (THEME BRIDGE)
   ============================================================ */
/* Wrapper */
.qp-ultimate-wrapper, .single-tool-box {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
    padding: 30px !important;
    margin-bottom: 40px !important;
}

/* Inputs */
.single-tool-box select, .single-tool-box input {
    background-color: #fff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--brand-dark) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    font-size: 16px !important;
}
.single-tool-box input:focus, .single-tool-box select:focus {
    outline: none; border-color: var(--brand-blue) !important;
    box-shadow: 0 0 0 3px rgba(66, 93, 245, 0.2) !important;
}

/* ============================================================
   8. DARK MODE OVERRIDES
   ============================================================ */
body.amp-dark-mode {
    --brand-dark: #f1f5f9;
    --brand-gray: #94a3b8;
    --bg-body: #0f172a;    /* Deep Slate */
    --bg-card: #1e293b;    /* Card BG */
    --border-color: #334155;
    --brand-blue: #6366f1; /* Lighter Electric Blue */
}

body.amp-dark-mode .rank-math-list-item,
body.amp-dark-mode .tool-card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}
body.amp-dark-mode .rank-math-question {
    background-color: var(--bg-body);
    color: #fff;
}
body.amp-dark-mode .single-tool-box input, 
body.amp-dark-mode .single-tool-box select {
    background-color: #0f172a !important;
    color: #fff !important;
    border-color: var(--border-color) !important;
}

/* ============================================================
   9. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .menu-toggle { display: flex; }
    .hp-tool-grid { grid-template-columns: repeat(2, 1fr); }
    .qp-ultimate-wrapper { padding: 15px !important; }
}
@media (max-width: 480px) {
    .hp-tool-grid { grid-template-columns: 1fr; }
}