* {
  box-sizing: border-box;
}

:root {
  --site-blue: #075aa8;
  --site-blue-dark: #003f7f;
  --site-blue-mid: #0b72d9;
  --site-shell-width: 1400px;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.22), transparent 26%),
    radial-gradient(circle at 82% 20%, rgba(0, 166, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #d5ecff 0%, #b5d9f2 48%, #8fc2e7 100%);
  color: #0f172a;
  overflow-x: hidden;
}

main {
  width: 100%;
}

/* ---------- TOP BAR ---------- */

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 28px 32px 22px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 102, 204, 0.12);
  box-shadow:
    0 18px 42px rgba(30, 64, 175, 0.08),
    0 0 46px rgba(0, 166, 255, 0.08);
}

.topbar > div:first-child {
  text-align: center;
  max-width: 760px;
}

.topbar h1 {
  margin: 0 0 10px 0;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -1.8px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(90deg, #003b7a 0%, #0066cc 42%, #00a6ff 72%, #003b7a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar p {
  margin: 0;
  color: #334155;
  font-size: 18px;
  text-align: center;
}

.gmt-box {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 230px;
  padding: 16px 18px;
  border: 1px solid rgba(147, 197, 253, 0.85);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 18px 45px rgba(37, 99, 235, 0.16),
    0 0 35px rgba(124, 58, 237, 0.12);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  backdrop-filter: blur(12px);
}

.gmt-box span {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
}

.gmt-box strong {
  margin-top: 6px;
  font-size: 34px;
  font-family: monospace;
  letter-spacing: 1px;
}

/* ---------- WORLD CLOCK PANEL ---------- */

.intro-section,
.noscript-warning {
  max-width: 1120px;
  margin: 28px auto;
  padding: 28px 32px;
  border: 1px solid rgba(209, 213, 219, 0.85);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86));
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 0 35px rgba(59, 130, 246, 0.08);
}

.intro-section.world-clock-section {
  width: min(var(--site-shell-width), calc(100% - 40px));
  max-width: var(--site-shell-width);
  margin: 30px auto 8px;
  padding: 40px 38px;
  min-height: 292px;
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 2.3fr);
  gap: 32px;
  align-items: center;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.93));
  border: 1px solid rgba(147, 197, 253, 0.92);
  box-shadow:
    0 28px 70px rgba(0, 63, 127, 0.16),
    0 0 72px rgba(7, 90, 168, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.clock-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(7, 90, 168, 0.12);
  color: var(--site-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.world-clock-heading h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -1.1px;
}

.world-clock-heading p {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.55;
  max-width: 340px;
}

.world-clock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.world-clock-card {
  min-height: 198px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(147, 197, 253, 0.92);
  background:
    radial-gradient(circle at top left, rgba(11, 114, 217, 0.14), transparent 36%),
    linear-gradient(145deg, #ffffff, #f7fbff);
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.1),
    0 0 28px rgba(59, 130, 246, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.city-name {
  display: block;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.timezone-label {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  word-break: break-word;
}

.world-clock-time {
  display: block;
  margin-top: 18px;
  color: #111827;
  font-family: monospace;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.8px;
}

.world-clock-date {
  display: block;
  margin-top: 10px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- DESKTOP LAYOUT ---------- */

.layout {
  width: min(var(--site-shell-width), calc(100% - 40px));
  max-width: var(--site-shell-width);
  margin: 0 auto 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: start;
}

.map-area {
  padding-top: 32px;
  min-width: 0;
}

#map-wrapper {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(147, 197, 253, 0.95);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(30, 64, 175, 0.14),
    0 0 55px rgba(0, 166, 255, 0.11),
    0 0 80px rgba(0, 102, 204, 0.08);
}

#map {
  width: 100%;
  height: 640px;
  background: #a7cfe8;
}

.info-panel {
  margin-top: 32px;
  min-height: 640px;
  padding: 30px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 28px 70px rgba(0, 63, 127, 0.11),
    0 0 48px rgba(7, 90, 168, 0.10);
  overflow-y: auto;
}

.info-panel h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -1.1px;
  color: #0f172a;
}

.info-label {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #64748b;
  font-weight: 850;
}

.info-value {
  margin: 0;
  font-size: 22px;
  font-family: monospace;
  color: #111827;
  word-break: break-word;
  font-weight: 750;
}

.big-time {
  font-size: 42px;
  font-weight: bold;
}

.offset {
  color: #0f766e;
}

.seasonal-status {
  color: #1e293b;
  line-height: 1.15;
}

/* ---------- OFFSET BARS ---------- */

.offset-bar {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  min-height: 54px;
}

#top-offset-bar {
  border-bottom: 1px solid #d1d5db;
}

#offset-bar {
  border-top: 1px solid #d1d5db;
}

.offset-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  color: #111827;
  padding: 6px 0;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
}

.offset-cell:last-child {
  border-right: none;
}

