/* --- CSS Branding Variables (Extracted from Logo) --- */
:root {
  --primary: #2E946A; /* Vibrant Green */
  --primary-dark: #247554;
  --secondary: #1A92D4; /* Deep Sky Blue */
  --secondary-dark: #1576AB;
  --accent: #F97316; /* Energy Orange */
  --bg-main: #FDFDFD;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #475569;
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 35px 60px -15px rgb(0 0 0 / 0.2);
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
}

/* --- Dark Theme Variables --- */
body.dark-theme {
  --bg-main: #0B1120;
  --bg-card: #1E293B;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --glass: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.05);
}

body.dark-theme .admin-main {
  background: var(--bg-main);
}
body.dark-theme .data-card,
body.dark-theme .admin-stat-card,
body.dark-theme .auth-card {
  background: var(--bg-card);
  border-color: rgba(255,255,255,0.05);
}
body.dark-theme .admin-stat-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
body.dark-theme .admin-header h1,
body.dark-theme .admin-stat-card .value,
body.dark-theme h3 {
  color: var(--text-main);
}
body.dark-theme input, 
body.dark-theme select,
body.dark-theme textarea {
  background: #0F172A;
  color: white;
  border-color: #334155;
}

body.dark-theme .data-card p,
body.dark-theme .data-card small,
body.dark-theme .admin-header p {
  color: var(--text-muted);
}

body.dark-theme #gallery-manager .gm-section-title {
  color: var(--text-main);
}

body.dark-theme .gm-loading {
  color: var(--text-muted);
}

