/* ===========================
   SISTEMA BASE EDITORIAL
=========================== */

:root {
  --bg: #f7f3ee;
  --bg-alt: #ffffff;
  --text: #1b1b1b;
  --muted: #7b6f63;
  --accent: #c9a27b;
  --border: #e0d6c9;
  --max-width: 1120px;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   MENÚ EDITORIAL
=========================== */

.menu {
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg);
}

.menu-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

/* LOGO RESPONSIVE */
.menu-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.desktop-logo { display: block; }

.mobile-logo {
  display: none;
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* LINKS DEL MENÚ */
.menu-links {
  display: flex;
  align-items: center;
}

.menu-links a {
  margin-left: 40px;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 0.15rem;
}

.menu-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.menu-links a:hover::after {
  width: 100%;
}

/* BOTONES */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
}

.btn:hover {
  transform: translateY(-2px);
  background: #b48c63;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* ===========================
   HERO EDITORIAL
=========================== */

.hero {
  padding: 4rem 0 3rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 1.5rem;
}

/* ===========================
   SECCIONES EDITORIALES
=========================== */

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 520px;
}

/* ===========================
   TARJETAS EDITORIALES (UNIFICADAS)
=========================== */

/* GRID GENERAL */
.cases-grid,
.posts-grid,
.cards-grid,
.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.2rem;
  margin-top: 2rem;
}

