/*
Theme Name: Sarkari Result Dynamic
Theme URI: https://example.com/
Author: Custom
Description: Dynamic Sarkari Result-style WordPress theme.
Version: 38.0
Requires at least: 6.0
*/

*{box-sizing:border-box}
body{margin:0;background:#f2f2f2;color:#222;font-family:Arial,sans-serif}
a{color:#0033cc}
.site-header{background:#8b0000;color:#fff;padding:15px 25px;display:flex;align-items:center;gap:20px}
.site-logo{width:85px;height:85px;object-fit:contain;background:#fff;border-radius:50%;padding:5px}
.header-text{flex:1;text-align:center}
.header-text h1{margin:0 0 7px;font-size:36px}
.header-text p{margin:0}
.main-nav{background:#000;display:flex;justify-content:center;flex-wrap:wrap}
.main-nav a{color:#fff;text-decoration:none;padding:13px 18px;border-right:1px solid #444}
.main-nav a:hover{background:#8b0000}
.container{width:95%;max-width:1200px;margin:20px auto}
.ticker{background:#ffeb3b;padding:10px;margin-bottom:20px;font-weight:bold;overflow:hidden}
.ticker a{color:#000}
.home-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.section-box,.single-post,.category-page,.sidebar-box{background:#fff;border:1px solid #ddd;border-radius:5px;overflow:hidden}
.section-title,.post-title-bar{background:#8b0000;color:#fff;padding:12px 15px;text-align:center;margin:0}
.section-list{list-style:none;padding:10px 15px;margin:0}
.section-list li{border-bottom:1px solid #ddd;padding:9px 0}
.section-list li:last-child{border-bottom:0}
.section-list a{text-decoration:none;font-weight:bold}
.view-all{text-align:right;padding:10px 15px;background:#fafafa}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px}
.breadcrumb{background:#fff;border:1px solid #ddd;padding:12px 15px;margin-bottom:15px;font-size:14px}
.single-post,.category-page{padding:20px}
.post-title-bar{margin:-20px -20px 15px;font-size:27px}
.post-meta{font-size:13px;color:#777;margin-bottom:20px}
.post-content{line-height:1.8;font-size:16px}
.post-content h2{background:#8b0000;color:#fff;padding:10px 15px;font-size:21px}
.post-content h3{color:#8b0000;border-bottom:2px solid #8b0000;padding-bottom:6px}
.post-content table{width:100%;border-collapse:collapse;margin:15px 0}
.post-content th,.post-content td{border:1px solid #ddd;padding:10px}
.post-content th{background:#f2f2f2}
.post-content img{max-width:100%;height:auto}
.category-title{margin:0 0 15px;color:#8b0000}
.archive-item{padding:15px 0;border-bottom:1px solid #ddd}
.archive-item:last-child{border-bottom:0}
.archive-item h2{margin:0 0 7px;font-size:20px}
.archive-item h2 a{text-decoration:none}
.archive-item .meta{font-size:13px;color:#777}
.pagination{text-align:center;margin-top:20px}
.pagination a,.pagination span{display:inline-block;padding:8px 12px;border:1px solid #ddd;margin:2px;text-decoration:none}
.pagination .current{background:#8b0000;color:#fff}
.sidebar-box{margin-bottom:20px}
.sidebar-box h3{background:#8b0000;color:#fff;margin:0;padding:11px;text-align:center;font-size:19px}
.sidebar-box ul{list-style:none;padding:10px 15px;margin:0}
.sidebar-box li{padding:8px 0;border-bottom:1px solid #ddd}
.site-footer{background:#000;color:#fff;text-align:center;padding:25px;margin-top:30px}
@media(max-width:768px){
 .site-header{flex-direction:column;text-align:center}
 .header-text h1{font-size:28px}
 .home-grid{grid-template-columns:1fr}
 .layout{grid-template-columns:1fr}
 .sidebar{order:2}
 .main-nav a{padding:10px 12px;font-size:14px}
 .post-title-bar{font-size:22px}
}

/* Category archive */
.category-page{padding:0}
.category-header{background:#8b0000;color:#fff;padding:18px 20px;text-align:center}
.category-header h1{margin:0;font-size:28px}
.category-description{margin-top:8px;font-size:14px;line-height:1.5}
.post-list{background:#fff}
.category-post{padding:17px 20px;border-bottom:1px solid #ddd}
.category-post:last-child{border-bottom:0}
.category-post-content{position:relative;min-height:80px}
.category-post h2{margin:0 0 7px;font-size:20px;line-height:1.35}
.category-post h2 a{color:#0033cc;text-decoration:none}
.category-post h2 a:hover{color:#8b0000;text-decoration:underline}
.category-post-meta{font-size:12px;color:#777;margin-bottom:8px}
.category-post p{margin:5px 0 10px;line-height:1.6;color:#444}
.category-thumb{float:right;margin:0 0 8px 15px}
.category-thumb img{width:110px;height:75px;object-fit:cover;border-radius:3px}
.read-more{font-size:14px;font-weight:bold;color:#8b0000;text-decoration:none}
.no-posts{padding:40px 20px;text-align:center}
.no-posts h2{color:#8b0000}
.sidebar-view-all{padding:10px 15px;background:#f7f7f7;text-align:right;border-top:1px solid #ddd}
.sidebar-view-all a{color:#8b0000;font-weight:bold;text-decoration:none}
.sidebar-box li a{line-height:1.45}
@media(max-width:768px){
 .category-header h1{font-size:23px}
 .category-post{padding:14px}
 .category-post h2{font-size:18px}
 .category-thumb{float:none;display:block;margin:10px 0}
 .category-thumb img{width:100%;height:auto;max-height:220px}
}


/* ===== Internal page scrolling fix ===== */
html {
    height: auto;
    min-height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden;
}

body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    position: static !important;
}

.site-header,
.main-nav,
.container,
.layout,
.main-content,
.category-page,
.single-post {
    height: auto;
    max-height: none;
}

.main-content,
.category-page,
.single-post {
    overflow: visible !important;
}

/* Prevent WordPress/admin-bar or theme elements from locking the viewport */
body.admin-bar {
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        min-height: calc(100vh - 46px);
    }
}


/* ===== Clean navigation design / hover fix ===== */
.main-nav {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    min-height: 48px;
    padding: 0;
}

.main-nav ul {
    list-style: none !important;
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 !important;
    padding: 0 !important;
}

.main-nav li {
    list-style: none !important;
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    border-left: 1px solid #444;
}

.main-nav li:last-child {
    border-right: 1px solid #444;
}

.main-nav li::before,
.main-nav li::after {
    display: none !important;
    content: none !important;
}

.main-nav a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-height: 48px;
    padding: 0 18px !important;
    margin: 0 !important;
    color: #fff !important;
    background: #000 !important;
    text-decoration: none !important;
    font-size: 18px;
    line-height: 48px;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color .15s ease, color .15s ease;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
    background: #8b0000 !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.main-nav a:active {
    transform: none !important;
}

/* Fallback for the automatically generated category links */
.main-nav > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-height: 48px;
    padding: 0 18px !important;
    border-left: 1px solid #444 !important;
    border-right: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
    transform: none !important;
}

.main-nav > a:last-child {
    border-right: 1px solid #444 !important;
}

.main-nav > a:hover {
    background: #8b0000 !important;
    transform: none !important;
    box-shadow: none !important;
}

@media(max-width:768px) {
    .main-nav {
        min-height: 44px;
    }

    .main-nav ul {
        width: 100%;
    }

    .main-nav a,
    .main-nav > a {
        height: 44px;
        min-height: 44px;
        line-height: 44px;
        padding: 0 12px !important;
        font-size: 14px;
    }
}


/* ===== Category: title + URL only ===== */
.category-title-url-only {
    padding: 0;
}

.category-link-list {
    background: #fff;
}

.category-link-item {
    padding: 14px 18px;
    border-bottom: 1px solid #ddd;
}

.category-link-item:last-child {
    border-bottom: 0;
}

.category-link-item h2 {
    margin: 0 0 5px;
    font-size: 19px;
    line-height: 1.4;
}

.category-link-item h2 a {
    color: #0033cc;
    text-decoration: none;
}

.category-link-item h2 a:hover {
    color: #8b0000;
    text-decoration: underline;
}

.category-link-item .post-url {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-all;
}

.category-link-item .post-url a {
    color: #666;
    text-decoration: none;
}

.category-link-item .post-url a:hover {
    color: #8b0000;
    text-decoration: underline;
}

@media(max-width:768px) {
    .category-link-item {
        padding: 12px 14px;
    }

    .category-link-item h2 {
        font-size: 17px;
    }

    .category-link-item .post-url {
        font-size: 12px;
    }
}

/* ===== Category: anchor text only ===== */
.category-title-url-only {
    padding: 0;
}

.category-link-list {
    background: #fff;
}

.category-link-item {
    margin: 0;
    padding: 13px 18px;
    border-bottom: 1px solid #ddd;
    line-height: 1.5;
}

.category-link-item:last-child {
    border-bottom: 0;
}

.category-anchor {
    display: block;
    color: #0033cc;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}

.category-anchor:hover {
    color: #8b0000;
    text-decoration: underline;
}

@media(max-width:768px) {
    .category-link-item {
        padding: 11px 14px;
    }

    .category-anchor {
        font-size: 16px;
    }
}

/* ===== Category anchor list with bullets ===== */
.category-bullet-list {
    margin: 0;
    padding: 5px 18px 5px 42px;
    background: #fff;
}

.category-bullet-list .category-link-item {
    margin: 0;
    padding: 11px 5px;
    border-bottom: 1px solid #ddd;
    line-height: 1.5;
}

.category-bullet-list .category-link-item:last-child {
    border-bottom: 0;
}

.category-bullet-list .category-anchor {
    display: inline;
    color: #0033cc;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}

.category-bullet-list .category-anchor:hover {
    color: #8b0000;
    text-decoration: underline;
}

.category-bullet-list .category-link-item::marker {
    color: #222;
    font-size: 16px;
}

@media(max-width:768px) {
    .category-bullet-list {
        padding-left: 32px;
    }

    .category-bullet-list .category-link-item {
        padding: 10px 3px;
    }

    .category-bullet-list .category-anchor {
        font-size: 16px;
    }
}

/* ===== Single post breadcrumb fix ===== */
.breadcrumb {
    display: block;
    width: 100%;
}

.breadcrumb a:first-child {
    color: #0033cc;
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 4px;
}


/* Homepage: all category boxes */
.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.section-box {
    min-width: 0;
}

@media(max-width:768px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Eye-catching View All button ===== */
.view-all {
    padding: 12px 15px !important;
    background: #f7f7f7 !important;
    text-align: center !important;
    border-top: 1px solid #ddd;
}

.view-all a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 130px;
    padding: 9px 18px;
    background: #8b0000;
    color: #fff !important;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,.18);
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.view-all a::before {
    content: "👁";
    font-size: 14px;
}

.view-all a:hover {
    background: #b30000;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 9px rgba(0,0,0,.22);
}

.view-all a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,.18);
}

@media(max-width:768px) {
    .view-all a {
        width: 100%;
        max-width: 220px;
    }
}

/* ===== Clean boxed View All button - no icon ===== */
.view-all {
    padding: 14px 15px !important;
    background: #f5f5f5 !important;
    text-align: center !important;
    border-top: 1px solid #ddd;
}

.view-all a,
.view-all a:hover,
.view-all a:focus {
    display: inline-block;
    min-width: 150px;
    padding: 10px 22px;
    background: #8b0000 !important;
    color: #fff !important;
    border: 1px solid #700000;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color .15s ease;
}

.view-all a::before {
    content: none !important;
    display: none !important;
}

.view-all a:hover {
    background: #000 !important;
}

@media(max-width:768px) {
    .view-all a {
        width: 100%;
        max-width: 220px;
    }
}

/* ===== View More pill button ===== */
.view-all {
    padding: 12px 0 16px !important;
    background: #fff !important;
    text-align: center !important;
    border-top: 1px solid #ddd;
}

.view-all a,
.view-all a:hover,
.view-all a:focus {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 205px;
    height: 58px;
    padding: 0 28px !important;
    background: #287be0 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 32px !important;
    font-size: 27px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color .15s ease;
}

.view-all a::before {
    content: none !important;
    display: none !important;
}

.view-all a:hover {
    background: #1769c8 !important;
}

@media(max-width:768px) {
    .view-all a {
        min-width: 170px;
        height: 50px;
        padding: 0 22px !important;
        font-size: 22px !important;
    }
}

/* ===== Compact right-aligned View More button ===== */
.view-all {
    padding: 10px 14px !important;
    background: #fff !important;
    text-align: right !important;
    border-top: 1px solid #ddd;
}

.view-all a,
.view-all a:hover,
.view-all a:focus {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    height: 38px;
    padding: 0 16px !important;
    background: #287be0 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.view-all a::before {
    content: none !important;
    display: none !important;
}

.view-all a:hover {
    background: #1769c8 !important;
}

@media(max-width:768px) {
    .view-all {
        padding: 9px 12px !important;
    }

    .view-all a {
        min-width: 95px;
        height: 36px;
        padding: 0 14px !important;
        font-size: 14px !important;
    }
}

/* Homepage: keep every category visible even when it has no posts */
.section-box .section-list:empty {
    min-height: 20px;
}

.section-box .section-list li {
    margin-bottom: 0;
}

/* ===== Home navigation stays black ===== */
.main-nav .menu-item-home > a,
.main-nav .menu-item-home > a:hover,
.main-nav .menu-item-home > a:focus,
.main-nav .menu-item-home.current-menu-item > a,
.main-nav .menu-item-home.current-menu-ancestor > a,

/* Home button: black normally, red on hover */
.main-nav .menu-item-home > a {
    background: #000 !important;
    color: #fff !important;
}

.main-nav .menu-item-home > a:hover,
.main-nav .menu-item-home > a:focus {
    background: #8b0000 !important;
    color: #fff !important;
}


/* ===== Dynamic Internal Page Structure ===== */
.single-post {
    background: #fff;
}

.post-title-bar {
    margin: 0 !important;
    padding: 16px 20px !important;
    background: #8b0000;
    color: #fff;
    font-size: 28px;
    line-height: 1.35;
}

.post-meta {
    padding: 9px 20px;
    background: #f4f4f4;
    color: #666;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
}

.internal-section {
    margin: 18px 0;
    border: 1px solid #ddd;
    background: #fff;
}

.internal-section h2 {
    margin: 0;
    padding: 11px 15px;
    background: #8b0000;
    color: #fff;
    font-size: 19px;
    line-height: 1.3;
}

.section-text {
    padding: 15px 17px;
    line-height: 1.7;
}

.short-info-box {
    border-left: 4px solid #8b0000;
}

.section-table {
    width: 100%;
}

.info-row {
    display: grid;
    grid-template-columns: 42% 58%;
    border-bottom: 1px solid #e5e5e5;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row strong,
.info-row span {
    padding: 10px 14px;
}

.info-row strong {
    background: #f7f7f7;
}

.internal-list {
    margin: 0;
    padding: 13px 35px 13px 38px;
    line-height: 1.7;
}

.internal-list li {
    margin-bottom: 5px;
}

.internal-steps {
    padding-left: 40px;
}

.important-links {
    padding: 8px 14px;
}

.important-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 4px;
    border-bottom: 1px solid #e5e5e5;
}

.important-link-row:last-child {
    border-bottom: 0;
}

.important-link-row span {
    font-weight: 600;
}

.important-link-row a {
    flex: 0 0 auto;
    padding: 7px 14px;
    background: #287be0;
    color: #fff;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.important-link-row a:hover {
    background: #1769c8;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-item summary {
    cursor: pointer;
    padding: 12px 15px;
    font-weight: 700;
    color: #0033cc;
}

.faq-item div {
    padding: 0 15px 14px;
    line-height: 1.7;
}

.post-content {
    padding: 0 18px;
}

@media(max-width:768px) {
    .post-title-bar {
        padding: 13px 14px !important;
        font-size: 22px;
    }

    .post-meta {
        padding: 8px 14px;
    }

    .internal-section {
        margin: 13px 0;
    }

    .internal-section h2 {
        font-size: 17px;
    }

    .info-row {
        grid-template-columns: 1fr;
    }

    .info-row strong {
        padding-bottom: 5px;
    }

    .info-row span {
        padding-top: 5px;
    }

    .important-link-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .important-link-row a {
        width: auto;
    }

    .post-content {
        padding: 0 12px;
    }
}


/* =========================================================
   Manual Colored Post Boxes
   ========================================================= */
.sr-featured-boxes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 20px;
}

.sr-featured-box {
    min-height: 112px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff !important;
    text-decoration: none !important;
    overflow: hidden;
    transition: filter .15s ease, transform .15s ease;
}

.sr-featured-box span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 700;
}

.sr-featured-box:hover {
    color: #fff !important;
    filter: brightness(.88);
    transform: translateY(-1px);
}

@media(max-width:900px) {
    .sr-featured-boxes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-featured-box {
        min-height: 105px;
    }

    .sr-featured-box span {
        font-size: 21px;
    }
}

@media(max-width:500px) {
    .sr-featured-boxes {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .sr-featured-box {
        min-height: 82px;
    }

    .sr-featured-box span {
        font-size: 20px;
    }
}

/* =========================================
   MOVING TEXT - NO BOX / NO TABLE
========================================= */
.sr-moving-text{
    width:100%;
    margin:10px 0 15px;
    padding:0;
    background:transparent;
    border:none;
    overflow:hidden;
}

.sr-moving-row{
    width:100%;
    overflow:hidden;
    white-space:nowrap;
    padding:4px 0;
    margin:0;
}

.sr-moving-track{
    display:inline-flex;
    align-items:center;
    width:max-content;
    min-width:max-content;
    animation:movingText 5s linear infinite alternate;
    will-change:transform;
}

.sr-moving-track a{
    color:#405cff;
    font-size:21px;
    font-weight:400;
    text-decoration:none;
    padding:0 10px;
    white-space:nowrap;
    flex-shrink:0;
}

.sr-moving-track a:hover{
    color:#8b0000;
    text-decoration:underline;
}

.sr-moving-track span{
    color:#333;
    font-size:21px;
    font-weight:600;
    flex-shrink:0;
}

@keyframes movingText{
    0%{transform:translateX(0);}
    100%{transform:translateX(calc(-1 * var(--moving-distance, 0px)));}
}

.sr-moving-row:hover .sr-moving-track{
    animation-play-state:paused;
}

@media(max-width:768px){
    .sr-moving-track{animation-duration:4s;}
    .sr-moving-track a{font-size:16px;padding:0 7px;}
    .sr-moving-track span{font-size:16px;}
}

@media(prefers-reduced-motion:reduce){
    .sr-moving-track{
        animation:none;
        transform:translateX(0);
    }
}