.offset-color {
  width: 100%;
  height: 12px;
  margin-top: 5px;
}

/* ---------- LEAFLET ---------- */

.leaflet-container {
  font-family: Inter, Arial, Helvetica, sans-serif;
  background-color: #a7cfe8;
}

.leaflet-control-zoom a {
  border-radius: 10px !important;
  margin-bottom: 4px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.leaflet-tooltip {
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
  font-weight: 600;
}

.leaflet-control-attribution {
  display: none !important;
}

.leaflet-control-home {
  width: 34px;
  height: 34px;
  margin: 10px 0 0 10px;
  border: 2px solid rgba(203, 213, 225, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  font-size: 23px;
  line-height: 28px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.leaflet-control-home:hover {
  background: #f8fafc;
}

/* ---------- COUNTRY PANEL ---------- */

.hidden {
  display: none;
}

.panel-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 28px 0;
}

#country-info {
  margin-top: 8px;
}

#country-info p {
  color: #4b5563;
  line-height: 1.5;
}

.country-loading,
.country-error,
.country-empty {
  padding: 14px;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  background: #f9fafb;
  color: #4b5563;
  line-height: 1.5;
}

.country-card,
.bento-country-card {
  border-radius: 24px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: #ffffff;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.12),
    0 0 38px rgba(59, 130, 246, 0.14);
  overflow: hidden;
}

.country-card-body {
  padding: 16px;
}

.country-header,
.bento-country-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
}

.country-flag {
  width: 54px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: white;
  flex-shrink: 0;
}

.country-name {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -0.9px;
  color: #0f172a;
}

.country-subtitle {
  margin: 4px 0 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}

.country-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.meta-box,
.bento-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
}

.meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #64748b;
  margin-bottom: 5px;
  font-weight: 850;
}

.meta-value {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.fun-fact-box,
.bento-fun-fact {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  border: 1px solid rgba(125, 211, 252, 0.9);
}

.fun-fact-box strong {
  display: block;
  margin-bottom: 6px;
  color: #155e75;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.fun-fact-box p {
  margin: 0;
  color: #164e63;
  line-height: 1.55;
  font-size: 14px;
}

/* ---------- COUNTRY GALLERY ---------- */

.country-gallery-carousel {
  position: relative;
  width: 100%;
  height: 250px;
  padding: 12px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.16), transparent 32%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
}

.country-gallery-track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #e5e7eb;
}

.country-gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.country-gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.country-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- SEO ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.seo-content {
  width: 100%;
  margin: 24px 0 0;
  padding: 20px 24px;
  border: 1px solid rgba(209, 213, 219, 0.85);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86));
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    0 0 35px rgba(59, 130, 246, 0.08);
}

.seo-content h2,
.noscript-warning h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
}

.seo-content p,
.noscript-warning p {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.55;
}

.seo-content details {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.seo-content summary {
  cursor: pointer;
  font-weight: 850;
  color: #0f172a;
}

.seo-content ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.seo-content li {
  margin-bottom: 6px;
  color: #374151;
  line-height: 1.45;
}

/* ---------- TABLET ---------- */

@media (max-width: 1100px) {
  .topbar {
    padding: 24px 24px 20px;
  }

  .topbar h1 {
    font-size: 42px;
  }

  .gmt-box {
    position: static;
    transform: none;
    margin-top: 18px;
    align-items: center;
  }

  .topbar {
    flex-direction: column;
  }

  .intro-section.world-clock-section,
  .layout {
    width: calc(100% - 32px);
  }

  .intro-section.world-clock-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 30px;
  }

  .world-clock-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .map-area {
    padding-top: 24px;
  }

  .info-panel {
    margin-top: 0;
    min-height: auto;
    border-radius: 24px;
  }

  #map {
    height: 540px;
  }
}

/* ---------- MOBILE: 3 STACKED PANELS ---------- */

