/* =============================================
   MYSARKARINAUKARI — Modern Theme 2026
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800&family=Noto+Sans:wght@400;600;700&display=swap');

:root {
    --blue:      #0b4a8f;
    --blue-dark: #072f60;
    --blue-light:#e8f0fb;
    --red:       #d32f2f;
    --red-light: #fdecea;
    --green:     #2e7d32;
    --green-light:#e8f5e9;
    --orange:    #e65100;
    --orange-light:#fff3e0;
    --yellow:    #ffd600;
    --white:     #ffffff;
    --bg:        #f4f6fb;
    --border:    #dde3ef;
    --text:      #1a1a2e;
    --muted:     #6b7280;
    --radius:    10px;
    --shadow:    0 2px 16px rgba(11,74,143,0.10);
    --font-head: 'Baloo 2', cursive;
    --font-body: 'Noto Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--blue-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-link { text-decoration: none; }

.logo-text {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}
.logo-my      { color: var(--yellow); }
.logo-sarkari { color: var(--white); }
.logo-naukari { color: #90caf9; }

.logo-sub {
    font-size: 10px;
    color: #90caf9;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.main-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-link {
    color: #cdd8f0;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.12);
    color: var(--white);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--blue-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: #cdd8f0;
    text-decoration: none;
    padding: 12px 24px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.08); color: white; }


/* ===== FIXED MOBILE NAV ===== */
.mobile-nav {
    display: flex; /* Changed from none to flex */
    flex-direction: column;
    background: var(--blue-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    max-height: 0; /* Start at 0 */
    overflow: hidden; /* Hide content when closed */
    transition: max-height 0.3s ease-in-out, padding 0.3s ease;
}

/* JavaScript toggles this class */
.mobile-nav.open {
    max-height: 500px; /* Large enough to fit all links */
    padding: 8px 0;
}

/* ===== FIXED FAQ SECTION ===== */
.faq-a {
    max-height: 0; /* Ensure it starts at 0 */
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.25s ease;
    padding: 0 18px; /* Start with 0 vertical padding */
    color: #555;
    font-size: 13.5px;
    line-height: 1.7;
    border-top: 1px solid transparent;
}

/* This replaces the [style*="max-height"] logic for cleaner transitions */
.faq-item.active .faq-a {
    padding: 12px 18px;
    border-top-color: var(--border);
}

/* ===== NEWS TICKER ===== */
.news-ticker {
    background: var(--yellow);
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 36px;
    border-bottom: 2px solid #e6be00;
}

.ticker-label {
    background: var(--red);
    color: white;
    font-weight: 800;
    font-size: 11px;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.ticker-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-scroll span {
    display: inline-block;
    animation: ticker 30s linear infinite;
    font-weight: 700;
    font-size: 13px;
    color: #1a1a2e;
    padding-left: 100%;
}

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ===== HERO SEARCH ===== */
.hero-search {
    background: linear-gradient(135deg, var(--blue-dark) 0%, #1565c0 60%, #0288d1 100%);
    padding: 50px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.07) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero-title {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--yellow);
    position: relative;
}

.hero-sub {
    color: #90caf9;
    font-size: 15px;
    margin-bottom: 28px;
}

.search-wrapper { position: relative; max-width: 580px; margin: 0 auto; }

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0,0,0,0.25);
    align-items: center;
    padding: 4px 4px 4px 18px;
}

.search-icon { font-size: 16px; margin-right: 6px; flex-shrink: 0; }

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text);
    background: transparent;
    padding: 10px 0;
}