/* --- Global Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar (Glassmorphism) — public portal only, not admin sidebar --- */
body > nav:not(.sidebar-links):not(.sidebar-nav-scroll):not(.breadcrumb) {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

body > nav:not(.sidebar-links):not(.sidebar-nav-scroll):not(.breadcrumb).scrolled {
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

/* Admin sidebar nav must not inherit public navbar layout */
.admin-layout nav.sidebar-links,
.admin-layout nav.sidebar-nav-scroll {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  padding: 12px 0;
  margin: 0;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}

nav.breadcrumb {
  position: static;
  width: auto;
  padding: 0;
  margin: 0 0 1.25rem;
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  z-index: auto;
}

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

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

.logo img {
  height: 40px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

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

.btn-login {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white !important;
  font-weight: 700;
  box-shadow: 0 8px 16px -4px rgba(0, 168, 107, 0.25);
}



/* --- Hero Section --- */
.hero {
  padding-top: 180px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 168, 107, 0.1) 0%, transparent 70%);
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 86, 210, 0.1) 0%, transparent 70%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: #0F172A;
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-btns {
  display: flex;
  gap: 16px;
}

.btn-primary {
  padding: 16px 36px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 20px -5px rgba(0, 168, 107, 0.3);
}

.btn-secondary {
  padding: 16px 36px;
  background: white;
  color: var(--text-main);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-badge {
  position: absolute;
  bottom: 40px;
  left: -20px;
  background: white;
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* --- Stats Section --- */
.stats {
  padding: 80px 0;
  background: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- Section Titles --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 12px auto 0;
}

/* --- Impact Section --- */
.impact {
  padding: 100px 0;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.impact-card {
  background: white;
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid #F1F5F9;
}

.impact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.impact-icon {
  width: 64px;
  height: 64px;
  background: rgba(0, 168, 107, 0.1);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.impact-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* --- Gallery Section --- */
.gallery {
  padding: 100px 0;
  background: #F1F5F9;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 300px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: white;
  font-size: 1.25rem;
}

.gallery-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

/* --- Powerful Footer (public site only — not admin dashboard) --- */
footer:not(.admin-page-footer) {
  background: #020617;
  color: white;
  padding: 100px 0 40px;
  position: relative;
  overflow: hidden;
}

footer:not(.admin-page-footer)::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}

.footer-about .logo-text {
  font-size: 1.8rem;
  margin-bottom: 24px;
  display: block;
}

.footer-about p {
  color: #94A3B8;
  line-height: 1.8;
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #F8FAFC;
}

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

.footer-links a {
  color: #94A3B8;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-links a i {
  font-size: 0.8rem;
  opacity: 0.5;
}

.portal-badge {
  background: var(--secondary);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 8px;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.social-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}

.social-circle:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
  border-color: var(--primary);
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748B;
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  gap: 24px;
}

/* --- Legal pages (Privacy, Terms) --- */
.legal-page {
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
}

.legal-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.legal-page-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.95rem;
}

.legal-page-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.legal-page-back {
  color: var(--primary-green, #2E946A);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-page-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.legal-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.legal-card h1 {
  font-size: 1.85rem;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.legal-updated {
  color: #64748b;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.legal-intro {
  background: #f1f5f9;
  border-left: 4px solid var(--primary-green, #2E946A);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 28px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.legal-card section {
  margin-bottom: 24px;
}

.legal-card h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: #1e4a6d;
}

.legal-card p,
.legal-card li {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #334155;
}

.legal-card ul {
  margin: 8px 0 0 1.25rem;
}

.legal-card li {
  margin-bottom: 6px;
}

.legal-card a {
  color: var(--primary-green, #2E946A);
  font-weight: 600;
}

.legal-footer-links {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .legal-card {
    padding: 24px 18px;
  }
  .legal-page-brand span {
    max-width: 180px;
    line-height: 1.3;
  }
}

/* --- Auth (Login) Styles --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: white;
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 2rem;
  letter-spacing: -1px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.1);
}

.btn-full {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 12px;
}

/* --- Admin Dashboard Styles --- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 280px;
  background: #1E3A5F;
  color: white;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-logo {
  flex-shrink: 0;
  padding: 24px 20px 16px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #1E3A5F;
}

.sidebar-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}

.sidebar-brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #fff;
  flex: 1;
}

.sidebar-close {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 1.35rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.sidebar-close:hover {
  color: #fff;
}

.sidebar-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #1E3A5F;
  overflow-y: auto;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-body::-webkit-scrollbar {
  display: none;
}

.sidebar-nav-scroll {
  flex: 0 0 auto;
  overflow: visible;
  padding: 12px 0;
  background: transparent;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  margin: 4px 16px;
  border-radius: 8px;
  color: #CBD5E1;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  box-sizing: border-box;
  max-width: calc(100% - 8px);
}

.sidebar-links a.active,
.sidebar-links a:hover {
  color: white;
  background: #2563EB;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.sidebar-links a.active {
  border-left: none;
}

.sidebar-logout {
  color: #f87171 !important;
  margin-top: 8px !important;
}

.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  box-shadow: none !important;
}

.admin-mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-theme-toggle {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.admin-header-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

.admin-header-theme-toggle--desktop {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  background: #f1f5f9;
  color: var(--text-main);
}

body.dark-theme .admin-header-theme-toggle--desktop {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

@media (max-width: 768px) {
  .admin-header-theme-toggle--desktop,
  .admin-global-bar {
    display: none;
  }

  .admin-mobile-header-actions .admin-notifications-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1rem;
  }

  .admin-mobile-header-actions .admin-notifications-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: transparent;
    color: #fff;
  }

  .admin-mobile-header-actions .admin-notifications-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    width: auto;
    top: 72px;
    z-index: 1102;
  }
}

.admin-global-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  padding: 8px 0;
  min-height: 48px;
}

/* Public admin — compact notification bell */
.admin-notifications-wrap {
  position: relative;
}

.admin-notifications-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-card, #fff);
  color: var(--text-main, #0f172a);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s;
}

.admin-notifications-btn:hover {
  background: var(--bg-hover, #f1f5f9);
  border-color: var(--primary-green, #2E946A);
  color: var(--primary-green, #2E946A);
}

.admin-notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.admin-notifications-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 88vw);
  max-height: 360px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 1200;
  overflow: hidden;
}

.admin-notifications-panel.open {
  display: flex;
  flex-direction: column;
}

.admin-notifications-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 0.82rem;
}

.admin-notifications-mark-all {
  border: none;
  background: none;
  color: var(--primary-green, #2E946A);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.admin-notifications-list {
  overflow-y: auto;
  max-height: 300px;
  padding: 6px;
}

.admin-notifications-empty {
  text-align: center;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
  padding: 20px 10px;
  margin: 0;
}

.admin-notification-item {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.admin-notification-item:hover {
  background: var(--bg-hover, #f8fafc);
}

.admin-notification-item.unread {
  background: rgba(46, 148, 106, 0.08);
  border-color: rgba(46, 148, 106, 0.18);
}

.admin-notification-item .title {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-main, #0f172a);
  margin-bottom: 3px;
  line-height: 1.35;
}

.admin-notification-item .body {
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-notification-item .time {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
}

body.dark-theme .admin-notifications-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

body.dark-theme .admin-notifications-panel {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .admin-notification-item .title {
  color: #f1f5f9;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-visit-site {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #60a5fa !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.sidebar-visit-site:hover {
  background: rgba(96, 165, 250, 0.12);
}

.sidebar-dev-panel {
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.sidebar-dev-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 500;
}

.sidebar-dev-social {
  display: flex;
  gap: 10px;
}

.sidebar-dev-social a {
  color: #fff;
  opacity: 0.35;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.2s;
}

.sidebar-dev-social a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.admin-main {
  flex: 1;
  min-width: 0;
  background: #F8FAFC;
  padding: 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-page-footer {
  margin-top: auto;
  position: relative;
  padding: 2rem 1rem 1rem;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  border-top: none;
  flex-shrink: 0;
}

.admin-page-footer::before {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

body.dark-theme .admin-page-footer {
  border-top-color: transparent;
}

.admin-page-footer p {
  margin: 0.75rem 0 0;
  max-width: 100%;
  padding: 0 0.5rem;
}

.admin-page-footer b {
  color: var(--secondary);
  font-weight: 700;
}

.admin-page-footer .footer-link {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
}

.admin-page-footer .footer-link:hover {
  text-decoration: underline;
  color: var(--secondary-dark);
}

.sidebar-cross-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #34d399 !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 10px 12px;
  margin: 0 16px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.sidebar-cross-panel:hover {
  background: rgba(52, 211, 153, 0.12);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.admin-header-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 1.25rem;
  padding-bottom: 0;
  line-height: 1.5;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  margin-top: 0;
}

.admin-stats-grid--5 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

@media (min-width: 1200px) {
  .admin-stats-grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

.admin-stat-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: 1px solid #E2E8F0;
  transition: all 0.3s ease;
  position: relative;
}

.admin-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  border-color: #2563EB;
}

.stat-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-icon--visitors { background: rgba(37, 99, 235, 0.12); color: #2563EB; }
.stat-icon--total-visitors { background: rgba(26, 146, 212, 0.12); color: #1A92D4; }
.stat-icon--users { background: rgba(46, 148, 106, 0.12); color: #2E946A; }
.stat-icon--messages { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }
.stat-icon--unread { background: rgba(234, 88, 12, 0.12); color: #EA580C; }
.stat-icon--articles { background: rgba(37, 99, 235, 0.12); color: #2563EB; }
.stat-icon--published { background: rgba(46, 148, 106, 0.12); color: #2E946A; }
.stat-icon--drafts { background: rgba(100, 116, 139, 0.15); color: #64748B; }
.stat-icon--views { background: rgba(26, 146, 212, 0.12); color: #1A92D4; }
.stat-icon--authors { background: rgba(217, 119, 6, 0.12); color: #D97706; }

.admin-stat-card .label {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-stat-card .value {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 0;
  display: block;
  line-height: 1.2;
}

.stat-badge-live {
  display: inline-block;
  margin-top: 8px;
  color: #10B981;
  font-size: 0.8rem;
  font-weight: 700;
}

.data-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

/* --- Gallery Manager --- */
.gm-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gm-section-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.gallery-manager-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 8px;
}

.gm-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 12px;
}

.gm-section-block {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--bg-card, #fff);
}

.gm-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.gm-section-head strong {
  font-size: 1rem;
  color: var(--text-main);
}

.gm-section-cat {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.gm-text-btn {
  border: 1px solid var(--glass-border, #e2e8f0);
  background: var(--bg-main, #f8fafc);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.gm-text-btn:hover {
  border-color: var(--primary-green, #2E946A);
  background: rgba(46, 148, 106, 0.08);
}

/* Admin modals — scrollable but no visible scrollbar */
.admin-modal-no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-modal-no-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.gm-slides-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

/* Homepage videos — 3 cards in one row (same card style as gallery pictures) */
.gm-slides-grid--videos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .gm-slides-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gm-slides-grid--videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .gm-slides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-slides-grid--videos { grid-template-columns: 1fr; }
}

.gm-slide-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--border-color, #e2e8f0);
  background: #0f172a;
}

.gm-slide-card--custom {
  border-color: var(--primary-green, #2E946A);
}

.gm-slide-card img,
.gm-slide-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.gm-slide-label {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.gm-slide-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
}

.gm-slide-card--custom .gm-slide-badge {
  background: var(--primary-green, #2E946A);
  color: #fff;
}

.gm-slide-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
}

.gm-slide-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-green, #145f40);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: transform 0.2s;
}

.gm-slide-btn:hover:not(:disabled) {
  transform: scale(1.08);
}

.gm-slide-btn--danger {
  color: #dc2626;
}

.gm-slide-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gm-slide-text-preview {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 46px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gm-slide-text-preview--empty {
  font-weight: 500;
  font-style: italic;
  opacity: 0.85;
}

.gm-slide-text-flag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
}

.gm-text-preview {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-main, #f8fafc);
  border: 1px dashed var(--border-color, #e2e8f0);
  font-size: 0.82rem;
  line-height: 1.5;
}

.gm-text-preview-row {
  margin-bottom: 8px;
}

.gm-text-preview-row:last-child {
  margin-bottom: 0;
}

.gm-text-preview-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.gm-text-preview-value {
  color: var(--text-main);
  word-break: break-word;
}

.gm-text-preview--empty .gm-text-preview-value {
  color: var(--text-muted);
  font-style: italic;
}

.gm-loading {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.gm-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid var(--border-color, #e2e8f0);
}

.gm-card--custom {
  border-color: var(--primary-green, #2E946A);
}

.gm-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gm-card--editable:hover img {
  transform: scale(1.05);
}

.gm-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gm-card--editable:hover .gm-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.gm-hover-overlay--image-only {
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.gm-card--editable:hover .gm-label-bar--peek {
  opacity: 0;
}

.gm-caption-preview {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.gm-hover-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.gm-action-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--primary-green, #145f40);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gm-action-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

.gm-action-btn--danger {
  color: #dc2626;
}

.gm-label-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.gm-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gm-badge--custom {
  background: var(--primary-green, #2E946A);
}

.gm-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content h1 { font-size: 3rem; }
  .hero-content p { margin: 0 auto 40px; }
  .hero-btns { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .impact-grid, .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  
  /* Admin Dashboard Mobile */
  .admin-mobile-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #0F172A;
    color: white;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .admin-menu-toggle { font-size: 1.5rem; cursor: pointer; }
  .admin-layout { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .sidebar.active { left: 0; }
  .sidebar-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 20px 16px;
  }
  .sidebar-close { display: block !important; font-size: 1.5rem; cursor: pointer; color: rgba(255,255,255,0.7); }
  .sidebar-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .sidebar-body::-webkit-scrollbar { display: none; }
  .sidebar-nav-scroll { overflow: visible; }
  .sidebar-footer { margin-top: auto; }
  .sidebar-links a { padding: 12px 20px; margin: 4px 12px; font-size: 0.95rem; }
  .sidebar-footer { padding: 14px 16px 18px; }

  .admin-main { padding: 24px 16px; width: 100%; overflow-x: hidden; height: auto; overflow-y: visible; }
  .admin-header { flex-direction: column; gap: 16px; align-items: stretch; text-align: center; }
  .admin-header button { width: 100%; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Admin messages table — preview only in list */
.messages-preview-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  color: var(--text-muted);
}

.message-modal-panel {
  max-width: 720px !important;
  width: 92% !important;
}

/* Admin message modal — full text when opened */
.message-modal-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  margin: 8px 0 0;
  padding: 20px 22px;
  background: var(--bg-main);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  min-height: 80px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.message-modal-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.modal-close-btn,
.hs-modal-close,
button.modal-close-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border: none;
  border-radius: 50% !important;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.5rem;
  line-height: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  padding: 0;
  margin: 0;
  font-family: Arial, sans-serif;
  vertical-align: middle;
}

.modal-close-btn::before,
.hs-modal-close::before {
  content: none;
}

.modal-close-btn:hover,
.hs-modal-close:hover,
button.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg) scale(1.08);
}
