/* ============================================
   RELÓGIO DA TERRA – DESIGN SYSTEM
   Mobile-First | Cosmic Educational Theme
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #060a1a;
  --bg-secondary: #0d1230;
  --bg-tertiary: #141a3d;
  --text-primary: #e8ecf4;
  --text-secondary: #8892b0;
  --text-muted: #4a5278;
  --accent-cyan: #00d4ff;
  --accent-cyan-glow: rgba(0, 212, 255, 0.4);
  --accent-cyan-dim: rgba(0, 212, 255, 0.15);
  --accent-amber: #ffb347;
  --accent-amber-glow: rgba(255, 179, 71, 0.4);
  --accent-amber-dim: rgba(255, 179, 71, 0.15);
  --accent-green: #00ff88;
  --accent-red: #ff6b6b;
  --accent-purple: #a78bfa;
  --glass-bg: rgba(13, 18, 48, 0.65);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --header-height: 56px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.35s var(--ease-out);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}

/* ===== TYPOGRAPHY (mobile base) ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ============================================
   HEADER NAVIGATION
   ============================================ */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 2000;
  background: rgba(6, 10, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HAMBURGER BUTTON ===== */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 2100;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE NAV DRAWER ===== */
.header-nav {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 260px;
  height: calc(100vh - var(--header-height));
  background: rgba(6, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  z-index: 2050;
  overflow-y: auto;
}

.header-nav.open {
  transform: translateX(0);
}

.header-link {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
  border-left: 3px solid transparent;
}

.header-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.header-link.active {
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

/* ===== SIDE NAVIGATION (hidden mobile) ===== */
#side-nav {
  display: none;
}

/* ============================================
   DROPDOWN COMPONENT (details/summary)
   ============================================ */
.dropdown {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  transition: border-color 0.2s ease;
}

.dropdown[open] {
  border-color: rgba(0, 212, 255, 0.15);
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  list-style: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.dropdown-trigger::-webkit-details-marker {
  display: none;
}

.dropdown-trigger::marker {
  display: none;
  content: '';
}

.dropdown-trigger:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.dropdown-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}

.dropdown[open] .dropdown-chevron {
  transform: rotate(-135deg);
}

.dropdown-content {
  padding: 0 16px 14px;
  animation: dropdownSlide 0.3s var(--ease-out);
}

@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-content .explanation {
  margin-bottom: 0;
}

/* ============================================
   MODULE SECTIONS (mobile base)
   ============================================ */
.module-section {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 4%;
  overflow: hidden;
}

.module-header {
  text-align: center;
  margin-bottom: 20px;
}

.module-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.module-header h2 {
  color: var(--text-primary);
  margin-bottom: 6px;
}

.module-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.85rem;
}

.module-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.earth-panel {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.earth-panel canvas {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 50%;
}

.info-panel {
  width: 100%;
}

/* ============================================
   HERO SECTION (mobile base)
   ============================================ */
#hero {
  background: radial-gradient(ellipse at 30% 50%, rgba(0, 40, 80, 0.3) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 30%, rgba(255, 179, 71, 0.08) 0%, transparent 50%),
              var(--bg-primary);
  padding: 20px 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#hero-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  padding: 0;
  text-align: center;
}

.hero-earth-wrap {
  position: relative;
  flex-shrink: 0;
}

#hero-canvas {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
}

.sun-element {
  position: absolute;
  right: -30px;
  top: 10%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d5 0%, #ffb347 40%, rgba(255, 179, 71, 0) 70%);
  box-shadow: 0 0 40px var(--accent-amber-glow),
              0 0 80px rgba(255, 179, 71, 0.15);
  animation: sunPulse 4s ease-in-out infinite;
}

.hero-text-area {
  max-width: 440px;
}

.hero-text-area h1 {
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text-area .subtitle {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent-amber);
  margin-bottom: 14px;
  font-weight: 500;
}

.hero-text-area .desc {
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.hero-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-controls label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  opacity: 0.6;
  animation: floatHint 2s ease-in-out infinite;
}

