/* =============================================
   ABDM Jharkhand - Main Stylesheet
   ============================================= */

/* CSS Variables for Theme */
:root {
    --primary-color: #0066cc;
    --secondary-color: #ff6b35;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

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

/* =============================================
   TOP UTILITY BAR
   ============================================= */
.topbar {
    background: #003580;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.topbar-left span, .topbar-right span { opacity: 0.85; }
.topbar-sep { opacity: 0.35; }
.topbar a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.topbar a:hover { color: #fff; }

/* =============================================
   MAIN HEADER
   ============================================= */
.header {
    background: linear-gradient(135deg, #0055b3 0%, #0066cc 50%, #0077e6 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.20);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: box-shadow 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.25);
}
.header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ff6b35, #ffd700);
    opacity: 0.8;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 16px;
}

/* Logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-wrap::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
}
.logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.20));
    transition: transform 0.3s ease;
}
.logo-section:hover .logo { transform: scale(1.05) rotate(-2deg); }
.site-title h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.1;
    margin-bottom: 2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.site-title h1 span { color: #ffd700; }
.site-title > p {
    font-size: 12px;
    opacity: 0.88;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}
.site-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-gov, .badge-digital {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-gov {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.30);
}
.badge-digital { background: #ffd700; color: #003580; }

/* Desktop Nav */
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}
.main-nav ul li a {
    color: rgba(255,255,255,0.90);
    text-decoration: none;
    padding: 9px 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius: 8px;
    transition: background 0.22s, color 0.22s, transform 0.2s;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    position: relative;
    text-align: center;
    white-space: nowrap;
}
.main-nav ul li a i {
    font-size: 15px;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateY(-1px);
}
.main-nav ul li a:hover i,
.main-nav ul li a.active i { opacity: 1; transform: scale(1.1); }
.main-nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 3px; left: 50%;
    transform: translateX(-50%);
    width: 18px; height: 2px;
    background: #ffd700;
    border-radius: 2px;
}
.main-nav ul li a.active { background: rgba(255,215,0,0.15); }
.main-nav ul li a.nav-cta {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: 10px;
    padding: 9px 14px;
    color: #fff;
}
.main-nav ul li a.nav-cta:hover {
    background: #ffd700;
    border-color: #ffd700;
    color: #003580;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,215,0,0.30);
}
.main-nav ul li a.nav-cta.active { background: #ffd700; border-color: #ffd700; color: #003580; }
.nav-dot {
    position: absolute;
    top: 6px; right: 8px;
    width: 7px; height: 7px;
    background: #ff4444;
    border-radius: 50%;
    border: 1.5px solid #0066cc;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

/* Hamburger */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    padding: 0;
}
.mobile-menu-toggle:hover { background: rgba(255,255,255,0.25); }
.hamburger-bar {
    display: block;
    width: 22px; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}
.mobile-menu-toggle.open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.open .hamburger-bar:nth-child(2) { opacity: 0; width: 0; }
.mobile-menu-toggle.open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Backdrop */
.mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1040;
    backdrop-filter: blur(2px);
}
.mobile-backdrop.visible { display: block; animation: fadeInBd 0.25s ease; }
@keyframes fadeInBd { from { opacity: 0; } to { opacity: 1; } }

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 300px; max-width: 90vw;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.18);
    overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: linear-gradient(135deg, #0055b3, #0077e6);
    color: #fff;
    flex-shrink: 0;
}
.drawer-brand { display: flex; align-items: center; gap: 12px; }
.drawer-logo { width: 44px; height: 44px; object-fit: contain; }
.drawer-brand strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.drawer-brand small { font-size: 10px; opacity: 0.80; }
.drawer-close {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.15);
    border: none; border-radius: 8px;
    color: #fff; font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.drawer-close:hover { background: rgba(255,255,255,0.30); }
