* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 197, 94, 0.18), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(132, 204, 22, 0.14), transparent 30%),
    linear-gradient(180deg, #f8fff8 0%, #eaf7e9 100%);
  color: #111827;
}

/* ---------- TOP BAR ---------- */

.topbar {
  padding: 34px 28px 28px;
  background: #ffffff;
  border-bottom: 0;
  box-shadow: none;
}

.topbar-inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.topbar-icon {
  display: none;
}

.topbar h1 {
  margin: 0 0 8px;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  font-weight: 900;
  text-align: center;
  color: #166534;
  background: linear-gradient(90deg, #166534 0%, #22c55e 48%, #0f766e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.topbar p {
  margin: 0 auto;
  max-width: 720px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  font-weight: 500;
}

/* ---------- INTRO PLUG SECTION ---------- */

.intro-section {
  padding: 0;
}

.plug-section {
  width: min(1380px, calc(100% - 64px));
  margin: 32px auto 0;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(187, 247, 208, 0.9);
  box-shadow:
    0 24px 62px rgba(15, 23, 42, 0.1),
    0 0 66px rgba(34, 197, 94, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.plug-heading,
.section-heading {
  max-width: 760px;
  margin: 0 auto 18px;
  text-align: center;
}

.plug-section .plug-heading {
  max-width: none;
  margin: 0;
  text-align: left;
}

.plug-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.plug-heading h2,
.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -1.2px;
  font-weight: 900;
}

.plug-section .plug-heading h2 {
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -1.7px;
}

.plug-heading p,
.section-heading p {
  margin: 12px auto 0;
  color: #475569;
  line-height: 1.55;
  font-size: 16px;
}

.plug-section .plug-heading p {
  margin-left: 0;
  margin-right: 0;
  max-width: 260px;
  font-size: 16px;
}

.plug-card-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.plug-card {
  min-width: 0;
  position: relative;
  overflow: visible;
  min-height: 230px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(187, 247, 208, 0.9);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow:
    0 14px 34px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.plug-card h3 {
  margin: 12px 0 4px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -1px;
  color: #0f172a;
}

.plug-card p {
  margin: 0 0 6px;
  color: #475569;
  line-height: 1.35;
  font-size: 14px;
}

.plug-card p:last-child {
  margin-bottom: 0;
}

/* ---------- PLUG IMAGES ---------- */

.plug-image,
.large-plug-photo,
.plug-detail-main-photo {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.plug-image {
  width: 82px;
  height: 82px;
  border-radius: 22px;
}

.large-plug-photo {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
}

.plug-detail-main-photo {
  width: 98px;
  height: 98px;
  border-radius: 26px;
}

.plug-photo-img,
.top-plug-photo,
.reference-plug-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 8px;
}

/* ---------- LAYOUT ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: calc(100vh - 120px);
  max-width: 1540px;
  margin: 44px auto 0;
  padding: 0 38px 42px;
  column-gap: 56px;
  align-items: start;
}

.map-area {
  padding: 0;
  min-width: 0;
}

#map-wrapper {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(187, 215, 201, 0.95);
  border-radius: 24px;
  overflow: hidden;
  max-width: 1180px;
  margin: 0;
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.14),
    0 0 55px rgba(34, 197, 94, 0.1),
    0 0 80px rgba(132, 204, 22, 0.07);
}

#map {
  width: 100%;
  height: 640px;
  background-color: #bfded7;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, 0.10) 2px, transparent 2px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.10) 2px, transparent 2px);
  background-size: 42px 42px, 42px 42px, 168px 168px, 168px 168px;
  touch-action: pan-x pan-y pinch-zoom;
}

.leaflet-container {
  background-color: #bfded7;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, 0.10) 2px, transparent 2px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.10) 2px, transparent 2px);
  background-size: 42px 42px, 42px 42px, 168px 168px, 168px 168px;
}

/* ---------- INFO PANEL ---------- */

.info-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 250, 0.96));
  border-left: none;
  border-radius: 0;
  padding: 46px 48px 42px;
  backdrop-filter: blur(18px);
  box-shadow:
    -24px 0 64px rgba(15, 23, 42, 0.08),
    inset 1px 0 0 rgba(22, 101, 52, 0.08);
  overflow-y: auto;
  min-width: 0;
  min-height: 640px;
  max-height: calc(100vh - 90px);
  position: sticky;
  top: 24px;
}

.info-panel h2 {
  margin-top: 0;
  margin-bottom: 32px;
  font-size: clamp(36px, 3.4vw, 54px);
  font-weight: 950;
  letter-spacing: -2.4px;
  line-height: 0.95;
  color: #0f172a;
}