.scroll-hint span {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-arrow-icon {
  color: var(--accent-cyan);
  opacity: 0.7;
  width: 20px;
  height: 20px;
}

/* ============================================
   GLASS PANELS (mobile base)
   ============================================ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--glass-shadow);
}

.glass-panel h3 {
  color: var(--text-primary);
  margin-bottom: 12px;
}

.glass-panel .explanation {
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.glass-panel .explanation strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ============================================
   CONTROL GROUPS
   ============================================ */
.control-group {
  margin-bottom: 16px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.control-group .value-display {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

/* ============================================
   CUSTOM RANGE SLIDER
   ============================================ */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--accent-cyan-dim), var(--bg-tertiary));
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  touch-action: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow),
              0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: grab;
}

input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: none;
  box-shadow: 0 0 10px var(--accent-cyan-glow);
  cursor: grab;
}

input[type="range"].amber-slider {
  background: linear-gradient(90deg, var(--accent-amber-dim), var(--bg-tertiary));
}

input[type="range"].amber-slider::-webkit-slider-thumb {
  background: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber-glow);
}

input[type="range"].amber-slider::-moz-range-thumb {
  background: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber-glow);
}

/* ============================================
   CLOCK WIDGETS (mobile base)
   ============================================ */
.clocks-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.clock-widget {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  transition: var(--transition);
}

.clock-widget:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

.clock-flag {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 2px;
}

.clock-city {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.clock-time {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.02em;
}

/* ============================================
   DEGREE-HOUR VISUAL
   ============================================ */
.degree-hour-visual {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
}

.dh-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.dh-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.5s var(--ease-out);
}

.dh-label {
  color: var(--text-muted);
  min-width: 32px;
}

.dh-value {
  color: var(--accent-amber);
  font-weight: 600;
  min-width: 52px;
  text-align: right;
  font-size: 0.75rem;
}

/* ============================================
   ZONE CARD
   ============================================ */
.zone-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color 0.3s ease;
}

.zone-card.equatorial { border-color: rgba(255, 179, 71, 0.4); }
.zone-card.tropical { border-color: rgba(0, 255, 136, 0.4); }
.zone-card.temperate { border-color: rgba(0, 212, 255, 0.4); }
.zone-card.polar { border-color: rgba(167, 139, 250, 0.4); }

.zone-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.zone-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   DAY LENGTH VISUAL
   ============================================ */
.daylight-visual {
  margin-top: 12px;
}

.daylight-bar-container {
  display: flex;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  margin-top: 8px;
}

.daylight-day {
  background: linear-gradient(90deg, #ffb347, #ffd700);
  transition: width 0.5s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a1a2e;
  font-family: var(--font-display);
  min-width: 30px;
}

.daylight-night {
  background: linear-gradient(90deg, #1a1a4e, #0a0e27);
  transition: width 0.5s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-display);
  min-width: 30px;
}

.daylight-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* ============================================
   COORDINATE DISPLAY
   ============================================ */
.coord-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.coord-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.coord-box .coord-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.coord-box .coord-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.coord-box.lat-box .coord-value { color: var(--accent-amber); }
.coord-box.lon-box .coord-value { color: var(--accent-cyan); }

.location-result {
  margin-bottom: 12px;
  padding: 14px;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-md);
  text-align: center;
}

.location-result .location-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 4px;
}

.location-result .location-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-green);
}

.location-result .location-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ============================================
   KEY PARALLELS LIST
   ============================================ */
.key-parallels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.key-parallel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  font-size: 0.8rem;
  font-family: var(--font-display);
  cursor: pointer;
}

.key-parallel-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.kp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kp-name {
  color: var(--text-secondary);
  flex: 1;
}

.kp-value {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.key-parallel-item.active {
  background: rgba(0, 212, 255, 0.08);
}

.key-parallel-item.active .kp-name {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ============================================
   MODULE BACKGROUNDS
   ============================================ */
#module-1 {
  background: radial-gradient(ellipse at 20% 60%, rgba(0, 60, 120, 0.15) 0%, transparent 50%),
              var(--bg-primary);
}

#module-2 {
  background: radial-gradient(ellipse at 70% 40%, rgba(0, 100, 150, 0.12) 0%, transparent 50%),
              var(--bg-primary);
}

