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

:root {
  --navy: #0D1B2A;
  --navy-mid: #1B2838;
  --navy-light: #243447;
  --navy-lighter: #2C3E50;
  --blue: #1A73E8;
  --blue-light: #4A90D9;
  --blue-dark: #155AB6;
  --blue-bg: rgba(26, 115, 232, 0.08);
  --green: #2E7D32;
  --green-bg: rgba(46, 125, 50, 0.08);
  --red: #C62828;
  --red-bg: rgba(198, 40, 40, 0.06);
  --orange: #E65100;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --gray-50: #F1F3F5;
  --gray-100: #E9ECEF;
  --gray-200: #DEE2E6;
  --gray-300: #CED4DA;
  --gray-500: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  --text: #212529;
  --text-secondary: #495057;
  --text-muted: #6C757D;
  --border: #DEE2E6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ========== CRISIS BANNER ========== */
.crisis-banner {
  background: var(--red);
  color: var(--white);
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1000;
  letter-spacing: 0.01em;
}
.crisis-banner a { color: #fff; text-decoration: underline; }

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 36px;
  z-index: 999;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--navy); background: var(--gray-50); }
.nav-links a.active { color: var(--navy); font-weight: 600; }
.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 9px 20px !important;
  border-radius: var(--radius) !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; }
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  align-items: center;
  gap: 60px;
}
.hero-text { flex: 1; max-width: 600px; }
.hero-text h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-text p {
  font-size: 17px;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.01em;
}
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--gray-100); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-mid); }

/* ========== SECTIONS ========== */
.section {
  padding: 72px 24px;
  max-width: 1140px;
  margin: 0 auto;
}
.section-bg { background: var(--off-white); }
.section-navy { background: var(--navy); color: var(--white); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 8px;
}
.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ========== CARDS ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
}
.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}
.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
  transition: var(--transition);
}
.card-link:hover { gap: 8px; }

/* ========== STATS BAR ========== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--navy);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stat-item {
  text-align: center;
  padding: 32px 20px;
  color: var(--white);
  border-right: 1px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-right: none; }
.stat-number { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 4px; }

/* ========== RESOURCE PAGE ========== */
.resource-section { margin-bottom: 48px; scroll-margin-top: 140px; }
.resource-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}
.resource-section > p { color: var(--text-secondary); margin-bottom: 20px; max-width: 680px; }
.resource-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 10px;
  transition: var(--transition);
}
.resource-item:hover { border-color: var(--blue); }
.resource-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.resource-item p { font-size: 14px; color: var(--text-secondary); }
.resource-item.alert {
  border-left: 4px solid var(--red);
  background: var(--red-bg);
}

/* ========== TIPS ========== */
.tip-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}
.tip-card:hover { box-shadow: var(--shadow-md); }
.tip-number {
  width: 32px; height: 32px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}
.tip-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.tip-card p { font-size: 14px; color: var(--text-secondary); }

/* ========== SIGNS ========== */
.signs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sign-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}
.sign-card:hover { border-color: var(--blue); }
.sign-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--navy); }
.sign-card p { font-size: 13px; color: var(--text-secondary); }

