:root {
  --primary: #2563eb;
  --primary-dark: #1565c0;
  --secondary: #fff;
  --bg: #f5f5f5;
  --text: #222;
  --text-muted: #666;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Header & Navigation */
.site-header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-light);
  display: block;
  text-align: left;
  padding: 0;
}

.site-header .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
}

.lang-toggle:hover {
  background: #e0eaff;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-left: auto;
  flex: 1 1 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-toggle {
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 0.35em 0.85em;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header img,
.site-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: none;
}

.site-brand span {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  align-items: center;
}

.site-header a,
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.25rem 0;
}

.site-nav a {
  margin: 0;
}

.site-header a:hover,
.site-nav a:hover {
  text-decoration: underline;
  color: #e0eaff;
}

.nav-toggle {
  display: none;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Page intro (replaces duplicate blue page-banner under nav) */
.page-intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 0.5rem;
  text-align: center;
}

.page-intro h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--primary);
  font-weight: 800;
}

.page-intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Legacy page-banner kept for any pages not yet migrated */
.page-banner {
  display: none;
}

/* Location result output table (homepage & tools) */
.location-result {
  margin-top: 1.5em;
  background: #f5faff;
  border-radius: var(--radius);
  padding: 1.25em 1.35em;
  box-shadow: var(--shadow-light);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.location-result-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  margin: 0;
}

.location-result-table th,
.location-result-table td {
  border: none;
  padding: 0.75rem 1rem 0.75rem 0;
  vertical-align: top;
  text-align: left;
  background: transparent;
  font-size: 1rem;
  line-height: 1.55;
}

.location-result-table tbody tr:first-child th,
.location-result-table tbody tr:first-child td {
  padding-top: 0.15rem;
}

.location-result-table tbody tr:last-child th,
.location-result-table tbody tr:last-child td {
  padding-bottom: 0.15rem;
}

.location-result-table tbody tr + tr th,
.location-result-table tbody tr + tr td {
  padding-top: 1rem;
}

.location-result-label {
  font-weight: 600;
  color: var(--primary-dark);
  width: 7.25rem;
  white-space: nowrap;
  padding-right: 1.5rem;
}

.location-result-value {
  font-family: inherit;
  color: var(--text);
  word-break: break-word;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.15em 0.25em;
  width: 100%;
}

.location-result-action {
  width: 5.25rem;
  padding-left: 1rem;
  padding-right: 0;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

/* Override global table styles for location output */
.location-result .location-result-table {
  margin: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.location-result .location-result-table th,
.location-result .location-result-table td {
  border: none;
  background: transparent;
}

.location-result .location-result-table th {
  font-weight: 600;
}

.location-result > .tool-map,
.location-result > iframe.tool-map {
  margin-top: 1.35rem;
}

.location-result > .tool-actions,
.location-result > .qr-block {
  margin-top: 1.15rem;
}

.location-result-value.mono {
  font-family: "Fira Mono", Consolas, monospace;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.location-result-value.pin-highlight {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--primary);
}

.location-result-value.copied,
.copy-icon.copied {
  background: #c8f7dc;
}

button.copy-icon {
  background: #fff;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 0.45em 0.65em;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 4.5rem;
  min-height: 2.35rem;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.18);
  font-size: 1rem;
  font-weight: normal;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  align-self: start;
  margin-top: 0;
}

button.copy-icon .copy-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

button.copy-icon:hover {
  background: #e0eaff;
  border-color: var(--primary);
}

button.copy-icon:active {
  transform: scale(0.96);
}

button.copy-icon svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  pointer-events: none;
  display: block;
  flex-shrink: 0;
}

button.copy-icon svg[fill="none"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero .location-result {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: center;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.65em 1.2em;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 0.95rem;
}

.btn-whatsapp:hover {
  background: #1da851;
  color: #fff;
}

.qr-block {
  margin-top: 1rem;
  text-align: center;
}

.qr-block img {
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  background: #fff;
  padding: 4px;
}

.qr-block p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 0.75em;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.compare-table th {
  background: #f0f7ff;
  color: var(--primary-dark);
}

.compare-table tr:nth-child(even) td {
  background: #fafbfc;
}

.pin-note {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.steps-list li {
  counter-increment: step;
  padding: 0.85rem 0 0.85rem 2.8rem;
  position: relative;
  border-bottom: 1px solid #eee;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.tool-map {
  width: 100%;
  height: 260px;
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  border: 0;
}

/* Main layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

main {
  margin: 0 auto;
  max-width: 900px;
  padding: 1.5rem 1.2rem 2.5rem;
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--primary);
  font-weight: 800;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.section,
.card {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.2rem;
  margin: 1.2rem 0;
}

.section h2,
.card h2 {
  color: var(--primary);
  margin-top: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.section h3 {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.hero {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  margin: 1.2rem 0;
  text-align: center;
}

.hero h2 {
  color: var(--primary);
  margin-top: 0;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.85em 1.5em;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  background: #f0f7ff;
  color: var(--primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: #e0eaff;
  color: var(--primary-dark);
}

/* Footer */
.site-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 2.5rem 1.2rem 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.site-footer .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  display: block;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: #fff;
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.45rem;
}

.site-footer a,
.footer-grid a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.92rem;
}

