/*
Theme Name: Rizoma Ingeniería
Theme URI: https://rizomaingenieria.com.ar
Author: Rizoma
Author URI: https://rizomaingenieria.com.ar
Description: Theme corporativo para Rizoma Ingeniería en Aguas. Diseño moderno con Bootstrap 5, scroll-to menu, AJAX forms y galería lightbox.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rizoma
Tags: one-page, bootstrap, responsive, corporate
*/

/* ============================================================
   SKIP TO MAIN — accesibilidad
   ============================================================ */
.skip-to-main {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--rizoma-purple);
  color: var(--rizoma-white);
  padding: 0.6rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-to-main:focus {
  top: 0;
  color: var(--rizoma-white);
}

/* Global focus ring — visible para usuarios de teclado */
:focus-visible {
  outline: 3px solid var(--rizoma-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================================
   PREFERS-REDUCED-MOTION — desactivar animaciones
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  #hero h1,
  #hero .hero-lead,
  .hero-cta,
  .hero-contact-bar {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  #hero .hero-bg {
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* ── Brand palette (ref: colores.png) ── */
  --rizoma-purple:       #5964AC;   /* primary purple-blue */
  --rizoma-purple-dark:  #7961A8;   /* purple-magenta, gradient end */
  --rizoma-purple-light: #7A85C8;   /* lighter tint */
  --rizoma-accent:       #668591;   /* teal-slate accent */
  --rizoma-accent-light: #8AAAB5;

  /* ── Neutrals ── */
  --rizoma-blue:         #090909;   /* near-black, headings */
  --rizoma-gray-dark:    #3F3F40;   /* navbar / footer bg */
  --rizoma-gray:         #333333;   /* body text */
  --rizoma-gray-mid:     #6B7280;   /* muted text */
  --rizoma-gray-light:   #F2F4F6;   /* section bg */
  --rizoma-white:        #FFFFFF;
  --rizoma-text:         #090909;

  /* ── Gradient (hero, quienes somos) ── */
  --gradient-brand: linear-gradient(135deg, #5964AC 0%, #7961A8 100%);

  --font-main: 'DM Sans', sans-serif;
  --transition: 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.20);
  --shadow-txt: 0 2px 2px rgba(0,0,0,.66);
  --radius:    8px;
  --radius-lg: 16px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-main);
  color: var(--rizoma-text);
  background: var(--rizoma-white);
  margin: 0;
  overflow-x: hidden;
  max-width: 100vw;
  font-size: var(--typo-body-size, 16px);
  line-height: var(--typo-body-lh, 1.6);
  font-weight: var(--typo-body-weight, 400);
}

img { max-width: 100%; height: auto; }

a { color: var(--rizoma-purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--rizoma-purple-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: var(--typo-heading-weight, 700);
  line-height: var(--typo-heading-lh, 1.25);
  color: var(--rizoma-text);
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: 1.25rem 0;
}
/* Ensure container is always a flex row */
#navbar .container {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

/* Inner pages: always solid */
#navbar.navbar-inner {
  background: var(--rizoma-gray-dark) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.7rem 0;
}

#navbar.scrolled {
  background: var(--rizoma-gray-dark);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
}

#navbar .navbar-brand img,
#navbar .navbar-brand .custom-logo {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: height var(--transition), max-width var(--transition);
}
#navbar.scrolled .navbar-brand img,
#navbar.scrolled .navbar-brand .custom-logo { height: 44px; max-width: 200px; }
#navbar.navbar-inner .navbar-brand img,
#navbar.navbar-inner .navbar-brand .custom-logo { filter: brightness(0) invert(1); }

/* Mobile: limitar ancho para dejar espacio al toggler */
@media (max-width: 991.98px) {
  #navbar .navbar-brand { max-width: calc(100% - 60px); }
  #navbar .navbar-brand img,
  #navbar .navbar-brand .custom-logo { height: 48px; max-width: 180px; }
  #navbar.scrolled .navbar-brand img,
  #navbar.scrolled .navbar-brand .custom-logo { height: 40px; max-width: 160px; }
}
@media (max-width: 400px) {
  #navbar .navbar-brand img,
  #navbar .navbar-brand .custom-logo { height: 38px; max-width: 140px; }
}

.navbar-brand-text {
  font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.03em;
}

/* Inner page: solo ícono en mobile */
.btn-back-home {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.85rem; font-weight: 600;
  color: rgba(255,255,255,.85) !important;
  border: 1.5px solid rgba(255,255,255,.3);
  padding: 0.4rem 1rem; border-radius: 50px;
  transition: all var(--transition); text-decoration: none !important;
}
.btn-back-home:hover { background: var(--rizoma-purple); border-color: var(--rizoma-purple); color: #fff !important; }
.btn-back-home .btn-back-label { display: inline; }
@media (max-width: 767px) {
  .btn-back-home { padding: 0.4rem 0.65rem; }
  .btn-back-home .btn-back-label { display: none; }
}

#navbar .nav-link {
  font-size: var(--typo-nav-size, 0.875rem); font-weight: var(--typo-nav-weight, 500); letter-spacing: 0.04em;
  color: var(--rizoma-white) !important;
  padding: 0.4rem 0.85rem !important;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}
#navbar .nav-link:hover { background: rgba(255,255,255,.15); color: var(--rizoma-white) !important; }
#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active { background: var(--rizoma-purple); color: var(--rizoma-white) !important; }

#navbar .navbar-toggler:focus { box-shadow: none; }
#navbar .navbar-brand { margin-right: auto; flex-shrink: 0; }

#navbar .nav-link.active {
  background: var(--rizoma-purple) !important;
  color: #fff !important;
}

@media (max-width: 991.98px) {
  /* Menú desplegable — popup redondeado */
  #navbar .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: var(--rizoma-gray-dark) !important;
    padding: 1rem;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    margin-top: 8px;
    border: 1px solid rgba(255,255,255,.08);
    z-index: 1000;
  }
  #navbar .navbar-collapse:not(.show) {
    display: none !important;
  }
  #navbar .navbar-collapse .navbar-nav {
    width: 100%;
    gap: 0.2rem;
  }
  #navbar .nav-link {
    text-align: left;
    padding: 0.7rem 1rem !important;
    border-radius: 8px;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
  }
  #navbar .nav-link:hover,
  #navbar .nav-link.active {
    background: var(--rizoma-purple) !important;
  }
  .navbar-toggler {
    margin-right: 0 !important;
    border: none !important;
  }
}

/* Toggler: hamburguesa → X */
#navbar .navbar-toggler-icon {
  background-image: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
}
#navbar .navbar-toggler-icon::before {
  content: "\F479";
  font-family: "bootstrap-icons";
  font-size: 1.6rem;
  color: rgba(255,255,255,.95);
  transition: transform 0.25s ease;
  line-height: 1;
}
#navbar .navbar-toggler:not(.collapsed) .navbar-toggler-icon::before {
  content: "\F659";
  transform: rotate(90deg);
  color: #fff;
}
#navbar .navbar-toggler {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0.3rem 0.5rem;
  margin-left: auto;
  z-index: 1001;
  padding: 0.4rem;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--rizoma-blue);
}

#hero .hero-bg {
  position: absolute;
  inset: 0;
  background-image: none; /* seteado por wp_head hook en enqueue.php */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.08);
  transition: transform 10s cubic-bezier(.25,.46,.45,.94);
}
#hero .hero-bg.loaded { transform: scale(1); }
#hero .hero-bg.loaded .hero-bg-shimmer { opacity: 0; pointer-events: none; }

/* ── Hero loading shimmer ───────────────────────────────────── */
.hero-bg-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0)   0%,
    rgba(255,255,255,.06) 40%,
    rgba(255,255,255,.12) 50%,
    rgba(255,255,255,.06) 60%,
    rgba(255,255,255,0)   100%
  );
  background-size: 200% 100%;
  animation: heroShimmer 1.6s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
@keyframes heroShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-shimmer { animation: none; }
}

#hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(9,9,9,.78) 0%,
    rgba(89,100,172,.75) 55%,
    rgba(121,97,168,.25) 100%
  );
}

#hero .hero-content {
  position: relative;
  z-index: 2;
  color: var(--rizoma-white);
}

#hero h1 {
  font-size: var(--typo-hero-h1-size, clamp(3rem, 6vw, 5.5rem));
  font-weight: var(--typo-hero-h1-weight, 900);
  color: var(--rizoma-white);
  line-height: 1;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(40px);
  animation: heroFadeUp 1s 0.2s cubic-bezier(.22,.61,.36,1) forwards;
  padding-left: 1.25rem;
  text-shadow: var(--shadow-txt);
  letter-spacing: -0.03em;
  position: relative;
}
#hero h1::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.1em;
  width: 5px;
  background: var(--gradient-brand);
  border-radius: 10px;
}

#hero h1 span {
  color: var(--rizoma-accent);
  display: block;
  text-shadow: var(--shadow-txt);
}

#hero .hero-lead {
  font-size: var(--typo-hero-lead-size, 1rem);
  line-height: 1.3;
  color: rgba(255,255,255,.88);
  max-width: 550px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.9s 0.45s cubic-bezier(.22,.61,.36,1) forwards;
}

.hero-cta {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeUp 0.85s 0.7s cubic-bezier(.22,.61,.36,1) forwards;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-rizoma-primary {
  background: var(--rizoma-gray-dark);
  color: var(--rizoma-white) !important;
  border: 2px solid var(--rizoma-gray-dark);
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-rizoma-primary:hover {
  background: var(--rizoma-purple-dark);
  border-color: var(--rizoma-purple-dark);
  color: var(--rizoma-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(106,90,205,.4);
}

.btn-rizoma-outline {
  background: transparent;
  color: var(--rizoma-white) !important;
  border: 2px solid rgba(255,255,255,.6);
  padding: 0.5rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-rizoma-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--rizoma-white);
  color: var(--rizoma-white) !important;
  transform: translateY(-2px);
}

.hero-contact-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  background: rgba(89,100,172,.93); /* overridden by inline style from customizer */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
  animation: barSlideUp 0.7s 1.1s cubic-bezier(.22,.61,.36,1) both;
}

.hero-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  color: rgba(255,255,255,.92);
  text-decoration: none !important;
  border-right: 1px solid rgba(255,255,255,.12);
  transition: background var(--transition);
  min-width: 0;
}
.bar-item:last-child { border-right: none; }
.bar-item:hover { background: rgba(255,255,255,.08); color: #fff !important; }

@media (max-width: 767px) {
  .hero-bar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bar-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 0.6rem 0.75rem;
  }
  .bar-item:nth-child(odd)  { border-right: 1px solid rgba(255,255,255,.08); }
  .bar-item:nth-child(3),
  .bar-item:nth-child(4)    { border-bottom: none; }
}

.bar-icon {
  font-size: 1.2rem;
  color: rgba(255,255,255,.75);
  flex-shrink: 0;
}
.bar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bar-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,.55);
  line-height: 1.2;
}
.bar-value {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section { padding: 100px 0; }
.section-sm { padding: 70px 0; }

/* section-badge — hidden by default, kept for compat */
.section-badge { display: none !important; }

/* ── Section title ───────────────────────────────────────── */
.section-title {
  /* Size: --section-title-size override por sección, fallback a var de tipografía */
  font-size: var(--section-title-size, var(--typo-section-title-size, clamp(2.6rem, 5vw, 4rem)));
  font-weight: var(--typo-section-title-weight, 900);
  color: var(--rizoma-gray);
  margin-bottom: 0.6rem;
  letter-spacing: -0.05em;
  line-height: var(--typo-heading-lh, 1.1);
}
.section-title .accent { color: var(--rizoma-purple); }

/* ── Left gradient line — vertical accent ── */
.section-title-wrap {
  position: relative;
  padding-left: 16px;
}
.section-title-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.05em;
  bottom: 0.05em;
  width: 4px;
  border-radius: 10px;
  background: var(--gradient-brand);
}

.section-divider { display: none !important; }
/* Dark section title-wrap line overrides */
#multimedia .section-title-wrap::before {
  background: linear-gradient(180deg, var(--rizoma-gray-dark), var(--rizoma-gray));
}
.qs-text-col .section-title-wrap::before {
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.8));
}

