/* ============================================================
   TakeYourDesign — Extras: carrusel, acordeón, blog, forms…
   ============================================================ */

/* ================= TESTIMONIOS ================= */

.carousel { position: relative; }

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar { display: none; }

@media (min-width: 760px) { .carousel-track { grid-auto-columns: calc(50% - 0.65rem); } }
@media (min-width: 1080px) { .carousel-track { grid-auto-columns: calc(33.333% - 0.85rem); } }

.quote-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.9rem;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.quote-stars { display: flex; gap: 3px; color: var(--brand); }
.quote-stars svg { width: 15px; height: 15px; }

.quote-card blockquote { font-size: 0.95rem; line-height: 1.65; color: var(--ink-2); flex: 1; }

.quote-author { display: flex; align-items: center; gap: 0.85rem; }

.quote-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.quote-author strong { display: block; font-size: 0.9rem; }
.quote-author span { font-size: 0.8rem; color: var(--ink-3); }

.carousel-nav { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.6rem; }

/* Tarjeta de perfil de Trustpilot */
.trustpilot-card {
  max-width: 600px;
  margin: 2.5rem auto 0;
  padding: 1.1rem 1.4rem;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.trustpilot-card a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 1.15rem;
  text-decoration: none;
  color: inherit;
}
.trustpilot-logo { width: 116px; height: auto; display: block; }
.trustpilot-stars { display: flex; align-items: center; gap: 3px; color: var(--tp-green, #00b67a); }
.trustpilot-stars svg { width: 17px; height: 17px; display: block; }
.trustpilot-star-partial { position: relative; width: 17px; height: 17px; }
.trustpilot-star-partial .star-under { color: #e4e4e7; position: absolute; inset: 0; }
.trustpilot-star-partial .star-over { position: absolute; inset: 0; clip-path: inset(0 60% 0 0); }
.trustpilot-score { font-size: 1rem; white-space: nowrap; }
.trustpilot-score strong { font-family: var(--font-display); font-size: 1.15rem; }
.trustpilot-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: var(--tp-green, #00b67a);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.trustpilot-count { font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
.trustpilot-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.trustpilot-cta::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all var(--t-fast) var(--ease);
}

.carousel-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.carousel-btn svg { width: 18px; height: 18px; }

/* ================= BLOG CARDS ================= */

.blog-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.post-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.post-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 244, 245, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 244, 245, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
}

.post-cover span {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(244, 244, 245, 0.55);
}

.post-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }

.post-tag {
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-body h3 { font-size: 1.08rem; line-height: 1.35; }
.post-card:hover h3 { color: var(--brand); }
.post-body p { font-size: 0.88rem; color: var(--ink-3); flex: 1; }

.post-meta {
  font-size: 0.78rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}
.post-meta > span + span::before {
  content: "·";
  color: var(--brand);
  margin-right: 0.9rem;
}
.post-meta-author {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--ink-2);
}
.post-meta-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ================= ACORDEÓN (FAQ / Por qué nosotros) ================= */

.accordion { display: grid; gap: 0.8rem; max-width: 780px; margin-inline: auto; }

.acc-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease);
}

.acc-item.is-open { border-color: var(--brand); }

.acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.4rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.acc-btn svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand); transition: transform var(--t-fast) var(--ease); }
.acc-item.is-open .acc-btn svg { transform: rotate(45deg); }

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-med) var(--ease);
}

.acc-panel > div { overflow: hidden; }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel p { padding: 0 1.4rem 1.3rem; font-size: 0.92rem; color: var(--ink-3); }

/* ================= BREADCRUMBS ================= */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-dark-3);
  margin-bottom: 1.6rem;
}

.breadcrumbs a { color: var(--ink-dark-2); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs li{ list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--ink-dark-3); }
.breadcrumbs [aria-current] { color: var(--brand); }

/* ================= PAGE HERO (interior) ================= */

.page-hero {
  position: relative;
  background: var(--dark);
  color: var(--ink-dark);
  margin-top: calc(var(--header-h) * -1);
  padding-block: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 244, 245, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 244, 245, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, #000 30%, transparent 75%);
}