.site-footer a:hover,
.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.88rem;
  color: #94a3b8;
}

.footer-bottom p {
  margin: 0;
  color: #94a3b8;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.blog-card {
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  display: block;
}

.blog-card h3,
.blog-card .blog-meta,
.blog-card .blog-excerpt,
.blog-card > a:last-child {
  margin-left: 1.2rem;
  margin-right: 1.2rem;
}

.blog-card h3 {
  margin-top: 1rem;
}

.blog-card > a:last-child {
  display: inline-block;
  margin-bottom: 1.2rem;
}

.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.blog-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.blog-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.blog-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-content p {
  margin: 1em 0;
}

.article-content ul,
.article-content ol {
  margin: 0.75em 0;
  padding-left: 1.4em;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.seo-link-card {
  display: block;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.seo-link-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-light);
  color: inherit;
}

.seo-link-card strong {
  display: block;
  color: var(--primary);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.seo-link-card span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.seo-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.seo-internal-links h2 {
  margin-top: 0;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.code-block {
  background: #f5faff;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-family: "Fira Mono", Consolas, monospace;
  font-size: 0.92rem;
  overflow-x: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

.lang-toggle.lang-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.35em 0.85em;
}


.breadcrumb a {
  text-decoration: none;
}

/* Legal pages */
.legal-content h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
}

.legal-content ul {
  padding-left: 1.4em;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checklist .status-done {
  border-left-color: #16a34a;
}

.checklist .status-done::before {
  content: "✓";
  color: #16a34a;
  font-weight: bold;
  flex-shrink: 0;
}

.checklist .status-pending::before {
  content: "○";
  color: #94a3b8;
  flex-shrink: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  background: #fafbfc;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

th,
td {
  padding: 0.7em;
  border: 1px solid #eee;
  text-align: left;
  font-size: 0.95em;
}

th {
  background: #f5f5f5;
  font-weight: 600;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem 1.2rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner .inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
}

.cookie-banner a {
  color: #93c5fd;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-actions button {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-accept {
  background: var(--primary);
  color: #fff;
}

.cookie-decline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569 !important;
}

/* Contact form */
.contact-form label {
  display: block;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.75em 1em;
  border: 1.5px solid #cfd8dc;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: #f8fafc;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.article-content img,
.article-featured-img,
.article-content img.article-hero {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-light);
}

.article-content img.align-right {
  float: right;
  max-width: 280px;
  margin: 0 0 1rem 1.5rem;
}

.related-posts {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.related-posts h2 {
  font-size: 1.15rem;
  color: var(--primary);
}

.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts li {
  margin-bottom: 0.6rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary);
}

.article-toc {
  background: #f5faff;
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
}

.article-toc h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.3rem;
}

.article-toc a {
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

.article-faq dt {
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 1.2rem;
}

.article-faq dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
}

.article-content img.featured-image,
.article-content img.article-hero {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow-light);
}

.article-content figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin: -1rem 0 1.5rem;
}

.related-posts {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-top: 2rem;
}

.related-posts h2 {
  font-size: 1.1rem;
  margin-top: 0;
}

.related-posts ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2em;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: #f0f7ff;
  color: #334155;
}

.article-toc {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

.article-toc ol {
  margin: 0.5rem 0 0;
  padding-left: 1.4em;
}

.article-toc a {
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .article-content img.align-right {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .header-controls {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.25rem;
    order: 3;
    flex: 1 1 100%;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .site-brand {
    order: 1;
    flex: 1 1 auto;
  }

  .site-nav.open {
    display: flex;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .page-banner h1 {
    font-size: 1.2rem;
  }

  main {
    padding: 1rem 0.8rem 2rem;
  }

  .location-result-table th {
    width: 5.75rem;
    padding-right: 0.75rem;
    font-size: 0.92rem;
  }

  .location-result-table th,
  .location-result-table td {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .location-result-table tbody tr + tr th,
  .location-result-table tbody tr + tr td {
    padding-top: 0.85rem;
  }

  .location-result-action {
    width: 4.5rem;
    padding-left: 0.5rem;
  }

  button.copy-icon {
    min-width: 3.5rem;
    padding: 0.4em 0.5em;
  }
}