.search-btn {
    background: var(--red);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.search-btn:hover { background: #b71c1c; }

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    text-align: left;
}

.search-dropdown a {
    display: block;
    padding: 11px 16px;
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover { background: #fff9c4; color: var(--red); }
.no-result { padding: 14px 16px; color: var(--red); font-size: 13px; }

.trending-row {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.fire-label {
    color: var(--yellow);
    font-weight: 700;
    font-size: 13px;
}

.trending-row a {
    color: white;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}
.trending-row a:hover { background: rgba(255,255,255,0.28); }

/* ===== QUICK LINKS ===== */
.quick-section {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 0 16px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.qbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 800;
    font-family: var(--font-head);
    font-size: 16px;
    letter-spacing: 0.3px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}
.qbox:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }

.qbox-icon { font-size: 26px; }
.qbox-green  { background: linear-gradient(135deg, #1b5e20, #43a047); color: white; }
.qbox-red    { background: linear-gradient(135deg, #b71c1c, #ef5350); color: white; }
.qbox-blue   { background: linear-gradient(135deg, #0d47a1, #1e88e5); color: white; }
.qbox-orange { background: linear-gradient(135deg, #e65100, #ff9800); color: white; }

/* ===== PORTAL CARDS ===== */
.portal-wrapper {
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 16px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.pcard {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}
.pcard:hover { box-shadow: 0 4px 20px rgba(11,74,143,0.14); }

.pcard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.head-green  { background: linear-gradient(90deg, #2e7d32, #43a047); }
.head-blue   { background: linear-gradient(90deg, #0d47a1, #1565c0); }
.head-red    { background: linear-gradient(90deg, #b71c1c, #d32f2f); }
.head-orange { background: linear-gradient(90deg, #e65100, #f57c00); }

.head-viewall {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    background: rgba(0,0,0,0.18);
    padding: 3px 10px;
    border-radius: 20px;
    transition: background 0.2s;
    white-space: nowrap;
}
.head-viewall:hover { background: rgba(0,0,0,0.32); color: white; }

.pcard-list {
    list-style: none;
    padding: 6px 0;
}

.pcard-list li {
    border-bottom: 1px dashed var(--border);
}
.pcard-list li:last-child { border-bottom: none; }

.pcard-list a {
    display: block;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.pcard-list a:hover { background: #fffde7; color: var(--red); }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
    vertical-align: middle;
}
.badge-green  { background: var(--green-light);  color: var(--green); border: 1px solid #c8e6c9; }
.badge-red    { background: var(--red-light);    color: var(--red);   border: 1px solid #ffcdd2; }
.badge-blue   { background: var(--blue-light);   color: var(--blue);  border: 1px solid #bbdefb; }

/* ===== TRENDING SECTION ===== */
.trending-section {
    max-width: 1200px;
    margin: 22px auto 0;
    padding: 14px 16px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: var(--shadow);
}

.trend-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid currentColor;
    transition: opacity 0.2s, transform 0.2s;
}
.trend-tag:hover { opacity: 0.8; transform: scale(1.04); }
.tag-red    { color: var(--red);    background: var(--red-light); }
.tag-blue   { color: var(--blue);   background: var(--blue-light); }
.tag-green  { color: var(--green);  background: var(--green-light); }
.tag-orange { color: var(--orange); background: var(--orange-light); }

/* ===== EXAM SCHEDULE ===== */
.exam-schedule {
    max-width: 1200px;
    margin: 22px auto 0;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.section-header h2 {
    background: linear-gradient(90deg, var(--blue-dark), #1565c0);
    color: white;
    padding: 14px 20px;
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
}

.table-scroll { overflow-x: auto; }

.exam-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}

.exam-table thead tr { background: #f8f9fa; }
.exam-table th {
    padding: 11px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--blue-dark);
    border-bottom: 2px solid var(--border);
}

.exam-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.exam-table tr:last-child td { border-bottom: none; }
.exam-table tr:hover td { background: var(--blue-light); }

.date-badge {
    background: var(--red-light);
    color: var(--red);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tbl-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}
.tbl-link:hover { color: var(--red); text-decoration: underline; }

/* ===== ABOUT SECTION ===== */
.about-section {
    max-width: 1200px;
    margin: 22px auto 0;
    padding: 0 16px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.about-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
}

.about-icon { font-size: 32px; margin-bottom: 10px; }
.about-card h3 { font-family: var(--font-head); color: var(--blue); font-size: 18px; margin-bottom: 10px; }
.about-card p { color: #444; line-height: 1.7; font-size: 14px; }

/* ===== COMMUNITY ===== */
.community-section {
    max-width: 1200px;
    margin: 22px auto 0;
    padding: 28px 20px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid #90caf9;
    box-shadow: var(--shadow);
}

.community-section h3 {
    font-family: var(--font-head);
    color: var(--blue-dark);
    font-size: 20px;
    margin-bottom: 8px;
}

.community-section p { color: #555; margin-bottom: 18px; }

.community-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cbtn {
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    color: white;
    transition: opacity 0.2s, transform 0.2s;
}
.cbtn:hover { opacity: 0.88; transform: translateY(-2px); }
.cbtn-blue   { background: var(--blue); }
.cbtn-green  { background: #25d366; }
.cbtn-orange { background: var(--orange); }

/* ===== FAQ ===== */
.faq-section {
    max-width: 1200px;
    margin: 22px auto 0;
    padding: 0 16px;
}

.faq-section h3 {
    font-family: var(--font-head);
    color: var(--red);
    font-size: 18px;
    margin-bottom: 14px;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-q {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    color: var(--blue-dark);
    user-select: none;
}
.faq-q:hover { background: var(--blue-light); }
.faq-q span { font-size: 18px; color: var(--blue); flex-shrink: 0; margin-left: 10px; }

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 18px;
    color: #555;
    font-size: 13.5px;
    line-height: 1.7;
    border-top: 1px solid transparent;
}
.faq-a[style*="max-height"] { padding: 12px 18px; border-top-color: var(--border); }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--blue-dark);
    color: #90caf9;
    margin-top: 40px;
    padding: 30px 20px 16px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 800;
    color: var(--yellow);
    margin-bottom: 6px;
}

.footer-brand p { font-size: 12px; color: #90caf9; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}
.footer-links a {
    color: #90caf9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--yellow); }

.footer-copy {
    max-width: 1200px;
    margin: 14px auto 0;
    font-size: 12px;
    text-align: center;
    color: rgba(255,255,255,0.45);
}

/* ===== MAIN BODY PADDING ===== */
.main-body { padding-bottom: 30px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .portal-grid { grid-template-columns: 1fr; }
    .about-grid  { grid-template-columns: 1fr; }
    .quick-grid  { grid-template-columns: repeat(2, 1fr); }
    .main-nav    { display: none; }
    .hamburger   { display: block; }
    .hero-title  { font-size: 24px; }
}

@media (max-width: 600px) {
    .quick-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hero-search { padding: 36px 14px 28px; }
    .trending-section { display: none; }
    .footer-inner { flex-direction: column; align-items: center; text-align: center; }
    .footer-links { justify-content: center; }
}