#module-3 {
  background: radial-gradient(ellipse at 30% 30%, rgba(255, 179, 71, 0.07) 0%, transparent 50%),
              var(--bg-primary);
}

#module-4 {
  background: radial-gradient(ellipse at 60% 60%, rgba(0, 255, 136, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 20% 80%, rgba(0, 100, 200, 0.08) 0%, transparent 40%),
              var(--bg-primary);
}

/* ============================================
   MERIDIAN HIGHLIGHT
   ============================================ */
.meridian-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0, 212, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.meridian-info .mi-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-cyan);
}

/* ============================================
   MONTH LABELS
   ============================================ */
.month-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.month-labels span {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* ============================================
   CANVAS GLOW WRAPPER
   ============================================ */
.canvas-glow {
  position: relative;
}

.canvas-glow::after {
  content: '';
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 150, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes floatHint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   ============================================
   TABLET BREAKPOINT (min-width: 600px)
   ============================================
   ============================================ */
@media (min-width: 600px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.2rem; }

  .module-section {
    padding: 40px 5%;
  }

  .module-header {
    margin-bottom: 30px;
  }

  .earth-panel canvas {
    max-width: 340px;
  }

  #hero-canvas {
    max-width: 340px;
  }

  .sun-element {
    width: 80px;
    height: 80px;
    right: -50px;
    top: 15%;
  }

  .glass-panel {
    padding: 24px;
  }

  .clocks-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .clock-time {
    font-size: 1.25rem;
  }

  input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }

  input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
}

/* ============================================
   ============================================
   DESKTOP BREAKPOINT (min-width: 960px)
   ============================================
   ============================================ */
@media (min-width: 960px) {
  :root {
    --header-height: 60px;
  }

  h1 { font-size: clamp(2.4rem, 4vw, 3.8rem); }
  h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
  h3 { font-size: 1.35rem; }

  html {
    scroll-snap-type: y proximity;
  }

  /* Header becomes horizontal nav */
  .header-inner {
    padding: 0 24px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: none;
  }

  .header-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: none;
    flex-direction: row;
    padding: 0;
    transform: none;
    gap: 4px;
    overflow: visible;
  }

  .header-link {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }

  .header-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
  }

  /* Show side nav on desktop */
  #side-nav {
    display: flex;
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    flex-direction: column;
    gap: 18px;
    align-items: center;
  }

  .nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
  }

  .nav-dot:hover,
  .nav-dot.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan-glow);
    transform: scale(1.3);
  }

  .nav-label {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-display);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid var(--glass-border);
  }

  .nav-dot:hover .nav-label {
    opacity: 1;
  }

  /* Module layout: side by side */
  .module-section {
    padding: 60px 5%;
    scroll-snap-align: start;
  }

  .module-header {
    margin-bottom: 40px;
  }

  .module-body {
    flex-direction: row;
    gap: 40px;
  }

  .earth-panel {
    flex: 1;
    min-height: 400px;
  }

  .earth-panel canvas {
    max-width: 100%;
  }

  .info-panel {
    flex: 0 0 380px;
    max-width: 420px;
  }

  /* Hero side by side */
  .hero-layout {
    flex-direction: row;
    gap: 60px;
    text-align: left;
    padding: 0 5%;
  }

  #hero-canvas {
    max-width: 420px;
  }

  .sun-element {
    width: 120px;
    height: 120px;
    right: -80px;
    top: 20%;
    box-shadow: 0 0 60px var(--accent-amber-glow),
                0 0 120px rgba(255, 179, 71, 0.2);
  }

  .hero-text-area .subtitle {
    font-size: 1.15rem;
  }

  .glass-panel {
    padding: 28px;
  }

  .glass-panel .explanation {
    font-size: 0.93rem;
    margin-bottom: 20px;
  }

  /* Sliders smaller thumb on desktop */
  input[type="range"] {
    height: 6px;
  }

  input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px var(--accent-cyan-glow),
                0 2px 12px rgba(0, 0, 0, 0.5);
  }

  input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }

  /* Clock widgets hover effect */
  .clock-widget:hover {
    transform: translateY(-2px);
  }

  .clock-time {
    font-size: 1.3rem;
  }

  .coord-box .coord-value {
    font-size: 1.4rem;
  }

  /* Dropdowns on desktop: default all open */
  .dropdown-trigger {
    font-size: 0.85rem;
  }

  .scroll-hint span {
    font-size: 0.75rem;
  }

  .scroll-arrow {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   ============================================
   LARGE DESKTOP (min-width: 1200px)
   ============================================
   ============================================ */
@media (min-width: 1200px) {
  .header-inner {
    padding: 0 40px;
  }

  .module-body {
    gap: 60px;
  }

  .info-panel {
    flex: 0 0 420px;
  }

  .hero-layout {
    gap: 80px;
  }
}

/* ============================================
   ============================================
   SVG ICON SYSTEM
   ============================================
   ============================================ */
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

.icon-logo {
  width: 28px;
  height: 28px;
  color: var(--accent-cyan);
}

.glass-panel h3 .icon {
  color: var(--accent-cyan);
  margin-right: 6px;
}

.zone-icon {
  color: var(--accent-amber);
  margin-right: 4px;
}

.location-icon {
  color: var(--accent-green);
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
}

.hero-controls label .icon {
  color: var(--accent-cyan);
  margin-right: 4px;
}

.hero-text-area .subtitle .icon {
  color: var(--accent-amber);
  margin-right: 4px;
}

/* ============================================
   CLOCK WIDGETS EXTRAS
   ============================================ */

/* ============================================
   NAV DIVIDER
   ============================================ */
.nav-divider {
  display: block;
  height: 1px;
  background: var(--glass-border);
  margin: 8px 24px;
}

/* ============================================
   "SAIBA MAIS" LINKS
   ============================================ */
.saiba-mais-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-top: 12px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.saiba-mais-link:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateX(2px);
}