/* Fade-in on scroll — snappy */
.fade-in-up {
  opacity: 0;
  transform: translateY(28px) scale(0.99);
  transition: opacity 0.5s cubic-bezier(.22,.61,.36,1),
              transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Staggered children inside a fade-in-up parent (servicios, stats) */
.fade-in-up.visible ~ .fade-in-up { transition-delay: 0.08s; }

/* ============================================================
   QUIENES SOMOS — image 3/4 + text card overlapping right
   ============================================================ */

/* ============================================================
   INNER PAGES — compensa navbar fijo
   ============================================================ */
.page-main {
  padding-top: 90px;
  padding-bottom: 80px;
}
.page-404-main {
  min-height: 70vh;
  display: flex;
  align-items: center;
}
@media (max-width: 991.98px) {
  .page-main { padding-top: 76px; padding-bottom: 60px; }
}

.qs-section {
  background: var(--rizoma-gray-light);
  padding: 60px 0 80px;
  overflow: hidden;
}

/* Outer wrapper: not constrained by container — allows full-bleed image */
.qs-outer {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0 0 40px;   /* left padding only; right handled by card */
}

/* ── Image col — 3/4 width ─────────────────────── */
.qs-img-col {
  flex: 0 0 72%;
  max-width: 72%;
  position: relative;
  z-index: 2;
}
.qs-img-col img,
.qs-img-col svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

/* ── Text card — overlaps image -60px from left ── */
.qs-text-col {
  flex: 0 0 auto;
  width: 440px;
  margin-left: -100px;    /* overlap onto the image */
  padding-left: 60px;
  position: relative;
  z-index: 1;            /* sits on top of image */
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

h2.qs-title { color: var(--rizoma-white); letter-spacing: -0.05em;  }

/* Decorative circle */
.qs-text-col::after {
  content: '';
  position: absolute;
  bottom: -50px; right: -50px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

.qs-text-inner {
  padding: 2.75rem 2.5rem;
  position: relative;
  z-index: 2;
}

/* Divider — left gradient line for dark bg */
.qs-divider {
  width: 44px;
  height: 4px;
  background: rgba(255,255,255,.5);
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

/* Body text — truncated, readable */
.qs-body {
  color: rgba(255,255,255,.82);
  line-height: 1.75;
  font-size: .9rem;
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qs-body a.read-more {
  font-size: 0.82rem; font-weight: 700; padding-left: 0.2em;
  color: rgba(255,255,255,.75);
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: gap 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  margin-left: 0.5rem; margin-top: auto; line-height: 1;
  text-decoration: none;
}
.qs-body a.read-more:hover {
  gap: 0.45rem; padding-left: 0.3rem;
  color: #fff;
}

/* Stats */
.qs-stats {
  display: flex;
  gap: 1.5rem;
  margin: 0 0 1.75rem;
  flex-wrap: wrap;
}
.qs-stats .stat-item { text-align: left; }
.qs-stats .stat-item .num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.qs-stats .stat-item .desc {
  font-size: 0.68rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* CTAs */
.qs-cta-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.qs-btn-primary {
  font-size: 0.75rem !important;
  padding: 0.1rem 1.25rem !important;
}

/* ── Responsive — tablet ────────────────────────── */
@media (max-width: 991px) {
  .qs-outer {
    flex-direction: column;
    padding: 0 24px;
    gap: 0;
  }
  .qs-img-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .qs-text-col {
    width: 100%;
    margin-left: 0; padding-left: 0;
    margin-top: -40px;   /* overlap image from bottom */
    border-radius: var(--radius-lg);
  }
}

/* ── Responsive — mobile ────────────────────────── */
@media (max-width: 767px) {
  .qs-section { padding: 48px 0 60px; }
  .qs-outer { padding: 0 16px; }
  .qs-text-inner { padding: 1.75rem 1.5rem; }
  .qs-text-col { margin-top: -28px; margin-left: 0; padding-left: 0; }
  .qs-stats { gap: 1rem; }
  .qs-stats .stat-item .num { font-size: 1.3rem; }
  .qs-cta-group { flex-direction: column; }
  .qs-btn-primary,
  .qs-btn-outline { width: 100%; justify-content: center !important; }
}

/* ============================================================

/* ============================================================
   QUOTE BAND
   ============================================================ */
.quote-band {
  background: var(--rizoma-white);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.quote-band--has-bg { background: var(--rizoma-blue); }
.quote-bg-img {
  position: absolute;
  inset: -30%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transition: transform 0.1s linear;
}
.quote-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,43,74,.82) 0%, rgba(89,100,172,.5) 100%);
}
.quote-band:not(.quote-band--has-bg)::before {
  content: '\201C';
  font-size: 18rem; font-weight: 900;
  color: var(--rizoma-purple); opacity: 0.06;
  position: absolute; top: -3rem; left: 2rem;
  line-height: 1; pointer-events: none;
}

.quote-band--has-bg

.quote-band::before {
  content: '\201C';
  font-size: 18rem;
  font-weight: 900;
  color: var(--rizoma-purple);
  opacity: 0.06;
  position: absolute;
  top: -3rem; left: 2rem;
  line-height: 1;
  pointer-events: none;
}
.quote-text {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 500;
  color: var(--rizoma-blue);
  font-style: italic;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.55;
  position: relative;
  z-index: 2;
  transition: transform 0.1s linear;
}
.quote-band--has-bg .quote-text {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

/* ── Layout foto (izquierda) + texto (derecha) ── */
.quote-band-inner {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  position: relative;
  z-index: 2;
}
.quote-band-media {
  flex: 0 0 38%;
  max-width: 420px;
}
.quote-band-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.quote-band-content { flex: 1; min-width: 0; }
.quote-band--has-image .quote-text {
  margin: 0;
  max-width: none;
  text-align: left;
}
.quote-band--has-image::before { display: none; } /* la comilla decorativa no combina con el layout con foto */
@media (max-width: 767.98px) {
  .quote-band-inner { flex-direction: column; text-align: center; }
  .quote-band-media { flex: 0 0 auto; width: 100%; max-width: 320px; }
  .quote-band--has-image .quote-text { text-align: center; }
}
/* ============================================================
   SERVICIOS
   ============================================================ */
#servicios { background: var(--rizoma-white); }

/* ── Shared card shell (service-card + nov-card + rizoma-post-card) ── */
.service-card,
.nov-card,
.rizoma-post-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--rizoma-white);
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  border: 1px solid rgba(0,0,0,.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit !important;
  position: relative;
}
.service-card:hover,
.nov-card:hover,
.rizoma-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 44px rgba(89,100,172,.16);
  border-color: rgba(89,100,172,.18);
  color: inherit !important;
}
.nov-card:hover .nov-card-title a,
.rizoma-post-card:hover .post-card-title a { color: var(--rizoma-purple); }

/* ── Image wrap — shared ── */
/* Image wrapper shared */
.service-card .card-img-wrap,
.post-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #dde0e8;
  flex-shrink: 0;
}
.service-card .card-img-wrap img,
.post-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.45s ease;
}
.service-card:hover .card-img-wrap img,
.rizoma-post-card:hover .post-card-img-wrap img { transform: scale(1.06); }
.service-card .card-img-wrap .card-overlay,
.service-card .card-img-wrap .card-img-title { display: none; }

/* ── Service card: gradient title bar ── */
.service-card .card-title-bar {
  background: var(--gradient-brand);
  padding: 0.75rem 1.1rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.service-card .card-title-bar h3 {
  font-size: 1rem; font-weight: 700;
  color: #fff; margin: 0; line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.service-card .card-title-bar .title-line {
  width: 3px; align-self: stretch;
  background: rgba(255,255,255,.5); border-radius: 3px;
  flex-shrink: 0; min-height: 1em;
}

/* ── Body — shared padding/typography ── */
.service-card .card-body,
.post-card-body,
.nov-card-body {
  padding: 0.9rem 1.05rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

/* ── Excerpt / description ── */
.service-card .card-body p,
.post-card-excerpt,
.nov-card-excerpt {
  font-size: 0.82rem;
  color: var(--rizoma-gray-mid);
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* ── Title — shared ── */
.post-card-title,
.nov-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rizoma-gray-dark);
  margin: 0.1rem 0 0;
  line-height: 1.35;
  text-transform: capitalize;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a,
.nov-card-title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.post-card-title a:hover,
.nov-card-title a:hover { color: var(--rizoma-purple); }

/* ── Footer / meta ── */
.post-card-meta,
.nov-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Novedades: categoría (izq, truncada) + fecha (der) en una fila */
.nov-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0,0,0,.06);
}
.nov-cat-footer {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rizoma-purple);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  text-decoration: none;
}
.nov-cat-footer:hover { color: var(--rizoma-purple-dark); }
.nov-card-date {
  font-size: 0.7rem;
  color: var(--rizoma-gray-mid);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Read more — servicios y novedades ── */
.service-card .read-more,
.nov-card .nov-read-more,
.rizoma-post-card .nov-read-more {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rizoma-purple);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  padding: 0.5em 0.5em 0.5em 0.45rem;
  border-left: 3px solid var(--rizoma-purple);
  border-radius: 0;
  margin-top: auto;
  align-self: flex-start;
  transition: gap 0.2s ease, color 0.2s ease, padding-left 0.2s ease, border-color 0.2s ease;
}
.service-card:hover .read-more,
.nov-card:hover .nov-read-more,
.rizoma-post-card:hover .nov-read-more {
  gap: 0.35rem;
  padding-left: 0.6rem;
  color: var(--rizoma-purple-dark);
  border-left-color: var(--rizoma-purple-dark);
}
.service-card .read-more i,
.nov-card .nov-read-more i,
.rizoma-post-card .nov-read-more i {
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.service-card:hover .read-more i,
.nov-card:hover .nov-read-more i,
.rizoma-post-card:hover .nov-read-more i {
  transform: translateX(3px);
  opacity: 1;
}

/* ── Placeholder (no image) ── */
.service-card-placeholder {
  width: 100%; height: 100%; aspect-ratio: 16/9;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
}
.service-card-placeholder i { font-size: 3rem; color: rgba(255,255,255,.2); }

/* ============================================================
   MULTIMEDIA — VIDEOS & FOTOS
   ============================================================ */
#multimedia {
  background: var(--gradient-brand);
  color: var(--rizoma-white);
}
#multimedia .section-title { color: var(--rizoma-white); }

/* Multimedia header: title left, tabs right inline */
.multimedia-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap; /* desktop: siempre en fila */
}
.multimedia-title { flex-shrink: 0; flex: 1; }
.multimedia-tabs-divider {
  height: 1px;
  background: rgba(255,255,255,.15);
  margin-bottom: 2rem;
  margin-top: 0;
}

.media-tabs {
  border-bottom: none;
  margin-bottom: 0;
  flex-shrink: 0;
}
.media-tabs .nav-link {
  color: rgba(255,255,255,.6);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition);
}
.media-tabs .nav-link:hover { color: var(--rizoma-white); }
.media-tabs .nav-link.active {
  color: var(--rizoma-white);
  border-bottom-color: var(--rizoma-accent);
  background: transparent;
}

/* Video thumbnails */
.video-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #000;
}
.video-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity var(--transition), transform 0.4s ease;
  display: block;
}
.video-item:hover img { opacity: 0.95; transform: scale(1.04); }

.video-item .play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 56px; height: 56px;
  background: var(--rizoma-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.video-item:hover .play-btn {
  transform: translate(-50%,-50%) scale(1.12);
  background: var(--rizoma-purple-dark);
}
.video-item .video-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 1rem 0.75rem 0.5rem;
}

