/* ============================================
 🇧🇷 BRAZIL PAGE — GlobalTime.io
 Inspired by the US theme, adapted to Brazil colors
============================================ */
:root {
  --bg: linear-gradient(135deg, #e0f2f1, #c8e6c9);
  --card: rgba(255, 255, 255, 0.85);
  --text: #006400; /* Dark Green */
  --muted: #555;
  --accent: #ffcc00; /* Yellow */
  --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: #00aaff; /* Bright Blue glow */
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ===========================
   Layout Base
=========================== */
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: #006400; /* Dark Green */;
}

.main-clock .tz {
  font-size: 16px;
  color: var(--muted);
  margin-top: 6px;
}

.utc-small {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 170, 0, 0.1);
  border-radius: 10px;
  padding: 6px 12px;
  text-align: right;
}

.utc-small .clock-time {
  font-size: 20px;
  font-weight: 600;
  color: #006400; /* Dark Green */;
}

.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: #ffcc00; /* Yellow accent */
  text-shadow: 0 0 10px rgba(255, 204, 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: #006400; /* Dark Green */;
  margin-top: 4px;
}

/* 🌙 Dark Mode */
body.dark-mode .city-time {
  color: #00aaff; /* Bright Blue */
}

body.dark-mode .city-name {
  color: #ffcc00; /* Yellow Accent */
}

/* ===========================
   🇧🇷 Flag Icon
=========================== */
.flag-inline-title {
  height: 1em;
  width: auto;
  margin-right: 0.4em;
  vertical-align: middle;
  position: relative;
  top: -0.1em;
  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);
}

/* ===========================
   ⏳ Converter
=========================== */
.converter h3 {
  margin-bottom: 12px;
}

.converter .row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.converter select,
.converter input {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  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 Buttons */
.cta {
  background: linear-gradient(90deg, #006400, #ffcc00, #3e4095);
  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, #3e4095, #ffcc00, #006400);
  box-shadow: 0 3px 12px rgba(0, 170, 0, 0.4);
  transform: translateY(-2px);
}

/* 📱 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;
  }
}

/* ===========================
   🔙 Back to Brazil Button
=========================== */
.back-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #006400;
  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: #3e4095;
}

.back-home-wrapper {
  text-align: center;
  margin: 40px 0;
}

/* ===========================
   🇧🇷 Brazilian States Directory
=========================== */
.brazil-divisions {
  text-align: center;
}

.brazil-divisions h3 {
  margin-bottom: 10px;
}

.brazil-divisions p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.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 #006400; /* Dark Green border */
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: 0.3s;
  text-align: center;
}

.division-link:hover {
  background: linear-gradient(90deg, #006400, #ffcc00, #3e4095);
  color: #000;
  transform: translateY(-2px);
  font-weight: 600;
}

/* 🌙 Dark Mode States Links */
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, #3e4095, #ffcc00, #006400);
  color: #fff;
}

.swap-btn {
  position: relative;
  cursor: pointer;
}

/* 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);
}
