:root {
    --primary-color: #b22544;
    --primary-text-color: #b22544;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --text-color: #333333;
    --header-bg: rgba(255, 255, 255, 0.8);
}

a {
    text-decoration: none;
    transition: color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #787777;
}

.btn-primary:hover {
    background-color: #941f38 !important;
    border-color: #821a30 !important;
}

.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

.text-theme {
    color: var(--primary-text-color) !important;
}

[data-theme="dark"] {
    --primary-color: #b22544;
    --primary-text-color: #ff8fa3; /* Brighter red for visibility in dark mode */
    --secondary-color: #495057;
    --background-color: #121212;
    --text-color: #ffffff;
    --header-bg: rgba(0, 0, 0, 0.8);
}

body {
    font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.section-heading-title {
    font-size: 2rem;
    font-weight: bold;
}

.sub-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 20px;
}

#admissions .card.h-100 {
    display: flex;
    flex-direction: column;
}

#admissions .card.h-100 .card-body {
    flex-grow: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 10px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-to-main:focus {
    top: 0;
}

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    z-index: 1000;
    transition: opacity 0.3s;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background-color: transparent;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.main-header.scrolled {
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .main-header:not(.scrolled) {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.logo img {
    height: 50px;
    margin-right: 15px;
}

.logo-text {
    font-weight: bold;
    line-height: 1.2;
}

.logo-main {
    font-size: 1.4rem;
}

.logo-sub {
    font-size: 0.9rem;
}

.logo-text.mobile {
    display: none;
}

/* Theme Toggle Icon */
#theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    margin-left: 15px;
}

/* Media Queries */
@media (max-width: 991.98px) {
    .logo-text.desktop {
        display: none;
    }
    .logo-text.mobile {
        display: block;
    }
    .main-nav {
        display: none;
    }
    .header-right {
        justify-content: flex-end;
    }
    .theme-toggle {
        margin-right: 15px;
    }
    .main-header .container {
        flex-wrap: wrap;
    }
    .navbar-collapse {
        width: 100%;
    }
}

.navbar-toggler {
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.5rem;
}

.nav-links-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
}

.nav-links-mobile a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 10px 0;
    font-weight: 500;
}

.accessibility-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accessibility-dropdown .dropdown-item span {
    flex-grow: 1;
}


.main-nav .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav .nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 10px;
    display: block;
    font-weight: 500;
    position: relative;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s;
}

.main-nav .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.focused {
    display: block;
}

.dropdown-menu li {
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    padding: 10px 15px;
    color: var(--text-color);
    display: block;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: rgba(128, 128, 128, 0.2);
}


.header-right {
    display: flex;
    align-items: center;
}

.accessibility-options {
    position: relative;
    margin-left: 15px;
}

.accessibility-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
}

.accessibility-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0;
        width: 220px;
        overflow: hidden;
}

.accessibility-dropdown .dropdown-item {
    padding: 12px 15px;
    background: none;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background-color 0.3s;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.accessibility-dropdown .font-size-group .dropdown-item {
    border-bottom: none;
    padding: 10px 5px;
    justify-content: center;
}

.accessibility-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.accessibility-dropdown .dropdown-item:hover {
    background-color: rgba(0,0,0,0.1);
}





.admission-heading {
    margin-bottom: 20px;
}

.admission-title {
    font-size: 2rem;
    font-weight: bold;
}

.admission-sub-title {
    font-size: 0.9rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    padding-bottom: 50px;
}

.hero-section img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index: 1;
}

.hero-content {
    position: absolute;
    bottom: 50px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.2rem;
}

/* Content Sections */
.content-section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f8f9fa;
}

[data-theme="dark"] .bg-light {
    background-color: #1a1a1a !important;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-weight: 700;
}

/* About Section */
.about-text, .principal-text, .contact-info {
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .about-text, .principal-text, .contact-info {
        margin-bottom: 0;
    }
}

/* Principal's Message */
.principal-text .lead {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
}

blockquote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 0;
}

cite {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

/* Gallery */
.gallery-grid {
    column-count: 2;
    column-gap: 15px;
}

@media (min-width: 576px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        column-count: 4;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    display: block;
    overflow: hidden;
    border-radius: 5px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    transition: transform 0.3s, opacity 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

.view-more-box {
    break-inside: avoid;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #e84e70, var(--primary-color));
    background-size: 200% 200%;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid rgba(232, 78, 112, 0.3);
    min-height: 150px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.2);
    position: relative;
    overflow: hidden;
}

.view-more-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
}

.view-more-box:hover {
    background-position: 100% 50%;
    color: white;
    border-color: rgba(232, 78, 112, 1);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(178, 37, 68, 0.4), 0 0 20px rgba(232, 78, 112, 0.4);
}

.view-more-box:hover::before {
    left: 200%;
}

.view-more-content {
    text-align: center;
    z-index: 1;
}

.view-more-content i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    transition: transform 0.3s ease;
}

.view-more-box:hover .view-more-content i {
    transform: scale(1.2) rotate(5deg);
}

