/**
Plugin Name: solotutes-frontend
Author: Prakash Joshi
Author URI: https://prakashjoshi.in
Description: Custom styles for solotutes-frontend plugin
Stylesheet for: Archive template (archive-cpt.php, custom-archive.php)
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solotutes-frontend
*/

/* =========================================
   1. ROOT VARIABLES on main style.css 
========================================= */


/* =========================================
   2. MAIN WRAPPERS & CONTAINERS
========================================= */
.qa-wrapper { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 40px 20px; 
    font-family: 'Inter', system-ui, sans-serif; 
    color: var(--qa-text-main); 
}
.st-archive-container { 
    width: 100%; 
    padding: 0; 
    font-family: 'Inter', system-ui, sans-serif; 
    color: var(--qa-text-main); 
}

/* =========================================
   3. ARCHIVE HEADERS (Standard & SEO)
========================================= */
.qa-breadcrumb { font-size: 14px; margin-bottom: 20px; color: var(--qa-text-muted); }
.qa-breadcrumb a { color: var(--qa-primary); text-decoration: none; font-weight: 500; }

.qa-header { text-align: center; margin-bottom: 30px; }
.qa-header h1 { font-size: 36px; font-weight: 800; margin: 0 0 10px 0; color: #0f172a; }
.qa-header p { font-size: 16px; color: var(--qa-text-muted); max-width: 600px; margin: 0 auto; }

/* Main SEO Header Container */
.st-archive-header {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius);
    margin-bottom: 40px;
    box-shadow: var(--qa-shadow);
    overflow: hidden; 
    display: flex;
    flex-direction: column; 
}
.st-archive-header.has-image .st-header-body { flex-direction: row; align-items: stretch; }

