/*
Theme Name: Estratos Soluciones
Theme URI: https://estratos.co
Author: Estratos
Author URI: https://estratos.co
Description: Tema corporativo para Estratos Soluciones Empresariales. Consultoría boutique y transformación digital. Convertido fielmente desde el sitio original (React/Tailwind) a un tema clásico de WordPress, sin pasos de compilación. Incluye página de inicio por secciones, portafolio de servicios (custom post type) y blog nativo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: estratos
Tags: consulting, business, blog, custom-colors, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. Design tokens (ported from the original index.css)
   ========================================================================== */
:root {
  --background: 214 40% 98%;
  --foreground: 222 47% 11%;
  --border: 214 30% 89%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 217 91% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 222 47% 20%;
  --secondary-foreground: 0 0% 100%;
  --muted: 214 30% 92%;
  --muted-foreground: 222 20% 42%;
  --accent: 214 32% 91%;
  --accent-foreground: 222 47% 11%;
  --destructive: 0 84% 60%;
  --input: 214 30% 86%;
  --ring: 217 91% 50%;

  --radius: 0.75rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  --max-width: 80rem;       /* max-w-7xl */
  --max-width-narrow: 48rem; /* max-w-3xl */
  --gutter: 1.5rem;          /* px-6 */
  --nav-height: 5rem;        /* h-20 */

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  /* The signature blue duotone applied to all photography in the original */
  --duotone: sepia(1) saturate(1.8) hue-rotate(185deg);
  --duotone-soft: sepia(1) saturate(1.6) hue-rotate(185deg);

  --shadow-lg: 0px 2px 0px 0px hsl(222 47% 11% / 0.02), 0px 4px 6px -1px hsl(222 47% 11% / 0.06);
  --shadow-2xl: 0 25px 50px -12px hsl(222 47% 11% / 0.18);
}

/* ==========================================================================
   2. Base / reset
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: hsl(var(--primary)); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0; }

button { font-family: inherit; cursor: pointer; }

/* ==========================================================================
   3. Layout helpers
   ========================================================================== */
.est-container { max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.est-container--narrow { max-width: var(--max-width-narrow); }
.est-section { padding-block: 6rem; padding-inline: var(--gutter); }
.est-section--muted { background: hsl(var(--muted) / 0.3); }

.est-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
  display: block;
}

.est-rule { margin-top: 2rem; width: 4rem; height: 4px; background: hsl(var(--primary)); border-radius: var(--radius-full); }

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.est-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease, color .2s ease;
}
.est-btn:hover { background: hsl(var(--primary) / 0.9); }
.est-btn svg { width: 1.1em; height: 1.1em; }

.est-btn--lg { height: 3.5rem; padding-inline: 2rem; font-size: 1rem; }
.est-btn--pill { border-radius: var(--radius-full); }
.est-btn--block { width: 100%; }

.est-btn--shadow { box-shadow: 0 10px 25px -5px hsl(var(--primary) / 0.3); }

.est-btn--outline {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}
.est-btn--outline:hover { background: hsl(var(--accent) / 0.6); }

.est-btn--ghost { background: transparent; color: hsl(var(--foreground)); }
.est-btn--ghost:hover { background: hsl(var(--accent) / 0.6); }

/* On-dark (hero) variants */
.est-btn--on-dark-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.est-btn--on-dark-outline:hover { background: rgba(255,255,255,0.1); }

.est-btn--on-primary {
  background: #fff;
  color: hsl(var(--primary));
}
.est-btn--on-primary:hover { background: rgba(255,255,255,0.9); }

.est-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: hsl(var(--primary));
  font-weight: 600;
  font-size: 0.95rem;
}
.est-link-arrow svg { width: 1rem; height: 1rem; transition: transform .2s ease; }
.est-link-arrow:hover svg, .est-card:hover .est-link-arrow svg { transform: translateX(4px); }

/* ==========================================================================
   5. Site header / navigation
   ========================================================================== */
.est-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 50;
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}
.est-nav__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.est-nav__logo img { height: 3rem; width: auto; object-fit: contain; }
.est-nav__logo span.est-wordmark { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: hsl(var(--foreground)); }

.est-nav__menu { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.est-nav__menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.8);
  transition: color .2s ease;
  font-family: var(--font-sans);
}
.est-nav__menu a:hover,
.est-nav__menu .current-menu-item > a,
.est-nav__menu .current_page_item > a { color: hsl(var(--primary)); }