.view-more-content span {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Contact Section */
.contact-form .form-control {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid #ced4da;
    color: var(--text-color);
    padding: 0.75rem 1rem;
}

.contact-form .form-control:focus {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(178, 37, 68, 0.25);
}

/* Footer */
.main-footer {
    background-color: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul.footer-links a {
    color: #ccc;
    text-decoration: none;
    line-height: 2.5;
    transition: color 0.3s;
    display: inline-block;
}

.footer-section ul.footer-links a i {
    font-size: 0.8rem;
    margin-right: 8px;
    color: var(--primary-color);
}

.footer-section ul.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-section ul.footer-contact-list li {
    display: flex;
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul.footer-contact-list li i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 4px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 20px;
}


/* High Contrast */
body.high-contrast {
    --background-color: #000000;
    --text-color: #ffff00;
    --primary-color: #ffff00;
    --header-bg: #000000;
    background-color: #000000 !important;
}

body.high-contrast,
body.high-contrast * {
    color: #ffff00 !important;
    opacity: 1 !important;
}

body.high-contrast .bg-light,
body.high-contrast .card,
body.high-contrast .dropdown-menu,
body.high-contrast .form-control {
    background-color: #000000 !important;
    border-color: #ffff00 !important;
}

body.high-contrast .nav-tabs .nav-link.active {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

body.high-contrast .btn-primary,
body.high-contrast .btn-secondary,
body.high-contrast .view-more-box {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

/* Big Cursor */
body.big-cursor,
body.big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1.5' d='M4 2 L4 22 L10 16 L14 24 L17 23 L13 15 L20 15 Z'/%3E%3C/svg%3E") 4 2, auto !important;
}

body.big-cursor a,
body.big-cursor a *,
body.big-cursor button,
body.big-cursor button *,
body.big-cursor .dropdown-item,
body.big-cursor .gallery-item {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1.5' d='M10.5 3a2.5 2.5 0 0 0-5 0v8.11L4.65 10a2.5 2.5 0 0 0-3.35 3.7l6.2 6.8c1.37 1.5 3.3 2.5 5.5 2.5h1.5a6.5 6.5 0 0 0 6.5-6.5v-4.5a2.5 2.5 0 0 0-5 0V11a2.5 2.5 0 0 0-5 0V9.5a2.5 2.5 0 0 0-5 0V3z'/%3E%3C/svg%3E") 10 2, pointer !important;
}

/* Text Spacing Accessibility */
body.text-spacing,
body.text-spacing * {
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
    line-height: 1.5 !important;
}

/* Hide Images */
body.hide-images img, body.hide-images [style*="background-image"] {
    visibility: hidden !important;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .hero-section {
        height: auto;
        min-height: 50vh;
    }
    .about-image {
        margin-top: 20px;
    }
    .admission-heading {
        margin-top: 20px;
    }
}

/* Dark mode specific fixes for the new form */
[data-theme="dark"] .card {
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .contact-form .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-highlight {
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(178, 37, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(178, 37, 68, 1);
    }
    100% {
        box-shadow: 0 0 5px rgba(178, 37, 68, 0.5);
    }
}

/* Fix for mandatory <a class="text-dark"> making text invisible in dark mode */
    body.dark-mode a.text-dark,
    [data-theme="dark"] a.text-dark {
        color: #e9ecef !important;
    }
    body.dark-mode a.text-dark:hover,
    [data-theme="dark"] a.text-dark:hover {
        color: #fff !important;
    }

    /* DataTables Dark Mode Support */
    body.dark-mode table.dataTable,
    [data-theme="dark"] table.dataTable {
        color: inherit !important;
    }
    body.dark-mode table.dataTable tbody tr,
    [data-theme="dark"] table.dataTable tbody tr {
        background-color: transparent !important;
    }
    body.dark-mode table.dataTable tbody tr:hover,
    [data-theme="dark"] table.dataTable tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }
    body.dark-mode .page-link,
    [data-theme="dark"] .page-link {
        background-color: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e9ecef;
    }
    body.dark-mode .page-item.disabled .page-link,
    [data-theme="dark"] .page-item.disabled .page-link {
        background-color: transparent;
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.3);
    }
    body.dark-mode .page-item.active .page-link,
    [data-theme="dark"] .page-item.active .page-link {
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }
    body.dark-mode .dt-container .dt-length select,
    body.dark-mode .dt-container .dt-search input,
    [data-theme="dark"] .dt-container .dt-length select,
    [data-theme="dark"] .dt-container .dt-search input {
        background-color: rgba(255, 255, 255, 0.1);
        color: inherit;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    body.dark-mode .dt-container .dt-info,
    body.dark-mode .dt-container .dt-length label,
    body.dark-mode .dt-container .dt-search label,
    [data-theme="dark"] .dt-container .dt-info,
    [data-theme="dark"] .dt-container .dt-length label,
    [data-theme="dark"] .dt-container .dt-search label {
        color: rgba(255, 255, 255, 0.8) !important;
    }