/* =========================================================
   Homepage V2 — full-width, no sidebar
   ========================================================= */

:root {
  --hp2-primary:   #1a56db;
  --hp2-primary-d: #1e40af;
  --hp2-dark:      #1e293b;
  --hp2-text:      #374151;
  --hp2-muted:     #6b7280;
  --hp2-border:    #e5e7eb;
  --hp2-bg:        #f9fafb;
  --hp2-card:      #ffffff;
  --hp2-green:     #059669;
  --hp2-red:       #dc2626;
  --hp2-shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --hp2-shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ── Wrapper ── */
.hp2 {
  background: var(--hp2-bg);
  width: 100%;
}

/* ── Hero ── */
.hp2-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1a56db 100%);
  padding: 40px 24px 48px;
  position: relative;
  overflow: hidden;
}
.hp2-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ── Hero widget card ── */
.hp2-widget {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

/* IP + Location row */
.hp2-widget__top {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.hp2-widget__ip-col {
  flex: 1;
  padding: 22px 24px;
}
.hp2-widget__loc-col {
  flex: 1;
  padding: 22px 24px;
  border-left: 1px solid rgba(255,255,255,.07);
}
.hp2-widget__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin: 0 0 8px;
}
.hp2-widget__ip-num {
  display: block;
  font-size: 26px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hp2-widget__ip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hp2-widget__ver-badge {
  display: inline-block;
  background: rgba(16,185,129,.18);
  color: #34d399;
  border: 1px solid rgba(16,185,129,.28);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 4px;
}
.hp2-widget__copy {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.4);
  font-size: 13px;
  padding: 2px 4px;
  line-height: 1;
  transition: color .15s;
}
.hp2-widget__copy:hover { color: rgba(255,255,255,.85); }
.hp2-widget__city {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hp2-widget__isp {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin: 0;
  word-break: break-word;
}

/* Status row */
.hp2-widget__status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.hp2-widget__status-item {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hp2-widget__status-item + .hp2-widget__status-item {
  border-left: 1px solid rgba(255,255,255,.07);
}
.hp2-widget__status-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.hp2-widget__status-val {
  font-size: 13px;
  font-weight: 600;
}
.hp2-widget__sv--good { color: #34d399; }
.hp2-widget__sv--warn { color: #fbbf24; }
.hp2-widget__sv--bad  { color: #f87171; }

/* Search in widget */
.hp2-widget__search {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.025);
}
.hp2-widget__search form {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
}
.hp2-widget__search input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: none;
  outline: none;
  padding: 10px 15px;
  font-size: 14px;
  color: #fff;
}
.hp2-widget__search input::placeholder { color: rgba(255,255,255,.3); }
.hp2-widget__search button {
  background: var(--hp2-primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.hp2-widget__search button:hover { background: var(--hp2-primary-d); }

/* Action buttons */
.hp2-widget__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.hp2-widget__actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  text-align: center;
  transition: background .15s, color .15s;
  line-height: 1.3;
}
.hp2-widget__actions a + a { border-left: 1px solid rgba(255,255,255,.07); }
.hp2-widget__actions a:hover { background: rgba(255,255,255,.06); color: #fff; }


/* ── Quick Nav ── */
.hp2-quicknav {
  background: #fff;
  border-bottom: 1px solid var(--hp2-border);
  padding: 12px 24px;
  overflow-x: auto;
}
.hp2-quicknav__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: max-content;
  margin: 0 auto;
}
.hp2-quicknav__item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--hp2-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--hp2-text);
  text-decoration: none;
  background: #fff;
  transition: border-color .15s, color .15s, background .15s;
}
.hp2-quicknav__item a:hover {
  border-color: var(--hp2-primary);
  color: var(--hp2-primary);
  background: #eff6ff;
}
.hp2-quicknav__item img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ── Main content area ── */
.hp2-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Card ── */
.hp2-card {
  background: var(--hp2-card);
  border: 1px solid var(--hp2-border);
  border-radius: 12px;
  box-shadow: var(--hp2-shadow);
  overflow: hidden;
}
.hp2-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--hp2-border);
  background: #fafafa;
}
.hp2-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp2-dark);
  margin: 0;
}
.hp2-card__body {
  padding: 0;
}

