/* ==========================================================
   महाराणा प्रताप महाविद्यालय – आधुनिक थीम (Bootstrap 5.3)
   ========================================================== */
:root {
    --mpm-primary: #c1121f;
    --mpm-primary-dark: #8d0b14;
    --mpm-primary-light: #fde8ea;
    --mpm-accent: #ffb703;
    --mpm-accent-dark: #e09b00;
    --mpm-dark: #1b1f2a;
    --mpm-ink: #2b2f3a;
    --mpm-muted: #6b7280;
    --mpm-bg: #f6f7fb;
    --mpm-card: #ffffff;
    --mpm-border: #e7e9f0;
    --mpm-radius: 14px;
    --mpm-shadow: 0 6px 24px rgba(20, 24, 40, .07);
    --mpm-shadow-lg: 0 14px 40px rgba(20, 24, 40, .12);
    --bs-primary: #c1121f;
    --bs-primary-rgb: 193, 18, 31;
    --bs-link-color: #b0101c;
    --bs-link-color-rgb: 176, 16, 28;
    --bs-link-hover-color: #7a0a12;
    --bs-body-font-family: "Hind", "Noto Sans Devanagari", "Poppins", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--bs-body-font-family);
    background: var(--mpm-bg);
    color: var(--mpm-ink);
    font-size: 1rem;
    line-height: 1.65;
}
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--mpm-dark); }