.est-nav__toggle { display: none; background: none; border: 0; padding: 0.5rem; color: hsl(var(--foreground)); }
.est-nav__toggle svg { width: 1.25rem; height: 1.25rem; }

.est-nav__mobile { display: none; flex-direction: column; gap: 0.25rem; padding: 0 var(--gutter) 1rem; background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border)); }
.est-nav__mobile.is-open { display: flex; }
.est-nav__mobile ul { list-style: none; margin: 0; padding: 0; }
.est-nav__mobile a { display: block; padding: 0.5rem 0; font-size: 0.875rem; font-weight: 500; color: hsl(var(--foreground) / 0.8); }
.est-nav__mobile a:hover { color: hsl(var(--primary)); }
.est-nav__mobile .est-btn { margin-top: 0.75rem; }

.est-site-main { /* offset handled per-template via padding-top where needed */ }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.est-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 75vh;
  min-height: 520px;
  overflow: hidden;
  text-align: center;
}
.est-hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover;
  background-position: center;
  filter: var(--duotone);
}
.est-hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, hsl(222 60% 8% / 0.70), hsl(222 60% 8% / 0.55), hsl(222 60% 8% / 0.80));
}
.est-hero__content { position: relative; z-index: 2; max-width: 56rem; margin-inline: auto; padding-inline: var(--gutter); }
.est-hero__eyebrow { color: hsl(var(--primary)); letter-spacing: 0.25em; text-transform: uppercase; font-size: 0.8rem; font-weight: 600; }
.est-hero__title { font-size: clamp(2rem, 5vw, 3.25rem); color: #fff; margin-top: 1.25rem; }
.est-hero__subtitle { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: rgba(255,255,255,0.72); font-weight: 300; max-width: 48rem; margin: 1.5rem auto 0; line-height: 1.5; }
.est-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.5rem; }

.est-hero__scroll {
  position: absolute; bottom: 2.5rem; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.4);
}
.est-hero__scroll span { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; }
.est-hero__scroll-line { width: 1px; height: 2.5rem; background: rgba(255,255,255,0.3); animation: est-pulse 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes est-pulse { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(0.3); } }

/* ==========================================================================
   7. About
   ========================================================================== */
.est-about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.est-about__heading h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.est-about__body { display: flex; flex-direction: column; gap: 1.5rem; color: hsl(var(--muted-foreground)); line-height: 1.7; }

/* ==========================================================================
   8. Section headers
   ========================================================================== */
.est-section-head { text-align: center; max-width: 42rem; margin: 0 auto 4rem; }
.est-section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
.est-section-head p { color: hsl(var(--muted-foreground)); }
.est-section-head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; text-align: left; max-width: var(--max-width); }
.est-section-head--split h2 { margin-bottom: 1rem; }

/* ==========================================================================
   9. Service cards (home grid)
   ========================================================================== */
.est-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.est-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s ease;
}
.est-card:hover { box-shadow: var(--shadow-lg); }

.est-card__media { position: relative; height: 12rem; overflow: hidden; }
.est-card__media-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: var(--duotone);
  transition: transform .7s ease;
}
.est-card:hover .est-card__media-img { transform: scale(1.05); }
.est-card__media-overlay { position: absolute; inset: 0; background: linear-gradient(to top, hsl(222 60% 8% / 0.55), transparent); }
.est-card__tag {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: #fff; background: hsl(var(--primary) / 0.8);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
}
.est-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.est-card__body h3 { font-size: 1.125rem; margin-bottom: 0.75rem; line-height: 1.35; transition: color .2s ease; }
.est-card:hover .est-card__body h3 { color: hsl(var(--primary)); }
.est-card__desc { color: hsl(var(--muted-foreground)); font-size: 0.9rem; line-height: 1.6; flex: 1; }
.est-card__foot { margin-top: 1.25rem; }

/* ==========================================================================
   10. Blog cards
   ========================================================================== */
.est-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.est-blog-grid--2 { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }

.est-post { display: flex; flex-direction: column; height: 100%; }
.est-post__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-2xl); overflow: hidden; margin-bottom: 1.5rem; }
.est-post__media--tall { aspect-ratio: auto; height: 14rem; }
.est-post__media-img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: var(--duotone-soft); transition: transform .7s ease; }
.est-post:hover .est-post__media-img { transform: scale(1.05); }
.est-post__media-overlay { position: absolute; inset: 0; background: linear-gradient(to top, hsl(222 60% 8% / 0.45), transparent); }
.est-post__tag {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: hsl(var(--primary) / 0.85); backdrop-filter: blur(4px);
  border-radius: var(--radius-full); padding: 0.25rem 0.75rem;
}
.est-post__read {
  position: absolute; bottom: 1rem; right: 1rem;
  font-size: 0.7rem; font-weight: 500;
  color: hsl(var(--foreground)); background: hsl(var(--background) / 0.8); backdrop-filter: blur(4px);
  border-radius: var(--radius-full); padding: 0.25rem 0.75rem;
  display: flex; align-items: center; gap: 0.25rem;
}
.est-post__read svg { width: 0.85rem; height: 0.85rem; color: hsl(var(--primary)); }
.est-post__date { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-bottom: 0.75rem; }
.est-post__title { font-family: var(--font-serif); font-size: 1.125rem; line-height: 1.35; margin-bottom: 0.75rem; transition: color .2s ease; }
.est-post:hover .est-post__title { color: hsl(var(--primary)); }
.est-post__excerpt { color: hsl(var(--muted-foreground)); font-size: 0.9rem; line-height: 1.6; flex: 1; margin-bottom: 1.25rem; }
.est-post__excerpt--clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   11. Partners
   ========================================================================== */
.est-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
}
.est-partner {
  background: hsl(var(--background));
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 2rem;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter .3s ease, opacity .3s ease;
  text-align: center;
}
.est-partner:hover { filter: grayscale(0); opacity: 1; }
.est-partner img { height: 2rem; width: auto; max-width: 120px; object-fit: contain; }
.est-partner span { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1.2; }

/* ==========================================================================
   12. Contact
   ========================================================================== */
.est-contact { background: hsl(var(--foreground)); color: hsl(var(--background)); }
.est-contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: flex-start; }
.est-contact__info h2 { font-size: clamp(1.75rem, 4vw, 3rem); margin-bottom: 1.5rem; color: hsl(var(--background)); }
.est-contact__lead { color: hsl(var(--background) / 0.65); font-size: 1.1rem; max-width: 28rem; font-weight: 300; line-height: 1.6; }
.est-contact__list { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2.5rem; }
.est-contact__item { display: flex; align-items: center; gap: 1rem; }
.est-contact__icon { height: 3rem; width: 3rem; border-radius: var(--radius); background: hsl(var(--primary) / 0.2); border: 1px solid hsl(var(--primary) / 0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.est-contact__icon svg { width: 1.25rem; height: 1.25rem; color: hsl(var(--primary)); }
.est-contact__item-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--background) / 0.5); margin-bottom: 0.15rem; }
.est-contact__item-value { font-weight: 500; color: hsl(var(--background)); }
.est-contact__tagline { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid hsl(var(--background) / 0.1); }
.est-contact__tagline p { font-size: 0.875rem; font-style: italic; color: hsl(var(--background) / 0.4); }

.est-contact__form {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 2.5rem;
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-2xl);
}
.est-contact__form h3 { font-family: var(--font-sans); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.est-contact__form-sub { color: hsl(var(--muted-foreground)); font-size: 0.875rem; margin-bottom: 2rem; }

.est-field { margin-bottom: 1.25rem; }
.est-field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.est-field input,
.est-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--foreground));
  transition: box-shadow .15s ease;
}
.est-field input:focus,
.est-field textarea:focus { outline: none; box-shadow: 0 0 0 2px hsl(var(--ring)); }
.est-field textarea { resize: vertical; min-height: 120px; }
.est-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.est-form-feedback { margin-top: 1rem; font-size: 0.9rem; }
.est-form-feedback.is-success { color: hsl(142 70% 35%); }
.est-form-feedback.is-error { color: hsl(var(--destructive)); }

/* ==========================================================================
   13. CTA strip (services page)
   ========================================================================== */
.est-cta { background: hsl(var(--primary)); padding: 4rem var(--gutter); }
.est-cta__inner { max-width: 56rem; margin-inline: auto; text-align: center; }
.est-cta h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
.est-cta p { color: rgba(255,255,255,0.7); max-width: 36rem; margin: 0 auto 2rem; }

/* ==========================================================================
   14. Services detail page
   ========================================================================== */
