/*
Theme Name: Pariksha Junction Pro
Theme URI: https://www.parikshajn.in
Author: Codex
Author URI: https://www.parikshajn.in
Description: A high-performance Hindi educational magazine theme for competitive exam preparation portals.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: pariksha-junction-pro
*/

:root {
    --font-hindi: "Hind", sans-serif;
    --font-english: "Poppins", sans-serif;
    --bg: #f4f7fb;
    --bg-elevated: #ffffff;
    --bg-soft: #e9eef7;
    --text: #14213d;
    --text-muted: #52607a;
    --heading: #0f172a;
    --primary: #0a5bd8;
    --primary-deep: #073b94;
    --accent: #ff8a00;
    --accent-soft: #fff2df;
    --border: rgba(20, 33, 61, 0.12);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
    --ticker-bg: linear-gradient(90deg, #0a5bd8, #073b94);
    --ticker-text: #ffffff;
    --success: #0d9488;
}

[data-theme="dark"] {
    --bg: #0b1220;
    --bg-elevated: #111a2d;
    --bg-soft: #17233b;
    --text: #e5edf9;
    --text-muted: #aab7cf;
    --heading: #f8fbff;
    --primary: #60a5fa;
    --primary-deep: #3b82f6;
    --accent: #fbbf24;
    --accent-soft: rgba(251, 191, 36, 0.12);
    --border: rgba(203, 213, 225, 0.14);
    --shadow: 0 24px 54px rgba(2, 6, 23, 0.45);
    --shadow-soft: 0 14px 30px rgba(2, 6, 23, 0.34);
    --ticker-bg: linear-gradient(90deg, #1d4ed8, #2563eb);
    --ticker-text: #eff6ff;
    --success: #34d399;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, rgba(10, 91, 216, 0.08), transparent 28%), var(--bg);
    color: var(--text);
    font-family: var(--font-hindi);
    line-height: 1.75;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--primary-deep);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.site-shell {
    min-height: 100vh;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.site-topbar {
    padding: 10px 0;
    background: var(--ticker-bg);
    color: var(--ticker-text);
    overflow: hidden;
}

.ticker {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
    font-family: var(--font-english);
    font-size: 0.95rem;
    font-weight: 600;
}

.ticker-label {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.ticker-track {
    overflow: hidden;
    position: relative;
    flex: 1;
}

.ticker-move {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 22s linear infinite;
}

@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
}

.branding {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.site-logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 100%;
}

.site-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.site-logo .custom-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 460px);
    max-height: 110px;
    object-fit: contain;
}

.branding-copy {
    min-width: 0;
}

.branding-copy.has-custom-logo .site-title {
    font-size: clamp(1.15rem, 1rem + 0.9vw, 1.65rem);
}

.branding-copy.has-custom-logo .site-tagline {
    font-size: 0.9rem;
}

.site-title {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2.2rem);
    color: var(--heading);
    font-family: var(--font-hindi);
    font-weight: 700;
}

.site-tagline {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-toggle,
.theme-toggle {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--heading);
    box-shadow: var(--shadow-soft);
    border-radius: 999px;
    padding: 10px 16px;
    font-family: var(--font-english);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle:hover,
.theme-toggle:hover {
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
}

.primary-nav-shell {
    margin: 0 0 18px;
    padding: 10px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 20px 40px rgba(7, 59, 148, 0.22);
}

.primary-nav ul {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.primary-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--font-english);
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    background: #ffffff;
    color: var(--primary-deep);
    border-color: transparent;
}

.main-content {
    padding: 28px 0 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.hero-panel,
.sidebar-panel,
.post-card,
.footer-card,
.empty-state {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-panel {
    overflow: hidden;
}

.hero-copy {
    padding: 24px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--primary);
    font-family: var(--font-english);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0 0 10px;
    color: var(--heading);
    font-size: clamp(1.8rem, 3.2vw, 3rem);
    line-height: 1.2;
}

.hero-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.sidebar-panel {
    padding: 22px;
}

.sidebar-title,
.section-title {
    margin: 0 0 18px;
    color: var(--heading);
    font-size: 1.2rem;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.sidebar-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.post-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
}

.post-card__thumb img,
.hero-panel img,
.wp-post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card__content {
    padding: 18px;
}

.post-card__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-family: var(--font-english);
    font-size: 0.82rem;
    font-weight: 600;
}

.post-card__title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.35;
}

.post-card__excerpt {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-card__link {
    display: inline-flex;
    margin-top: 16px;
    font-family: var(--font-english);
    font-weight: 700;
}

.empty-state {
    padding: 36px 28px;
    text-align: center;
}

.site-footer {
    padding: 32px 0 40px;
}

.footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    color: var(--text-muted);
    font-family: var(--font-english);
}

.footer-card a {
    font-weight: 700;
}

