/* ==========================================================================
   DIET HATTA - District Institute of Education and Training
   Modern Government Design System & Stylesheet (2026 Edition)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens & CSS Custom Properties --- */
:root {
    /* Primary Color Palette (Deep Navy & Imperial Blues) */
    --primary: #0F2756;
    --primary-light: #1E3A8A;
    --primary-dark: #091838;
    --primary-accent: #2563EB;
    --primary-subtle: #EFF6FF;

    /* National Accents */
    --accent-saffron: #F59E0B;
    --accent-saffron-dark: #D97706;
    --accent-saffron-subtle: #FEF3C7;
    --accent-green: #10B981;
    --accent-green-dark: #059669;
    --accent-green-subtle: #ECFDF5;

    /* Neutrals & Slate Tones */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-surface: #F1F5F9;
    --border-color: #E2E8F0;
    --border-focus: #93C5FD;
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-subtle: #94A3B8;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #0F2756 0%, #1E3A8A 60%, #2563EB 100%);
    --grad-header: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    --grad-saffron: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --grad-card: linear-gradient(180deg, #FFFFFF 0%, #FAFCFF 100%);
    --grad-footer: linear-gradient(180deg, #0B192C 0%, #060E18 100%);

    /* Shadows & Elevation */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 16px -2px rgba(15, 39, 86, 0.08);
    --shadow-lg: 0 12px 28px -4px rgba(15, 39, 86, 0.12);
    --shadow-hover: 0 20px 35px -6px rgba(15, 39, 86, 0.16);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 9999px;

    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Global Reset & Typography --- */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-main);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* --- Accessibility Top Bar --- */
.accessibility-bar {
    background-color: #0A162D;
    color: #CBD5E1;
    font-size: 12.5px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.accessibility-bar a {
    color: #CBD5E1;
    text-decoration: none;
    transition: var(--transition-fast);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.accessibility-bar a:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.12);
}

.gov-badge-text {
    font-weight: 500;
    letter-spacing: 0.02em;
}

.accessibility-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.font-size-adjust {
    display: inline-block;
    min-width: 26px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
    font-size: 11.5px;
    border-radius: var(--radius-sm);
}

/* --- Government Brand Header --- */
.govt-header {
    background: #FFFFFF;
    padding: 16px 0;
    border-bottom: 3px solid var(--accent-saffron);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.emblem-wrapper {
    position: relative;
    flex-shrink: 0;
}

.emblem-img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
    transition: var(--transition-fast);
}

.emblem-wrapper:hover .emblem-img {
    transform: scale(1.05);
}

.header-text h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: var(--primary);
    line-height: 1.25;
}

.header-text .sub-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent-saffron-dark);
    margin: 2px 0 0;
    letter-spacing: 0.02em;
}

.header-text .district-tag {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.header-meta-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.meta-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-subtle);
    color: var(--primary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.meta-info small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.meta-info span {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-heading);
}

/* --- Main Navigation Bar --- */
.navbar-custom {
    background: var(--grad-primary);
    padding: 0;
    box-shadow: 0 4px 20px rgba(15, 39, 86, 0.15);
    z-index: 990;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 16px 18px !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    position: relative;
    transition: var(--transition-fast);
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #FFFFFF !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-custom .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    background: var(--accent-saffron);
    border-radius: 3px 3px 0 0;
}

.navbar-custom .dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    margin-top: 6px;
    border-top: 3px solid var(--accent-saffron);
    background: #FFFFFF;
    animation: fadeInMenu 0.2s ease;
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-custom .dropdown-item {
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 20px;
    color: var(--text-heading);
    transition: var(--transition-fast);
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item.active {
    background: var(--primary-subtle);
    color: var(--primary-accent);
    padding-left: 24px;
}

.btn-nav-login {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-pill);
    padding: 6px 18px !important;
    font-size: 13px !important;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-nav-login:hover {
    background: #FFFFFF;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* --- Hero Slider --- */
.hero-slider-section {
    position: relative;
    background: var(--primary-dark);
}

.hero-slider-section .carousel-item {
    height: 480px;
    position: relative;
}

.hero-slider-section .carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.85);
}

.hero-slider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(9, 24, 56, 0.88) 0%, rgba(15, 39, 86, 0.6) 50%, rgba(9, 24, 56, 0.2) 100%);
    display: flex;
    align-items: center;
}

.hero-caption-modern {
    color: #FFFFFF;
    max-width: 680px;
    padding-left: 20px;
}

.hero-tag-badge {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.6);
    color: #FCD34D;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.hero-caption-modern h2 {
    font-size: 38px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.18;
    margin-bottom: 14px;
}

.hero-caption-modern p {
    font-size: 16px;
    color: #E2E8F0;
    margin-bottom: 22px;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    transition: var(--transition-fast);
}

.carousel-indicators .active {
    width: 28px;
    border-radius: var(--radius-pill);
    background-color: var(--accent-saffron);
}

/* --- Floating Key Stats Strip --- */
.stats-floating-section {
    position: relative;
    z-index: 10;
    margin-top: -50px;
}