.panel-divider {
  border: none;
  border-top: 1px solid #d9ded8;
  margin: 34px 0 42px;
}

.hidden {
  display: none;
}

.info-label {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 3.4px;
  color: #64748b;
  font-weight: 950;
}

.info-value {
  margin: 0;
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.05;
  color: #111827;
  word-break: break-word;
  font-weight: 950;
  letter-spacing: -1.1px;
}

#plug-info > p:not(.info-label):not(.info-value),
#country-info > p:not(.info-label):not(.info-value) {
  color: #334155;
  font-size: 16px;
  line-height: 1.45;
  max-width: 330px;
}

.main-plug-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 18px;
}

.main-plug-text {
  font-size: clamp(40px, 3.4vw, 60px);
  font-weight: 950;
  letter-spacing: -1.8px;
  color: #0f172a;
}

.plug-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.plug-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}


.info-panel .large-plug-photo {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  border-color: rgba(22, 163, 74, 0.22);
}

.info-panel .plug-pill {
  background: #147d6f;
  box-shadow: 0 12px 24px rgba(20, 125, 111, 0.18);
}

.info-panel .fact-box {
  border-color: rgba(22, 101, 52, 0.13);
  border-radius: 22px;
}

.info-panel .fact-label {
  color: #64748b;
  letter-spacing: 1.6px;
}

.info-panel .fact-value {
  font-size: 16px;
  font-weight: 900;
  color: #111827;
}

.info-panel .history-box {
  background: linear-gradient(135deg, #ecfdf5, #f7fff8);
  border-color: rgba(22, 163, 74, 0.22);
}

.info-panel .history-box strong {
  color: #147d6f;
}

/* ---------- CLICKED COUNTRY CARD ---------- */

.plug-detail-card {
  border: 1px solid rgba(187, 247, 208, 0.95);
  border-radius: 30px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.10),
    0 0 38px rgba(22, 163, 74, 0.12);
}

.plug-detail-header {
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(132, 204, 22, 0.14), transparent 34%),
    linear-gradient(135deg, #f8fff8, #ecfdf5);
}

.plug-detail-hero {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
}

.plug-detail-title-wrap {
  min-width: 0;
}

.plug-detail-header h3 {
  margin: 0 0 6px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 0.98;
  letter-spacing: -1.6px;
  color: #0f172a;
}

.plug-detail-header p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.35;
}

.compact-plug-pills {
  margin-top: 12px;
}

.compact-plug-pills .plug-pill {
  min-width: auto;
  padding: 7px 10px;
  font-size: 12px;
}

.plug-detail-body {
  padding: 16px;
}

.fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.fact-box {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 11px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.fact-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #64748b;
  margin-bottom: 5px;
  font-weight: 850;
}

.fact-value {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.history-box {
  margin-top: 12px;
  padding: 13px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid rgba(134, 239, 172, 0.9);
}

.history-box strong {
  display: block;
  margin-bottom: 6px;
  color: #166534;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.history-box p {
  margin: 0 0 10px;
  color: #14532d;
  line-height: 1.5;
  font-size: 13.5px;
  font-weight: 600;
}

.history-box p:last-child {
  margin-bottom: 0;
}

/* ---------- ALL PLUG TYPES SECTION ---------- */

.all-plug-types-section {
  margin: 26px auto 0;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.85);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  max-width: 1180px;
}

.all-plug-types-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.type-reference-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: visible;
}

.type-reference-card .plug-image {
  width: 92px;
  height: 92px;
  cursor: zoom-in;
}

.type-reference-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #0f172a;
}

.type-reference-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
  font-size: 13.5px;
}

.type-reference-meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

.type-reference-meta strong {
  color: #0f172a;
}

.plug-hover-bubble {
  display: none;
  position: absolute;
  left: 102px;
  top: 0;
  width: 190px;
  height: 190px;
  z-index: 9999;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(187, 247, 208, 0.95);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.24),
    0 0 40px rgba(34, 197, 94, 0.12);
  padding: 18px;
  pointer-events: auto;
}

.type-reference-card.bubble-visible .plug-hover-bubble,
.plug-card.bubble-visible .plug-hover-bubble {
  display: grid;
  place-items: center;
}

.plug-hover-bubble img,
.plug-hover-bubble svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- CAPITAL LABELS ---------- */

.capital-marker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 950 !important;
}

.capital-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}

