/* ============================================================
   ISIPPublic — style.css
   HopeRise / Clause Organic Theme — warm off-white and forest green
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #f4f5f1; /* Warm off-white/beige tint */
  --surface:      #ffffff; /* Pure white card surface */
  --surface-2:    #e9ece5; /* Slightly darker warm gray-green */
  --border:       rgba(11,76,60,.09); /* Soft forest border */
  --border-hover: rgba(11,76,60,.25);

  --text:         #0b2c24; /* Deep forest charcoal */
  --text-muted:   #556b62; /* Moss gray */
  --text-dim:     #3d4f47;

  --accent:       #0b4c3c; /* Forest green */
  --accent-glow:  rgba(11,76,60,.12);
  --accent-2:     #166534; /* Rich leaf green */

  --green:        #166534;
  --green-bg:     #f0fdf4;
  --green-border: #bbf7d0;

  --orange:       #b45309; /* Warm amber */
  --orange-bg:    #fffbeb;
  --orange-border:#fde68a;

  --red:          #b91c1c; /* Soft red */
  --red-bg:       #fef2f2;
  --red-border:   #fecaca;

  --radius:       12px;
  --radius-sm:    8px;
  --transition:   .22s cubic-bezier(0.16, 1, 0.3, 1);

  --font-sans:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ── Background canvas ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: rgba(244,245,241,.8);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 100%;
  margin: 0;
  padding: 10px 40px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.3px;
  user-select: none;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.logo-text { color: var(--text); }
.logo-dot  { color: #a3e635; /* Fresh lime dot! */ }

/* ── Hero ── */
.hero {
  padding: 80px 0 50px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 14px;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(11,76,60,.04), 0 1px 3px rgba(11,76,60,.02);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 15px 35px rgba(11,76,60,.08), 0 1px 3px rgba(11,76,60,.02);
}

.input-card { text-align: left; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfa;
}

.card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}

.card-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.ip-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 140px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text);
  caret-color: var(--accent);
}

.ip-textarea::placeholder { color: #8a9e95; opacity: 0.8; }

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  background: #fbfcfb;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(.97); }

.btn-ghost {
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-hover);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

/* ── Results ── */
.results-section {
  margin-top: 28px;
  text-align: left;
  animation: fadeUp .3s ease-out;
}

.results-section.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.results-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.results-meta {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

/* ── Summary chips ── */
.summary-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.chip-public  { background: var(--green-bg);  border-color: var(--green-border);  color: var(--green); }
.chip-private { background: var(--orange-bg); border-color: var(--orange-border); color: var(--orange); }
.chip-invalid { background: var(--red-bg);    border-color: var(--red-border);    color: var(--red); }

.chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Table ── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(11,76,60,.03);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: var(--surface);
}

.results-table thead th {
  padding: 10px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: #fafbfa;
  border-bottom: 1px solid var(--border);
}

.results-table thead th:first-child { width: 38px; text-align: center; }

.results-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: rgba(11,76,60,.015); }

.results-table tbody td {
  padding: 10px 10px;
  vertical-align: middle;
}

