:root {
    --primary: #1a3a6b;
    --primary-light: #2d5aa0;
    --accent: #e8a317;
    --accent-text: #7a5804;
    --text: #1e293b;
    --text-muted: #475569;
    --on-primary-muted: #e2e8f0;
    --bg: #ffffff;
    --bg-light: #f1f5f9;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.cert-badge { font-size: 0.85rem; color: var(--accent-text); margin-top: 0.5rem; font-weight: 600; }
.site-header { background: var(--bg); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-top { background: var(--primary); color: white; font-size: 0.85rem; padding: 0.4rem 0; }
.header-top-inner { display: flex; gap: 2rem; flex-wrap: wrap; }
.header-main { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-icon { background: var(--primary); color: white; width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.logo strong { display: block; font-size: 1rem; line-height: 1.2; }
.logo small { color: var(--text-muted); font-size: 0.75rem; }

.main-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; align-items: center; }
.main-nav a { padding: 0.5rem 0.75rem; color: var(--text); font-size: 0.9rem; font-weight: 500; border-radius: var(--radius); text-decoration: none; }
.main-nav a:hover { background: var(--bg-light); color: var(--primary); text-decoration: none; }

.nav-dropdown { position: relative; }
.nav-dropdown-label { padding: 0.5rem 0.75rem; font-size: 0.9rem; font-weight: 500; color: var(--text); cursor: default; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 180px; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 200; flex-direction: column; }
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { border-radius: 0; white-space: nowrap; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero-carousel { position: relative; min-height: 480px; overflow: hidden; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out; pointer-events: none; }
.carousel-slide.active { opacity: 1; pointer-events: auto; z-index: 0; }
.carousel-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 8s ease; }
.carousel-slide.active .carousel-bg { transform: scale(1.05); }
.hero-default { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.carousel-content { position: relative; z-index: 2; padding: 6rem 1.5rem; color: white; text-align: center; min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.carousel-content h1 { font-size: 2.5rem; margin-bottom: 1rem; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.carousel-content p { font-size: 1.2rem; margin-bottom: 2rem; color: var(--on-primary-muted); max-width: 640px; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.carousel-dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 0.5rem; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; background: transparent; cursor: pointer; padding: 0; transition: background 0.3s; }
.carousel-dot.active { background: var(--accent); border-color: var(--accent); }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,0.15); border: none; color: white; font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; line-height: 1; }
.carousel-nav:hover { background: rgba(255,255,255,0.3); }
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: all 0.2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #122847; border-color: var(--accent); }
.btn-primary:hover { background: #d4920f; color: #0f2038; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* Sections */
.section { padding: 4rem 0; }
.bg-light { background: var(--bg-light); }
.section-title { font-size: 1.75rem; color: var(--primary); margin-bottom: 2rem; }
.page-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; padding: 3rem 0; }
.page-header h1 { font-size: 2rem; }
.page-header p { color: var(--on-primary-muted); margin-top: 0.5rem; }
.back-link { color: var(--on-primary-muted); font-size: 0.9rem; display: inline-block; margin-bottom: 1rem; text-decoration: underline; }
.back-link:hover { color: #ffffff; }

/* Quick Actions */
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.action-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; color: var(--text); text-decoration: none; transition: all 0.2s; box-shadow: var(--shadow); }
.action-card:hover { border-color: var(--primary-light); transform: translateY(-3px); text-decoration: none; box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.action-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
.action-card h3 { color: var(--primary); margin-bottom: 0.5rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.news-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.news-card-img { height: 180px; background-size: cover; background-position: center; background-color: var(--bg-light); }
.news-card-body { padding: 1.25rem; }
.news-card-body h3 { font-size: 1rem; margin: 0.5rem 0; }
.news-card-body h3 a { color: var(--text); }
.news-card-body p { color: var(--text-muted); font-size: 0.9rem; }

.badge { display: inline-block; background: var(--primary); color: white; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 20px; }

/* Two column */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.intro-text { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.8; }
.stats-card { background: var(--primary); color: white; border-radius: var(--radius); padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 2rem; }
.stat span { font-size: 0.85rem; color: var(--on-primary-muted); }

/* Events */
.event-list { display: flex; flex-direction: column; gap: 1rem; }
.event-item { display: flex; gap: 1.5rem; align-items: center; background: white; padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); }
.event-date { background: var(--primary); color: white; padding: 0.75rem 1rem; border-radius: var(--radius); text-align: center; min-width: 70px; }
.event-date strong { display: block; font-size: 1.5rem; line-height: 1; }
.event-date span { font-size: 0.8rem; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 2rem; }
.about-card { background: var(--bg-light); padding: 1.5rem; border-radius: var(--radius); border-left: 4px solid var(--accent); }
.about-card.full-width { grid-column: 1 / -1; }
.about-block { margin-bottom: 2rem; }
.content-page { max-width: 800px; }

/* Leadership */
.bearers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.bearer-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); }
.bearer-photo { width: 100px; height: 100px; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--bg-light); margin: 0 auto 1rem; }
.designation { color: var(--primary); font-weight: 600; }
.district { color: var(--text-muted); font-size: 0.9rem; }

/* Gallery */
.album-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.album-card:hover { text-decoration: none; transform: translateY(-2px); }
.album-cover { height: 200px; background-size: cover; background-position: center; position: relative; background-color: var(--bg-light); }
.image-count { position: absolute; bottom: 0.5rem; right: 0.5rem; background: rgba(0,0,0,0.7); color: white; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.8rem; }
.album-info { padding: 1rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gallery-item { cursor: pointer; border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; display: block; }
.gallery-item span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: white; padding: 0.5rem; font-size: 0.85rem; }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; border-radius: var(--radius); }
.video-thumb { height: 200px; background-size: cover; background-position: center; border-radius: var(--radius); position: relative; background-color: var(--bg-light); }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: white; background: rgba(0,0,0,0.4); border-radius: var(--radius); text-decoration: none; }
.video-card h3 { margin: 0.75rem 0 0.25rem; font-size: 1rem; }