.stats-card-modern {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-normal);
}

.stats-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-focus);
}

.stats-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stats-icon-primary {
    background: var(--primary-subtle);
    color: var(--primary-accent);
}

.stats-icon-saffron {
    background: var(--accent-saffron-subtle);
    color: var(--accent-saffron-dark);
}

.stats-icon-green {
    background: var(--accent-green-subtle);
    color: var(--accent-green-dark);
}

.stats-icon-indigo {
    background: #EEF2FF;
    color: #4F46E5;
}

.stats-card-modern h3 {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    color: var(--text-heading);
    line-height: 1.1;
}

.stats-card-modern p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
    font-weight: 500;
}

/* --- Notice Marquee Ticker --- */
.notice-ticker-wrap {
    background: #FFFFFF;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-label-badge {
    background: #EF4444;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 10px 18px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.ticker-content marquee {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading);
    padding: 10px 14px;
}

/* --- Modern Cards & Panels --- */
.modern-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-normal);
}

.modern-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #CBD5E1;
}

.card-header-primary {
    background: var(--grad-primary);
    color: #FFFFFF;
    padding: 16px 22px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-primary a.btn {
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
}

/* --- Notice Board List --- */
.notice-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.notice-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    display: flex;
    align-items: flex-start;
}

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

.notice-item:hover {
    background-color: var(--primary-subtle);
}

.notice-item a {
    color: var(--text-heading);
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.5;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-fast);
}

.notice-item a:hover {
    color: var(--primary-accent);
}

/* --- Principal Message Section --- */
.principal-card-modern {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
}

.principal-profile-header {
    background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
    padding: 30px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.principal-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 14px;
}

.principal-avatar {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #FFFFFF;
    box-shadow: 0 4px 14px rgba(15, 39, 86, 0.15);
}

.principal-ring-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    background: var(--accent-saffron);
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}

.principal-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
}

.principal-desig {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.principal-message-body {
    padding: 24px;
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
}

.quote-decor {
    font-size: 24px;
    color: var(--accent-saffron);
    opacity: 0.5;
    margin-right: 6px;
}

/* --- Institutional Wings / Feature Cards --- */
.feature-box {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-accent);
    opacity: 0;
    transition: var(--transition-fast);
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-focus);
}

.feature-box:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: var(--primary-subtle);
    color: var(--primary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
    transition: var(--transition-fast);
}

.feature-box:hover .feature-icon-wrapper {
    background: var(--primary);
    color: #FFFFFF;
}

.feature-box h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-heading);
}

.feature-box p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* --- Buttons & UI Elements --- */
.btn-primary-gov {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(15, 39, 86, 0.15);
}

.btn-primary-gov:hover {
    background: var(--primary-light);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 39, 86, 0.25);
}

.btn-saffron-gov {
    background: var(--accent-saffron);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-saffron-gov:hover {
    background: var(--accent-saffron-dark);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* --- Section Title Badge --- */
.section-badge-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-badge {
    background: var(--primary-subtle);
    color: var(--primary-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: var(--radius-pill);
    display: inline-block;
    margin-bottom: 10px;
}

.section-badge-title h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-badge-title p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Section Padding --- */
.section-padding {
    padding: 60px 0;
}

.bg-subtle-pattern {
    background-color: #F8FAFC;
    background-image: radial-gradient(#E2E8F0 1px, transparent 1px);
    background-size: 20px 20px;
}

/* --- Floating Back to Top Button --- */
#backToTopBtn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
    z-index: 999;
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#backToTopBtn:hover {
    background: var(--accent-saffron);
    transform: translateY(-4px);
}

/* --- Visitor Counter Box --- */
.visitor-counter-box {
    display: inline-block;
}

/* --- Modern Footer --- */
.footer-main {
    background: var(--grad-footer);
    color: #E2E8F0;
    padding: 65px 0 35px;
    border-top: 4px solid var(--accent-saffron);
}

.footer-brand h4 {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 13.5px;
    color: #94A3B8;
    line-height: 1.6;
}

.footer-heading {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--accent-saffron);
    border-radius: 2px;
}

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

.footer-links li {
    margin-bottom: 9px;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13.5px;
    color: #94A3B8;
}

.footer-contact-item i {
    color: var(--accent-saffron);
    margin-top: 3px;
}

.footer-bottom {
    background: #040910;
    color: #64748B;
    padding: 20px 0;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom a {
    color: #94A3B8;
}

.footer-bottom a:hover {
    color: #FFFFFF;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .header-text h1 { font-size: 17px; }
    .header-meta-box { display: none; }
    .hero-slider-section .carousel-item { height: 380px; }
    .hero-caption-modern h2 { font-size: 26px; }
    .hero-caption-modern p { font-size: 14px; }
    .stats-floating-section { margin-top: 20px; }
}

@media (max-width: 576px) {
    .emblem-img { width: 48px; height: 48px; }
    .header-text h1 { font-size: 15px; }
    .hero-slider-section .carousel-item { height: 320px; }
    .hero-caption-modern h2 { font-size: 22px; }
}