.saiba-mais-link .icon {
  transition: transform 0.2s ease;
}

.saiba-mais-link:hover .icon {
  transform: translateX(4px);
}

/* ============================================
   FOOTER
   ============================================ */
#main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 32px 4%;
  text-align: center;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent-cyan);
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-contact a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  transition: opacity 0.2s ease;
}

.footer-contact a:hover {
  opacity: 0.8;
}

.footer-sep {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   SHARED PAGE STYLES (Saiba Mais & Contato)
   ============================================ */
.page-container {
  min-height: 100vh;
  padding: 24px 4%;
  padding-top: calc(var(--header-height) + 24px);
}

.page-hero {
  text-align: center;
  padding: 32px 0 24px;
  max-width: 700px;
  margin: 0 auto;
}

.page-hero h1 {
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 0.95rem;
}

/* ===== ARTICLE CARDS ===== */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.article-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.article-card .article-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.article-card h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.article-card h3 {
  font-size: 1rem;
  margin: 20px 0 8px;
  color: var(--accent-cyan);
}

.article-card p {
  margin-bottom: 12px;
  line-height: 1.8;
}

.article-card ul,
.article-card ol {
  margin: 8px 0 16px 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
}

.article-card li {
  margin-bottom: 4px;
}

.article-card strong {
  color: var(--accent-cyan);
}

.article-highlight {
  background: rgba(0, 212, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 16px;
  transition: opacity 0.2s ease;
}

.article-back-link:hover {
  opacity: 0.8;
}

/* ===== CONTACT PAGE ===== */
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.contact-info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.contact-info-card h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-info-card h2 .icon {
  color: var(--accent-cyan);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item .icon {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-item a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.contact-item a:hover {
  opacity: 0.8;
}

.contact-item span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-cyan);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-cyan), #0098cc);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-cyan-glow);
}

.btn-submit .icon {
  stroke: #fff;
}

/* Desktop adjustments for new pages */
@media (min-width: 960px) {
  .page-container {
    padding: 40px 5%;
    padding-top: calc(var(--header-height) + 40px);
  }

  .page-hero {
    padding: 48px 0 36px;
  }

  .article-card {
    padding: 32px;
  }

  .article-card h2 {
    font-size: 1.5rem;
  }

  .contact-layout {
    flex-direction: row;
  }

  .contact-info-card {
    flex: 1;
  }

  .nav-divider {
    display: inline-block;
    width: 1px;
    height: 20px;
    margin: 0 8px;
    background: var(--glass-border);
  }
}