/* ============================================================
   GALLERY
   ============================================================ */

/* ── Grid base ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 2rem 0;
}

/* ── Items ── */
.gallery-item {
  position: relative;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4/3;
  background: #e8eaf0;
}

/* Shimmer solo mientras carga — no pisa la imagen */
.gallery-item:not(.loaded)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s infinite;
  z-index: 0;
  pointer-events: none;
}
.gallery-item.loaded::after { display: none; }
@keyframes gallery-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.gallery-item img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}

/* Overlay oscuro al hover */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15,20,50,.0);
  transition: background 0.35s ease;
  z-index: 2;
  pointer-events: none;
}
.gallery-item:hover::before { background: rgba(15,20,50,.45); }
.gallery-item:hover img { transform: scale(1.06); }

/* ── Zoom icon ── */
.gallery-item .zoom-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0) rotate(-15deg);
  color: #fff;
  font-size: 1.6rem;
  z-index: 3;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.3s;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.gallery-item:hover .zoom-icon {
  transform: translate(-50%,-50%) scale(1) rotate(0deg);
  opacity: 1;
}

/* Caption */
.gallery-item figcaption,
.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(10,15,40,.85) 0%, rgba(10,15,40,.3) 70%, transparent 100%);
  color: rgba(255,255,255,.92);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 2rem 0.85rem 0.6rem;
  z-index: 3;
  transform: translateY(4px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: block !important; /* override del reset del core */
}
.gallery-item:hover figcaption,
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ── Número de items: variantes de layout ── */
/* 1 imagen: centrada y grande */
.gallery-grid.gallery-cols-1 {
  grid-template-columns: 1fr;
  max-width: 680px;
}
.gallery-grid.gallery-cols-1 .gallery-item { aspect-ratio: 16/9; }

/* 2 columnas */
.gallery-grid.gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Layout masonry-feel: primera imagen grande cuando hay 7+ */
.gallery-grid.gallery-featured .gallery-item:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

/* ── Responsive ── */

/* ── WordPress native gallery block ── */
.rizoma-content .wp-block-gallery,
.rizoma-article .wp-block-gallery,
.service-content .wp-block-gallery {
  margin: 2rem 0 !important;
  gap: 10px !important;
}
.rizoma-content .wp-block-gallery .wp-block-image,
.rizoma-article .wp-block-gallery .wp-block-image,
.service-content .wp-block-gallery .wp-block-image {
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  transition: transform 0.3s ease;
}
.rizoma-content .wp-block-gallery .wp-block-image:hover,
.rizoma-article .wp-block-gallery .wp-block-image:hover,
.service-content .wp-block-gallery .wp-block-image:hover {
  transform: translateY(-3px);
}
.rizoma-content .wp-block-gallery .wp-block-image img,
.rizoma-article .wp-block-gallery .wp-block-image img,
.service-content .wp-block-gallery .wp-block-image img {
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 2px 14px rgba(0,0,0,.12);
  transition: transform 0.45s cubic-bezier(.25,.46,.45,.94), box-shadow 0.35s ease;
}
.rizoma-content .wp-block-gallery .wp-block-image:hover img,
.rizoma-article .wp-block-gallery .wp-block-image:hover img,
.service-content .wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.04);
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
}

/* Figcaptions del bloque nativo */
.rizoma-content .wp-block-gallery figcaption,
.rizoma-article .wp-block-gallery figcaption,
.service-content .wp-block-gallery figcaption {
  font-size: 0.75rem;
  font-style: italic;
  color: rgba(255,255,255,.8);
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  padding: 1.5rem 0.75rem 0.5rem;
}

/* ── Imágenes sueltas en contenido ── */
.rizoma-content img,
.rizoma-article img,
.service-content img {
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(0,0,0,.10);
  margin: 1.25rem auto;
  display: block;
  max-width: 100%;
  transition: box-shadow 0.3s;
}
.rizoma-content img:hover,
.rizoma-article img:hover,
.service-content img:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.18);
}
/* No aplicar estilos de hover al logo ni iconos inline */
.rizoma-content .wp-block-image img,
.rizoma-article .wp-block-image img,
.service-content .wp-block-image img {
  margin: 0;
  box-shadow: none;
}

/* ============================================================
   LIGHTBOX — mejorado
   ============================================================ */
#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,8,20,.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#lightbox-overlay.active {
  display: flex;
  animation: lb-fade-in 0.22s ease;
}
@keyframes lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#lightbox-overlay img {
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 0 100px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06);
  animation: lb-zoom-in 0.28s cubic-bezier(.34,1.2,.64,1);
  display: block;
  object-fit: contain;
}
@keyframes lb-zoom-in {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Caption en lightbox */
#lightbox-caption {
  color: rgba(255,255,255,.55);
  font-size: 0.78rem;
  margin-top: 0.85rem;
  max-width: 600px;
  text-align: center;
  min-height: 1.1em;
  transition: opacity 0.25s;
}

/* Counter */
#lightbox-counter {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.35);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,.06);
  padding: 0.25rem 0.85rem;
  border-radius: 50px;
  white-space: nowrap;
}

/* Cerrar */
#lightbox-close {
  position: absolute;
  top: 1.25rem; right: 1.5rem;
  color: rgba(255,255,255,.6);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  opacity: 1;
  transition: color 0.2s, transform 0.2s;
  background: none; border: none;
  padding: 0.3rem;
  z-index: 2;
}
#lightbox-close:hover { color: #fff; transform: rotate(90deg) scale(1.15); }

/* Navegación */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  border-radius: 50%;
  width: 52px; height: 52px;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, transform 0.22s;
  backdrop-filter: blur(4px);
}
.lightbox-nav:hover {
  background: var(--rizoma-purple);
  color: #fff;
  border-color: var(--rizoma-purple);
  transform: translateY(-50%) scale(1.08);
}
#lightbox-prev { left: 1.5rem; }
#lightbox-next { right: 1.5rem; }

/* Thumbnails strip */
#lightbox-thumbs {
  display: flex;
  gap: 6px;
  position: absolute;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
}
#lightbox-thumbs::-webkit-scrollbar { display: none; }
#lightbox-thumbs img {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.2s, outline 0.2s;
  flex-shrink: 0;
  box-shadow: none !important;
  margin: 0 !important;
  border-radius: 5px !important;
}
#lightbox-thumbs img.active { opacity: 1; outline: 2px solid var(--rizoma-accent); }
#lightbox-thumbs img:hover  { opacity: 0.8; }

/* Video modal */
#video-modal .modal-content {
  background: #000;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
#video-modal .modal-body { padding: 0; }
#video-modal iframe { border: none; }
#video-modal .btn-close { filter: invert(1); }

/* ============================================================
   CLIENTES
   ============================================================ */
/* Clientes: centered layout, no left line */
#clientes .section-title-wrap {
  padding-left: 0;
  display: inline-block;
}
#clientes .section-title-wrap::before { display: none; }
#clientes .section-title-wrap::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: 2px;
  margin: 0.5rem auto 0;
}

#clientes {
  background: var(--rizoma-white);
  overflow: hidden;
}

/* Infinite logo carousel */
.logos-carousel-wrap {
  position: relative; overflow: hidden;
  padding: 2rem 0; margin-top: 1rem;
}
.logos-carousel-wrap::before,
.logos-carousel-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none;
}
.logos-carousel-wrap::before { left: 0; background: linear-gradient(to right, var(--rizoma-white), transparent); }
.logos-carousel-wrap::after  { right: 0; background: linear-gradient(to left, var(--rizoma-white), transparent); }
.logos-carousel-track {
  display: flex; align-items: center; gap: 4rem;
  width: max-content;
  animation: logos-scroll 36s linear infinite;
}
.logos-carousel-wrap:hover .logos-carousel-track { animation-play-state: paused; }
@keyframes logos-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logo-slide {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none !important;
}
a.logo-slide { cursor: pointer; }
a.logo-slide:focus-visible { outline: 2px solid var(--rizoma-purple); border-radius: 4px; outline-offset: 4px; }
.logo-slide img,
.logo-slide .logo-slide__img {
  height: 64px; object-fit: contain;
  transition: filter 0.35s ease, transform 0.35s ease;
}

