:root {
  --navy: #0b2545;
  --blue: #1e6fd9;
  --blue-light: #4d9bf5;
  --gray-dark: #2b2f36;
  --gray: #6b7280;
  --gray-light: #f4f6f9;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(11, 37, 69, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3 { color: var(--navy); margin-top: 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 37, 69, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.brand {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #d6e4f5;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--blue-light); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 800px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 14px 0; }
  .nav-toggle { display: block; }
}

/* HERO */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--navy) 0%, #123a6b 60%, var(--blue) 100%);
  color: var(--white);
  overflow: hidden;
  max-width: 100%;
  flex-wrap: wrap;
}

.hero-content { max-width: 600px; margin: 0 auto; }

.hero h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 16px; }

.subtitle { font-size: 1.1rem; color: #cfe0f7; margin-bottom: 28px; }

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--blue-light); color: var(--navy); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(77,155,245,0.4); }

.btn-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.5); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.hero-globe {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.globe-ring {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  animation: pulse 3s ease-in-out infinite;
}

.globe-ring.delay-1 { width: 75%; height: 75%; animation-delay: 0.6s; }
.globe-ring.delay-2 { width: 50%; height: 50%; animation-delay: 1.2s; }

.globe-dot { font-size: 4rem; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 1; }
}

.fade-in { animation: fadeIn 1s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* SECTIONS */
.section, .section-alt, .intro {
  padding: 70px 0;
}

.section-alt { background: var(--gray-light); }

.intro h2, .section h2, .section-alt h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 24px;
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 36px;
  color: var(--gray);
}

/* CARDS */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.card.highlight {
  border-left: 4px solid var(--blue);
  background: #eef5fd;
}

.card h3 { margin-bottom: 12px; color: var(--navy); }

.formula {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
}

.math-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.math-table th, .math-table td {
  border: 1px solid #dde5ee;
  padding: 8px 12px;
  text-align: left;
}

.math-table th { background: #eef5fd; }

.link-arrow { color: var(--blue); font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* CALCULATOR */
.calculator-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
}

@media (max-width: 900px) {
  .calculator-grid { grid-template-columns: 1fr; }
}

.calc-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--navy);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4dbe4;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-group input:focus { outline: 2px solid var(--blue-light); border-color: var(--blue); }

.form-buttons { display: flex; gap: 12px; margin: 20px 0 8px; }

.hint { font-size: 0.82rem; color: var(--gray); margin: 8px 0 0; }

.error { color: #c0392b; font-size: 0.88rem; min-height: 1.2em; }

.results { margin-top: 28px; border-top: 1px solid #e6e9ee; padding-top: 20px; }
.results.hidden { display: none; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result-item {
  background: var(--gray-light);
  border-radius: 8px;
  padding: 14px 16px;
}

.result-label { display: block; font-size: 0.78rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em; }
.result-value { display: block; font-size: 1.35rem; font-weight: 700; color: var(--navy); margin-top: 4px; }
.result-sub { display: block; font-size: 0.85rem; color: var(--gray); margin-top: 2px; }

.work-details { margin-top: 20px; font-size: 0.88rem; }
.work-details summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.work-details pre {
  background: #0b2545;
  color: #d6e4f5;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-top: 10px;
  white-space: pre-wrap;
}

.map-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 420px;
}

#map { width: 100%; height: 100%; min-height: 420px; }

/* VERIFICATION */
.table-wrap { overflow-x: auto; }

.verify-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.verify-table th, .verify-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #eef1f5;
}

.verify-table th { background: var(--navy); color: var(--white); }

.note { margin-top: 20px; color: var(--gray); font-size: 0.92rem; }

.verify-locations {
  text-align: center;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 18px;
}

.verify-table tr.row-inactive { opacity: 0.45; }
.verify-table tr.row-inactive td { font-style: italic; }

/* REFERENCES */
.ref-list { list-style: none; padding: 0; max-width: 800px; margin: 0 auto; }
.ref-list li {
  background: var(--gray-light);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.ref-list a { color: var(--blue); text-decoration: none; }
.ref-list a:hover { text-decoration: underline; }

/* FOOTER */
.footer {
  background: var(--navy);
  color: #b9cbe2;
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}
