/* 🌐 Root Variables */
:root {
  --primary-bg: #cce0ff;
  --dark-bg: #121212;
  --dark-content-bg: #1a1a1a;
  --dark-text: #f4f4f4;
  --light-text: #000;
  --accent: #003366;
  --sub-accent: #006699;
  --highlight: #ff9800;
  --shadow: rgba(0, 0, 0, 0.2);
  --shadow-hover: rgba(0,0,0,0.25);
  --transition: all 0.3s ease-in-out;
  --radius: 12px;
  --glass-bg: rgba(255,255,255,0.15);
  --glass-blur: 10px;
}

/* ===========================
   GENERAL PAGE CONTAINERS
=========================== */

.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  background: radial-gradient(circle at top, #f6f8fc 0%, #e9eff7 40%, #e3edf7 100%);
  padding: 80px 15px 30px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--light-text);
  box-sizing: border-box;
}

/* Dark mode page wrapper */
body.dark-mode .page-wrapper {
  background: radial-gradient(circle at top, #020617 0%, #020617 40%, #020617 100%);
  color: var(--dark-text);
}

.section-container {
  width: 100%;
  max-width: 1280px;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffffee;
  backdrop-filter: blur(12px);
  border-radius: 18px;
  margin-bottom: 32px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  transition: var(--transition);
}

.dark-mode .section-container {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* Generic container (if used elsewhere) */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding-top: 0;
}

/* ===========================
   TYPOGRAPHY
=========================== */

h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  text-align: center;
  transition: var(--transition);
}

.dark-mode h1 {
  color: var(--dark-text);
}

/* ===========================
   CLOCK & DATETIME – BASE
=========================== */

.clock {
  width: 100%;
  max-width: 500px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 4px 10px var(--shadow);
  transition: var(--transition);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: bold;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333333;
  background: var(--primary-bg);
  padding: 20px 30px;
  display: inline-block;
  margin-top: 15px;
}

.datetime {
  width: 100%;
  max-width: 500px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 4px 10px var(--shadow);
  transition: var(--transition);
  background: var(--primary-bg);
  color: var(--light-text);
  padding: 15px 25px;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.dark-mode .clock {
  color: #87CEFA;
  background: #333333;
  box-shadow: 0 4px 10px var(--shadow);
}

.dark-mode .datetime {
  background: #222222;
  color: var(--dark-text);
}

/* ===========================
   TIMEZONE DROPDOWN
=========================== */

.clock-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.clock-section h1 {
  width: 75%;
  margin: 0 auto;
}

.custom-select-wrapper {
  position: relative;
  width: 75%;
  max-width: 400px;
  margin: 15px auto;
  box-sizing: border-box;
}

.custom-select-wrapper select {
  width: 100%;
  box-sizing: border-box;
}

.custom-select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
  color: var(--accent);
}

.dark-mode .custom-select-wrapper::after {
  color: var(--dark-text);
}

.custom-select-wrapper select {
  appearance: none;
  background-color: var(--primary-bg);
  color: var(--light-text);
  padding: 8px 12px;
  padding-right: 40px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: center;
  outline: none;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.custom-select-wrapper select:focus,
.custom-select-wrapper select:hover {
  border: 1px solid var(--accent);
  box-shadow: 0 0 8px rgba(0, 51, 102, 0.4);
}

.dark-mode .custom-select-wrapper select {
  background-color: var(--dark-content-bg);
  color: var(--dark-text);
}

.dark-mode .custom-select-wrapper select option {
  background-color: #333333;
  color: var(--dark-text);
}

label[for="timezone"] {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
}

.dark-mode label[for="timezone"] {
  color: var(--dark-text);
}

#utcOffset,
#timezoneName {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 18px;
  margin-top: 5px;
  transition: var(--transition);
}

#utcOffset {
  color: var(--accent);
}

#timezoneName {
  color: var(--sub-accent);
}

.dark-mode #utcOffset,
.dark-mode #timezoneName {
  color: var(--dark-text);
}

/* ===========================
   HERO / CLOCK LAYOUT (NEW)
=========================== */

.clock-section {
  padding-top: 32px;
  padding-bottom: 40px;
}

.clock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  width: 100%;
}

@media (max-width: 960px) {
  .clock-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* LEFT side copy */

.clock-copy {
  text-align: left;
}

@media (max-width: 960px) {
  .clock-copy {
    text-align: center;
  }
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 10px;
  font-weight: 600;
}

.dark-mode .eyebrow {
  color: #e2e8f0;
}

.clock-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  color: #0f172a;
}

