/* ========================================= */
/* ========== GLOBAL STYLES (All Pages) ===== */
/* ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #f7f9fc;
  color: #1e1e1e;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ========== HEADER ========== */
header {
  background: linear-gradient(90deg, #1a2b4c, #243a64);
  color: #ffffff;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffcc70;
}

nav a.active {
  border-bottom: 2px solid #ffcc70;
  padding-bottom: 3px;
}

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, #1a2b4c, #324a78);
  padding: 4rem 0;
  text-align: center;
  color: #ffffff;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #dbe3f2;
}

.cta-button {
  display: inline-block;
  background-color: #ffcc70;
  color: #1e2a38;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #ffb347;
}

/* ========== FOOTER ========== */
footer {
  background-color: #1a2b4c;
  color: #e0e0e0;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.95rem;
}

footer a {
  color: #a0c0ff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  nav ul {
    justify-content: center;
    gap: 1rem;
  }

  .feature-boxes,
  .steps,
  .grid {
    flex-direction: column;
    align-items: center;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p,
  .trust-us ul {
    font-size: 1rem;
  }

  th,
  td {
    padding: 0.75rem;
  }
}

/* ========================================= */
/* ========== INDEX PAGE STYLES ============ */
/* ========================================= */
.features {
  padding: 4rem 0;
  background-color: #ffffff;
  text-align: center;
}

.features h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1e2a38;
}

.feature-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.feature {
  background-color: #f0f4fa;
  padding: 2rem;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.feature h4 {
  color: #233b6c;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature p {
  font-size: 0.95rem;
  color: #444;
}

.how-it-works {
  background-color: #f7f9fc;
  padding: 4rem 0;
  text-align: center;
}

.how-it-works h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1e2a38;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.step {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 10px;
  width: 260px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.trust-us {
  background-color: #eef2fb;
  padding: 4rem 0;
  text-align: center;
}

.trust-us h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.trust-us ul {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
  color: #2c3e50;
  line-height: 2.2rem;
}

.newsletter {
  background-color: #ffffff;
  padding: 4rem 0;
  text-align: center;
}

.newsletter h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.newsletter p {
  margin-bottom: 1.5rem;
}

.newsletter input[type="email"] {
  padding: 0.8rem;
  width: 250px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-right: 1rem;
}

.newsletter button {
  background-color: #4672e0;
  color: white;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.newsletter button:hover {
  background-color: #365bb5;
}

.testimonials {
  background-color: #f7f9fc;
  padding: 4rem 0;
  text-align: center;
}

.testimonials h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.testimonials blockquote {
  font-style: italic;
  background-color: #ffffff;
  padding: 1.5rem;
  border-left: 6px solid #ffcc70;
  margin: 1rem auto;
  max-width: 600px;
  border-radius: 8px;
  color: #333;
}

.testimonials footer {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

/* ========================================= */
/* ========== COMPARISONS PAGE STYLES ====== */
/* ========================================= */
.table-wrapper {
  overflow-x: auto;
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  min-width: 800px;
}

thead {
  background-color: #1a2b4c;
  color: white;
}

th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
  background-color: #f4f8ff;
}

th {
  font-weight: 600;
}

td:last-child {
  font-style: italic;
  color: #444;
}

/* ========================================= */
/* ========== GUIDES PAGE STYLES =========== */
/* ========================================= */

.guides {
  padding: 4rem 0;
  background-color: #ffffff;
}

.guides h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #1e2a38;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 0;
}

.guide-card {
  background-color: #f4f7fc;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.guide-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #1e2a38;
}

.guide-card p {
  margin-bottom: 1rem;
  color: #444;
}

.read-more-btn {
  background-color: #ffcc70;
  color: #1e2a38;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.read-more-btn:hover {
  background-color: #ffb347;
}

.more-content {
  display: none;
  font-size: 0.95rem;
  color: #333;
  margin-top: 0.5rem;
}

.more-content.show {
  display: block;
}

/* ========================================= */
/* ========== SAFETY PAGE STYLES =========== */
/* ========================================= */
.feature-box {
  background-color: #f4f7fc;
  border-left: 6px solid #4672e0;
  padding: 1.5rem;
  border-radius: 10px;
  width: 300px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box h4 {
  color: #1a2b4c;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-box p {
  color: #2f3e50;
  font-size: 0.95rem;
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
/* Safety grid: display horizontally for safety alerts */
.features .grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* ========================================= */
/* ========== TRUSTED APPS STYLES ========== */
/* ========================================= */
.features.trusted {
  background-color: #f9fcff;
}

.feature-box {
  background-color: #ecf4ff;
  border-left: 5px solid #2980b9;
  padding: 1.8rem;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box h4 {
  color: #1f3b6d;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.feature-box p {
  font-size: 0.95rem;
  color: #2c3e50;
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* ========================================= */
/* ========== ABOUT PAGE STYLES ============ */
/* ========================================= */
.features {
  padding: 4rem 0;
  background-color: #f9fbff;
  color: #1f2d40;
  text-align: left;
}

.features h3 {
  font-size: 1.8rem;
  margin-top: 2rem;
  color: #2c3e50;
  border-left: 6px solid #4672e0;
  padding-left: 0.75rem;
}

.features p {
  font-size: 1rem;
  margin: 1rem 0 2rem 0;
  line-height: 1.6;
  color: #2f3e50;
  max-width: 800px;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: #d9534f;
}

.form-message.success {
  color: #5cb85c;
}

/* Sticky footer layout fix */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ===== Watchlist (final, consolidated) ===== */

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 1rem 0 2rem;
}
.filters label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #1e2a38;
}
.filters select,
.filters input[type="text"] {
  padding: 0.6rem 0.8rem;
  border: 1px solid #cfd8ea;
  border-radius: 10px;
  min-width: 200px;
  background: #fff;
  transition: box-shadow .2s ease, transform .05s ease;
}
.filters select:focus,
.filters input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(70,114,224,.15);
}

/* Grid: stretch cards to match tallest in each row */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

/* Card base */
.watch-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 16px;
  border: 1px solid #e7edf7;
  box-shadow: 0 10px 24px rgba(20,39,80,0.06);
  padding: 1.2rem 1.2rem 1rem;
  transition: transform .15s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
  min-height: 240px;
}
.watch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 16px;
  background: radial-gradient(1200px 200px at 0% 0%, rgba(70,114,224,.06), transparent);
}
.watch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20,39,80,0.10);
}