/* No — siempre a color (default si no hay clase) */
.logos-gray--no .logo-slide img,
.logos-gray--no .logo-slide .logo-slide__img {
  filter: none;
}

/* Sí con color al hover (default del tema) */
.logos-gray--hover .logo-slide img,
.logos-gray--hover .logo-slide .logo-slide__img {
  filter: grayscale(1) opacity(0.55);
}
.logos-gray--hover .logo-slide:hover img,
.logos-gray--hover .logo-slide:hover .logo-slide__img {
  filter: grayscale(0) opacity(1);
  transform: scale(1.06);
}

/* Sí siempre — sin efecto hover */
.logos-gray--always .logo-slide img,
.logos-gray--always .logo-slide .logo-slide__img {
  filter: grayscale(1) opacity(0.55);
}
.logo-slide--demo {
  flex-direction: column; gap: 0.3rem; opacity: 0.45; min-width: 100px; text-align: center;
}
.logo-slide--demo i { font-size: 2rem; color: var(--rizoma-purple); }
.logo-slide--demo span {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--rizoma-gray);
}

.testimonial-carousel .testimonial-item {
  padding: 2.5rem 2rem;
  background: var(--rizoma-gray-light);
  border-radius: var(--radius-lg);
  position: relative;
}
.testimonial-item::before {
  content: '\201C';
  font-size: 5rem;
  font-weight: 900;
  color: var(--rizoma-purple);
  opacity: 0.15;
  position: absolute;
  top: -0.5rem; left: 1.25rem;
  line-height: 1;
}
.testimonial-item blockquote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--rizoma-blue);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.testimonial-item cite {
  font-style: normal;
  font-weight: 700;
  color: var(--rizoma-purple);
  font-size: 0.9rem;
}
.shortcode-clientes-placeholder {
  background: rgba(89,100,172,.06);
  border: 2px dashed rgba(89,100,172,.3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--rizoma-gray);
  font-size: 0.9rem;
}

/* ============================================================
   PRESUPUESTO
   ============================================================ */
#presupuesto {
  background: linear-gradient(135deg, #3F3F40 0%, #090909 100%);
  position: relative;
  overflow: hidden;
}
#presupuesto::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: var(--rizoma-purple);
  opacity: 0.12;
}
#presupuesto::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: var(--rizoma-accent);
  opacity: 0.08;
}
#presupuesto .section-title { color: var(--rizoma-white); }
#presupuesto .section-title-wrap { padding-left: 20px; }
#presupuesto .section-title-wrap::before {
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.8));
}
#presupuesto p.lead-text {
  color: rgba(255,255,255,.75);
  margin-bottom: 2rem;
}

.budget-form {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
/* Reducir gap entre filas del form */
.budget-form .row.g-3 { --bs-gutter-y: 0.6rem; --bs-gutter-x: 0.75rem; }

.budget-form .form-label {
  color: rgba(255,255,255,.88);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  letter-spacing: 0.02em;
}

.budget-form .form-control,
.budget-form .form-select {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--rizoma-white);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  font-size: 0.87rem;
  font-family: var(--font-main);
  transition: border-color var(--transition), background var(--transition);
}
.budget-form .form-control::placeholder { color: rgba(255,255,255,.38); }
.budget-form .form-control:focus,
.budget-form .form-select:focus {
  background: rgba(255,255,255,.15);
  border-color: var(--rizoma-accent);
  color: var(--rizoma-white);
  box-shadow: 0 0 0 3px rgba(0,201,167,.2);
}
.budget-form .form-select option { background: var(--rizoma-blue); color: white; }

.budget-form textarea.form-control { resize: none; min-height: 100px; }

.btn-submit {
  background: var(--gradient-brand);
  color: var(--rizoma-white) !important;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  padding: 0.85rem 2.5rem;
  width: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,201,167,.4);
}
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

#form-feedback {
  display: none;
  margin-top: 1rem;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}
#form-feedback.success {
  display: block;
  background: rgba(0,201,167,.15);
  border: 1px solid var(--rizoma-accent);
  color: var(--rizoma-accent);
}
#form-feedback.error {
  display: block;
  background: rgba(220,38,38,.15);
  border: 1px solid #DC2626;
  color: #FCA5A5;
}

/* Budget form loading spinner */
.spinner-border-sm { width: 1rem; height: 1rem; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--rizoma-accent);
  color: rgba(255,255,255,.75);
  padding: 70px 0 0;
}

#footer .footer-logo { margin-bottom: 1rem; }
#footer .footer-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1); /* force white */
}
#footer .footer-logo .custom-logo-link img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

#footer .footer-about {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,.6);
  max-width: 300px;
}

#footer .footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
#footer .footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
#footer .footer-social a:hover {
  background: var(--rizoma-purple);
  color: white;
  transform: translateY(-3px);
}

#footer h5 {
  color: var(--rizoma-white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rizoma-accent-light);
  display: inline-block;
}

#footer ul { list-style: none; padding: 0; margin: 0; }
#footer ul li { margin-bottom: 0.5rem; }
#footer ul li i { color: var(--rizoma-accent-light); }
#footer ul li a {
  color: rgba(255,255,255,.6);
  font-size: 0.88rem;
  transition: color var(--transition), padding-left var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
#footer ul li a:hover {
  color: #FFF;
  padding-left: 0.3rem;
}

#footer 

/* Mobile: iconos de contacto y redes */
.footer-mobile-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: flex-start;
}
.footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8) !important;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  text-decoration: none !important;
}
.footer-icon-link:hover {
  background: var(--rizoma-purple);
  color: #fff !important;
  transform: translateY(-2px);
  border-color: var(--rizoma-purple);
}
/* CIE logo spacing */
.footer-cie-logo {
  display: block;
  margin: 1rem 0 0.75rem;
  opacity: 0.85;
}