.dark-mode .clock-copy h1 {
  color: #e5e7eb;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #4b5563;
  max-width: 520px;
  margin: 0 0 16px;
}

.dark-mode .hero-subtitle {
  color: #cbd5f5;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  font-size: 0.9rem;
  color: #374151;
}

.hero-bullets li::before {
  content: "•";
  margin-right: 6px;
  color: #2563eb;
  font-weight: 900;
}

.dark-mode .hero-bullets {
  color: #e5e7eb;
}

@media (max-width: 768px) {
  .hero-bullets {
    grid-template-columns: 1fr;
    text-align: left;
    justify-items: flex-start;
  }

  .clock-copy {
    align-items: center;
  }
}

/* RIGHT side – clock panel */

.clock-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.clock-box {
  border-radius: 18px;
  padding: 18px 18px 20px;
  background: linear-gradient(145deg, #dbeafe, #eff6ff);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.25);
}

.dark-mode .clock-box {
  background: radial-gradient(circle at top, #0f172a 0%, #020617 55%);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Hero-specific overrides – scoped to .clock-box */

.clock-box .clock {
  margin-top: 0;
  margin-bottom: 10px;
  box-shadow: none;
  background: transparent;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: #0f172a;
}

.dark-mode .clock-box .clock {
  color: #e0f2fe;
  background: transparent;
  box-shadow: none;
}

.clock-box .datetime {
  box-shadow: none;
  background: #ffffffee;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.94rem;
  text-align: left;
}

.dark-mode .clock-box .datetime {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.clock-box .datetime #date {
  font-weight: 600;
  margin-bottom: 4px;
}

.clock-box .datetime p {
  margin: 2px 0;
}

/* Dropdown inside clock panel */

.clock-panel .custom-select-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 4px;
}

.clock-panel .custom-select-wrapper select {
  text-align: left;
  font-weight: 500;
}

/* Micro copy under panel */

.micro-copy {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 2px 0 0;
}

.dark-mode .micro-copy {
  color: #9ca3af;
}

/* ===========================
   MINI HERO CARDS
=========================== */

.mini-hero-section {
  padding: 20px 15px;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mini-hero {
  flex: 1 1 calc(25% - 12px);
  max-width: 260px;
  min-width: 150px;
  height: 90px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  text-decoration: none !important;
  color: inherit;
  background-size: 200% 200%;
  animation: gradientShift 14s ease-in-out infinite;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.mini-hero-inner h2 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.mini-hero-inner p {
  margin: 3px 0 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: #111827;
}

.mini-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
  cursor: pointer;
}

/* ===========================
   CONTINENT CARDS
=========================== */

.continents-time {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 20px 15px;
}

.continent-card {
  text-decoration: none;
  border-radius: 14px;
  padding: 15px 10px;
  text-align: center;
  flex: 1 1 220px;
  max-width: 260px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.continent-card .card-inner {
  padding: 10px 15px;
}

.continent-card h2 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.continent-card p {
  font-size: 0.8rem;
  margin: 2px 0 0;
  color: #111827;
  opacity: 0.9;
}

.continent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
  cursor: pointer;
}

/* ===========================
   COUNTRY CARDS
=========================== */

.country-card {
  text-decoration: none;
  border-radius: 14px;
  padding: 15px 10px;
  text-align: center;
  flex: 1 1 160px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.country-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.country-inner img {
  width: 40px;
  height: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(15,23,42,0.6));
}

.country-inner h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

/* ===========================
   ANIMATIONS
=========================== */

@keyframes gradientShift {
  0% { background-position: left top; }
  50% { background-position: right bottom; }
  100% { background-position: left top; }
}

/* ====================================
   ADVERTISEMENT INVITATION BANNER
===================================== */
/* Light mode banner - simple and page-friendly */
.advertise-banner {
  background: #ffffff; /* light page background */
  color: #003366; /* darker accent for readability */
  padding: 18px 25px;
  text-align: center;
  position: relative;
  border-radius: var(--radius);
  margin: 20px auto;
  max-width: 1100px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  will-change: opacity, transform, background, color;
}

.advertise-banner h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.advertise-banner p {
  font-size: 15px;
  margin: 6px 0;
  opacity: 0.95;
  line-height: 1.5;
}
.advertise-banner .close-ad:hover {
    color: #ff4d4d;
    transform: scale(1.1);
}


/* Links inside banner */
.contact-email a {
  color: #0055a5; /* lighter than text, but still visible */
  font-weight: 600;
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
  color: #0077cc;
}

/* Close button positioning */
.advertise-banner .close-ad {
    position: absolute;      /* position relative to banner */
    top: 12px;               /* distance from top */
    right: 15px;             /* distance from right */
    background: transparent; /* no box */
    border: none;            /* no border */
    color: inherit;          /* matches banner text */
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.advertise-banner .close-ad:hover {
    color: #ff4d4d;          /* hover color */
    transform: scale(1.1);   /* subtle hover effect */
}

/* Dark mode adjustments */
body.dark-mode .advertise-banner {
  background: #1a1a1a; /* dark content background */
  color: #f4f4f4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

body.dark-mode .contact-email a {
  color: #ffd369;
}

body.dark-mode .contact-email a:hover {
  color: #ffe58a;
}

/* ===========================
   RESPONSIVE – CARDS & CLOCK
=========================== */

@media (max-width: 1024px) {
  .mini-hero {
    flex: 1 1 calc(33.33% - 10px);
    max-width: 200px;
  }
  .continent-card {
    flex: 1 1 calc(33.33% - 12px);
    max-width: 200px;
    height: 80px;
  }
  .country-card {
    flex: 1 1 calc(33.33% - 12px);
  }
}

@media (max-width: 768px) {
  .mini-hero {
    flex: 1 1 calc(50% - 10px);
    max-width: 180px;
  }
  .continent-card {
    flex: 1 1 calc(50% - 12px);
    max-width: 180px;
    height: 75px;
  }
  .country-card {
    flex: 1 1 calc(50% - 12px);
  }

  h1 {
    font-size: 2rem;
  }

  .clock {
    font-size: 2.2rem;
    padding: 12px 18px;
  }

  .datetime {
    font-size: 1.3rem;
    padding: 12px 18px;
  }

  .custom-select-wrapper {
    max-width: 100%;
  }

  .custom-select-wrapper select {
    font-size: 16px;
    padding: 8px 12px;
    width: 100%;
  }

  label[for="timezone"] {
    font-size: 16px;
  }

  #utcOffset,
  #timezoneName {
    font-size: 16px;
  }

  .custom-select-wrapper::after {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .section-container {
    padding: 32px 16px;
  }
}

@media (max-width: 480px) {
  .mini-hero {
    flex: 1 1 100%;
    max-width: 100%;
    height: 80px;
  }

  .continent-card {
    flex: 1 1 100%;
    max-width: 100%;
    height: 70px;
  }

  .country-card {
    flex: 1 1 100%;
  }

  h1 {
    font-size: 1.6rem;
  }

  .clock {
    font-size: 1.8rem;
    padding: 10px 15px;
  }

  .datetime {
    font-size: 1.1rem;
    padding: 8px 12px;
  }

  .custom-select-wrapper {
    max-width: 100%;
  }

  .custom-select-wrapper select {
    font-size: 14px;
    padding: 6px 10px;
    width: 100%;
  }

  label[for="timezone"] {
    font-size: 14px;
  }

  #utcOffset,
  #timezoneName {
    font-size: 14px;
  }

  .custom-select-wrapper::after {
    font-size: 12px;
    right: 8px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.4rem;
  }

  .clock {
    font-size: 1.6rem;
    padding: 6px 10px;
  }

  .datetime {
    font-size: 1rem;
    padding: 6px 10px;
  }

  .custom-select-wrapper select {
    font-size: 13px;
    padding: 5px 8px;
  }

  label[for="timezone"] {
    font-size: 13px;
  }

  #utcOffset,
  #timezoneName {
    font-size: 13px;
  }
}

/* ===========================
   DARK MODE – GLOBAL TEXT
=========================== */

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p,
body.dark-mode a {
  color: #e5e7eb;
}

body.dark-mode a:hover {
  color: #bfdbfe;
}

/* DARK MODE – CARDS OVERRIDE */

body.dark-mode .mini-hero,
body.dark-mode .continent-card,
body.dark-mode .country-card {
  background-image: none;
  background: radial-gradient(circle at top left, #1f2937 0%, #020617 65%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.9);
}

body.dark-mode .mini-hero-inner h2,
body.dark-mode .mini-hero-inner p,
body.dark-mode .continent-card h2,
body.dark-mode .continent-card p,
body.dark-mode .country-inner h3 {
  color: #e5e7eb;
}

body.dark-mode .mini-hero:hover,
body.dark-mode .continent-card:hover,
body.dark-mode .country-card:hover {
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.95);
  transform: translateY(-4px);
}

/* DARK MODE – DROPDOWN FOCUS */

body.dark-mode .custom-select-wrapper select:focus,
body.dark-mode .custom-select-wrapper select:hover {
  border: 1px solid #60a5fa;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.55);
}