/* ========== IMAGE FEATURE BLOCKS ========== */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}
.feature-block.reverse { direction: rtl; }
.feature-block.reverse > * { direction: ltr; }
.feature-block img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.feature-text h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.feature-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ========== CHAT ========== */
.chat-container {
  max-width: 760px;
  margin: 0 auto;
  height: 65vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.chat-header {
  padding: 16px 24px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-status {
  width: 10px; height: 10px;
  background: #4CAF50;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.chat-header-text h3 { font-size: 15px; font-weight: 600; }
.chat-header-text span { font-size: 12px; opacity: 0.6; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--gray-50);
}
.message {
  max-width: 78%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.65;
  animation: fadeUp 0.25s ease;
}
.message.bot {
  background: var(--white);
  color: var(--text);
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}
.message.user {
  background: var(--navy);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.message .msg-time { font-size: 11px; opacity: 0.5; margin-top: 6px; display: block; }
.message.system {
  background: rgba(26,115,232,0.06);
  border: 1px solid rgba(26,115,232,0.15);
  color: var(--text);
  align-self: center;
  max-width: 90%;
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
}
.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: var(--white);
}
.chat-input-area input {
  flex: 1;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.chat-input-area input:focus { border-color: var(--blue); background: var(--white); }
.chat-input-area button {
  padding: 12px 24px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.chat-input-area button:hover { background: var(--navy-light); }

/* ========== ADMIN ========== */
.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 64px);
  overflow: hidden;
}
.admin-sidebar {
  background: var(--gray-50);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.admin-sidebar h3 {
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
.convo-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: var(--transition);
}
.convo-item:hover, .convo-item.active { background: rgba(26,115,232,0.05); }
.convo-item.active { border-left: 3px solid var(--blue); }
.convo-item .name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.convo-item .preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-item .time { font-size: 11px; color: var(--text-muted); float: right; }
.convo-item .unread { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 50px; float: right; }
.admin-chat { display: flex; flex-direction: column; height: 100%; }
.admin-chat-header { padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--white); display: flex; justify-content: space-between; align-items: center; }
.admin-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; background: var(--gray-50); }
.admin-input { padding: 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; background: var(--white); }
.admin-input input { flex: 1; background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; font-family: inherit; outline: none; }
.admin-input input:focus { border-color: var(--blue); }
.admin-input button { padding: 12px 24px; background: var(--navy); color: #fff; border: none; border-radius: var(--radius); font-weight: 600; cursor: pointer; font-family: inherit; }
.admin-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }
.admin-login { max-width: 380px; margin: 80px auto; padding: 36px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; box-shadow: var(--shadow-md); }
.admin-login h2 { font-size: 22px; margin-bottom: 8px; color: var(--navy); }
.admin-login input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; font-family: inherit; font-size: 14px; outline: none; }
.admin-login input:focus { border-color: var(--blue); }

/* ========== ABOUT ========== */
.about-hero { text-align: center; padding: 64px 24px 32px; background: var(--off-white); border-bottom: 1px solid var(--border); }
.about-story { max-width: 700px; margin: 0 auto; padding: 0 24px; }
.about-story p { font-size: 16px; color: var(--text-secondary); line-height: 1.9; margin-bottom: 20px; }
.about-story .highlight { background: var(--blue-bg); border-left: 4px solid var(--navy); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; font-style: italic; color: var(--text); font-size: 16px; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 36px; }
.value-card { text-align: center; padding: 28px 20px; background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--border); }
.value-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.value-card p { font-size: 13px; color: var(--text-secondary); }

/* ========== PAGE HEADER ========== */
.page-header { text-align: center; padding: 56px 24px 40px; background: var(--navy); color: var(--white); }
.page-header h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.page-header p { font-size: 16px; opacity: 0.75; max-width: 520px; margin: 0 auto; }

/* ========== FOOTER ========== */
.footer { border-top: 1px solid var(--border); padding: 48px 24px 24px; background: var(--navy); color: var(--white); }
.footer-inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { font-size: 14px; opacity: 0.6; margin-top: 12px; max-width: 260px; line-height: 1.6; }
.footer h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; opacity: 0.5; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 6px; }
.footer ul a { color: rgba(255,255,255,0.7); font-size: 14px; transition: var(--transition); }
.footer ul a:hover { color: var(--white); }
.footer-bottom { max-width: 1140px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.4); }

.emergency-note {
  background: var(--red-bg);
  border: 1px solid rgba(198,40,40,0.15);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--red);
  margin: 24px auto;
  max-width: 1140px;
  text-align: center;
}

/* ========== CHECKLIST ========== */
.checklist { display: flex; flex-direction: column; gap: 12px; }
.checklist label { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; padding: 8px 0; }
.checklist input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }

/* ========== ANIMATIONS ========== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 12px; z-index: 998; }
  .mobile-toggle { display: block; }
  .hero-content { padding: 48px 24px; flex-direction: column; gap: 32px; }
  .hero-text h1 { font-size: 28px; }
  .feature-block, .feature-block.reverse { grid-template-columns: 1fr; gap: 24px; direction: ltr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 48px 20px; }
  .admin-layout { grid-template-columns: 1fr; height: auto; }
  .admin-sidebar { max-height: 180px; }
  .card-grid { grid-template-columns: 1fr; }
}
