/* ==========================================
   🌎 Bolivia Page CSS — GlobalTime.io
   Standalone for Bolivia
========================================== */

/* ---------- Root Colors & Variables ---------- */
:root {
  --bg: linear-gradient(135deg, #eef2f7, #dce4f7);
  --card: rgba(255, 255, 255, 0.85);
  --text: #1a1f71;
  --muted: #555;
  --accent: #d52b1e; /* Bolivia Red */
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 🌙 Dark Mode */
body.dark-mode {
  --bg: linear-gradient(135deg, #0d1117, #161b22);
  --card: rgba(22, 27, 34, 0.9);
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #d52b1e; /* Bolivia Red Accent */
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ---------- Base Layout ---------- */
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s, color 0.3s;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin: 30px auto;
  max-width: 1280px;
  padding: 0 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: background 0.3s, box-shadow 0.3s;
}

/* ---------- Clocks ---------- */
.main-clock {
  position: relative;
  text-align: center;
  margin-bottom: 24px;
}

.main-clock .time {
  font-size: 64px;
  font-weight: 700;
  color: var(--accent);
}

.main-clock .tz {
  font-size: 16px;
  color: var(--muted);
  margin-top: 6px;
}

.utc-small {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(213, 43, 30, 0.1); /* Bolivia Red translucent */
  border-radius: 10px;
  padding: 6px 12px;
  text-align: right;
}

.utc-small .clock-time {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
}

.utc-small .clock-tz {
  font-size: 12px;
  color: var(--muted);
}

/* Dark Mode Clock Colors */
body.dark-mode .main-clock .time,
body.dark-mode .utc-small .clock-time {
  color: #ffd100; /* Bolivia Yellow */
  text-shadow: 0 0 10px rgba(255, 209, 0, 0.7);
}

/* ---------- Meta Info ---------- */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.meta {
  background: rgba(0, 0, 0, 0.05);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
}

body.dark-mode .meta {
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Cities Grid ---------- */
.cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.city-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 14px;
  border-radius: var(--radius);
  text-align: center;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.city-card:hover {
  transform: translateY(-3px);
}

.city-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.city-time {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
}

body.dark-mode .city-time {
  color: #ffd100; /* Bolivia Yellow */
}

body.dark-mode .city-name {
  color: #007934; /* Bolivia Green */
}

/* ---------- Flag Icons ---------- */
.flag-inline-title {
  height: 1em;
  width: auto;
  margin-right: 0.4em;
  vertical-align: middle;
  border-radius: 0.2em;
  object-fit: cover;
  box-shadow: 0 0.05em 0.15em rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.flag-inline-title:hover {
  transform: scale(1.05);
}

/* ---------- Time Converter ---------- */
.converter h3 {
  margin-bottom: 12px;
}

.converter .row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.converter .row select,
.converter .row input {
  flex: 1 1 250px;
  min-width: 250px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

body.dark-mode .converter select,
body.dark-mode .converter input {
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.cta {
  background: linear-gradient(90deg, #d52b1e, #ffd100, #007934);
  border: none;
  color: #000;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  transition: 0.2s;
}

.cta:hover {
  background: linear-gradient(90deg, #007934, #ffd100, #d52b1e);
  box-shadow: 0 3px 12px rgba(60, 157, 246, 0.4);
  transform: translateY(-2px);
}

/* Swap Button Tooltip */
.swap-btn::after {
  content: "Swap From ↔ To";
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background: var(--accent);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.swap-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Bolivia Departments ---------- */
.bolivia-divisions {
  text-align: center;
}

.states-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.division-link {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: 0.3s;
  text-align: center;
}

.division-link:hover {
  background: linear-gradient(90deg, #d52b1e, #ffd100, #007934);
  color: #fff;
  transform: translateY(-2px);
  font-weight: 600;
}

body.dark-mode .division-link {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.dark-mode .division-link:hover {
  background: linear-gradient(90deg, #d52b1e, #ffd100, #007934);
  color: #fff;
}

/* ---------- Back Button ---------- */
.back-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #d52b1e;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.back-home-button:hover {
  background-color: #007934;
}

.back-home-wrapper {
  text-align: center;
  margin: 40px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .main-clock .time {
    font-size: 48px;
  }
  .utc-small {
    position: static;
    margin-top: 10px;
    text-align: center;
  }
}