.footer-bottom {
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.1rem 0;
  background: rgba(0,0,0,.12);
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.footer-bottom-copy {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,.35);
  line-height: 1.4;
}
.footer-bottom-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.footer-bottom-sep {
  color: rgba(255,255,255,.2);
  font-size: 0.8rem;
}
.footer-bottom-logos a {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.2s;
  filter: brightness(0) invert(1);
}
.footer-bottom-logos a:hover { opacity: 0.9; }
.footer-bottom-logos img { display: block; }
.footer-bottom-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* Link de crédito generado por PHP (footer_disenado/footer_desarrollado + URL) */
.footer-credit-link {
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: color .2s;
}
.footer-credit-link:hover { color: rgba(255,255,255,.75); }
.footer-bottom-badge {
  display: inline-block !important;
  height: 20px;
  width: auto;
  opacity: 0.6;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.footer-bottom-badge--sm {
  height: 10px;
}
.footer-bottom-label:hover .footer-bottom-badge { opacity: 0.9; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeUp {
  0%   { opacity: 0; transform: translateY(40px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes barSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes logos-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   RESPONSIVE — TABLET (≤991px)
   ============================================================ */
@media (max-width: 991px) {

  .section { padding: 64px 0; }

  /* Hero contact bar */
  .hero-contact-bar { padding: 1rem 0; }
  .hero-contact-bar .contact-item { justify-content: center; }

  /* Quienes somos */
  #quienes-somos .row { flex-direction: column; }

  /* Service card img height */
  .service-card .card-img-wrap { aspect-ratio: 16/9; height: auto; }
  .service-card-placeholder { aspect-ratio: 16/9; min-height: 0; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  /* Footer */
  #footer { padding: 50px 0 0; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤767px)
   ============================================================ */
@media (max-width: 767px) {

  .section { padding: 52px 0; }

  /* Navbar */
  #navbar { padding: 0.85rem 0; }
  #navbar.scrolled { padding: 0.5rem 0; }

  /* Hero */
  #hero { min-height: 100svh; padding-bottom: 75px; }
  #hero h1 { font-size: clamp(3.4rem, 13vw, 4.5rem); margin-bottom: 0.75rem; }
  #hero .hero-lead { font-size: 0.95rem; margin-bottom: 1.5rem; }
  .hero-cta { flex-direction: column; gap: 0.6rem; }
  .btn-rizoma-primary,
  .btn-rizoma-outline {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.92rem;
  }
  .hero-contact-bar { padding: 0.85rem 0; }
  .hero-contact-bar .contact-item { gap: 0.5rem; }
  .hero-contact-bar .contact-item i { font-size: 1.2rem; }
  .hero-contact-bar .contact-item .label { font-size: 0.68rem; }
  .hero-contact-bar .contact-item .value { font-size: 0.85rem; }
  .hero-contact-bar [style*="width:1px"] { display: none !important; }

  /* Section commons */
  .section-title { font-size: clamp(2rem, 8vw, 2.8rem); }

  /* Quienes somos */
  .qs-section { padding: 52px 0; }
  .stat-item .num { font-size: 1.4rem; }
  .stat-item .desc { font-size: 0.68rem; }

  /* Quote */
  .quote-band { padding: 44px 0; }

  /* Servicios — 1 columna */
  #servicios .col-12.col-md-6 { flex: 0 0 100%; max-width: 100%; }
  .service-card .card-img-wrap { aspect-ratio: 16/9; height: auto; }
  .service-card-placeholder { aspect-ratio: 16/9; min-height: 0; }
  .service-card .card-img-title h3 { font-size: 1rem; }

  /* Multimedia */
  #multimedia { padding: 52px 0; }
  .multimedia-header { align-items: center; gap: 0.75rem; flex-wrap: nowrap; }
  .multimedia-title { min-width: 0; }
  .multimedia-header .section-title-wrap { min-width: 0; --section-title-size: clamp(1.3rem, 5.5vw, 2rem); }
  .multimedia-header .section-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .media-tabs .nav-link { padding: 0.5rem 0.9rem; font-size: 0.88rem; }
  .video-item .play-btn { width: 44px; height: 44px; font-size: 1.1rem; }
  .video-item .video-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Clientes */
  .clientes-logos-wrap { gap: 1.5rem; padding: 1rem 0; }
  .clientes-logos-wrap img { height: 32px; }
  .testimonial-item { padding: 1.75rem 1.25rem; }
  .testimonial-item blockquote { font-size: 0.95rem; }

  /* Presupuesto */
  #presupuesto { padding: 44px 0; }
  #presupuesto::before,
  #presupuesto::after { display: none; }
  #presupuesto .row.g-5 { --bs-gutter-y: 1.5rem; }
  .budget-form { padding: 1.25rem 1rem; border-radius: var(--radius); }
  .budget-form .form-control,
  .budget-form .form-select { font-size: 0.9rem; padding: 0.55rem 0.8rem; }
  .budget-form .form-label { font-size: 0.78rem; margin-bottom: 0.25rem; }
  .budget-form textarea.form-control { min-height: 90px; }
  .btn-submit { font-size: 0.95rem; padding: 0.75rem; }

  /* Footer */
  #footer { padding: 44px 0 0; }
  #footer .footer-about { max-width: 100%; }
  #footer h5 { font-size: 0.82rem; margin-bottom: 0.85rem; }
  #footer ul li { margin-bottom: 0.35rem; }
  .footer-bottom-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
  .footer-bottom-copy { font-size: 0.68rem; text-align: center; }
  .footer-bottom-logos { justify-content: center; flex-wrap: wrap; }
  .footer-bottom-label { text-align: center; }

  /* Lightbox mobile */
  #lightbox-prev { left: 0.4rem; }
  #lightbox-next { right: 0.4rem; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1rem; }
  #lightbox-close { top: 0.75rem; right: 0.75rem; font-size: 1.5rem; }
  #lightbox-overlay img { max-width: 96vw; max-height: 72vh; }
  #lightbox-thumbs { bottom: 2.8rem; }
  #lightbox-thumbs img { width: 40px; height: 28px; }
  #lightbox-counter { bottom: 0.9rem; font-size: 0.7rem; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {

  #hero h1 { font-size: clamp(3rem, 14vw, 3.8rem); }
  #hero .hero-lead { font-size: 0.9rem; }

  .service-card .card-img-wrap { aspect-ratio: 16/9; height: auto; }

  .multimedia-header { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 0.5rem; }
  .multimedia-title { min-width: 0; }
  .multimedia-header .section-title-wrap { min-width: 0; --section-title-size: clamp(1.1rem, 5.5vw, 1.5rem); }
  .multimedia-header .section-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .media-tabs .nav-link { padding: 0.4rem 0.6rem; font-size: 0.8rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  #footer .col-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ============================================================
   PARALLAX — CSS hook for quote band ::before
   ============================================================ */

/* ============================================================
   RIZOMA CONTENT (single, page, archive body text)
   ============================================================ */
.rizoma-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--rizoma-gray);
}
.rizoma-content p   { margin-bottom: 1.25rem; }
.rizoma-content h2,
.rizoma-content h3  { color: var(--rizoma-blue); margin: 2rem 0 0.75rem; font-weight: 700; font-size: 1.15rem; }
.rizoma-content h2  { font-size: 1.4rem; }
.rizoma-content ul,
.rizoma-content ol  { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.rizoma-content li  { margin-bottom: 0.35rem; }
.rizoma-content blockquote {
  border-left: 4px solid var(--rizoma-purple);
  padding: 0.75rem 1.25rem;
  background: rgba(89,100,172,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  margin: 1.5rem 0;
  color: var(--rizoma-blue);
}
.rizoma-content img {
  border-radius: var(--radius);
  margin: 1rem 0;
}
.rizoma-content a {
  color: var(--rizoma-purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   GALLERY SHORTCODE EN CONTENIDO
   ============================================================ */

/* Wrapper de separación respecto al texto */
.rizoma-gallery-wrap {
  margin: 2.5rem 0;
  clear: both;
}

/* ── Reset CSS nativo de WordPress (fallback por si cache sirve HTML viejo) ──
   Scoped a .gallery.galleryid-* para no pisar el markup nuestro */
.gallery.galleryid-* { margin: 0 !important; }
/* El markup nativo usa figure.gallery-item — lo reseteamos solo en ese contexto */
figure.gallery-item  { float: none !important; margin: 0 !important; padding: 0 !important; width: auto !important; }
.gallery br          { display: none !important; }
/* NO usar .gallery-caption global — solo dentro del markup nativo del core */
figure.gallery-item .gallery-caption { display: none !important; }

/* ── Columnas según atributo columns= del shortcode ── */

.gallery-grid.gallery-cols-4 .gallery-item,
.gallery-grid.gallery-cols-5 .gallery-item,
.gallery-grid.gallery-cols-6 .gallery-item { aspect-ratio: 1/1; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .gallery-grid.gallery-cols-4 { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid.gallery-cols-5 { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid.gallery-cols-6 { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid.gallery-cols-4 .gallery-item,
  .gallery-grid.gallery-cols-5 .gallery-item,
  .gallery-grid.gallery-cols-6 .gallery-item { aspect-ratio: 4/3; }
}
@media (max-width: 576px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .gallery-grid.gallery-featured .gallery-item:first-child { grid-column: span 2; aspect-ratio: 16/9; }
  .gallery-grid.gallery-cols-1 { max-width: 100%; }
  .gallery-grid.gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.gallery-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.gallery-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.gallery-cols-5 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.gallery-cols-6 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.gallery-cols-4 .gallery-item,
  .gallery-grid.gallery-cols-5 .gallery-item,
  .gallery-grid.gallery-cols-6 .gallery-item { aspect-ratio: 1/1; }
}

/* ── No aplicar sombra/hover a imgs dentro de gallery-item ──
   (el overlay .gallery-item::before ya lo maneja) */
.rizoma-gallery-wrap img,
.rizoma-content .rizoma-gallery-wrap img,
.rizoma-article .rizoma-gallery-wrap img,
.service-content .rizoma-gallery-wrap img {
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rizoma-gallery-wrap img:hover,
.rizoma-content .rizoma-gallery-wrap img:hover,
.rizoma-article .rizoma-gallery-wrap img:hover,
.service-content .rizoma-gallery-wrap img:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* Post meta */
.post-meta-top { margin-bottom: 0.5rem; }
.post-cat, .post-card-cat {
  display: inline-block;
  background: var(--rizoma-purple);
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  text-decoration: none !important;
}
.post-meta-date {
  font-size: 0.82rem;
  color: rgba(255,255,255,.7);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.post-meta-inline {
  font-size: 0.85rem;
  color: var(--rizoma-gray);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Post tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.post-tag {
  background: rgba(89,100,172,.08);
  color: var(--rizoma-purple);
  font-size: 0.8rem;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  border: 1px solid rgba(89,100,172,.2);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.post-tag:hover { background: var(--rizoma-purple); color: #fff; }

/* Post navigation */
.post-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rizoma-gray-light);
  flex-wrap: wrap;
}
.post-nav-link {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid rgba(89,100,172,.15);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  color: var(--rizoma-text);
}
.post-nav-link:hover {
  background: rgba(89,100,172,.05);
  border-color: var(--rizoma-purple);
  color: var(--rizoma-purple);
}
.post-nav-link.next { text-align: right; }
.post-nav-link .nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rizoma-purple);
  opacity: 0.75;
}
.post-nav-link .nav-title { font-size: 0.9rem; font-weight: 600; }

/* ============================================================
   ARCHIVE — Post cards grid
   ============================================================ */
#rizoma-archive .archive-header { padding-bottom: 0; }
/* rizoma-post-card shell → shared card shell (service-card, nov-card, rizoma-post-card) */
/* post-card-img-wrap, post-card-body, post-card-title, post-card-excerpt, post-card-meta
   all unified in the SERVICIOS / NOVEDADES shared card section above */

/* Infinite scroll loader */
#infinite-scroll-sentinel { padding: 2rem 0; text-align: center; }
.infinite-scroll-loader { display: flex; justify-content: center; align-items: center; }

/* ============================================================
   404 PAGE
   ============================================================ */
/* ── 404 ── */
#page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rizoma-gray-light);
  padding: 120px 1rem 80px;
}
.e404-wrap {
  text-align: center;
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.e404-drop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 260px;
  height: 340px;
  pointer-events: none;
  opacity: 0.7;
  animation: dropFloat 6s ease-in-out infinite;
}
@keyframes dropFloat {
  0%, 100% { transform: translate(-50%, -55%) scale(1); }
  50%       { transform: translate(-50%, -58%) scale(1.04); }
}
.e404-number {
  font-size: clamp(7rem, 22vw, 12rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
  margin-bottom: 0.25rem;
}
.e404-content {
  position: relative;
  z-index: 2;
}
.e404-content .section-title-wrap { margin-bottom: 1rem; }
.e404-content .section-title { font-size: clamp(1.6rem, 4vw, 2.2rem) !important; }
.e404-text {
  color: var(--rizoma-gray);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.e404-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   SINGLE / PAGE — back link (defined in earlier block,
   archived here for reference — no duplication needed)
   ============================================================ */
#single-servicio,
#single-equipo {
  padding-top: 90px;
  padding-bottom: 80px;
}

/* ── Header imagen con título superpuesto — usado en page.php y single.php ── */
.single-service-header {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}
.single-service-header img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
}
.single-service-header .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,20,50,.75) 0%, rgba(15,20,50,.15) 55%, transparent 100%);
  border-radius: var(--radius-lg);
}
.single-service-header .img-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 2rem 1.75rem;
}
.single-service-header .img-title h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  letter-spacing: -0.02em;
}
.single-service-header .img-title .title-accent {
  display: block;
  width: 44px; height: 4px;
  background: var(--gradient-brand);
  border-radius: 2px;
}
@media (max-width: 767px) {
  .single-service-header img { aspect-ratio: 4/3; height: auto; }
  .single-service-header .img-title { padding: 1.25rem; }
  .single-service-header .img-title h1 { font-size: 1.5rem; }
}

/* ── Hero card — espejo del service-card del frontend ── */
.ss-hero-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--rizoma-white);
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  margin-bottom: 2rem;
}

.ss-img-wrap {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--gradient-brand);
}
.ss-img-wrap .ss-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.25,.46,.45,.94);
}
.ss-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,43,74,.55) 0%, transparent 55%);
}
.ss-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}
.ss-img-placeholder i {
  font-size: 4rem;
  color: rgba(255,255,255,.2);
}