/* Publications */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.pub-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.pub-cover { height: 160px; background-size: cover; background-position: center; position: relative; background-color: var(--bg-light); }
.pub-type { position: absolute; top: 0.5rem; left: 0.5rem; background: var(--accent); color: #122847; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.pub-info { padding: 1.25rem; }
.pub-info h3 { margin-bottom: 0.5rem; }

/* Forms */
.form-card { background: white; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-control { padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(45,90,160,0.15); }

.membership-tabs, .filter-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.membership-tabs button, .filter-tabs button { padding: 0.6rem 1.25rem; border: 1px solid var(--border); background: white; border-radius: var(--radius); cursor: pointer; font-size: 0.9rem; font-weight: 500; }
.membership-tabs button.active, .filter-tabs button.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.info-item { margin-bottom: 1.5rem; }
.info-item strong { display: block; color: var(--primary); margin-bottom: 0.25rem; }
.map-embed iframe, .map-placeholder { width: 100%; height: 250px; border: none; border-radius: var(--radius); background: var(--bg-light); }
.map-placeholder { display: flex; align-items: center; justify-content: center; }

/* Article */
.article-content img.article-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }
.page-header .article-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; font-size: 0.9rem; color: var(--on-primary-muted); }

/* Ads */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.ad-banner img { width: 100%; border-radius: var(--radius); }

/* Alerts */
.alert { padding: 1.5rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }

/* Footer */
.site-footer { background: var(--primary); color: white; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding: 3rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.footer-grid h4 { margin-bottom: 1rem; color: #f5d565; }
.footer-grid a { display: block; color: var(--on-primary-muted); margin-bottom: 0.4rem; font-size: 0.9rem; }
.footer-grid a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.25rem 0; text-align: center; font-size: 0.85rem; color: var(--on-primary-muted); }
.footer-bottom p { margin: 0.25rem 0; }

/* Services */
.service-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.service-card-link { color: inherit; text-decoration: none; display: block; }
.service-card-link:hover { text-decoration: none; }
.service-card-img { height: 180px; background-size: cover; background-position: center; position: relative; }
.service-card-body { padding: 1.25rem; }
.service-card-body h3 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.service-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.service-badge { position: absolute; top: 0.75rem; left: 0.75rem; background: var(--accent); color: #122847; font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; }

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.loading { text-align: center; padding: 4rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; flex-direction: column; padding: 1rem; box-shadow: var(--shadow); }
    .main-nav.open { display: flex; }
    .header-main { position: relative; flex-wrap: wrap; }
    .two-col, .contact-grid, .about-grid, .form-grid { grid-template-columns: 1fr; }
    .carousel-content h1 { font-size: 1.75rem; }
    .hero-carousel { min-height: 300px; }
    .header-top-inner { gap: 0.75rem; }
    .visitor-count { display: none; }
}

#blazor-error-ui { background: #ffffe0; bottom: 0; box-shadow: 0 -1px 5px rgba(0,0,0,0.2); display: none; left: 0; padding: 0.6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.footer-cookie-link,
.cookie-inline-link {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.footer-bottom .footer-cookie-link { color: #ffffff; }
.footer-bottom a { display: inline; margin-bottom: 0; }
.legal-content h2 { margin: 2rem 0 0.75rem; color: var(--primary); font-size: 1.25rem; }
.legal-content h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.legal-content ul { margin: 0.75rem 0 0.75rem 1.5rem; }
.legal-content li { margin-bottom: 0.35rem; }
.legal-content .cookie-inline-link { color: var(--primary-light); }