@media (max-width: 980px) {
    .hero-grid,
    .magazine-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .branding,
    .header-main,
    .footer-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-grid,
    .magazine-grid {
        grid-template-columns: 1fr;
    }

    .primary-nav ul {
        gap: 8px;
    }

    .nav-toggle,
    .primary-nav a,
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .branding {
        width: 100%;
        text-align: center;
        align-items: center;
        gap: 10px;
    }

    .site-logo {
        justify-content: center;
        width: 100%;
    }

    .site-logo .custom-logo {
        max-width: min(100%, 320px);
        max-height: 84px;
    }

    .branding-copy {
        width: 100%;
    }

    .branding-copy.has-custom-logo .site-title,
    .branding-copy.has-custom-logo .site-tagline {
        text-align: center;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .primary-nav-shell {
        padding: 8px;
        margin: 0 0 16px;
    }

    .primary-nav {
        display: none;
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-nav ul {
        flex-direction: column;
    }

    .primary-nav a {
        background: rgba(255, 255, 255, 0.1);
    }
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.screen-reader-text.skip-link:focus {
    clip: auto;
    width: auto;
    height: auto;
    margin: 12px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    color: var(--heading);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    z-index: 100;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.content-area,
.sidebar-area {
    min-width: 0;
}

.content-card,
.sidebar-card,
.comments-area,
.post-navigation-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.entry-hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 22px 22px 0 0;
}

.entry-shell {
    padding: 28px;
}

.entry-header {
    margin-bottom: 18px;
}

.entry-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--primary);
    font-family: var(--font-english);
    font-size: 0.82rem;
    font-weight: 700;
}

.entry-title {
    margin: 12px 0 10px;
    color: var(--heading);
    line-height: 1.18;
}

.entry-summary {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.entry-content {
    color: var(--text);
    font-size: 1rem;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--heading);
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table {
    margin-bottom: 1.1em;
}

.entry-content blockquote {
    margin-left: 0;
    padding: 16px 18px;
    border-left: 4px solid var(--accent);
    background: var(--bg-soft);
    border-radius: 0 16px 16px 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    padding: 10px 12px;
    border: 1px solid var(--border);
}

.entry-tags {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text);
    font-size: 0.9rem;
}

.post-navigation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.post-navigation-card {
    display: block;
    padding: 20px;
    color: var(--text);
}

.nav-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-family: var(--font-english);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
}

.related-posts,
.comments-area {
    margin-top: 24px;
    padding: 24px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-note {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.sidebar-area {
    display: grid;
    gap: 18px;
}

.sidebar-card {
    padding: 22px;
}

.sidebar-list,
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-list li,
.widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-list li:last-child,
.widget li:last-child {
    border-bottom: 0;
}

.widget-post-list {
    display: grid;
    gap: 14px;
}

.widget-post-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
}

.widget-post-thumb img {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
}

.widget-post-meta {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-family: var(--font-english);
    font-size: 0.8rem;
    font-weight: 600;
}

.widget-post-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.search-form__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.search-field,
.search-submit {
    min-height: 46px;
    border-radius: 14px;
}

.search-field {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 0 14px;
}

.search-submit {
    border: 0;
    padding: 0 18px;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-english);
    font-weight: 700;
}

.comment-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.comment-list .comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-list .comment:last-child {
    border-bottom: 0;
}

.comment-author,
.comment-metadata {
    font-family: var(--font-english);
}

.comment-respond {
    margin-top: 18px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
}

.comment-form textarea {
    min-height: 150px;
}

.ad-slot {
    width: 100%;
    margin: 24px 0;
}

.ad-slot--header-ad,
.ad-slot--home-ad {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 0;
}

.ad-slot--footer-ad {
    margin: 0 0 20px;
}

.ad-slot-widget,
.ad-slot__inner {
    width: 100%;
}

.ad-slot-widget > *,
.ad-slot__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    width: 100%;
    padding: 18px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(10, 91, 216, 0.08), rgba(255, 138, 0, 0.08)),
        var(--bg-soft);
}

.ad-slot--sidebar-ad .ad-slot-widget > *,
.ad-slot--sidebar-ad .ad-slot__inner {
    min-height: 280px;
}

.ad-slot--single-top-ad .ad-slot-widget > *,
.ad-slot--single-bottom-ad .ad-slot-widget > *,
.ad-slot--home-ad .ad-slot-widget > *,
.ad-slot--header-ad .ad-slot-widget > *,
.ad-slot--footer-ad .ad-slot-widget > * {
    min-height: 140px;
}

.ad-slot__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10, 91, 216, 0.12);
    color: var(--primary);
    font-family: var(--font-english);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ad-slot__inner p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.ad-slot ins.adsbygoogle,
.ad-slot iframe,
.ad-slot img {
    max-width: 100%;
}

.entry-content .pjp-irp-wrap {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.entry-content .pjp-irp-wrap .poweredByText {
    opacity: 0.7;
}

@media (max-width: 980px) {
    .content-layout,
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .entry-shell,
    .related-posts,
    .comments-area,
    .sidebar-card {
        padding: 20px;
    }

    .post-navigation-grid,
    .search-form__grid {
        grid-template-columns: 1fr;
    }

    .ad-slot--header-ad,
    .ad-slot--home-ad {
        width: min(100% - 24px, 1180px);
    }
}