@media (max-width: 900px) {
  .topbar {
    display: block;
    position: relative;
    padding: 42px 14px 18px;
    text-align: center;
  }

  .topbar > div:first-child {
    max-width: 100%;
    padding: 0 86px;
    text-align: center;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 1.12;
    letter-spacing: -0.3px;
    margin: 0;
  }

  .topbar p {
    display: none;
  }

  .gmt-box {
    position: absolute;
    top: 8px;
    right: 10px;
    transform: none;
    width: 84px;
    min-width: 0;
    margin: 0;
    padding: 6px;
    border-radius: 12px;
    align-items: center;
  }

  .gmt-box span {
    font-size: 6px;
    line-height: 1.05;
    letter-spacing: 0.3px;
    text-align: center;
  }

  .gmt-box strong {
    margin-top: 3px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .intro-section.world-clock-section,
  .layout {
    width: calc(100% - 20px);
    margin-left: auto;
    margin-right: auto;
  }

  .intro-section.world-clock-section {
    display: block;
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 20px;
    min-height: auto;
  }

  .world-clock-heading {
    text-align: center;
    margin-bottom: 12px;
  }

  .clock-eyebrow {
    font-size: 7px;
    padding: 4px 8px;
    margin-bottom: 6px;
  }

  .world-clock-heading h2 {
    font-size: 18px;
    line-height: 1.05;
    letter-spacing: -0.5px;
    margin: 0 0 5px;
  }

  .world-clock-heading p {
    font-size: 10px;
    line-height: 1.3;
    max-width: 100%;
    margin: 0 auto;
  }

  .world-clock-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .world-clock-card {
    min-height: 76px;
    padding: 7px 3px;
    border-radius: 13px;
    text-align: center;
    overflow: hidden;
  }

  .city-name {
    font-size: 8px;
    line-height: 1.05;
    letter-spacing: -0.2px;
  }

  .timezone-label {
    display: none;
  }

  .world-clock-time {
    margin-top: 8px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: -0.4px;
  }

  .world-clock-date {
    margin-top: 5px;
    font-size: 7px;
    line-height: 1.1;
  }

  .layout {
    display: block;
    margin-bottom: 28px;
  }

  .map-area {
    width: 100%;
    padding: 0;
  }

  #map-wrapper {
    width: 100%;
    border-radius: 20px;
  }

  #map {
    width: 100%;
    height: 300px;
  }

  .offset-bar {
    min-height: 32px;
    overflow: hidden;
  }

  .offset-cell {
    min-width: 0;
    font-size: 6px;
    padding: 3px 0;
  }

  .offset-color {
    height: 6px;
    margin-top: 3px;
  }

  .info-panel {
    width: 100%;
    margin-top: 12px;
    min-height: auto;
    padding: 16px;
    border-radius: 20px;
    display: block;
  }

  .info-panel h2 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .panel-divider {
    margin: 14px 0;
  }

  .info-label {
    font-size: 8px;
    margin-top: 10px;
    margin-bottom: 3px;
  }

  .info-value {
    font-size: 14px;
  }

  .big-time {
    font-size: 26px;
  }

  .country-meta {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .country-gallery-carousel {
    height: 160px;
  }

  .seo-content.compact-seo {
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
  }
}

@media (max-width: 430px) {
  .topbar > div:first-child {
    padding: 0 72px;
  }

  .topbar h1 {
    font-size: 16px;
  }

  .gmt-box {
    width: 74px;
  }

  .gmt-box strong {
    font-size: 11px;
  }

  .world-clock-heading h2 {
    font-size: 16px;
  }

  .world-clock-heading p {
    font-size: 9px;
  }

  .world-clock-grid {
    gap: 4px;
  }

  .world-clock-card {
    min-height: 70px;
  }

  .city-name {
    font-size: 7px;
  }

  .world-clock-time {
    font-size: 9px;
  }

  .world-clock-date {
    font-size: 6px;
  }

  #map {
    height: 280px;
  }

  .country-meta {
    grid-template-columns: 1fr;
  }
}

/* ---------- FINAL MOBILE REFINEMENTS ---------- */

.layout .seo-content.compact-seo {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .topbar {
    padding-top: 46px;
  }

  .topbar > div:first-child {
    padding: 0 78px;
  }

  .topbar h1 {
    font-size: 20px;
    line-height: 1.15;
    text-align: center;
  }

  .gmt-box {
    top: 8px;
    right: 10px;
  }

  .layout .seo-content.compact-seo {
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 430px) {
  .topbar > div:first-child {
    padding: 0 70px;
  }

  .topbar h1 {
    font-size: 18px;
  }
}

/* ---------- FINAL FINAL CLOCK PANEL POLISH ---------- */

@media (max-width: 900px) {
  .world-clock-heading {
    width: 100%;
    text-align: center;
  }

  .world-clock-heading h2 {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 auto 8px;
    text-align: center;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.8px;
  }

  .world-clock-heading p {
    max-width: 96%;
    margin: 0 auto;
    text-align: center;
    font-size: 12px;
  }

  .clock-eyebrow {
    margin-left: auto;
    margin-right: auto;
  }

  .city-name {
    font-size: 13px;
    line-height: 1;
  }

  .world-clock-time {
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.6px;
  }

  .world-clock-date {
    font-size: 9px;
  }
}

@media (max-width: 430px) {
  .world-clock-heading h2 {
    font-size: 24px;
  }

  .world-clock-heading p {
    font-size: 10px;
  }

  .city-name {
    font-size: 11px;
  }

  .world-clock-time {
    font-size: 15px;
  }

  .world-clock-date {
    font-size: 8px;
  }
}

/* ---------- FINAL TOP TITLE POSITION ---------- */

@media (max-width: 900px) {
  .topbar {
    padding-top: 26px;
    padding-bottom: 24px;
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.08;
  }

  .gmt-box {
    top: 8px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-top: 24px;
    padding-bottom: 22px;
  }

  .topbar h1 {
    font-size: 21px;
  }
}