/* TARJETA BASE */
.case-card,
.post-card,
.card {
  display: block;
  padding: 1.9rem 1.7rem;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #ffffff;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

/* LABEL NUMERADA (para cards-3) */
.card-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c8a97e;
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* TITULO */
.case-card h3,
.post-card h3,
.card-title {
  font-size: 1.28rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: #111;
  line-height: 1.3;
}

/* DESCRIPCIÓN */
.case-card p,
.post-card p,
.card-text {
  font-size: 1rem;
  line-height: 1.55;
  color: #555;
  margin: 0;
}

/* HOVER PREMIUM */
.case-card:hover,
.post-card:hover,
.card:hover {
  border-color: #c8a97e;
  background: #faf9f7;
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

/* ===========================
   MÉTRICAS
=========================== */

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.metric-block {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.25rem;
  background: var(--bg-alt);
}

.metric-block-value {
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
  margin-bottom: 0.2rem;
}

.metric-block-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.metric-block-text {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===========================
   PROCESO
=========================== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.process-step {
  background: var(--bg-alt);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.25rem;
}

/* ===========================
   PORTFOLIO
=========================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-card {
  background: var(--bg-alt);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform 0.25s ease;
}

.portfolio-thumb {
  background: #f0e3d4;
  height: 140px;
}

.portfolio-body {
  padding: 1.25rem 1.25rem 1.4rem;
  display: grid;
  gap: 0.5rem;
}

.portfolio-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.portfolio-title {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
}

.portfolio-result {
  font-size: 0.85rem;
  color: var(--muted);
}

.portfolio-link {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

/* ===========================
   TESTIMONIO
=========================== */

.testimonial {
  background: var(--bg-alt);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  padding: 2rem;
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}

.testimonial-quote {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
}

.testimonial-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===========================
   CTA FINAL
=========================== */

.cta-final {
  text-align: center;
  padding: 3rem 0 1rem;
}

.cta-final h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.cta-final p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ===========================
   FOOTER
=========================== */

footer {
  padding: 2.5rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.footer-logo {
  height: 28px;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* FOTO EDITORIAL SOBRE MÍ */

.sobre-mi-foto img {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  background: #fff;
  display: block;
  margin-left: auto;
}

/* ===========================
   POSTS GRID
=========================== */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.4rem;
  margin-top: 2.4rem;
}

.post-card {
  display: block;
  padding: 2rem 1.8rem;
  border: 1px solid #e6e3df;
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  transition: all 0.28s ease;
}

.post-card h3 {
  font-size: 1.32rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  color: #111;
}

.post-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

.post-card:hover {
  border-color: #c8a97e;
  background: #faf9f7;
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

/* ===========================
   RESPONSIVE
=========================== */

/* Tablet */
@media (max-width: 960px) {
  .metrics-row,
  .process-grid,
  .portfolio-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mobile general */
@media (max-width: 768px) {

  /* Ocultar CTA del menú */
  .menu .btn-outline {
    display: none !important;
  }

  /* Logo mobile */
  .desktop-logo { display: none; }
  .mobile-logo { display: block; }

  /* Links menú */
  .menu-links {
    display: none;
  }

  /* Wrapper con aire editorial */
  .wrapper {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  /* Hero compensando menú sticky */
  .hero {
    padding-top: 5.5rem !important;
    padding-bottom: 3rem !important;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 1.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 2rem;
  }

  .hero .btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
  }

  section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.7rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
  }

  .cases-grid,
  .cards-3 {
    gap: 1.8rem;
  }

  .case-card,
  .post-card,
  .card {
    padding: 1.5rem 1.3rem;
  }

  .case-card h3,
  .post-card h3,
  .card-title {
    font-size: 1.15rem;
  }
}

/* Mobile pequeño */
@media (max-width: 600px) {
  .metrics-row,
  .process-grid,
  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===========================
   ANIMACIONES EDITORIALES
=========================== */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease-out forwards;
}

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

.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

/* ============================================
   MOBILE — AJUSTE EDITORIAL FINAL
   ============================================ */
@media (max-width: 768px) {

  /* ============================
     MENÚ
     ============================ */
  .menu-inner {
    padding: 0.7rem 0 !important;
  }

  .menu .btn-outline {
    display: none !important;
  }

  .desktop-logo { display: none !important; }
  .mobile-logo { display: block !important; }

  .menu-links {
    display: none !important;
  }

  /* ============================
     WRAPPER GLOBAL
     ============================ */
  .wrapper {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  /* ============================
     HERO
     ============================ */
  .hero {
    padding-top: 6.2rem !important; /* compensación perfecta */
    padding-bottom: 3rem !important;
  }

  .hero-title {
    font-size: 1.9rem !important;
    line-height: 1.22 !important;
    margin-bottom: 1.4rem !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 2.4rem !important;
  }

  .hero .btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
  }

  /* ============================
     SECCIONES
     ============================ */
  section {
    padding: 3rem 0 !important;
  }

  .section-label {
    margin-bottom: 1rem !important;
  }

  .section-title {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
    margin-bottom: 1.5rem !important;
  }

  /* ============================
     CARDS / GRIDS
     ============================ */
  .cards-3,
  .cases-grid {
    gap: 2rem !important;
  }

  .cards-3 + div {
    margin-top: 2.4rem !important;
  }

  .case-card,
  .post-card,
  .card {
    padding: 1.5rem 1.3rem !important;
  }

  .case-card h3,
  .post-card h3,
  .card-title {
    font-size: 1.15rem !important;
  }

  /* ============================
     CTA FINAL
     ============================ */
  .cta-final h2 {
    font-size: 1.6rem !important;
    margin-bottom: 1rem !important;
  }

  .cta-final p {
    margin-bottom: 2rem !important;
  }

  /* ============================
     FOOTER
     ============================ */
  footer {
    padding: 2rem 0 !important;
  }

  .footer-grid {
    gap: 1.5rem !important;
  }

  /* ============================
     AJUSTE GLOBAL DE TIPOGRAFÍA
     ============================ */
  h1, h2, h3 {
    word-break: normal;
    hyphens: auto;
  }
}

/* ============================================
   MOBILE PEQUEÑO (≤600px)
   ============================================ */
@media (max-width: 600px) {

  .metrics-row,
  .process-grid,
  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
/* ===========================
   POST INDIVIDUAL — EDITORIAL
=========================== */

.post-wrapper {
  padding-top: 6rem;
  padding-bottom: 4rem;
  max-width: 760px;
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.post-title {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  display: grid;
  gap: 1.6rem;
}

.post-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin-top: 2.4rem;
  margin-bottom: 1rem;
}

.post-content h3 {
  font-size: 1.4rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

.post-content p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-content img {
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.4rem;
  line-height: 1.7;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
}
@media (max-width: 768px) {

  .post-wrapper {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .post-title {
    font-size: 1.9rem;
    line-height: 1.25;
  }

  .post-content {
    font-size: 1rem;
    gap: 1.4rem;
  }

  .post-content h2 {
    font-size: 1.5rem;
  }

  .post-content h3 {
    font-size: 1.25rem;
  }
}
/* ===========================
   POST INDIVIDUAL — EDITORIAL
=========================== */

.post-wrapper {
  padding-top: 6rem;
  padding-bottom: 4rem;
  max-width: 760px;
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.post-title {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  display: grid;
  gap: 1.6rem;
}

.post-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin-top: 2.4rem;
  margin-bottom: 1rem;
}

.post-content h3 {
  font-size: 1.4rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

.post-content p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-content img {
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.4rem;
  line-height: 1.7;
}

.post-content li {
  margin-bottom: 0.6rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.5rem 0;
}
/* AJUSTES EDITORIALES FINOS PARA POSTS */
.post-wrapper {
  padding-top: 7rem !important;
  padding-bottom: 4rem !important;
  max-width: 760px;
}

@media (max-width: 768px) {
  .post-wrapper {
    max-width: 92% !important;
  }

  .post-title {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
  }
}

.post-date {
  margin-bottom: 1.2rem !important;
}

.post-content p {
  margin-bottom: 1.2rem !important;
}

.post-content ol {
  padding-left: 1.4rem !important;
  margin-bottom: 1.6rem !important;
}

.post-content ol li {
  margin-bottom: 1rem !important;
  line-height: 1.6 !important;
}

.post-intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}
/* ============================================
   AJUSTES EDITORIALES PARA PÁGINA AGENCIA IA
   ============================================ */

/* Normalización de enlaces dentro de textos (IA + Blog) */
p a,
li a,
.card-text a,
.post-content a {
  color: var(--accent) !important;
  text-decoration: none !important;
  font-weight: 500;
}

p a:hover,
li a:hover,
.card-text a:hover,
.post-content a:hover {
  opacity: 0.7;
}

/* Evitar scroll lateral en secciones IA */
.ia-wrapper,
.ia-container,
.ia-section {
  max-width: 100%;
  overflow-x: hidden;
}

/* Grids IA */
.ia-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.ia-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* Ajustes responsive IA */
@media (max-width: 768px) {

  /* Tipografías IA */
  .ia-hero-title,
  .ia-section-title,
  .ia-block-title {
    font-size: 1.7rem !important;
    line-height: 1.25 !important;
  }

  .ia-hero-subtitle,
  .ia-section-text,
  .ia-block-text,
  .ia-feature-text {
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }

  /* Wrapper IA */
  .ia-wrapper {
    padding-left: 1.4rem !important;
    padding-right: 1.4rem !important;
  }

  /* Grids IA responsive */
  .ia-grid-3,
  .ia-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 1.6rem !important;
  }

  /* Espaciado IA */
  .ia-section {
    padding: 2.8rem 0 !important;
  }
}

/* Ajuste editorial para títulos IA */
.ia-hero-title,
.ia-section-title,
.ia-block-title {
  word-break: normal;
  hyphens: auto;
}

/* ============================================
   AJUSTES EXTRA PARA BLOG (ARTÍCULOS)
   ============================================ */

/* Evitar enlaces azules en posts */
.post-content a {
  color: var(--accent) !important;
  text-decoration: none !important;
}

.post-content a:hover {
  opacity: 0.7;
}

/* Ajuste de imágenes en posts */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Ajuste de listas en posts */
.post-content ul,
.post-content ol {
  padding-left: 1.4rem;
  line-height: 1.7;
}

/* Ajuste de títulos en posts */
@media (max-width: 768px) {
  .post-title {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
  }

  .post-content h2 {
    font-size: 1.5rem !important;
  }

  .post-content h3 {
    font-size: 1.25rem !important;
  }
}