.est-page-head { padding: 9rem var(--gutter) 5rem; background: hsl(var(--muted) / 0.3); border-bottom: 1px solid hsl(var(--border)); }
.est-page-head__inner { max-width: var(--max-width); margin-inline: auto; }
.est-page-head h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1.25rem; }
.est-page-head p { color: hsl(var(--muted-foreground)); font-size: 1.1rem; max-width: 42rem; }

.est-service-list { max-width: var(--max-width); margin-inline: auto; padding: 4rem var(--gutter); display: flex; flex-direction: column; gap: 7rem; }
.est-service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.est-service-row__media { position: relative; border-radius: var(--radius-3xl); overflow: hidden; height: 24rem; }
.est-service-row__media-img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: var(--duotone-soft); }
.est-service-row__media-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom right, hsl(222 60% 8% / 0.3), transparent); }
.est-service-row__badge { position: absolute; top: 1.5rem; left: 1.5rem; height: 3.5rem; width: 3.5rem; border-radius: var(--radius-2xl); background: hsl(var(--primary) / 0.9); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; color: #fff; }
.est-service-row__badge svg { width: 2rem; height: 2rem; }
.est-service-row__num { position: absolute; bottom: 1.5rem; right: 1.5rem; font-family: var(--font-serif); font-size: 4.5rem; font-weight: 700; color: rgba(255,255,255,0.1); line-height: 1; user-select: none; }
.est-service-row--flip .est-service-row__media { order: 2; }

.est-service-row__tagline { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.est-service-row__pill { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1); border: 1px solid hsl(var(--primary) / 0.2); border-radius: var(--radius-full); padding: 0.25rem 0.75rem; }
.est-service-row__idx { font-size: 1.5rem; font-weight: 700; color: hsl(var(--muted-foreground) / 0.3); }
.est-service-row h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: 0.5rem; line-height: 1.2; }
.est-service-row__sub { color: hsl(var(--primary)); font-weight: 500; margin-bottom: 1.25rem; font-size: 0.9rem; }
.est-service-row__desc { color: hsl(var(--muted-foreground)); line-height: 1.7; margin-bottom: 1.75rem; }
.est-bullets { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.est-bullets li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.9rem; color: hsl(var(--foreground) / 0.8); }
.est-bullets svg { width: 1rem; height: 1rem; color: hsl(var(--primary)); flex-shrink: 0; margin-top: 0.25rem; }

/* ==========================================================================
   15. Single post / article
   ========================================================================== */
.est-article-banner { position: relative; height: 50vh; min-height: 360px; overflow: hidden; }
.est-article-banner__img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: var(--duotone-soft); }
.est-article-banner__overlay { position: absolute; inset: 0; background: linear-gradient(to top, hsl(222 60% 8% / 0.85), hsl(222 60% 8% / 0.5), transparent); }
.est-article-banner__inner { position: absolute; bottom: 0; left: 0; right: 0; padding: 0 var(--gutter) 2.5rem; max-width: 56rem; margin-inline: auto; }
.est-article-banner__inner h1 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.2; }
.est-article-banner__meta { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; color: rgba(255,255,255,0.6); font-size: 0.875rem; }
.est-article-banner__meta svg { width: 0.9rem; height: 0.9rem; }
.est-article-tag { display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: hsl(var(--primary) / 0.8); border-radius: var(--radius-full); padding: 0.25rem 0.75rem; margin-bottom: 1rem; }

.est-article-body { max-width: var(--max-width-narrow); margin-inline: auto; padding: 4rem var(--gutter); }
.est-article-back { display: inline-flex; align-items: center; gap: 0.5rem; color: hsl(var(--primary)); font-size: 0.875rem; font-weight: 500; margin-bottom: 2.5rem; }
.est-article-back:hover { text-decoration: underline; }
.est-article-back svg { width: 1rem; height: 1rem; }
.est-prose { color: hsl(var(--foreground) / 0.85); line-height: 1.75; }
.est-prose > * + * { margin-top: 1.5rem; }
.est-prose h2, .est-prose h3 { font-family: var(--font-serif); margin-top: 2.5rem; }
.est-prose h2 { font-size: 1.6rem; }
.est-prose h3 { font-size: 1.3rem; }
.est-prose img { border-radius: var(--radius-2xl); }
.est-prose a { text-decoration: underline; }
.est-prose ul, .est-prose ol { padding-left: 1.25rem; }
.est-prose blockquote { border-left: 3px solid hsl(var(--primary)); padding-left: 1.25rem; font-style: italic; color: hsl(var(--muted-foreground)); }