/* Title bar — idéntico a .card-title-bar */
.ss-title-bar {
  background: var(--gradient-brand);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ss-title-line {
  width: 4px;
  align-self: stretch;
  background: rgba(255,255,255,.55);
  border-radius: 2px;
  flex-shrink: 0;
  min-height: 1.5em;
}
.ss-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

/* Body */
.ss-body {
  padding: 0.5rem 0 2rem;
}

/* CTA buttons */
.ss-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 3rem;
}

/* Relacionados */
.ss-related {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(89,100,172,.1);
}
.ss-related-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rizoma-blue);
  margin-bottom: 1.25rem;
}

@media (max-width: 767px) {
  #single-servicio,
  #single-equipo { padding-top: 80px; padding-bottom: 50px; }
  .ss-img-wrap { aspect-ratio: 16 / 9; }
  .ss-title { font-size: 1.3rem; }
  .ss-title-bar { padding: 0.85rem 1rem; }
  .ss-cta { flex-direction: column; }
  .ss-cta .btn-rizoma-primary,
  .ss-cta .btn-rizoma-outline { width: 100%; justify-content: center; }
}

/* Breadcrumbs */
.rizoma-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
  color: var(--rizoma-gray);
  padding: 0.5rem 0.75rem;
  background: rgba(89,100,172,.06);
  border-radius: var(--radius);
}
.bc-item {
  color: var(--rizoma-purple);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
a.bc-item:hover {
  background: rgba(89,100,172,.1);
  color: var(--rizoma-blue);
}
.bc-current {
  color: var(--rizoma-gray);
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-home i { font-size: 1rem; vertical-align: -2px; }
.bc-sep {
  color: rgba(89,100,172,.35);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
}

/* service-content dentro del single (hereda de rizoma-content) */
.service-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--rizoma-gray);
}
.service-content p { margin-bottom: 1.25rem; }
.service-content h2, .service-content h3 { color: var(--rizoma-blue); margin-top: 2rem; }

/* ============================================================
   WHATSAPP FLOATING BUTTON — removed (handled by plugin)
   ============================================================ */

/* ============================================================
   FORM — Inline validation feedback
   ============================================================ */