/* ---------- बटन ---------- */
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary, .btn-danger {
    --bs-btn-bg: var(--mpm-primary); --bs-btn-border-color: var(--mpm-primary);
    --bs-btn-hover-bg: var(--mpm-primary-dark); --bs-btn-hover-border-color: var(--mpm-primary-dark);
    --bs-btn-active-bg: var(--mpm-primary-dark); --bs-btn-active-border-color: var(--mpm-primary-dark);
    box-shadow: 0 4px 14px rgba(193, 18, 31, .25);
}
.btn-accent { background: var(--mpm-accent); color: #3a2a00; border: 0; }
.btn-accent:hover { background: var(--mpm-accent-dark); color: #000; }
.btn-soft { background: var(--mpm-primary-light); color: var(--mpm-primary-dark); border: 0; }
.btn-soft:hover { background: #fbd3d7; color: var(--mpm-primary-dark); }
.btn-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }

/* ---------- फ़ॉर्म ---------- */
.form-control, .form-select { border-radius: 10px; border-color: #d9dce6; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--mpm-primary); box-shadow: 0 0 0 .2rem rgba(193, 18, 31, .15); }
.form-label { font-weight: 500; color: #3b4150; margin-bottom: .3rem; }
.form-text { font-size: .8rem; }
.req::after { content: " *"; color: var(--mpm-primary); }

/* ---------- कार्ड ---------- */
.card { border: 1px solid var(--mpm-border); border-radius: var(--mpm-radius); box-shadow: var(--mpm-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--mpm-border); font-weight: 600; border-radius: var(--mpm-radius) var(--mpm-radius) 0 0 !important; }
.card-header.bg-brand { background: linear-gradient(90deg, var(--mpm-primary), #e2352a); color: #fff; }
.form-card { max-width: 760px; margin: 0 auto; }
.form-card .card-header { background: linear-gradient(90deg, var(--mpm-primary), #e2352a); color: #fff; }
.card-soft { background: #fff; border-radius: var(--mpm-radius); box-shadow: var(--mpm-shadow); border: 1px solid var(--mpm-border); padding: 1.25rem; }

/* ---------- टेबल ---------- */
.table-modern { --bs-table-bg: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 0; }
.table-modern thead th { background: #2a2f3d; color: #fff; font-weight: 500; white-space: nowrap; border: 0; vertical-align: middle; }
.table-modern tbody tr:hover { background: #fff7f7; }
.table-modern td, .table-modern th { vertical-align: middle; }
.table-wrap { background: #fff; border-radius: var(--mpm-radius); box-shadow: var(--mpm-shadow); border: 1px solid var(--mpm-border); overflow-x: auto; }
.table-filter { max-width: 320px; }

/* ---------- पेज शीर्षक ---------- */
.page-heading h3 { font-size: 1.35rem; position: relative; padding-left: .9rem; }
.page-heading h3::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 4px; background: linear-gradient(var(--mpm-primary), var(--mpm-accent)); }
.page-heading h3 i { color: var(--mpm-primary); }

.section-title { text-align: center; margin-bottom: 1.5rem; }
.section-title h2 { font-size: 1.6rem; font-weight: 700; position: relative; display: inline-block; padding-bottom: .5rem; }
.section-title h2::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 70px; height: 4px; border-radius: 3px; transform: translateX(-50%); background: linear-gradient(90deg, var(--mpm-primary), var(--mpm-accent)); }
.section-title p { color: var(--mpm-muted); margin: .5rem 0 0; }

/* ==========================================================
   एडमिन / शिक्षक पैनल
   ========================================================== */
.panel-header { background: linear-gradient(100deg, var(--mpm-primary-dark), var(--mpm-primary) 55%, #e2352a); box-shadow: 0 4px 18px rgba(0, 0, 0, .15); }
.brand { color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-logo { width: 100px; height: 100px; object-fit: contain; }
.brand-title { font-size: 1.15rem; font-weight: 700; line-height: 1.25; color: #fff; }
.brand-sub { font-size: .8rem; color: rgba(255, 255, 255, .85); }
.panel-nav { background: rgba(0, 0, 0, .18); }
.panel-nav .nav-link, .site-nav .nav-link { color: #fff !important; font-weight: 500; padding: .65rem .8rem !important; border-radius: 8px; }
.panel-nav .nav-link:hover, .site-nav .nav-link:hover, .panel-nav .nav-link.show, .site-nav .nav-link.show { background: rgba(255, 255, 255, .15); text-decoration: none; }
.dropdown-menu { border: 0; border-radius: 12px; padding: .4rem; min-width: 250px; max-height: 75vh; overflow-y: auto; }
.dropdown-item { border-radius: 8px; padding: .45rem .8rem; white-space: normal; font-size: .95rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--mpm-primary-light); color: var(--mpm-primary-dark); text-decoration: none; }
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-left: .15rem; }
.dropdown-submenu > .dropdown-toggle::after { transform: rotate(-90deg); float: right; margin-top: .55em; }
@media (min-width: 992px) {
    /* उप-मेनू वाले मेनू में scroll नहीं, वरना तीसरे स्तर का मेनू कट जाता है */
    .dropdown-menu:has(> .dropdown-submenu) { overflow: visible; max-height: none; }
    .dropdown-submenu > .dropdown-menu { position: absolute; }
    .dropdown-submenu.open-left > .dropdown-menu { left: auto; right: 100%; margin-left: 0; margin-right: .15rem; }
}
@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu { left: 0; margin-left: 1rem; position: static; box-shadow: none !important; }
    .dropdown-menu { max-height: none; }
}

.panel-main { min-height: calc(100vh - 170px); padding-top: 1rem; }
.welcome-bar { background: linear-gradient(90deg, var(--mpm-accent), #ffd166); color: #3a2a00; border-radius: 12px; padding: .6rem 1rem; box-shadow: var(--mpm-shadow); }
.welcome-bar a { color: #4a2600; }
.panel-footer { padding: 1rem 0; color: #6b7280; border-top: 1px solid var(--mpm-border); background: #fff; margin-top: 2rem; }

/* एडमिन होम टाइल */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
.tile { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--mpm-border); border-radius: 14px; padding: .9rem 1rem; color: var(--mpm-ink); box-shadow: var(--mpm-shadow); transition: transform .15s, box-shadow .15s, border-color .15s; min-height: 72px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--mpm-shadow-lg); border-color: #f3b9be; text-decoration: none; color: var(--mpm-primary-dark); }
.tile i { font-size: 1.4rem; color: var(--mpm-primary); background: var(--mpm-primary-light); width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tile span { font-weight: 500; line-height: 1.3; }
.stat-card { border-radius: 16px; padding: 1.1rem 1.25rem; color: #fff; box-shadow: var(--mpm-shadow-lg); }
.stat-card .num { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-1 { background: linear-gradient(135deg, #c1121f, #f05454); }
.stat-2 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #3a2a00; }
.stat-3 { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.stat-4 { background: linear-gradient(135deg, #059669, #34d399); }

/* लॉगिन पेज */
.layout-blank { background: radial-gradient(circle at 15% 20%, #ffe1e3 0, transparent 40%), radial-gradient(circle at 85% 80%, #fff1c9 0, transparent 40%), var(--mpm-bg); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 430px; border-radius: 20px; overflow: hidden; box-shadow: var(--mpm-shadow-lg); border: 0; }
.login-card .login-top { background: linear-gradient(120deg, var(--mpm-primary-dark), var(--mpm-primary) 60%, #e2352a); color: #fff; text-align: center; padding: 1.75rem 1.25rem 1.25rem; }
.login-card .login-top img { width: 130px; height: 130px; }
.login-card .login-top h1 { color: #fff; font-size: 1.15rem; margin: .75rem 0 .25rem; }

/* ==========================================================
   सार्वजनिक वेबसाइट (Hindi)
   ========================================================== */
.social-bar { position: fixed; left: 0; top: 40%; z-index: 1030; flex-direction: column; }
.social-bar a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; transition: width .2s; }
.social-bar a:hover { width: 52px; text-decoration: none; }
.sb-fb { background: #1877f2; } .sb-yt { background: #ff0000; } .sb-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); } .sb-x { background: #111; }
#topbar { background: var(--mpm-dark); color: #d1d5db; font-size: .88rem; padding: .35rem 0; }
#topbar a { color: #fff; }
.site-header { background: linear-gradient(100deg, var(--mpm-primary-dark), var(--mpm-primary) 55%, #e2352a); position: sticky; top: 0; z-index: 1020; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
.site-header .brand-logo { width: 100px; height: 100px; }
.site-header .brand-title { font-size: 1.35rem; }
.site-nav { background: rgba(0, 0, 0, .18); }
.site-nav .navbar-nav { gap: .1rem; }

.ticker { display: flex; align-items: stretch; overflow: hidden; font-size: .95rem; }
.ticker-label { flex: 0 0 auto; padding: .35rem .9rem; font-weight: 600; color: #fff; background: var(--mpm-primary); white-space: nowrap; }
.ticker-thought { background: #ffe3d6; }
.ticker-highlight { background: #fff; border-bottom: 1px solid var(--mpm-border); }
.ticker-highlight .ticker-label { background: var(--mpm-dark); }
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-move { display: inline-flex; gap: 2.5rem; white-space: nowrap; padding: .35rem 0; animation: ticker 45s linear infinite; padding-left: 100%; }
.ticker-track:hover .ticker-move { animation-play-state: paused; }
.ticker-move span { display: inline-flex; align-items: center; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.content-wrap { padding-top: 1rem; padding-bottom: 1rem; }
.content-wrap > .row.content { margin-left: 0; margin-right: 0; }
#main { min-height: 30vh; }
.site-footer { background: var(--mpm-dark); color: #cbd5e1; margin-top: 2.5rem; }
.site-footer .footer-top { padding: 2.5rem 0 1.5rem; }
.site-footer h4 { color: #fff; font-size: 1.1rem; padding-bottom: .5rem; margin-bottom: 1rem; border-bottom: 3px solid var(--mpm-primary); display: inline-block; }
.site-footer a { color: #e5e7eb; }
.site-footer a:hover { color: var(--mpm-accent); }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: .25rem 0; }
.footer-links li::before { content: "\203A"; color: var(--mpm-accent); margin-right: .5rem; font-weight: 700; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: inline-flex; align-items: center; justify-content: center; }
.footer-bottom { background: #11141c; padding: .9rem 0; }

/* सामग्री घटक */
.box { background: #fff; border-radius: var(--mpm-radius); box-shadow: var(--mpm-shadow); border: 1px solid var(--mpm-border); overflow: hidden; }
.box-title { background: linear-gradient(90deg, var(--mpm-primary), #e2352a); color: #fff; padding: .6rem 1rem; font-weight: 600; font-size: 1.05rem; margin: 0; }
.box-title a { color: #fff; }
.box-body { padding: 1rem; }
.list-links { list-style: none; padding: 0; margin: 0; }
.list-links li { padding: .55rem .2rem; border-bottom: 1px dashed var(--mpm-border); display: flex; gap: .6rem; align-items: flex-start; }
.list-links li:last-child { border-bottom: 0; }
.list-links li::before { content: "\F285"; font-family: "bootstrap-icons"; color: var(--mpm-primary); font-size: .8rem; margin-top: .25rem; }
.list-links .date { font-size: .78rem; color: var(--mpm-muted); white-space: nowrap; }
.notice-scroll { max-height: 360px; overflow-y: auto; }

.person-card { background: #fff; border-radius: 16px; box-shadow: var(--mpm-shadow); border: 1px solid var(--mpm-border); text-align: center; padding: 1.25rem 1rem; height: 100%; transition: transform .15s, box-shadow .15s; }
.person-card:hover { transform: translateY(-4px); box-shadow: var(--mpm-shadow-lg); }
.person-card img { width: 120px; height: 140px; object-fit: cover; border-radius: 12px; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); background: #f3f4f6; }
.person-card h5 { margin: .8rem 0 .2rem; font-size: 1.05rem; }
.person-card .role { color: var(--mpm-primary); font-size: .9rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--mpm-shadow); background: #fff; display: block; }
.gallery-item img { width: 100%; height: 170px; object-fit: cover; transition: transform .3s; display: block; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .4rem .6rem; color: #fff; font-size: .85rem; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }

.doc-item { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--mpm-border); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .6rem; color: var(--mpm-ink); transition: border-color .15s, box-shadow .15s; }
.doc-item:hover { border-color: #f3b9be; box-shadow: var(--mpm-shadow); text-decoration: none; color: var(--mpm-primary-dark); }
.doc-item i { font-size: 1.6rem; color: var(--mpm-primary); }

.video-wrap { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.hero-carousel .carousel-item img { height: 460px; object-fit: cover; }
@media (max-width: 767.98px) { .hero-carousel .carousel-item img { height: 220px; } .site-header .brand-title { font-size: 1rem; } .site-header .brand-logo { width: 50px; height: 50px; } }

.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--mpm-primary); color: #fff; display: none; align-items: center; justify-content: center; font-size: 1.6rem; z-index: 1040; box-shadow: var(--mpm-shadow-lg); }
.back-to-top.show { display: flex; }
.back-to-top:hover { color: #fff; background: var(--mpm-primary-dark); text-decoration: none; }

.empty-state { text-align: center; color: var(--mpm-muted); padding: 2rem 1rem; }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: .5rem; color: #cbd5e1; }

/* ---------- प्रिंट ---------- */
.print-only { display: none; }
@media print {
    .no-print, .panel-header, .panel-footer, .site-header, #topbar, .social-bar, .ticker, .site-footer, .back-to-top, .welcome-bar, .btn, .pagination { display: none !important; }
    .print-only { display: block !important; }
    body { background: #fff; font-size: 12pt; }
    .card, .table-wrap, .box, .card-soft { box-shadow: none !important; border: 0 !important; }
    .table-modern thead th { background: #eee !important; color: #000 !important; }
    a { color: #000; }
}
.print-page { background: #fff; max-width: 1000px; margin: 1rem auto; padding: 1.5rem; border-radius: 12px; box-shadow: var(--mpm-shadow); }
@media print { .print-page { margin: 0; padding: 0; max-width: none; } }
.print-head { text-align: center; border-bottom: 2px solid #000; padding-bottom: .5rem; margin-bottom: 1rem; }
.print-head h2 { font-size: 1.4rem; margin: 0; }

/* पुराना KrutiDev फ़ॉन्ट – डेटाबेस में कुछ नाम/शीर्षक KrutiDev एन्कोडिंग में हैं (class="hindi") */
@font-face {
    font-family: 'KrutiDev010';
    src: url('../font/k010-KrutiDev010_Webfont.woff') format('woff'), url('../font/k010-KrutiDev010_Webfont.ttf') format('truetype'), url('../font/k101.ttf') format('truetype');
    font-display: swap;
}
.hindi { font-family: 'KrutiDev010', Mangal, "Hind", sans-serif; font-size: 1.15em; }

/* AOS fade-left/right से मोबाइल पर साइड-स्क्रॉल रोकें */
html, body { overflow-x: clip; }