/* Header Layout Elements */
.st-breadcrumb-bar { width: 100%; padding: 15px 40px; background: #f8fafc; border-bottom: 1px solid var(--qa-border); margin-bottom: 20px; }
.st-breadcrumb { font-size: 13px; color: var(--qa-text-muted); font-weight: 500; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.st-breadcrumb a { color: var(--qa-primary); text-decoration: none; transition: 0.2s;}
.st-breadcrumb a:hover { color: #0f4687; }
.st-breadcrumb i { font-size: 10px; color: #cbd5e1; }

.st-header-body { display: flex; flex-direction: column; }
.st-header-image { width: 40%; background: var(--qa-bg-light); min-height: 250px; border-right: 1px solid var(--qa-border); }
.st-header-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.st-header-text-box { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; text-align: left; }
.st-archive-header:not(.has-image) .st-header-text-box { text-align: center; align-items: center; }
.st-header-text-box h1 { font-size: 34px; font-weight: 800; margin: 0 0 15px 0; color: #0f172a; text-transform: capitalize; line-height: 1.2;}
.st-header-text-box p { font-size: 16px; color: var(--qa-text-muted); max-width: 800px; margin: 0; line-height: 1.7; }

/* Section Titles */
.st-section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; color: var(--qa-text-main); border-left: 4px solid var(--qa-primary); padding-left: 12px; display: flex; align-items: center; justify-content: space-between; }
.is-junior-theme .st-section-title i { color: #8B5CF6 !important; }

/* =========================================
   4. CHIPS, FILTERS & SUB-CATEGORIES
========================================= */
/* Top Level Chips */
.qa-level-highlight { background: var(--qa-white); border: 1px solid var(--qa-border); border-radius: var(--qa-radius); padding: 25px; margin-bottom: 20px; box-shadow: var(--qa-shadow); text-align: center; }
.qa-level-highlight h3 { margin: 0 0 15px 0; font-size: 18px; color: var(--qa-text-main); display: flex; align-items: center; justify-content: center; gap: 8px; }
.level-chips-container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lvl-chip { background: var(--qa-bg-light); color: var(--qa-text-main); border: 1px solid var(--qa-border); padding: 10px 20px; border-radius: 30px; font-size: 14px; font-weight: 600; text-decoration: none; transition: 0.2s ease; }
.lvl-chip:hover { background: #e2e8f0; }
.lvl-chip.active { background: var(--qa-primary); color: var(--qa-white); border-color: var(--qa-primary); box-shadow: 0 4px 10px rgba(20, 91, 171, 0.3); }

/* Sub-Categories Grid */
.st-child-tax-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-bottom: 40px; }
.st-child-tax-card { background: var(--qa-white); border: 1px solid var(--qa-border); padding: 15px 20px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--qa-text-main); text-decoration: none; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.02); display: flex; justify-content: space-between; align-items: center; }
.st-child-tax-card span:last-child { background: var(--qa-bg-light); color: var(--qa-text-muted); font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.st-child-tax-card:hover { border-color: var(--qa-primary); color: var(--qa-primary); transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.06); }
.is-junior-theme .st-child-tax-card:hover { border-color: #8B5CF6; color: #8B5CF6; }

/* Filter Toggle UI */
.qa-filter-toggle-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--qa-white); border: 1px solid var(--qa-border); color: var(--qa-text-main); padding: 10px 24px; border-radius: 30px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.3s; margin: 0 auto 30px auto; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.qa-filter-toggle-btn:hover { border-color: var(--qa-primary); color: var(--qa-primary); }

.qa-filters-wrapper { display: none; margin-bottom: 40px; animation: fadeIn 0.3s ease-in-out; width: 100%; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Filter Forms & Inputs */
.qa-filters-form { display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; background: var(--qa-white); padding: 20px 25px; border-radius: var(--qa-radius); border: 1px solid var(--qa-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); width: 100%; box-sizing: border-box; }
.qa-filter-group { flex: 1; min-width: 200px; }
.qa-filters-form select { width: 100%; padding: 10px 16px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 14px; font-weight: 500; color: var(--qa-text-main); background: #f8fafc url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 14px center; appearance: none; outline: none; cursor: pointer; transition: 0.2s; }
.qa-filters-form select:focus { border-color: var(--qa-primary); box-shadow: 0 0 0 3px rgba(20,91,171,0.1); }

.qa-filter-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.qa-filter-btn { background: var(--qa-primary); color: var(--qa-white); border: none; padding: 12px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.qa-filter-btn:hover { background: var(--qa-primary-hover); }
.qa-reset-btn { color: var(--qa-text-muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 15px; border-radius: 8px; transition: 0.2s; }
.qa-reset-btn:hover { background: #f1f5f9; color: var(--qa-text-main); }

/* Smart Filter Cross-Linking */
.st-filter-section { background: var(--qa-white); border: 1px solid var(--qa-border); border-radius: 16px; padding: 25px 30px; margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.st-filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px dashed #cbd5e1; }
.st-filter-title { font-size: 1.2rem; font-weight: 800; color: var(--qa-text-main); margin: 0; display: flex; align-items: center; gap: 10px; }
.st-clear-filter { font-size: 12px; font-weight: 700; color: #ef4444; text-decoration: none; background: #fef2f2; padding: 6px 14px; border-radius: 20px; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #fecaca; text-transform: uppercase; letter-spacing: 0.5px; }
.st-clear-filter:hover { background: #ef4444; color: #ffffff; border-color: #ef4444; }
.st-filter-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.st-filter-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--qa-bg-light); color: var(--qa-text-main); border: 1px solid #e2e8f0; padding: 10px 20px; border-radius: 50px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; }
.st-filter-chip i { color: var(--qa-primary); font-size: 14px; transition: 0.3s; }
.st-filter-chip:hover { background: var(--qa-white); border-color: var(--qa-primary); color: var(--qa-primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(20, 91, 171, 0.12); }
.st-filter-chip.active { background: var(--qa-primary); color: #ffffff; border-color: var(--qa-primary); box-shadow: 0 4px 15px rgba(20, 91, 171, 0.3); }
.st-filter-chip.active i { color: #ffffff; }
.is-junior-theme .st-filter-chip.active { background: #8B5CF6; border-color: #8B5CF6; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.is-junior-theme .st-filter-chip:hover i, .is-junior-theme .st-filter-title i { color: #8B5CF6; }
.is-junior-theme .st-filter-chip:hover { border-color: #8B5CF6; color: #8B5CF6; }

/* Junior Special Subjects Grid */
.junior-subjects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.j-sub-card { padding: 25px 15px; border-radius: 16px; text-align: center; font-weight: 700; text-decoration: none; color: white; transition: 0.3s; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.j-sub-card:hover { transform: translateY(-5px) scale(1.02); }
.j-sub-card i { font-size: 35px; }
.j-sub-math { background: linear-gradient(135deg, #F59E0B, #D97706); }
.j-sub-eng { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.j-sub-evs { background: linear-gradient(135deg, #10B981, #059669); }
.j-sub-gk { background: linear-gradient(135deg, #F43F5E, #E11D48); }

/* =========================================
   5. POSTS GRID & CARDS
========================================= */
.qa-grid { display: grid; gap: 25px; width: 100%; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.qa-card { background: var(--qa-white); border: 1px solid var(--qa-border); border-radius: var(--qa-radius); overflow: hidden; display: flex; flex-direction: column; transition: 0.3s; box-shadow: var(--qa-shadow); }
.qa-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px -5px rgba(0,0,0,0.1); border-color: var(--qa-primary); }

.qa-thumb { height: 180px; width: 100%; position: relative; background: var(--qa-bg-light); display: block; overflow: hidden; }
.qa-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.qa-card:hover .qa-thumb img { transform: scale(1.05); }
.qa-badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.95); color: var(--qa-primary); font-size: 11px; font-weight: 800; padding: 5px 12px; border-radius: 6px; text-transform: uppercase; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.qa-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.qa-content h3 { font-size: 18px; margin: 0 0 10px 0; line-height: 1.4; }
.qa-content h3 a { color: var(--qa-text-main); text-decoration: none; }
.qa-content h3 a:hover { color: var(--qa-primary); }
.qa-content p { font-size: 14px; color: var(--qa-text-muted); margin: 0 0 15px 0; flex-grow: 1; }

.qa-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--qa-border); padding-top: 15px; gap: 10px; flex-wrap: wrap; }
.qa-meta-item { font-size: 12px; color: var(--qa-text-muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.qa-meta-item i { color: var(--qa-primary); font-size: 13px; }

/* Previews (Q&A Snippets) */
.card-preview-list { margin: 0 0 15px 0; padding: 0; list-style: none; background: var(--qa-bg-light); border-radius: 8px; padding: 12px; border: 1px solid #f1f5f9; }
.card-preview-list li { font-size: 13px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #e2e8f0; }
.card-preview-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.cp-q { font-weight: 700; color: #334155; margin-bottom: 3px; }
.cp-a { color: #10b981; font-weight: 600; display: flex; align-items: flex-start; gap: 5px; }

/* =========================================
   6. PAGINATION & FOOTER ADS
========================================= */
.qa-pagination { margin-top: 50px; text-align: center; width: 100%; }
.qa-pagination ul.page-numbers { display: flex; justify-content: center; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.qa-pagination ul.page-numbers li { margin: 0; padding: 0; display: inline-block; }
.qa-pagination ul.page-numbers li a.page-numbers,
.qa-pagination ul.page-numbers li span.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--qa-border); text-decoration: none; font-size: 15px; font-weight: 600; background: var(--qa-white); color: var(--qa-text-main); transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.qa-pagination ul.page-numbers li a.page-numbers:hover { background: var(--qa-bg-light); border-color: var(--qa-primary); color: var(--qa-primary); transform: translateY(-2px); }
.qa-pagination ul.page-numbers li span.current { background: var(--qa-primary); color: var(--qa-white); border-color: var(--qa-primary); box-shadow: 0 4px 10px rgba(20, 91, 171, 0.2); }
.qa-pagination ul.page-numbers li a.next,
.qa-pagination ul.page-numbers li a.prev { font-size: 14px; padding: 0 18px; background: var(--qa-bg-light); }
.is-junior-theme .qa-pagination ul.page-numbers li span.current { background: #8B5CF6; border-color: #8B5CF6; box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3); }

/* Bottom Explore Links */
.st-explore-footer { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--qa-border); }
.st-explore-btn { background: var(--qa-bg-light); color: var(--qa-text-main); border: 1px solid var(--qa-border); padding: 12px 25px; border-radius: 50px; font-weight: 600; text-decoration: none; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
.st-explore-btn:hover { background: var(--qa-primary); color: white; border-color: var(--qa-primary); }

/* Monetization Ad Slots */
.st-ad-slot { width: 100%; background: #f8fafc; border: 1px dashed #cbd5e1; text-align: center; padding: 20px; color: #94a3b8; font-size: 12px; border-radius: 8px; margin-bottom: 30px; }

/* =========================================
   7. RESPONSIVE CSS (MOBILE & TABLET)
========================================= */
@media(max-width: 992px) {
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width: 768px) {
    .qa-grid { grid-template-columns: 1fr; }
    
    .st-archive-header.has-image { flex-direction: column; }
    .st-header-image { width: 100%; min-height: 200px; border-right: none; border-bottom: 1px solid var(--qa-border); }
    
    .qa-filters-form { flex-direction: column; align-items: stretch; padding: 20px; }
    .qa-filter-group { max-width: 100%; }
    .qa-filter-actions { margin-left: 0; flex-direction: column; width: 100%; margin-top: 10px; }
    .qa-filter-btn, .qa-reset-btn { width: 100%; text-align: center; }
}