:root {
    /* Light Theme Variables */
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #8c1515;
    --nav-bg: #333;
    --card-bg: #fff;
    --card-border: #ddd;
    --link-color: #0056b3;
    --link-hover-color: #d9534f;
}

body.dark-mode {
    /* Dark Theme Variables */
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --nav-bg: #2c2c2c;
    --card-bg: #1e1e1e;
    --card-border: #444;
    --link-color: #8ab4f8;
    --link-hover-color: #d9534f;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    padding: 20px;
}
.live-indicator {
  display: flex;
  align-items: center;
  margin-left: 15px; /* "Admission" और "Live" के बीच थोड़ी जगह के लिए */
}

.live-text {
  color: #fff; /* टेक्स्ट का रंग सफेद */
  font-weight: bold;
  animation: blink-text 1.5s infinite; /* ब्लिंकिंग एनिमेशन */
}

.live-dot {
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  margin-right: 5px; /* डॉट और टेक्स्ट के बीच जगह */
  animation: blink-dot 1.5s infinite; /* ब्लिंकिंग एनिमेशन */
}

/* टेक्स्ट के लिए ब्लिंकिंग कीफ़्रेम */
@keyframes blink-text {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* डॉट के लिए ब्लिंकिंग कीफ़्रेम */
@keyframes blink-dot {
  0% { transform: scale(1); box-shadow: 0 0 3px red; }
  50% { transform: scale(0.8); box-shadow: 0 0 10px red; }
  100% { transform: scale(1); box-shadow: 0 0 3px red; }
}
/* --- CSS for Scrolling Latest Posts Ticker --- */

.latest-posts-ticker {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden; /* This is crucial */
    border-radius: 5px;
}

.ticker-label {
    background-color: #000000;
    color: #ffffff;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap; /* Prevents "Latest Posts" from wrapping */
}

.ticker-wrapper {
    flex-grow: 1;
    overflow: hidden; /* Hides the part of the list that is outside */
    position: relative;
    height: 40px; /* Adjust height as needed */
    display: flex;
    align-items: center;
}

ul.ticker-content {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Aligns list items horizontally */
    animation: scroll-ticker 30s linear infinite; /* The animation magic */
}

ul.ticker-content li {
    padding: 0 25px;
    white-space: nowrap; /* Prevents link text from wrapping */
    font-size: 0.95rem;
    position: relative;
}

/* Adds a separator line between items */
ul.ticker-content li::after {
    content: '|';
    color: #ccc;
    position: absolute;
    right: -5px;
}

ul.ticker-content li:last-child::after {
    content: ''; /* Removes separator from the last item */
}


ul.ticker-content a {
    text-decoration: none;
    color: #d9534f; /* Red color for links */
    font-weight: 500;
}

ul.ticker-content a:hover {
    text-decoration: underline;
}

/* Stop scrolling on hover */
.ticker-wrapper:hover .ticker-content {
    animation-play-state: paused;
}


/* The Keyframe Animation */
@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Moves the list left by half its width */
    }
}


/* Grid Container Styles */
.top-highlights-grid {
    display: grid;
    /* For large screens: 4 columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 8px; /* MODIFIED: Reduced space between boxes */
}

/* Individual Grid Item Styles */
.grid-item {
    transition: transform 0.2s ease-in-out;
}

.top-highlights-grid .grid-item a {
    color: white;
    font-weight: bold;
    font-size: 0.9em;       /* MODIFIED: Reduced font size */
    padding: 10px;          /* MODIFIED: Reduced padding */
    min-height: 60px;       /* MODIFIED: Halved the minimum height */
    border-radius: 8px;
    text-align: center;
    
    /* Centering text vertically and horizontally */
    display: flex;
    justify-content: center;
    align-items: center;
    
    cursor: pointer;
}

.grid-item:hover {
    transform: scale(1.05);
}

