/* Blog — Geomatic Ingeniería. Misma paleta y tipografías de la landing. */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 7%;
  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 40%;
  --border: 0 0% 88%;
  --accent-orange: 24 95% 53%;
  --accent-orange-deep: 20 88% 46%;
  --accent-orange-bright: 28 100% 58%;
  --card: 0 0% 98%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Manrope", system-ui, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  margin: 2em 0 0.6em;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-top: 0;
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.1em;
  line-height: 1.8;
}

a {
  color: hsl(var(--accent-orange-deep));
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--accent-orange-bright));
}

strong {
  font-weight: 600;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.5em;
}

/* Header mínimo: solo logo + CTA */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.site-logo img {
  height: 64px;
  width: auto;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.site-logo:hover img {
  transform: scale(1.06);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(
    135deg,
    hsl(var(--accent-orange-bright)) 0%,
    hsl(var(--accent-orange-deep)) 100%
  );
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 8px 30px -8px hsl(var(--accent-orange) / 0.5);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.cta-btn:hover {
  opacity: 0.92;
  color: #fff;
  transform: translateY(-1px);
}

.cta-btn--block {
  width: 100%;
}

.cta-btn--lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--wide {
  max-width: 1000px;
}

article.post {
  padding: 3rem 0 1rem;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.post__meta a {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.post__meta a:hover {
  color: hsl(var(--accent-orange-deep));
}

.post__lead {
  font-size: 1.15rem;
  color: hsl(0 0% 25%);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* Portada a ancho completo */
.post__cover {
  margin: 0 0 2rem;
  padding: 0;
}

.post__cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
  object-fit: cover;
}

/* Resumen rápido */
.quick-summary {
  margin: 0 0 2rem;
  padding: 1.5rem 1.75rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-left: 4px solid hsl(var(--accent-orange));
  border-radius: 0.5rem;
}

.quick-summary__title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.quick-summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.quick-summary li {
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.quick-summary li:last-child {
  margin-bottom: 0;
}

/* Índice de contenidos */
.toc {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: hsl(var(--muted));
  border-radius: 0.5rem;
}

.toc__title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(0 0% 35%);
  margin: 0 0 0.6rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
  counter-reset: toc;
  list-style: none;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 0.4em;
  line-height: 1.5;
}

.toc li::before {
  content: counter(toc) ". ";
  color: hsl(var(--accent-orange-deep));
  font-weight: 600;
}

.toc a {
  color: hsl(0 0% 20%);
  font-weight: 500;
}

/* Tabla */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

thead th {
  background: hsl(var(--card));
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsl(0 0% 30%);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: hsl(var(--muted));
}

tbody tr:hover {
  background: hsl(var(--card));
}

.price-cell {
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 600;
  color: hsl(var(--accent-orange-deep));
  white-space: nowrap;
}

.table-note {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin: -1rem 0 1.5rem;
}

/* CTA dentro del artículo */
.cta-inline {
  margin: 2.5rem 0;
  padding: 2rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-left: 4px solid hsl(var(--accent-orange));
  border-radius: 0.5rem;
}

.cta-inline--orange {
  background: linear-gradient(
    135deg,
    hsl(var(--accent-orange-bright)) 0%,
    hsl(var(--accent-orange-deep)) 100%
  );
  border: none;
  color: #fff;
}

.cta-inline--orange p {
  color: #fff;
}

.cta-inline--orange strong {
  color: #fff;
}

.cta-btn--on-orange {
  background: #fff;
  color: hsl(var(--accent-orange-deep));
  box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.25);
}

.cta-btn--on-orange:hover {
  color: hsl(var(--accent-orange-deep));
  opacity: 0.95;
}

.cta-inline p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.cta-inline p:last-of-type {
  margin-bottom: 1.25rem;
}

/* Bloque destacado */
.callout {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: hsl(var(--card));
  border-radius: 0.5rem;
  border-left: 3px solid hsl(var(--accent-orange));
}

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

/* FAQ */
.faq {
  margin: 2rem 0;
}

.faq__item {
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 0;
}

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

.faq__item p {
  margin: 0;
  color: hsl(0 0% 25%);
}

/* Firma del autor */
.author-signature {
  margin: 2.5rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.author-signature__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    hsl(var(--accent-orange-bright)) 0%,
    hsl(var(--accent-orange-deep)) 100%
  );
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.author-signature__name {
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.15rem;
}

.author-signature__role {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin: 0 0 0.4rem;
}

.author-signature__updated {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* CTA final */
.cta-final {
  margin: 2.5rem 0 3rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(
    135deg,
    hsl(0 0% 7%) 0%,
    hsl(0 0% 15%) 100%
  );
  border-radius: 0.75rem;
  color: hsl(0 0% 98%);
}

.cta-final h2 {
  color: hsl(0 0% 98%);
  margin-top: 0;
}

.cta-final p {
  color: hsl(0 0% 80%);
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

/* Footer mínimo */
.site-footer {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.site-footer a {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.site-footer a:hover {
  color: hsl(var(--accent-orange-deep));
}

/* Blog index */
.blog-index {
  padding: 3.5rem 0 4rem;
}

.blog-index__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.blog-index__subtitle {
  font-size: 1.1rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2.5rem;
}

.post-card {
  display: block;
  padding: 1.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.6rem;
  margin-bottom: 1.25rem;
  background: hsl(var(--background));
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
  color: inherit;
  text-decoration: none;
}

.post-card:hover {
  border-color: hsl(var(--accent-orange));
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  color: inherit;
}

.post-card__title {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.post-card__summary {
  color: hsl(0 0% 25%);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.post-card__date {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}

.breadcrumb {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: hsl(var(--muted-foreground));
}

.breadcrumb a:hover {
  color: hsl(var(--accent-orange-deep));
}

/* Barra fija inferior con CTA (solo móvil) */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 640px) {
  .site-header__inner {
    height: 64px;
  }
  .site-logo img {
    height: 44px;
  }
  .cta-btn {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }
  article.post {
    padding: 2rem 0 1rem;
  }

  .mobile-cta-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid hsl(var(--border));
  }

  body {
    padding-bottom: 5rem;
  }

  .post__cover img {
    border-radius: 0.4rem;
  }

  .quick-summary,
  .toc {
    padding: 1.1rem 1.25rem;
  }
}