.drawer-nav { flex: 1; padding: 10px 0; }
.drawer-nav ul { list-style: none; }
.drawer-nav ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    color: #1e293b;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.drawer-nav ul li a:hover,
.drawer-nav ul li a.active {
    background: #eff6ff;
    border-left-color: #0066cc;
    color: #0066cc;
}
.drawer-icon {
    width: 34px; height: 34px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #0066cc;
    flex-shrink: 0;
    transition: background 0.2s;
}
.drawer-nav ul li a:hover .drawer-icon,
.drawer-nav ul li a.active .drawer-icon { background: #dbeafe; }
.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 10px;
    flex-shrink: 0;
}
.drawer-ext-link {
    display: flex; align-items: center; gap: 8px;
    color: #0066cc; text-decoration: none;
    font-size: 13px; font-weight: 500;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 8px;
    transition: background 0.2s;
}
.drawer-ext-link:hover { background: #dbeafe; }

/* Hero Section */
.hero-section {
    padding: 30px 0;
    background-color: var(--bg-light);
}

.hero-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Slider Container (80%) */
.slider-container {
    flex: 1 1 70%;
    position: relative;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slider {
    position: relative;
    width: 100%;
    height: 400px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 20px;
    transition: var(--transition);
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

/* Leadership Scroll (20%) */
.leadership-scroll {
    flex: 1 1 25%;
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.leadership-scroll h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 20px;
}

.leadership-wrapper {
    height: 340px;
    overflow: hidden;
}

.leadership-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: scroll-up 20s linear infinite;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.leadership-list:hover {
    animation-play-state: paused;
}

.leader-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: var(--transition);
}

.leader-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.leader-image img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.leader-info h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.leader-info p {
    font-size: 12px;
    color: var(--text-light);
}

/* Section Styles */
.about-section,
.services-section,
.stats-section,
.info-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.header-line {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 15px;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
}

/* Card Hover Effect */
.card-hover {
    transition: var(--transition);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* About Section */
.about-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.highlight-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.highlight-item i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.highlight-item h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.highlight-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* Info Section (Notifications & News) */
.info-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.card-header h3 {
    font-size: 22px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--primary-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.view-all:hover {
    gap: 10px;
}

.scroll-container {
    height: 300px;
    overflow: hidden;
}

.scroll-content {
    animation: scroll-news 15s linear infinite;
}

@keyframes scroll-news {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.scroll-content:hover {
    animation-play-state: paused;
}

.notification-item,
.news-item {
    padding: 15px;
    border-bottom: 1px solid var(--bg-light);
    transition: var(--transition);
}

.notification-item:hover,
.news-item:hover {
    background: var(--bg-light);
    padding-left: 20px;
}

.notification-link,
.news-link {
    color: var(--text-dark);
    text-decoration: none;
    display: block;
}

.notification-link:hover,
.news-link:hover {
    color: var(--primary-color);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0088ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 36px;
    color: var(--white);
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.service-link:hover {
    gap: 10px;
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), #0088ff);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column p {
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-column ul li a:hover {
    opacity: 1;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.contact-list li i {
    margin-top: 5px;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 10px;
    opacity: 0.7;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
    padding: 0 5px;
}

.footer-links a:hover {
    opacity: 1;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #0088ff;
    transform: translateY(-5px);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .hero-wrapper { flex-direction: column; }
    .slider-container, .leadership-scroll { flex: 1 1 100%; }
    .main-nav ul li a { padding: 8px 10px; font-size: 10.5px; }
}

@media (max-width: 900px) {
    .main-nav { display: none !important; }
    .mobile-menu-toggle { display: flex; }
    .topbar-right { display: none; }
}

@media (max-width: 768px) {
    .topbar-inner { justify-content: center; }
    .section-header h2 { font-size: 28px; }
    .services-grid, .stats-grid { grid-template-columns: 1fr; }
    .slider { height: 250px; }
    .slider-btn { padding: 10px 15px; font-size: 16px; }
    .logo { width: 52px; height: 52px; }
    .site-title h1 { font-size: 18px; }
    .site-badges { display: none; }
}

@media (max-width: 480px) {
    .topbar { display: none; }
    .site-title h1 { font-size: 16px; }
    .site-title > p { font-size: 10px; }
    .logo { width: 44px; height: 44px; }
    .section-header h2 { font-size: 24px; }
    .scroll-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 16px; }
}