/* Specific background colors for each box */
.box-1 { background-color: #5a4a24; }
.box-2 { background-color: #1a1a5a; }
.box-3 { background-color: #5a005a; }
.box-4 { background-color: #005a2d; }
.box-5 { background-color: #e02020; }
.box-6 { background-color: #f040f0; }
.box-7 { background-color: #111111; }
.box-8 { background-color: #2020ff; }

/* Responsive Design for Tablets */
@media (max-width: 992px) {
    .top-highlights-grid {
        /* 2 columns for tablets */
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Design for Mobile Phones */
@media (max-width: 576px) {
    .top-highlights-grid {
        /* 1 column for mobile */
        grid-template-columns: 1fr;
    }
    .top-highlights-grid .grid-item a {
        font-size: 0.8em;   /* MODIFIED: Reduced font size for mobile */
        min-height: 50px;   /* MODIFIED: Halved the height for mobile */
    }
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--link-hover-color);
}

header {
    background-color: var(--header-bg);
    color: white;
    padding: 10px 0;
    text-align: center;
    border-bottom: 2px solid var(--link-hover-color);
    transition: background-color 0.3s;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    margin: 0;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
}

.logo .victory-symbol {
    height: 80px;
    margin-right: 30px;
}

.logo p {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 1px;
}

nav {
    background-color: var(--nav-bg);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

nav ul li a {
    display: block;
    color: white;
    padding: 15px 20px;
    font-weight: 500;
    transition: background-color 0.3s;
}

nav ul li a.active,
nav ul li a:hover {
    background-color: var(--link-hover-color);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.search-container {
    display: flex;
}

.search-container input {
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 4px 0 0 4px;
    background-color: #555;
    color: white;
    outline: none;
    width: 150px;
    transition: width 0.3s ease-in-out;
}

.search-container input:focus {
    width: 200px;
}

.search-container input::placeholder {
    color: #ccc;
}

.search-container button {
    padding: 8px 12px;
    border: none;
    background-color: #d9534f;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

#darkModeToggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

#darkModeToggle:hover {
    transform: scale(1.1);
}

main {
    padding: 20px;
}

.intro {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    transition: background-color 0.3s, border-color 0.3s;
    overflow: hidden; /* Hide scrolling text when it leaves the box */
}

@keyframes animated-gradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.intro h2 {
    white-space: nowrap;
    background: linear-gradient(90deg, #8c1515, hsl(2, 100%, 49%), #ff1500, #ef0b03, #8c1515);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 8px rgba(255, 100, 100, 0.6);
    animation:
        animated-gradient 6s ease-in-out infinite alternate,
        marquee-scroll 15s linear infinite;
    margin: 0;
}

body.dark-mode .intro h2 {
    text-shadow: 0 0 10px rgba(255, 120, 120, 0.8);
}

.social-links {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--card-border);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    border-radius: 25px;
    color: white !important;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn i {
    margin-right: 10px;
    font-size: 1.3rem;
}
.free-courses-btn { background-color: #cc0000; } /* FIX: Spelling corrected from Coures-btn */
.telegram-btn { background-color: #0088cc; }
.whatsapp-btn { background-color: #25D366; }
.x-btn { background-color: #000000; }
.book-btn { background-color: #00c023; }

.social-btn:hover {
    transform: translateY(-3px) scale(1.05);
    color: #fff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7),
                 0 0 25px var(--btn-glow-color);
}
.free-courses-btn:hover { /* FIX: Spelling corrected from Coures-btn */
    --btn-glow-color: #cc0000;
}
.telegram-btn:hover {
    --btn-glow-color: #0088cc;
}
.whatsapp-btn:hover {
    --btn-glow-color: #25D366;
}
.x-btn:hover {
    --btn-glow-color: #777;
}
.book-btn:hover {
    --btn-glow-color: #309d00;
}
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

@media (min-width: 992px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.content-box {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
}

.content-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body.dark-mode .content-box:hover {
    box-shadow: 0 4px 15px rgba(255,255,255,0.05);
}

.box-header {
    color: white;
    padding: 12px 15px;
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.box-header i {
    margin-right: 10px;
}

.content-box ul {
    list-style: none;
    padding: 15px;
    margin: 0;
    flex-grow: 1;
}

.content-box ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

body.dark-mode .content-box ul li {
    border-bottom-color: var(--card-border);
}

.content-box ul li:last-child {
    border-bottom: none;
}

.view-more-container {
    text-align: right;
    padding: 10px 15px;
    background-color: #f9f9f9;
}

body.dark-mode .view-more-container {
    background-color: #2c2c2c;
}

.view-more-btn {
    font-weight: bold;
}

.color-results { background-color: #007bff; }
.color-admit-card { background-color: #dc3545; }
.color-latest-jobs { background-color: #28a745; }
.color-answer-key { background-color: #ffc107; color: #333 !important; }
.color-syllabus { background-color: #17a2b8; }
.color-admission { background-color: #6f42c1; }
.color-certificate { background-color: #fd7e14; }
.color-important { background-color: #d63384; }
.color-upcoming { background-color: #6c757d; }

.tag {
    padding: 3px 8px;
    font-size: 0.75em;
    color: white;
    border-radius: 5px;
    margin-left: 5px;
}
.tag-reminder { background-color: #ffc107; color: #333; }
.tag-extended { background-color: #17a2b8; }
.tag-upcoming { background-color: #28a745; }

.faq-section {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--card-border);
    transition: background-color 0.3s, border-color 0.3s;
}

.faq-item {
    margin-bottom: 15px;
}

.faq-item h3 {
    margin: 0 0 5px 0;
    color: var(--text-color);
}

footer {
    background-color: var(--nav-bg);
    color: #aaa;
    padding: 20px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #aaa;
    margin-left: 15px;
}

.footer-nav a:hover {
    color: white;
}

@media (max-width: 992px) {
    nav {
        justify-content: center;
    }
    .nav-controls {
        width: 100%;
        justify-content: center;
        border-top: 1px solid #444;
    }
}

.content-box ul li:nth-child(n + 4) {
    display: none;
}

.content-box ul.show-all li {
    display: list-item;
}

.content-box ul.show-all + .view-more-container {
    display: none;
}