.results-table tbody td:first-child {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.ip-cell {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid;
}

.status-badge.public  { background: var(--green-bg);  border-color: var(--green-border);  color: var(--green); }
.status-badge.private { background: var(--orange-bg); border-color: var(--orange-border); color: var(--orange); }
.status-badge.invalid { background: var(--red-bg);    border-color: var(--red-border);    color: var(--red); }

.status-badge svg { flex-shrink: 0; }

.rfc-cell {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  max-width: 100%;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-logo {
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Navigation & Dropdown ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-trigger:hover,
.dropdown:hover .dropdown-trigger {
  color: var(--primary);
  background: rgba(18, 53, 36, 0.05);
}

.nav-link {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(18, 53, 36, 0.05);
}

.dropdown-caret {
  transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  min-width: 180px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(18, 53, 36, 0.05);
  color: var(--primary);
}

/* ── Learn Section & Articles ── */
.learn-section {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.learn-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  text-align: center;
}

.learn-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  scroll-margin-top: 80px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(18, 53, 36, 0.04);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.article-tag {
  background: rgba(18, 53, 36, 0.06);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-read-time {
  color: var(--text-muted);
}

.article-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.article-content {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
}

.article-content p {
  margin-bottom: 16px;
}

.article-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-content ul, .article-content ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13.5px;
}

.article-content th, .article-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th {
  background: rgba(18, 53, 36, 0.03);
  font-weight: 600;
}

.article-content code {
  font-family: var(--font-mono);
  background: rgba(18, 53, 36, 0.05);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── EEAT Author Block ── */
.author-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.author-avatar {
  font-size: 24px;
  background: rgba(18, 53, 36, 0.06);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.author-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Standalone Article Page Layout ── */
.article-container {
  max-width: 800px;
  margin: 60px auto 100px;
  padding: 0 24px;
  text-align: left;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb-separator {
  color: var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, transform 0.15s ease;
}

.back-link:hover {
  color: var(--text);
  transform: translateX(-2px);
}

.article-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.article-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ── Profile Page Layout ── */
.profile-layout {
  display: flex;
  gap: 48px;
  margin-top: 24px;
  align-items: flex-start;
}

.profile-sidebar {
  width: 220px;
  flex-shrink: 0;
  text-align: center;
}

.profile-img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.profile-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 20px;
  display: block;
  text-align: center;
}

.profile-main {
  flex-grow: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .profile-layout {
    flex-direction: column;
    gap: 32px;
    align-items: center;
  }
  
  .profile-sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .profile-badges {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .logo-img {
    height: 38px;
  }
  
  .header-inner {
    padding: 8px 24px;
    min-height: 56px;
  }
}

@media (max-width: 540px) {
  .header-inner {
    padding: 8px 16px;
  }
  .hero { padding: 50px 0 30px; }
  .hero-title { font-size: 2rem; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 2px; }
  .card-actions { gap: 6px; }
  .results-table { font-size: 11.5px; }
  .results-table tbody td { padding: 8px 10px; }
  .results-table thead th { padding: 8px 10px; }
  .article-card { padding: 20px; }
  .article-content table { display: block; overflow-x: auto; }
  .article-container { margin: 40px auto 60px; }
}

/* ── Affiliate CTA & Recommendation Styling ── */
.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-2);
  color: #ffffff !important;
  border-color: var(--accent-2);
  box-shadow: 0 4px 12px rgba(11,76,60,0.15);
}

.cta-card {
  background: linear-gradient(135deg, rgba(11, 76, 60, 0.03) 0%, rgba(22, 101, 52, 0.05) 100%);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
}

.cta-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.cta-card-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.cta-button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.recommendations-card {
  background: linear-gradient(135deg, rgba(11, 76, 60, 0.03) 0%, rgba(22, 101, 52, 0.05) 100%);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: fadeUp .3s ease-out;
  text-align: left;
}

.recommendations-card.hidden {
  display: none;
}

.recommendations-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.recommendations-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recommendations-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.recommendations-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.recommendations-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: color var(--transition), border-color var(--transition);
}

.recommendations-link:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}

/* ── VPN Comparison Deals Grid ── */
.vpn-deals-section {
  margin: 40px 0;
  text-align: left;
}
.vpn-deals-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}
.vpn-deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.vpn-deal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(11,76,60,.03);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.vpn-deal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: 0.8;
}
.vpn-deal-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 15px 35px rgba(11,76,60,.08);
}
.vpn-deal-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(11, 76, 60, 0.08);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.vpn-deal-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.vpn-deal-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
}
.vpn-deal-banner-wrapper {
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
}
.vpn-deal-banner-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}
.vpn-deal-card:hover .vpn-deal-banner-wrapper img {
  transform: scale(1.02);
}
.vpn-deal-action {
  margin-top: auto;
  text-align: center;
}
.vpn-deal-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .vpn-deals-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

