/* ---------- Layout: Hero / Main ---------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- Card ---------- */
.card {
  background: #ffffffee;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 18px 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Slight variation for nested cards in facts section */
.info-block .card {
  background: rgba(248, 250, 252, 0.9);
  border-style: dashed;
}

/* Dark mode overrides for cards */
body.dark-mode .card {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

body.dark-mode .info-block .card {
  background: rgba(15, 23, 42, 0.8);
}

/* ---------- Main Clock Block ---------- */
.info-block {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.main-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

/* 🔵 UTC pill clock */
.utc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(37, 99, 235, 0.06);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.85rem;
  opacity: 0.9;
}

body.dark-mode .utc-row {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.25);
}

.clock-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 500;
}

.clock-tz {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
}

body.dark-mode .clock-tz {
  color: #9ca3af;
}

/* ---------- Canada Title ---------- */

.canada-title {
  text-align: center;
  margin-bottom: 16px;
}

.canada-title .title-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 600;
  color: #0f172a;
}

.canada-title .tz-small {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.75;
  color: #6b7280;
}

body.dark-mode .canada-title .title-main {
  color: #e5e7eb;
}

body.dark-mode .canada-title .tz-small {
  opacity: 0.85;
  color: #9ca3af;
}


/* ---------- Flag ---------- */
.flag-inline-title {
  height: 1em;
  width: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

/* ---------- Meta Row ---------- */
.meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px 16px;
  margin-top: 6px;
}

.meta {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #4b5563;
  padding: 8px 10px;
  border-left: 3px solid rgba(148, 163, 184, 0.6);
  background: rgba(241, 245, 249, 0.9);
  border-radius: 0 10px 10px 0;
}

body.dark-mode .meta {
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.7);
}

/* ---------- Section Titles ---------- */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 12px 0 10px;
  color: #0f172a;
}

body.dark-mode .section-title {
  color: #e5e7eb;
}

.section-title img.flag-inline-title {
  box-shadow: none;
}

/* ---------- Cities ---------- */
.cities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

/* City cards */
.city-card {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 58%), #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

body.dark-mode .city-card {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 58%), rgba(15, 23, 42, 0.95);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.24);
}

.city-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.city-time {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.city-offset {
  font-size: 0.8rem;
  color: #6b7280;
}

body.dark-mode .city-offset {
  color: #9ca3af;
}

/* ---------- Facts, Holidays & Tourism Block ---------- */

.info-block ul {
  margin: 6px 0 10px;
  padding-left: 20px;
  font-size: 0.9rem;
  color: #4b5563 !important;
}

/* Dark mode list text */
body.dark-mode .info-block p,
body.dark-mode .info-block ul,
body.dark-mode .info-block li {
  color: #9ca3af;
}

.info-block li {
  margin-bottom: 4px;
}

.info-block h4 {
  font-size: 0.98rem;
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 600;
  color: #0f172a;
}

body.dark-mode .info-block h4 {
  color: #e5e7eb;
}

/* ---------- SEO text links ---------- */

/* Light mode */
.seo-text a {
  color: #2563eb;
}

.seo-text a:hover {
  color: #1d4ed8;
}

/* Dark mode */
body.dark-mode .seo-text a {
  color: #93c5fd;
  text-decoration: underline;
}

body.dark-mode .seo-text a:hover {
  color: #60a5fa;
}

/* ---------- Canada Big Timezone Clocks ---------- */
.canada-big-clocks {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.tz-box {
  text-align: center;
  padding: 16px 12px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

@media (hover: hover) {
  .tz-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  }
}

body.dark-mode .tz-box {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.tz-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 6px;
}

body.dark-mode .tz-label {
  color: #9ca3af;
}

/* ---------- Time Value (MATCHES US SCALE) ---------- */

.tz-time {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

body.dark-mode .tz-time {
  color: #e5e7eb;
}

/* ---------- Converter ---------- */
.converter {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.converter .row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.1fr;
  gap: 8px;
}

.converter select,
.converter input[type="datetime-local"] {
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  font-size: 0.9rem;
  background: #f9fafb;
  color: #111827;
}

body.dark-mode .converter select,
body.dark-mode .converter input {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Buttons */
.convert-actions {
  display: flex;
  gap: 8px;
}

.cta {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: #2563eb;
  color: #f9fafb;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.45);
}

.swap-btn {
  flex: 0 0 auto;
  width: 40px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: none;
}

/* ---------- Provinces ---------- */
.canada-divisions {
  flex: 1;
  min-width: 280px;
}

.states-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.division-link {
  display: inline-flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #4b5563;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.division-link::after {
  content: "→";
  opacity: 0.7;
}

body.dark-mode .division-link {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* ---------- Back Button ---------- */
.back-home-wrapper {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 16px;
}

.back-home-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  color: #6b7280;
  background: #f9fafb;
}

body.dark-mode .back-home-button {
  color: #9ca3af;
  background: rgba(15, 23, 42, 0.9);
}

/* ---------- Utilities ---------- */
.hidden {
  display: none !important;
}

.info-text {
  font-size: 0.82rem;
  color: #6b7280;
}

body.dark-mode .info-text {
  color: #9ca3af;
}

.divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin: 10px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .converter .row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main-clock {
    flex-direction: column;
    align-items: stretch;
  }

  .utc-row {
    justify-content: space-between;
  }

  .cities {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