.est-related { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid hsl(var(--border)); }
.est-related h3 { font-family: var(--font-sans); font-size: 1.125rem; font-weight: 700; margin-bottom: 1.5rem; }
.est-related__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.est-related__card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); padding: 1.25rem; transition: box-shadow .3s ease; }
.est-related__card:hover { box-shadow: var(--shadow-lg); }
.est-related__card .tag { font-size: 0.75rem; color: hsl(var(--primary)); font-weight: 500; }
.est-related__card h4 { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 700; margin: 0.25rem 0 0.5rem; line-height: 1.35; }
.est-related__card:hover h4 { color: hsl(var(--primary)); }

/* ==========================================================================
   16. Footer
   ========================================================================== */
.est-footer { padding: 2rem var(--gutter); background: hsl(var(--foreground)); border-top: 1px solid hsl(var(--background) / 0.1); }
.est-footer__inner { max-width: var(--max-width); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.est-footer__logo img { height: 2rem; filter: brightness(0) invert(1); }
.est-footer__logo span { color: hsl(var(--background)); font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; }
.est-footer__copy { font-size: 0.875rem; color: hsl(var(--background) / 0.5); }

/* ==========================================================================
   17. 404 / generic
   ========================================================================== */
.est-404 { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8rem var(--gutter) 4rem; }
.est-404 h1 { font-size: 4rem; color: hsl(var(--primary)); }
.est-404 p { color: hsl(var(--muted-foreground)); margin: 1rem 0 2rem; }

/* WordPress alignments & captions inside prose */
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.wp-caption-text { font-size: 0.85rem; color: hsl(var(--muted-foreground)); text-align: center; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Pagination */
.est-pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.est-pagination a, .est-pagination span { padding: 0.5rem 0.9rem; border-radius: var(--radius); border: 1px solid hsl(var(--border)); font-size: 0.9rem; color: hsl(var(--foreground)); }
.est-pagination .current { background: hsl(var(--primary)); color: #fff; border-color: hsl(var(--primary)); }

/* ==========================================================================
   18. Scroll-reveal animation
   ========================================================================== */
.est-reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.est-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .est-reveal { opacity: 1; transform: none; transition: none; }
  .est-hero__scroll-line { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   19. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .est-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .est-blog-grid { grid-template-columns: repeat(2, 1fr); }
  .est-partners { grid-template-columns: repeat(3, 1fr); }
  .est-service-row { grid-template-columns: 1fr; gap: 2rem; }
  .est-service-row--flip .est-service-row__media { order: 0; }
}
@media (max-width: 768px) {
  .est-section { padding-block: 4rem; }
  .est-nav__menu, .est-nav__inner > .est-btn { display: none; }
  .est-nav__toggle { display: inline-flex; }
  .est-about__grid,
  .est-contact__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .est-grid-3,
  .est-blog-grid,
  .est-blog-grid--2 { grid-template-columns: 1fr; }
  .est-section-head--split { flex-direction: column; align-items: flex-start; }
  .est-related__grid { grid-template-columns: 1fr; }
  .est-contact__form { padding: 1.75rem; }
  .est-field-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .est-partners { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   20. Page banner (Servicios / Blog / Contacto) — duotono azul claro + gris
   ========================================================================== */
:root {
  /* Imagen en grises con un leve realce; el tinte azul-claro lo da el overlay */
  --duotone-banner: grayscale(1) brightness(1.05) contrast(0.96);
}
.est-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44vh;
  padding: calc(var(--nav-height) + 2.5rem) 0 2.5rem;
  overflow: hidden;
}
.est-banner__img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: var(--duotone-banner);
}
.est-banner__overlay {
  position: absolute; inset: 0;
  /* Azules claros + grises */
  background: linear-gradient(135deg, hsl(212 45% 88% / 0.82), hsl(216 24% 66% / 0.72));
}
.est-banner__inner {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.est-banner .est-eyebrow { color: hsl(var(--primary)); }
.est-banner h1 { font-size: clamp(2rem, 5vw, 3.25rem); color: hsl(var(--foreground)); margin-bottom: 0.75rem; }
.est-banner p { color: hsl(var(--foreground) / 0.78); font-size: 1.1rem; max-width: 42rem; }

/* Tarjeta de datos de contacto (reemplaza el formulario) */
.est-contact-card__list { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.est-contact-card__item { display: flex; align-items: center; gap: 0.9rem; }
.est-contact-card__icon { height: 2.75rem; width: 2.75rem; border-radius: var(--radius); background: hsl(var(--primary) / 0.1); border: 1px solid hsl(var(--primary) / 0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.est-contact-card__icon svg { width: 1.15rem; height: 1.15rem; color: hsl(var(--primary)); }
.est-contact-card__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); margin-bottom: 0.1rem; }
.est-contact-card__value { font-weight: 600; color: hsl(var(--foreground)); word-break: break-word; line-height: 1.3; }
.est-contact-card__value a { color: hsl(var(--foreground)); }
.est-contact-card__value a:hover { color: hsl(var(--primary)); }

@media (max-width: 768px) {
  .est-banner { min-height: 34vh; padding-top: calc(var(--nav-height) + 1.5rem); }
}

/* ==========================================================================
   21. Recursos descargables (lead magnet)
   ========================================================================== */
.est-lead { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-2xl); overflow: hidden; display: flex; flex-direction: column; }
.est-lead__media { position: relative; height: 12rem; }
.est-lead__img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: var(--duotone-soft); }
.est-lead__img--placeholder { display: flex; align-items: center; justify-content: center; background: hsl(var(--muted)); filter: none; }
.est-lead__img--placeholder svg { width: 3rem; height: 3rem; color: hsl(var(--primary)); }
.est-lead__badge { position: absolute; top: 1rem; left: 1rem; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: hsl(var(--primary) / 0.9); backdrop-filter: blur(4px); border-radius: var(--radius-full); padding: 0.3rem 0.7rem; }
.est-lead__badge svg { width: 0.9rem; height: 0.9rem; }
.est-lead__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.est-lead__title { font-size: 1.15rem; line-height: 1.3; }
.est-lead__desc { color: hsl(var(--muted-foreground)); font-size: 0.92rem; line-height: 1.6; }
.est-lead__trigger { align-self: flex-start; margin-top: 0.5rem; }
.est-lead__form { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.85rem; border-top: 1px solid hsl(var(--border)); padding-top: 1.25rem; }
.est-lead__form .est-field { margin-bottom: 0; }
.est-lead__consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.8rem; color: hsl(var(--muted-foreground)); line-height: 1.4; cursor: pointer; }
.est-lead__consent input { margin-top: 0.2rem; flex-shrink: 0; }
.est-lead__feedback { font-size: 0.9rem; }
.est-lead__feedback.is-success { color: hsl(142 65% 38%); }
.est-lead__feedback.is-error { color: hsl(var(--destructive)); }

/* Destacado en el Home: tarjeta horizontal */
.est-lead--wide { flex-direction: row; align-items: stretch; box-shadow: var(--shadow-lg); }
.est-lead--wide .est-lead__media { width: 42%; height: auto; min-height: 19rem; flex-shrink: 0; }
.est-lead--wide .est-lead__body { padding: 2.5rem; justify-content: center; }
.est-lead--wide .est-lead__title { font-size: 1.6rem; }
@media (max-width: 768px) {
  .est-lead--wide { flex-direction: column; }
  .est-lead--wide .est-lead__media { width: auto; min-height: 12rem; height: 12rem; }
  .est-lead--wide .est-lead__body { padding: 1.75rem; }
}

/* Enlace de descarga tras enviar el formulario (visible y tappable en iOS) */
.est-lead__dl{
  display:inline-flex; align-items:center; gap:0.4rem;
  margin-top:0.55rem; padding:0.6rem 1rem;
  background:hsl(var(--primary)); color:#fff !important;
  font-weight:600; font-size:0.92rem; border-radius:var(--radius);
  text-decoration:none;
}
.est-lead__dl:hover{ background:hsl(var(--primary) / 0.92); }
.est-lead__feedback.is-success{ display:flex; flex-direction:column; gap:0.15rem; }

/* Refuerzo responsive del lead magnet en móviles */
@media (max-width: 540px){
  .est-lead__body{ padding:1.25rem; }
  .est-lead--wide .est-lead__body{ padding:1.25rem; }
  .est-lead__title,
  .est-lead--wide .est-lead__title{ font-size:1.25rem; }
  .est-lead__trigger{ width:100%; justify-content:center; }
  .est-lead__form .est-btn--block{ width:100%; }
  .est-lead__media{ height:10rem; }
  .est-lead--wide .est-lead__media{ min-height:10rem; height:10rem; }
}
