html {
  scroll-behavior: smooth;
}

:root {
  --fixed-offset: 180px;
}

section,
.split-section {
  scroll-margin-top: calc(var(--fixed-offset) + 20px);
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #ffffff;
  color: #111;
  padding-top: var(--fixed-offset);
}

/* HEADER */
.fixed-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.top-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 18px 20px 10px;
  background: linear-gradient(180deg, #ffffff, #f5e6a3);
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo-wrap {
  text-align: center;
}

.site-logo {
  max-width: 260px;
  width: 100%;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.35));
}

.header-side-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header-side-nav-left {
  justify-content: flex-end;
}

.header-side-nav-right {
  justify-content: flex-start;
}

.header-side-nav a {
  background: #0b1f3a;
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid #d4af37;
  font-weight: 700;
  font-size: 14px;
  transition: 0.2s;
  white-space: nowrap;
}

.header-side-nav a:hover {
  background: #d4af37;
  color: #0b1f3a;
  transform: translateY(-2px);
}

/* TICKER */
.ticker-box {
  background: #0b1f3a;
  width: 100%;
  border-bottom: 2px solid #d4af37;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  padding-top: 6px;
  overflow: hidden;
}

.ticker-wrap {
  background: transparent;
  color: #fff;
  text-align: center;
  width: 100%;
  border-bottom: none;
  box-shadow: none;
  overflow: hidden;
}

.ticker-phone-top {
  padding: 6px 10px 4px;
  color: #f5d36b;
  font-weight: 800;
}

.ticker-info-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 16px;
  line-height: 1.3;
  color: #f5d36b;
  font-weight: 700;
  padding: 4px 10px 2px;
}

.ticker-static {
  padding: 0;
  overflow: hidden;
}

/* AUTO-SCROLLING SPOT TICKER */
.ticker-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  width: max-content;
  min-width: 100%;
  overflow: visible;
  padding: 8px 10px 10px;
  box-sizing: border-box;
  animation: tickerScroll 22s linear infinite;
  will-change: transform;
}

.ticker-inner:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% {
    transform: translateX(100vw);
  }

  100% {
    transform: translateX(-100%);
  }
}

.spot-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #101d2f;
  border: 1px solid rgba(212, 175, 55, 0.65);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: inset 0 0 12px rgba(255,255,255,0.04);
  width: auto;
  min-width: max-content;
  box-sizing: border-box;
  white-space: nowrap;
}

.spot-label {
  color: #f5d36b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 13px;
  white-space: nowrap;
}

.spot-price {
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
}

.spot-updated {
  flex: 0 0 auto;
  color: #cfd6df;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.price-up {
  color: #00e676;
  font-weight: 900;
  white-space: nowrap;
}

.price-down {
  color: #ff5252;
  font-weight: 900;
  white-space: nowrap;
}

.price-flat {
  color: #ffd54f;
  font-weight: 900;
  white-space: nowrap;
}

/* MAIN */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 30px 20px;
}

.hero {
  text-align: center;
  padding: 35px 0 10px;
}

.hero h1 {
  text-align: center;
  font-size: 42px;
  margin-bottom: 10px;
  color: #111;
}

.hero p {
  text-align: center;
  font-size: 18px;
  color: #444;
  margin-bottom: 0;
}

/* INFO BOXES */
.info {
  background: #fafafa;
  padding: 30px;
  margin-top: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.info h2 {
  margin-top: 0;
  color: #b89600;
}

.contact-box p {
  margin: 10px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 10px;
}

.section-copy {
  text-align: center;
  color: #555;
  max-width: 900px;
  margin: 0 auto 10px;
  line-height: 1.8;
}

/* SPLIT SECTIONS */
.split-section {
  display: flex;
  gap: 50px;
  align-items: center;
  margin: 50px 0;
  padding: 30px;
  background: #fff;
  border: 2px solid #0b1f3a;
  border-radius: 18px;
  position: relative;
}

.split-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, #ffd700);
}

.split-section.reverse {
  flex-direction: row-reverse;
}

.split-image {
  flex: 1;
  text-align: center;
}

.split-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 14px;
  border: 2px solid #0b1f3a;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.split-text {
  flex: 1;
  max-width: 500px;
}

.split-text h2 {
  color: #0b1f3a;
}

.split-text h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #d4af37;
  margin-top: 6px;
}

.split-text p {
  line-height: 1.8;
  color: #333;
}

/* FEATURED COINS */
#featured-coins {
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  justify-content: center;
  justify-items: center;
  gap: 30px;
  margin-top: 25px;
}

.card {
  background: #0b1f3a;
  color: #ffffff;
  padding: 25px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  border: 2px solid #d4af37;
  transition: 0.3s;
  overflow: hidden;
  max-width: 300px;
  width: 100%;
  box-sizing: border-box;
  margin: auto;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 25px rgba(212,175,55,0.4);
}

.card img {
  height: 220px;
  width: 100%;
  max-width: 220px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.card img:hover {
  transform: scale(1.15);
}

.card h3 {
  color: #ffd700;
}

.card p {
  color: #e0e6ed;
  font-size: 14px;
  line-height: 1.6;
}

/* MAP */
.map-wrap {
  margin-top: 20px;
  border-radius: 16px;
  overflow: hidden;
}

/* COIN MODAL */
.coin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 9999;
}

.coin-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.coin-zoom-wrap {
  max-width: 90%;
  max-height: 80%;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.coin-zoom-wrap img {
  max-width: 100%;
  max-height: 75vh;
  display: block;
  border-radius: 10px;
  transform-origin: center center;
  transition: transform 0.08s ease;
  cursor: zoom-in;
}

.coin-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  z-index: 10000;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  background: #ffd700;
  margin-top: 30px;
}

/* TABLET */
@media (max-width: 1100px) {
  .top-header {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding: 12px 14px;
  }

  .site-logo {
    max-width: 220px;
  }

  .header-side-nav-left,
  .header-side-nav-right {
    justify-content: center;
  }

  .header-side-nav a {
    font-size: 13px;
    padding: 8px 11px;
  }

  .split-section,
  .split-section.reverse {
    gap: 28px;
    padding: 24px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(240px, 300px));
  }
}

/* MOBILE */
@media (max-width: 768px) {
  section,
  .split-section {
    scroll-margin-top: calc(var(--fixed-offset) + 35px);
  }

  .container {
    padding: 18px 14px;
  }

  .top-header {
    padding: 10px 10px 8px;
  }

  .site-logo {
    max-width: 185px;
  }

  .header-side-nav {
    gap: 6px;
    justify-content: center;
  }

  .header-side-nav a {
    font-size: 11px;
    padding: 7px 8px;
    border-width: 1px;
  }

  .ticker-info-line {
    gap: 10px;
    font-size: 13px;
    padding: 5px 8px 2px;
  }

  .ticker-inner {
    animation-duration: 18s;
    padding: 7px 8px 9px;
  }

  .spot-card {
    gap: 6px;
    padding: 7px 9px;
  }

  .spot-label {
    font-size: 11px;
  }

  .spot-price {
    font-size: 15px;
  }

  .spot-updated {
    font-size: 11px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}