/* =========================================================
   GOIPSCAN – GLOBAL STYLE SYSTEM (FINAL)
   Clean, Fast, Responsive, AdSense-Safe
   ========================================================= */

/* ------------------------------
   RESET & BASE TYPOGRAPHY
--------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f7f9fc;
  color: #222;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: #1a4fc7;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ------------------------------
   LAYOUT HELPERS
--------------------------------*/
.layout {
  width: 100%;
  max-width: 1200px;
  padding: 2rem 1.5rem;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.container {
  max-width: 900px;
  margin: auto;
}

.max-900 {
  max-width: 900px;
  margin: auto;
}

.section {
  padding: 2rem 1rem;
}

.center-text {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ------------------------------
   HEADER
   (Covers both <header> and .site-header)
--------------------------------*/
header,
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}

.site-text,
.brand-text {
  display: flex;
  flex-direction: column;
}

.site-name,
.brand h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.site-tagline,
.brand p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

/* Mobile header */
@media (max-width: 900px) {
  header,
  .site-header {
    flex-direction: column;
    text-align: center;
  }
}

/* ------------------------------
   NAVIGATION
--------------------------------*/
nav.menu {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.8rem 1.2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

nav.menu a {
  color: #2161d3;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

nav.menu a:hover {
  color: #1a4fc7;
}

nav.menu a.active {
  color: #1a4fc7;
  border-bottom-color: #1a4fc7;
  font-weight: 700;
}

@media (max-width: 640px) {
  nav.menu {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
}

/* ------------------------------
   CARDS & PANELS
--------------------------------*/
.card {
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  background: #ffffff;
  padding: 2rem;
}

/* ------------------------------
   HOME – IP DISPLAY CARD
--------------------------------*/
.ip-card {
  background: radial-gradient(circle at 0% 0%, #2970e8 0%, #1a4fc7 45%, #1742ad 100%);
  min-height: 200px;
  color: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.ip-label {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.8rem;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

.ip-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.ip {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

#ipv4Text {
  display: inline-block;
  min-width: 200px;
  min-height: 1.2em;
}

.copy {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.copy:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.locline {
  font-size: 1rem;
  margin-top: 1rem;
  opacity: 0.95;
}

/* Smaller IP on mobile */
@media (max-width: 900px) {
  .ip {
    font-size: 2.2rem;
  }
}

/* ------------------------------
   INFO GRID + CONNECTION DETAILS
--------------------------------*/
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

ul.details {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.details li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #eee;
  padding: 10px 0;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

ul.details li:hover {
  background: #fafafa;
}

ul.details li span:first-child {
  opacity: 0.75;
}

/* Map container */
.map-card #map,
#map {
  height: 300px;
  min-height: 300px;
  width: 100%;
  border-radius: 10px;
  margin-top: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* ------------------------------
   MINI IP BANNER (SUBPAGES)
--------------------------------*/
.ip-banner {
  background: linear-gradient(145deg, #2161d3, #1a4fc7);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 0 8px 8px;
}

.ip-banner-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ip-banner-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.ip-banner-value {
  font-size: 1.3rem;
  font-weight: 600;
}

/* ------------------------------
   BUTTONS (generic)
--------------------------------*/
button,
.btn {
  padding: 0.6rem 1.2rem;
  background: #1a4fc7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

button:hover,
.btn:hover {
  background: #1540a7;
}

/* ------------------------------
   FORMS (tools etc.)
--------------------------------*/
input,
select,
textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

input:focus,
textarea:focus {
  border-color: #1a4fc7;
  outline: none;
}

/* ------------------------------
   TOOLS GRID (tools.html)
--------------------------------*/
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.tool-icon {
  font-size: 2rem;
  color: #2161d3;
  margin-bottom: 0.8rem;
}

.tool-card h3 {
  color: #1a4fc7;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.tool-card p {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.tool-card a {
  display: inline-block;
  background: #2161d3;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
}

.tool-card a:hover {
  background: #1a4fc7;
}

/* ------------------------------
   ARTICLE LIST (articles.html)
--------------------------------*/
.article-list-container {
  max-width: 900px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-item {
  background: #fff;
  padding: 1.5rem 1.8rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.article-text {
  flex: 1;
}

.article-text h3 {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.article-text h3 a {
  text-decoration: none;
  color: #1a4fc7;
}

.article-text h3 a:hover {
  text-decoration: underline;
}

.article-desc {
  color: #555;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.article-meta {
  font-size: 0.85rem;
  color: #777;
}

.article-thumb {
  width: 110px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive article list */
@media (max-width: 700px) {
  .article-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-thumb {
    width: 100%;
    height: 150px;
  }
}

/* Hero images inside article body (used by article.css) */
.article-hero {
  max-width: 260px;
  width: 40%;
  float: right;
  margin: 0 0 1.5rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* ------------------------------
   FLAGS
--------------------------------*/
.flag-icon {
  width: 24px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 3px;
}

/* ------------------------------
   FOOTER
--------------------------------*/
footer,
.site-footer {
  text-align: center;
  font-size: 0.85rem;
  padding: 1.8rem 1rem;
  color: #555;
  background: #f1f4f8;
  margin-top: 3rem;
}

footer a,
.site-footer a {
  color: #1a4fc7;
}

.footer-links a {
  margin: 0 0.4rem;
}

/* ------------------------------
   ADSENSE SAFE BLOCK
--------------------------------*/
.ad-container {
  text-align: center;
  margin: 2rem auto;
  min-height: 90px; /* reduce CLS */
}
