/*
Theme Name: NEETmcqs Dark Theme
Theme URI: https://neetmcqs.com/
Author: Antigravity
Author URI: https://neetmcqs.com/
Description: A custom, high-performance, native Dark Mode theme designed specifically for NEET MCQs practice, interactive question cards, and 3-level syllabus navigation.
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: neetmcqs-theme
*/

/* CSS Reset & Dark Design Tokens */
:root {
    --bg-main: #0b0f19;
    --bg-card: #1e293b;
    --bg-header: #0f172a;
    --bg-hover: #1e3a8a;
    --border-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #10b981;
    --accent-red: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #60a5fa;
}

/* Site Layout Container */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
}

.site-main-container {
    max-width: 1280px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
    flex-grow: 1;
    box-sizing: border-box;
}

.content-grid-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 960px) {
    .site-main-container {
        padding: 0 12px;
        margin: 15px auto;
    }

    .content-grid-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Site Header */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0 !important;
    z-index: 1000;
}

/* Fix sticky header overlap with WordPress login admin bar */
body.admin-bar .site-header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px !important;
    }
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand a {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.site-brand span {
    color: var(--accent-blue);
}

.custom-logo-link {
    display: inline-block;
}

.custom-logo-link img {
    max-height: 48px;
    width: auto;
    display: block;
}

@media (max-width: 640px) {
    .custom-logo-link img {
        max-height: 38px;
    }
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.site-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 6px;
    transition: color 0.2s ease;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-blue);
    transition: width 0.2s ease;
}

.site-nav a:hover {
    color: #ffffff;
}

.site-nav a:hover::after {
    width: 100%;
}

/* Active Page Navigation Tabs */
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a {
    color: #ffffff !important;
}

.site-nav .current-menu-item > a::after,
.site-nav .current_page_item > a::after,
.site-nav .current-menu-ancestor > a::after {
    width: 100% !important;
}

@media (max-width: 640px) {
    .header-container {
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        text-align: center;
    }

    .site-brand {
        width: 100%;
    }

    .site-nav {
        width: 100%;
    }

    .site-nav ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-nav a {
        font-size: 0.85rem;
    }
}

/* Page / Archive Header Card */
.archive-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    word-break: break-word;
    overflow-wrap: break-word;
}

.archive-header-card h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

@media (max-width: 640px) {
    .archive-header-card {
        padding: 16px 18px;
        margin-bottom: 18px;
        border-radius: 10px;
    }

    .archive-header-card h1 {
        font-size: 1.35rem;
    }
}

.breadcrumbs {
    color: var(--text-muted);
    font-size: 0.9rem;
    word-break: break-word;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--accent-blue);
}

.breadcrumbs .breadcrumb-count {
    color: #94a3b8;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 2px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 35px 0;
    flex-wrap: wrap;
}

.pagination-container .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.pagination-container .page-numbers.current {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

/* Site Footer */
.site-footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border-card);
    padding: 24px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 50px;
}

/* Header Toppers Slideshow Container */
.shi-header-slideshow-container {
    flex: 1;
    margin: 0 40px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    height: 38px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shi-slide-item {
    position: absolute;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
    width: 100%;
    height: 100%;
}

.shi-slide-item.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.shi-slide-item.exit {
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
}

.shi-ticker-icon {
    margin-right: 6px;
    font-size: 1rem;
}

.shi-ticker-state {
    color: var(--accent-blue);
    font-weight: 600;
    margin-right: 5px;
}

.shi-ticker-name {
    color: #ffffff;
    margin-right: 5px;
}

.shi-ticker-score {
    color: var(--accent-green);
    font-weight: 500;
}

/* Subtopics Dropdown Container */
.subtopics-dropdown-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 480px; /* Limit width on desktop */
}

.subtopics-dropdown-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.subtopics-select-el {
    flex-grow: 1;
    background-color: #1e293b !important; /* Dark slate */
    color: #f8fafc !important; /* Pure white text */
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
    font-family: inherit !important;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    width: 100%;
    
    /* Custom Arrow styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px !important;
    padding-right: 36px !important;
}

.subtopics-select-el:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.subtopics-select-el option {
    background-color: #0f172a !important; /* Match dark theme dropdown list */
    color: #f1f5f9 !important;
}

/* Mobile responsive layout */
@media (max-width: 640px) {
    .subtopics-dropdown-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Responsive Question Containers & Tables */
.pyq-question-container {
    overflow-x: auto !important; /* Enable horizontal scrolling on the card if any content overflows */
    max-width: 100% !important;
}

.pyq-question-container table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    margin: 15px 0 !important;
}

.pyq-question-container table td,
.pyq-question-container table th {
    padding: 10px 12px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* Hide on mobile/tablet viewports and display brand properly */
@media (max-width: 960px) {
    .shi-header-slideshow-container {
        display: none !important;
    }
}