.budget-form .form-control.is-valid,
.budget-form .form-select.is-valid { border-color: #2ecc71 !important; background-image: none; }
.budget-form .form-control.is-invalid,
.budget-form .form-select.is-invalid { border-color: #e74c3c !important; background-image: none; box-shadow: 0 0 0 3px rgba(231,76,60,.15) !important; }
.budget-form .field-feedback { font-size: 0.75rem; margin-top: 0.3rem; min-height: 1.1em; display: block; }
.budget-form .field-feedback.valid   { color: #2ecc71; }
.budget-form .field-feedback.invalid { color: #e74c3c; }
.budget-form .form-label .required-mark { color: #e74c3c; margin-left: 2px; }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
  background: #1e1e2e; border-top: 2px solid var(--rizoma-purple);
  padding: 1rem 0; box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.cookie-banner:not([hidden]) { transform: translateY(0); }
.cookie-banner[hidden] { display: none !important; }
.cookie-banner__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-banner__text { flex: 1 1 300px; font-size: 0.85rem; color: rgba(255,255,255,.8); margin: 0; line-height: 1.6; }
.cookie-banner__link { color: var(--rizoma-purple-light); text-decoration: underline; margin-left: 0.4rem; }
.cookie-banner__actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-banner__btn { padding: 0.5rem 1.25rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; transition: all var(--transition); }
.cookie-banner__btn--accept { background: var(--rizoma-purple); color: #fff; }
.cookie-banner__btn--accept:hover { filter: brightness(1.15); }
.cookie-banner__btn--decline { background: transparent; color: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.2); }
.cookie-banner__btn--decline:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar-wrap .search-form { display: flex; gap: 0; max-width: 560px; }
.search-bar-wrap .search-field {
  flex: 1; padding: 0.7rem 1.1rem;
  border: 2px solid rgba(89,100,172,.25); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-family: var(--font-main); font-size: 0.95rem; color: var(--rizoma-text);
  background: #fff; transition: border-color var(--transition); outline: none;
}
.search-bar-wrap .search-field:focus { border-color: var(--rizoma-purple); }
.search-bar-wrap .search-submit {
  background: var(--gradient-brand); color: #fff; border: none;
  padding: 0.7rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: filter var(--transition); white-space: nowrap;
}
.search-bar-wrap .search-submit:hover { filter: brightness(1.1); }

/* ============================================================
   ADMIN OPTIONS — Image picker
   ============================================================ */
.rizoma-opts__img-picker { display: flex; flex-direction: column; gap: 8px; }

/* ── Ocultar badge Trustindex / TI Verified ── */
.ti-verified-by,
.ti-verified-by-row,
[class*='ti-verified'],
[id*='ti-verified'],
.trustindex-widget-verified,
.ti-widget-verified,
[class*='trustindex'][class*='verified'],
.ti-reviews-widget .ti-widget-footer { display: none !important; }

/* Forzar que ningún elemento sobrepase el ancho del viewport */
.wp-block-group,
.wp-block-cover,
[class*="whatsapp"],
[class*="wa-widget"],
[class*="wpcf7"],
[id*="whatsapp"],
.pojo-a11y-toolbar-toggle,
#ti-widget-container,
.ti-widget-container { max-width: 100vw; overflow-x: hidden; }

/* ============================================================
   NOVEDADES — sección home + slider
   ============================================================ */
/* ============================================================
   NOVEDADES
   ============================================================ */

/* Sección — gradiente gris claro para diferenciar de blanco */
.nov-section,
.equ-section {
  background: linear-gradient(180deg, #f0f2f7 0%, #e8eaef 100%);
  border-top: 1px solid rgba(89,100,172,.08);
  border-bottom: 1px solid rgba(89,100,172,.06);
}

/* Header */
.nov-header,
.equ-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.nov-header .section-title-wrap,
.equ-header .section-title-wrap { --section-title-size: clamp(1.3rem, 2.2vw, 1.8rem); }

/* Barra vertical izquierda: usar top/bottom en % del propio pseudo para que
   escale correctamente a cualquier font-size del título */
.nov-header .section-title-wrap::before,
.equ-header .section-title-wrap::before {
  width: 4px;
  top: 0.08em;
  bottom: 0.08em;
}

.nov-ver-mas,
.equ-ver-mas { font-size: 0.85rem; padding: 0.5rem 1.2rem; flex-shrink: 0; }

/* Responsive: fila única en mobile — título y botón inline */
@media (max-width: 575px) {
  .nov-header,
  .equ-header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.6rem;
  }
  .nov-header .section-title-wrap,
  .equ-header .section-title-wrap {
    flex: 1 1 0;
    min-width: 0;
    --section-title-size: clamp(1.3rem, 5vw, 1.7rem);
  }
  .nov-header .section-title,
  .equ-header .section-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Sobreescribir la regla global .btn-rizoma-outline { width:100% }
     que aplica en este mismo breakpoint y fuerza el botón a ancho completo */
  .nov-header .nov-ver-mas,
  .equ-header .equ-ver-mas {
    width: auto !important;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ── Card ── */
/* .nov-card shell, hover → shared card shell block above */

/* ── Imagen wrapper (div, no <a>, para evitar nested anchors) ── */
.nov-card-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #dde0e8;
  flex-shrink: 0;
  position: relative;
}
.nov-card-img--empty,
.post-card-img-wrap--empty { background: #dde0e8; }

/* Link interno de la imagen */
.nov-card-img-link,
.post-card-img-link {
  display: block;
  width: 100%; height: 100%;
  position: absolute; inset: 0;
}
.nov-card-img-link img,
.post-card-img-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.nov-card:hover .nov-card-img-link img,
.rizoma-post-card:hover .post-card-img-link img { transform: scale(1.07); }

/* Placeholder sin imagen */
.nov-card-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #bbbfc9; font-size: 2.2rem;
}

/* Meta sobre la imagen: categoría + fecha en fila */
.nov-img-meta {
  position: absolute;
  bottom: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.nov-img-date {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* Badge categoría — ahora dentro de .nov-img-meta, ya no posiciona absoluto */
.nov-cat-badge {
  position: static;
  bottom: auto;
  left: auto;
  z-index: auto;
  margin: 0 !important;
  background: rgba(89,100,172,.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 0.68rem !important;
  padding: 0.18rem 0.55rem !important;
}
.nov-card:hover .nov-cat-badge,
.rizoma-post-card:hover .nov-cat-badge,
.service-card:hover .nov-cat-badge { background: var(--rizoma-purple); transform: translateY(-1px); }

/* Badge categoría sobre el título (sin imagen) */
.nov-cat-inline {
  align-self: flex-start;
  margin-bottom: 0.2rem !important;
  font-size: 0.68rem !important;
  padding: 0.18rem 0.55rem !important;
}

/* ── Arrow buttons ── */

/* ── Archive post card (misma lógica) ── */

/* ── Responsive: ver también el bloque nov-header arriba ── */

/* ============================================================
   SKELETON LOADER — Novedades / Archive cards
   ============================================================ */
@keyframes rzm-skeleton-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .45; }
}
.rzm-skeleton {
  background: #e9eaf0;
  border-radius: 4px;
  animation: rzm-skeleton-pulse 1.4s ease-in-out infinite;
  display: block;
}
.rzm-skeleton-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ebebef;
}
.rzm-skeleton-img  { width: 100%; aspect-ratio: 16/9; }
.rzm-skeleton-body { padding: 1rem; display: flex; flex-direction: column; gap: 10px; }
.rzm-skeleton-title { height: 18px; width: 80%; }
.rzm-skeleton-text  { height: 12px; width: 100%; }
.rzm-skeleton-text-sm { height: 12px; width: 55%; }

/* Lazy image fade-in */
img.lazy-img              { opacity: 0; transition: opacity .3s ease; }
img.lazy-img.lazy-loaded  { opacity: 1; }

/* ── Footer badges ─────────────────────────────────────────── */
.footer-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.footer-badge--cert {
    max-height: 60px;
    max-width: 120px;
    object-fit: contain;
    width: auto;
}
.footer-badge--icon {
    max-height: 20px;
    width: auto;
    object-fit: contain;
}

/* ── Mini-player sticky ────────────────────────────────────── */
.rzm-mini-player {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    z-index: 9999;
    background: #0a0a0a;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
}
.rzm-mini-player--visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.rzm-mini-player__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}
.rzm-mini-player__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.rzm-mini-player__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #111;
}
.rzm-mini-player__title {
    flex: 1;
    font-size: 11px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: inherit;
}
.rzm-mini-player__expand,
.rzm-mini-player__close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    transition: color .15s, background .15s;
    font-size: 13px;
    flex-shrink: 0;
}
.rzm-mini-player__expand:hover,
.rzm-mini-player__close:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}
@media (max-width: 480px) {
    .rzm-mini-player { width: calc(100vw - 32px); right: 16px; bottom: 16px; }
}