.page-hero .hero-glow { opacity: 0.8; }
.page-hero .container { position: relative; }
.page-hero h1 { margin-block: 1.2rem 1.3rem; max-width: 780px; }
.page-hero .lead { font-size: var(--fs-lead); color: var(--ink-dark-2); max-width: 640px; }

/* Page-hero en monitores anchos */
@media (min-width: 1600px) {
  .page-hero h1 { max-width: 960px; }
  .page-hero .lead { max-width: 720px; }
}

/* ================= PAGE HERO CON FOTO ================= */

/* Variante foto de fondo con overlay */
.page-hero--bg { background: #050507; }
.page-hero--bg .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}
.page-hero--bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 6, 9, 0.4) 0%, rgba(6, 6, 9, 0.86) 100%),
    linear-gradient(90deg, rgba(6, 6, 9, 0.55) 0%, rgba(6, 6, 9, 0.1) 60%, rgba(6, 6, 9, 0.3) 100%);
}
.page-hero--bg::before { opacity: 0.35; }
.page-hero--bg .container { position: relative; z-index: 1; }
.page-hero--bg .hero-glow { opacity: 0.55; }

/* Hero del home con foto de fondo */
.hero--bg { background: #050507; }
.hero--bg .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}
.hero--bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 6, 9, 0.35) 0%, rgba(6, 6, 9, 0.88) 100%),
    linear-gradient(90deg, rgba(6, 6, 9, 0.6) 0%, rgba(6, 6, 9, 0.15) 55%, rgba(6, 6, 9, 0.35) 100%);
}
.hero--bg::before { opacity: 0.3; }
.hero--bg .hero-inner { position: relative; z-index: 1; }
.hero--bg .hero-glow { opacity: 0.4; }

/* ================= IMÁGENES EN PANELES ================= */

.visual-panel--photo { place-items: stretch; }
.visual-panel--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
}

.post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card--photo .case-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}
.case-card--photo::before {
  background: linear-gradient(180deg, rgba(11, 11, 14, 0.5), rgba(11, 11, 14, 0.92));
}

/* ================= FEATURE LIST (detalle servicio) ================= */

.feature-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1920px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature {
  display: flex;
  gap: 1.1rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.feature .icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.feature p { font-size: 0.9rem; color: var(--ink-3); }

/* ================= FORMULARIO ================= */

.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .form-grid .full { grid-column: 1 / -1; } }

.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

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

.form-note { font-size: 0.8rem; color: var(--ink-3); }

.form-status {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.form-status.is-success {
  color: var(--success, #0b7a3b);
  background: var(--success-soft, rgba(11, 122, 59, 0.08));
  border: 1px solid rgba(11, 122, 59, 0.25);
}
.form-status.is-error {
  color: var(--danger, #b3261e);
  background: var(--danger-soft, rgba(179, 38, 30, 0.08));
  border: 1px solid rgba(179, 38, 30, 0.25);
}
.cf-turnstile { min-height: 65px; }

/* ================= CONTACTO ================= */

.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 4.5rem; } }

.contact-info-card {
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--dark);
  color: var(--ink-dark);
}

.contact-info-card h3 { color: var(--ink-dark); margin-bottom: 1.4rem; }

.contact-info-card ul { display: grid; gap: 1.2rem; }
.contact-info-card li { display: flex; gap: 0.9rem; align-items: flex-start; font-size: 0.94rem; color: var(--ink-dark-2); }
.contact-info-card svg { width: 19px; height: 19px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.contact-info-card strong { display: block; color: var(--ink-dark); font-size: 0.85rem; margin-bottom: 2px; }

/* ================= LEGAL ================= */

.legal-body {  }
.legal-body h2 { font-size: 1.4rem; margin-block: 2.2rem 0.9rem; }
.legal-body p, .legal-body li { color: var(--ink-3); font-size: 0.96rem; }
.legal-body p + p { margin-top: 0.9rem; }
.legal-body ul { list-style: disc; padding-left: 1.4rem; margin-top: 0.9rem; display: grid; gap: 0.4rem; }
.legal-body a { color: var(--brand); text-decoration: underline; }
.legal-updated { font-size: 0.85rem; color: var(--ink-3); }

/* ================= CASOS DE ÉXITO ================= */

.case-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
.case-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .case-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.case-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--dark);
  color: var(--ink-dark);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.case-card > * { position: relative; }