.capital-label {
  padding: 3px 7px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(203, 213, 225, 0.9);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

/* ---------- LEAFLET ---------- */

.leaflet-container {
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.leaflet-control-zoom a,
.leaflet-control-home {
  border-radius: 10px !important;
  margin-bottom: 4px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.leaflet-control-home {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(0, 0, 0, 0.18);
  background: white;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  left: -9999px;
}

.noscript-warning {
  margin: 30px;
  padding: 20px;
  border-radius: 20px;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1250px) {
  .plug-section {
    grid-template-columns: 1fr;
  }

  .plug-section .plug-heading {
    text-align: center;
  }

  .plug-section .plug-heading p {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }

  .plug-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  .info-panel {
    position: static;
    max-height: none;
    border-radius: 28px;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 18px;
  }

  .topbar-inner {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar h1 {
    font-size: 34px;
  }

  .topbar p {
    font-size: 14px;
  }

  .plug-section {
    width: calc(100% - 28px);
    margin: 18px auto 0;
    padding: 20px;
  }

  .plug-card-grid,
  .all-plug-types-list {
    grid-template-columns: 1fr;
  }

  .layout {
    padding: 0 18px 28px;
    margin-top: 26px;
  }

  .map-area {
    padding: 18px;
  }

  .info-panel {
    padding: 28px;
  }

  .info-panel h2 {
    font-size: 38px;
    letter-spacing: -1.8px;
  }

  .info-label {
    font-size: 15px;
    letter-spacing: 2.2px;
  }

  .info-value {
    font-size: 28px;
  }

  #map {
    height: 520px;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .plug-detail-hero {
    grid-template-columns: 82px 1fr;
  }

  .plug-detail-main-photo {
    width: 82px;
    height: 82px;
  }

  .plug-hover-bubble {
    left: 96px;
    width: 150px;
    height: 150px;
  }
}
/* ---------- FINAL PANEL SCALE OVERRIDES ---------- */
.info-panel {
  padding: 38px 42px 36px;
}

.info-panel h2 {
  margin-bottom: 26px;
  font-size: clamp(30px, 2.45vw, 38px);
  line-height: 1.02;
  letter-spacing: -1.7px;
}

.info-label {
  margin-top: 18px;
  margin-bottom: 7px;
  font-size: 12.5px;
  letter-spacing: 2.5px;
  line-height: 1.1;
}

.info-value {
  font-size: clamp(22px, 1.85vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.7px;
}

#plug-info > p:not(.info-label):not(.info-value),
#country-info > p:not(.info-label):not(.info-value) {
  font-size: 15.5px;
  line-height: 1.45;
  max-width: 315px;
}

.main-plug-row {
  gap: 14px;
  margin: 10px 0 16px;
}

.main-plug-text {
  font-size: clamp(34px, 2.8vw, 44px);
  letter-spacing: -1.2px;
  line-height: 1;
}

.info-panel .large-plug-photo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
}

.info-panel .plug-pill {
  min-width: auto;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1;
}

.plug-pill-row {
  gap: 8px;
  margin-top: 8px;
}

.panel-divider {
  margin: 28px 0 34px;
}

.plug-detail-card {
  border-radius: 24px;
}

.plug-detail-header {
  padding: 14px;
}

.plug-detail-hero {
  grid-template-columns: 72px 1fr;
  gap: 14px;
}

.plug-detail-main-photo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.plug-detail-header h3 {
  font-size: clamp(24px, 2.25vw, 32px);
  letter-spacing: -1.1px;
  line-height: 1;
}

.plug-detail-header p {
  font-size: 13.5px;
  line-height: 1.3;
}

.compact-plug-pills {
  margin-top: 10px;
}

.compact-plug-pills .plug-pill {
  padding: 6px 9px;
  font-size: 11.5px;
}

.plug-detail-body {
  padding: 14px;
}

.fact-grid {
  gap: 9px;
  margin-bottom: 12px;
}

.fact-box {
  padding: 10px;
  border-radius: 14px;
}

.fact-label,
.info-panel .fact-label {
  font-size: 9.5px;
  letter-spacing: 1px;
}

.fact-value,
.info-panel .fact-value {
  font-size: 13.5px;
  line-height: 1.28;
}

.history-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
}

.history-box strong {
  font-size: 11.5px;
  letter-spacing: 0.7px;
}

.history-box p {
  font-size: 12.8px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .info-panel {
    padding: 24px;
  }

  .info-panel h2 {
    font-size: 32px;
    letter-spacing: -1.4px;
  }

  .info-label {
    font-size: 11.5px;
    letter-spacing: 2px;
  }

  .info-value {
    font-size: 23px;
  }

  .main-plug-text {
    font-size: 34px;
  }
}