.watch-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
  min-height: 64px;
}

.app-id { display: flex; align-items: center; gap: .75rem; }
.avatar {
  --h: 210;
  width: 40px; height: 40px; border-radius: 50%;
  font-weight: 800; display: grid; place-items: center;
  color: #11213f;
  background: hsl(var(--h) 85% 90%);
  border: 1px solid hsl(var(--h) 80% 75%);
  text-transform: uppercase;
}
.subline { font-size: .85rem; color: #5b6c8a; }

.tag {
  font-size: 0.85rem; padding: 0.25rem 0.6rem; border-radius: 999px;
  background: #eef2ff; color: #1a2b4c; border: 1px solid #cfd8ea; white-space: nowrap;
}
.tag.danger { background: #ffe9e9; color: #7a1520; border-color: #f3b5b9; }
.tag.warn   { background: #fff6e6; color: #6a4a07; border-color: #f2d2a3; }

/* Summary clamp */
.watch-card .summary {
  color: #2f3e50;
  margin: 0.35rem 0 0.8rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  line-height: 1.2rem;
  min-height: calc(1.2rem * 3);
}

.watch-card .meta {
  list-style: none;
  display: grid;
  gap: 0.25rem;
  padding-left: 0;
  font-size: 0.95rem;
  color: #405269;
  margin-bottom: 0.75rem;
}
.watch-card .meta a { color: #205ad9; text-decoration: none; }
.watch-card .meta a:hover { text-decoration: underline; }

/* Details button */
.details-btn {
  margin-top: auto;
  align-self: flex-start;
  background: #f0f5ff;
  border: 1px solid #d9e4ff;
  color: #1a2b4c; font-weight: 700;
  padding: .5rem .8rem; border-radius: 10px;
  cursor: pointer; transition: background .15s ease, box-shadow .15s ease;
}
.details-btn:hover { background: #e7efff; box-shadow: 0 6px 16px rgba(32,90,217,0.12); }

/* Collapsible details panel */
.details {
  overflow: hidden;
  transition: max-height .25s ease;
  max-height: 0;
  margin-top: .5rem; padding-top: .25rem;
  border-top: 1px dashed #e0e7f5;
}
.details[hidden] { display: none !important; max-height: 0 !important; overflow: hidden; }

/* Urgent help button */
.help-btn {
  position: fixed; right: 1rem; bottom: 1rem;
  background: #c62828; color: #fff;
  padding: 0.9rem 1.1rem; border-radius: 999px;
  box-shadow: 0 10px 28px rgba(198,40,40,0.35);
  text-decoration: none; font-weight: 800; z-index: 1000;
}
.help-btn:hover { background: #b71c1c; }

/* Responsive adjustments */
@media (min-width: 992px) {
  .watch-card { min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .watch-card, .details { transition: none !important; }
}

/* Scalable min-height variable */
:root {
  --watch-card-min-h: 260px;
}
@media (min-width: 992px) {
  .watch-card { min-height: var(--watch-card-min-h); }
}
@media (min-width: 1440px) {
  :root { --watch-card-min-h: 280px; }
}
/* ===== Watchlist Modal (minimal styles) ===== */
.wl-modal { 
  position: fixed; inset: 0; display: none; z-index: 1050;
}
.wl-modal[aria-hidden="false"] { display: block; }
.wl-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
}
.wl-modal__dialog {
  position: relative; margin: 5vh auto 0; max-width: 760px;
  background: #fff; border-radius: 16px; padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: 0 20px 60px rgba(16, 30, 54, .25);
}
.wl-modal__close {
  position: absolute; right: .75rem; top: .75rem;
  border: 0; background: #f3f5fb; border-radius: 10px; font-size: 1rem;
  width: 34px; height: 34px; cursor: pointer;
}
.wl-modal__header {
  display: grid; grid-template-columns: 52px 1fr auto; gap: .9rem; align-items: center;
  margin-bottom: .6rem;
}
.wl-modal__avatar {
  --h: 210; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #11213f;
  background: hsl(var(--h) 85% 90%); border: 1px solid hsl(var(--h) 80% 75%);
  text-transform: uppercase;
}
.wl-modal__subline { color: #5b6c8a; font-size: .9rem; }
.wl-modal__body { display: grid; gap: 1rem; }

.details-section h5 { margin-bottom: .35rem; color: #1e2a38; }
.details-section .bullet { padding-left: 1.1rem; }
.details-section .bullet li { margin: .25rem 0; }

.updates { list-style: none; padding-left: 0; }
.updates li { padding: .5rem .6rem; background: #f7f9fe; border: 1px solid #e2e9fb; border-radius: 8px; margin-bottom: .5rem; }
.updates .update-date { font-weight: 700; }

.badge-new {
  display: inline-block; margin-left: .35rem; font-size: .75rem;
  background: #fff3c4; color: #7a4b00; border: 1px solid #f1dea2; padding: .05rem .4rem; border-radius: 6px;
}

/* Availability badge */
.badge-availability {
  font-size: 0.78rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #cfd8ea;
  margin-left: .5rem;
  white-space: nowrap;
}
.badge-availability.active { background: #eaf8ed; color: #0f5a23; border-color: #bfe6c8; }
.badge-availability.unavailable { background: #f7eaea; color: #7a1520; border-color: #efc0c3; }
.badge-availability.regional { background: #fff7e6; color: #6a4a07; border-color: #f2d2a3; }
.updates-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.update-item {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-left: 30px;
  margin-bottom: 20px;
}

.update-item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ccc;
}

.update-marker {
  position: absolute;
  left: 3px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: #0078d4;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #0078d4;
}

.update-content {
  flex: 1;
}

.update-date {
  font-weight: bold;
  color: #0078d4;
  margin-bottom: 2px;
}

.update-note {
  font-size: 0.95em;
  color: #444;
}

.update-note a {
  color: #0078d4;
  text-decoration: none;
}

.update-note a:hover {
  text-decoration: underline;
}

.guide-detail { max-width: 900px; }
.emergency-banner{background:#fff4e5;padding:12px;border-left:4px solid #f59e0b;border-radius:12px;margin:12px 0}
.legal-disclaimer{background:#f8fafc;padding:12px;border-left:4px solid #64748b;border-radius:12px;margin:24px 0;font-size:.95rem}
.guides-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.guide-card{background:#f8fbff;border:1px solid #e5edf7;border-radius:16px;padding:16px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.guide-card h3{margin:0 0 8px}
.guide-card .summary{color:#475569}
.guide-card .btn{display:inline-block;padding:8px 12px;border-radius:10px;background:#fbbf24;color:#111827;text-decoration:none;font-weight:600}
.guide-card .meta { color:#64748b; font-size:.9rem; margin-top:8px }
.read-more-btn { cursor:pointer }

/* Loading */
.guide-card.loading { opacity: .8; }

/* Tags */
.tags {
  margin-top: 8px;
}
.tag {
  display: inline-block;
  background: #eef2ff;
  color: #374151;
  border-radius: 999px;
  padding: 4px 8px;
  margin-right: 6px;
  font-size: 0.85rem;
}

/* Tooltips */
.tt { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.tt[data-tooltip] { cursor: help; }
.tt[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92); /* near-slate-900 */
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: pre-line;
  min-width: 160px;
  max-width: 320px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
  z-index: 50;
}
.tt[data-tooltip]:hover::after,
.tt[data-tooltip]:focus::after {
  opacity: 1;
}
.tt .info-dot {
  display: inline-block; width: 16px; height: 16px; line-height: 16px;
  border-radius: 50%; background: #e5e7eb; color: #111827;
  text-align: center; font-size: 12px; font-weight: 700;
}
.search-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 15px;
}

#home-search {
  padding: 8px;
  width: 260px;
}

#home-search-btn {
  background-color: #f4a934;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: bold;
}

.cta-wrapper {
  text-align: center;
}