.case-card .post-tag { background: rgba(255, 0, 6, 0.16); color: #ff6b6e; margin-bottom: 0.9rem; }
.case-card h3 { margin-bottom: 0.6rem; }
.case-card p { font-size: 0.9rem; color: var(--ink-dark-2); }

.case-metric { margin-top: 1.2rem; display: flex; gap: 2rem; }
.case-metric strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--brand); }
.case-metric span { font-size: 0.78rem; color: var(--ink-dark-3); }

/* ================= BLOG POST (plantilla de artículo) ================= */

.post-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 3.5rem; }
}

.post-main { min-width: 0; }

/* ---- Contenido ---- */

.post-content { min-width: 0; }

.post-content h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin-block: 2.8rem 1rem;
  scroll-margin-top: 110px;
}
.post-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  margin-block: 2.1rem 0.8rem;
  scroll-margin-top: 110px;
}

.post-content p {
  color: var(--ink-2);
  line-height: 1.78;
  margin-bottom: 1.2rem;
}
.post-content strong { color: var(--ink); font-weight: 600; }

.post-content ul,
.post-content ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.post-content li::marker { color: var(--brand); }
.post-content li > ul,
.post-content li > ol { margin-top: 0.5rem; }

.post-content li{
  position: relative;
}

.post-content li::before{
  content: " ";
  width: 6px;
  height: 6px;
  background: red;
  display: block;
  position: absolute;
  left: -15px;
  top: 10px;
  border-radius: 50%;
}

.post-content blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.2rem 0 0.2rem 1.2rem;
  margin: 1.6rem 0;
  color: var(--ink-2);
  font-style: italic;
}

.post-content img {
  width: 100%;
  border-radius: var(--r-lg);
  margin: 1.8rem 0 0.6rem;
}
.post-content img + em {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-bottom: 1.6rem;
}

.post-content a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content a:hover { text-decoration-thickness: 2px; }

/* ---- Respuesta rápida (GEO) ---- */

.post-answer {
  margin-bottom: 2.4rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--brand-soft-strong);
  border-left: 4px solid var(--brand);
  border-radius: var(--r-md);
  background: var(--brand-soft);
}
.post-answer strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}
.post-answer p { margin-bottom: 0; color: var(--ink); }

/* ---- Tabla de contenidos (sticky) ---- */

.post-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: 0.88rem;
}
.post-toc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.post-toc ol, .post-toc ul { list-style: none; padding-left: 0; display: grid; gap: 0.45rem; }
.post-toc ul { padding-left: 0.9rem; margin-top: 0.45rem; border-left: 1px solid var(--line); }
.post-toc ul li { font-size: 0.82rem; }
.post-toc a { color: var(--ink-3); line-height: 1.45; font-size: 0.9em; }
.post-toc a:hover { color: var(--brand); }
.post-toc a.is-active { color: var(--brand); font-weight: 600; }

@media (max-width: 1079px) {
  .post-toc { position: static; max-height: none; overflow: visible; order: -1; }
}

/* ---- Meta del hero (autor, fecha, lectura) ---- */

.post-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 0;
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: var(--ink-dark-2);
}
.post-hero-meta > span + span::before {
  content: "·";
  color: var(--brand);
  margin-right: 0.9rem;
}
.post-hero-author {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: 0.9rem;
  font-weight: 600;
  color: var(--ink-dark);
}
.post-hero-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Bio del autor ---- */

.post-author {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  align-items: start;
}
.post-author > img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-author-role {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.25rem;
}
.post-author h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.post-author p { font-size: 0.92rem; color: var(--ink-3); line-height: 1.65; margin-bottom: 0.9rem; }
.post-author .card-link { font-weight: 600; display: inline-flex; align-items: center; gap: 0.45rem; }
.post-author .card-link svg { width: 14px; height: 14px; }
.post-author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
}
.post-author-links .card-link:hover { color: var(--brand); }

@media (max-width: 640px) {
  .post-author { flex-direction: column; text-align: center; }
}