/* ── IP Details table ── */
.hp2-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.hp2-details-col {
  padding: 8px 0;
}
.hp2-details-col:first-child {
  border-right: 1px solid var(--hp2-border);
}
.hp2-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background .1s;
}
.hp2-detail-row:last-child { border-bottom: none; }
.hp2-detail-row:hover { background: #f9fafb; }
.hp2-detail-row__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: .75;
}
.hp2-detail-row__body {
  flex: 1;
  min-width: 0;
}
.hp2-detail-row__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hp2-muted);
  margin: 0 0 2px;
}
.hp2-detail-row__value {
  font-size: 14px;
  color: var(--hp2-dark);
  font-weight: 500;
  word-break: break-word;
  margin: 0;
}
.hp2-detail-row__value a {
  color: var(--hp2-primary);
  text-decoration: none;
  font-size: 12px;
  margin-left: 6px;
}
.hp2-detail-row__value a:hover { text-decoration: underline; }
.hp2-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 6px;
}
.hp2-badge--green { background: #d1fae5; color: #065f46; }
.hp2-badge--red   { background: #fee2e2; color: #991b1b; }
.hp2-badge--gray  { background: #f3f4f6; color: #6b7280; }

/* ── Details footer ── */
.hp2-details-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--hp2-border);
  background: #fafafa;
}
.hp2-details-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hp2-primary);
  text-decoration: none;
}
.hp2-details-footer a:hover { text-decoration: underline; }

/* ── Map toggle ── */
.hp2-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--hp2-border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hp2-text);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.hp2-map-toggle:hover {
  border-color: var(--hp2-primary);
  color: var(--hp2-primary);
}
#hp2-mapid {
  width: 100%;
  height: 300px;
  display: none;
  border-top: 1px solid var(--hp2-border);
}
#hp2-mapid.visible { display: block; }

/* ── Action buttons ── */
.hp2-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--hp2-border);
}
.hp2-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.hp2-btn:hover { opacity: .88; transform: translateY(-1px); }
.hp2-btn--danger {
  background: #dc2626;
  color: #fff;
}
.hp2-btn--warning {
  background: #d97706;
  color: #fff;
}
.hp2-btn--primary {
  background: var(--hp2-primary);
  color: #fff;
}
.hp2-btn img {
  width: 18px;
  height: 18px;
}

/* ── Section header ── */
.hp2-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.hp2-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hp2-dark);
  margin: 0;
  position: relative;
}
.hp2-section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--hp2-primary);
  border-radius: 2px;
  margin-top: 4px;
}

/* ── Security tool cards ── */
.hp2-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.hp2-tool-card {
  background: var(--hp2-card);
  border: 1px solid var(--hp2-border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--hp2-shadow);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hp2-tool-card:hover {
  box-shadow: var(--hp2-shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}
.hp2-tool-card__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.hp2-tool-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp2-dark);
  margin: 0;
}
.hp2-tool-card__desc {
  font-size: 13px;
  color: var(--hp2-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Why section ── */
.hp2-why {
  background: var(--hp2-card);
  border: 1px solid var(--hp2-border);
  border-radius: 12px;
  box-shadow: var(--hp2-shadow);
  padding: 28px 32px;
}
.hp2-why p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--hp2-text);
  margin: 0 0 14px;
}
.hp2-why p:last-child { margin: 0; }
.hp2-why a { color: var(--hp2-primary); }

/* ── Feedback ── */
.hp2-feedback {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 14px;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hp2-feedback a {
  color: var(--hp2-primary);
  font-weight: 600;
  text-decoration: none;
}
.hp2-feedback-btn {
  background: var(--hp2-primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

/* ── Popular tools ── */
.hp2-popular-tools {
  background: var(--hp2-card);
  border: 1px solid var(--hp2-border);
  border-radius: 12px;
  box-shadow: var(--hp2-shadow);
  padding: 20px 24px;
}
.hp2-popular-tools__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp2-dark);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hp2-border);
}
.hp2-popular-tools__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hp2-popular-tools__list li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--hp2-text);
  text-decoration: none;
  transition: color .15s;
}
.hp2-popular-tools__list li a:hover { color: var(--hp2-primary); }
.hp2-popular-tools__list li img {
  width: 16px;
  height: 16px;
  opacity: .6;
}

/* ── Copy tooltip ── */
.hp2-copied-tip {
  font-size: 11px;
  color: #059669;
  display: none;
  margin-left: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hp2-hero { padding: 28px 14px 36px; }
  .hp2-widget__ip-num { font-size: 20px; }
  .hp2-widget__city { font-size: 15px; }
  .hp2-details-grid { grid-template-columns: 1fr; }
  .hp2-details-col:first-child { border-right: none; border-bottom: 1px solid var(--hp2-border); }
  .hp2-tools-grid { grid-template-columns: 1fr; }
  .hp2-popular-tools__list { grid-template-columns: 1fr; }
  .hp2-content { padding: 20px 14px; gap: 20px; }
  .hp2-why { padding: 20px; }
}
@media (max-width: 560px) {
  .hp2-widget__top { flex-direction: column; }
  .hp2-widget__loc-col { border-left: none; border-top: 1px solid rgba(255,255,255,.07); }
  .hp2-widget__actions { grid-template-columns: 1fr; }
  .hp2-widget__actions a + a { border-left: none; border-top: 1px solid rgba(255,255,255,.07); }
}
@media (min-width: 769px) and (max-width: 992px) {
  .hp2-tools-grid { grid-template-columns: 1fr 1fr; }
}
