:root {
  --brand-light: #fcfbf9;
  --brand-primary: #1a3c2e;
  --brand-dark: #111827;
  --brand-accent: #b5924c;
  --text-main: #1f2937;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-padding-top: 80px;
  overscroll-behavior-y: none;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }
}

body {
  background-color: var(--brand-light);
  color: var(--text-main);
  margin: 0;
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-placeholder {
  background-color: #0f172a;
  min-height: 100vh;
}

.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.safe-area-top {
  padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* Animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
  will-change: transform, opacity;
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out forwards;
  will-change: transform;
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
  will-change: opacity;
}

.reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* WhatsApp pulsing glow effect */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-pulse {
  animation: whatsapp-pulse 2s infinite;
}

/* --- HERO STAGGERED ENTRANCE --- */
@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-stagger-1,
.hero-stagger-2,
.hero-stagger-3,
.hero-stagger-4,
.hero-stagger-5 {
  opacity: 0;
  animation: hero-enter 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-stagger-1 { animation-delay: 0.2s; }
.hero-stagger-2 { animation-delay: 0.45s; }
.hero-stagger-3 { animation-delay: 0.65s; }
.hero-stagger-4 { animation-delay: 0.85s; }
.hero-stagger-5 { animation-delay: 1.05s; }

/* Subtle shimmer on the badge */
@keyframes badge-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.badge-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(181, 146, 76, 0.08) 45%,
    rgba(181, 146, 76, 0.15) 50%,
    rgba(181, 146, 76, 0.08) 55%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: badge-shimmer 4s ease-in-out infinite;
  animation-delay: 2s;
}

/* Credential glow — subtle golden border pulse */
@keyframes credential-border-glow {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }
  50% {
    border-color: rgba(212, 176, 106, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 20px rgba(181, 146, 76, 0.1);
  }
}

.credential-glow {
  animation: credential-border-glow 4s ease-in-out infinite;
  animation-delay: 3s;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.credential-glow:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(212, 176, 106, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 24px rgba(181, 146, 76, 0.15);
}

.hero-badge-glass {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- HERO MOBILE BRAND MARK --- */
.hero-brand-mobile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 1.5rem;
}

.hero-brand-mobile-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  font-weight: 500;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-brand-mobile-subtitle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  opacity: 0.95;
}

.hero-brand-mobile-line {
  height: 1px;
  width: 24px;
}

.hero-brand-mobile-line.line-left {
  background: linear-gradient(to right, transparent, var(--brand-accent, #b5924c));
}

.hero-brand-mobile-line.line-right {
  background: linear-gradient(to left, transparent, var(--brand-accent, #b5924c));
}

.hero-brand-mobile-subtitle {
  color: var(--brand-accent, #b5924c);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
  .hero-brand-mobile-container {
    display: none;
  }
}

/* --- SERVICIOS SECTION DIVIDER --- */
.servicios-divider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  height: 1px;
  margin: 0 auto;
}

.servicios-divider::before,
.servicios-divider::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
}

.servicios-divider::before {
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(181, 146, 76, 0.25) 30%,
    rgba(181, 146, 76, 0.6) 70%,
    rgba(181, 146, 76, 0.8) 100%
  );
}

.servicios-divider::after {
  background: linear-gradient(
    to left,
    transparent 0%,
    rgba(181, 146, 76, 0.25) 30%,
    rgba(181, 146, 76, 0.6) 70%,
    rgba(181, 146, 76, 0.8) 100%
  );
}

/* Central diamond ornament */
.servicios-divider-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--brand-accent, #b5924c);
  opacity: 0.8;
  margin: 0 0.75rem;
}

@media (max-width: 639px) {
  .servicios-divider {
    max-width: 280px;
    margin-left: 0;
  }
  .servicios-divider::before {
    flex: 0 0 60px;
  }
}

/* --- SERVICE HEADER DECORATIVE DIVIDER --- */
.service-header-separator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.5rem;
  margin-bottom: 1.75rem;
}

.service-header-separator-main {
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-accent, #b5924c) 0%, #d4af37 100%);
  border-radius: 9999px;
}

.service-header-separator-dot {
  width: 6px;
  height: 6px;
  background-color: var(--brand-accent, #b5924c);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.service-header-separator-sub {
  width: 25px;
  height: 1px;
  background-color: rgba(181, 146, 76, 0.4);
  border-radius: 9999px;
}

/* --- SERVICE CARD GOLDEN ACCENT LINE --- */
.service-card {
  position: relative;
  border-radius: 2px !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@media (min-width: 768px) {
  .service-card:hover {
    transform: translateY(-6px) !important;
  }
}

/* --- FORM INPUT MICRO-INTERACTIONS --- */
.form-input-enhanced {
  position: relative;
  transition: all 0.3s ease;
}

.form-input-enhanced:focus {
  border-color: #1a3c2e !important;
  box-shadow: 0 0 0 3px rgba(26, 60, 46, 0.1), 0 2px 8px rgba(26, 60, 46, 0.06) !important;
  transform: translateY(-1px);
}

/* Submit button glow when enabled */
@keyframes btn-glow-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(181, 146, 76, 0.25); }
  50% { box-shadow: 0 4px 20px rgba(181, 146, 76, 0.4); }
}

.btn-glow-enabled {
  animation: btn-glow-pulse 2.5s ease-in-out infinite;
}

/* --- WHATSAPP DELAYED ENTRANCE --- */
@keyframes whatsapp-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.whatsapp-delayed {
  opacity: 0;
  animation: whatsapp-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.5s;
}

/* --- SCROLL ARROW DELAYED FADE --- */
@keyframes arrow-fade-bounce {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, 8px);
  }
}

.scroll-arrow-delayed {
  opacity: 0;
  animation: hero-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.3s;
}

.scroll-arrow-delayed.animate-complete {
  animation: arrow-fade-bounce 2s ease-in-out infinite;
}

/* --- STAT COUNTER HIGHLIGHT --- */
.stat-counter {
  transition: all 0.4s ease;
}

.stat-counter.counted {
  text-shadow: 0 0 20px rgba(181, 146, 76, 0.15);
}

/* --- FOOTER LINK HOVER EFFECTS --- */
.footer-link {
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-link:hover {
  padding-left: 4px;
}

/* --- FOOTER LOGO --- */
.footer-logo {
  height: 64px;
  width: auto;
  transition: transform 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.02);
}

@media (max-width: 640px) {
  .footer-logo {
    height: 48px;
  }
}

/* --- PROJECT CHIP / BADGE --- */
.project-chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.6;
}

/* --- PREMIUM INTERACTIVE EFFECTS --- */

@keyframes nav-entrance {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Floating Capsule Header Styling */
.capsule-header {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  pointer-events: none; /* Permite clicks a través del contenedor del header */
  transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: none !important; /* Ensure absolutely no transform stacking context is created */
}

.capsule-header.header-scrolled {
  top: 0.75rem;
}

.capsule-nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  margin: 0 auto;
  pointer-events: auto; /* Habilita clicks en el menú en sí */
}

#desktop-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding: 0.625rem; /* Symmetrical concentric padding at original height */
  border-radius: 9999px;
  background-color: rgba(17, 24, 39, 0.35); /* Cristal esmerilado oscuro inicial mejorado */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.25);
  opacity: 0;
  animation: nav-entrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado Scrolled del Menú */
.header-scrolled #desktop-nav {
  background-color: rgba(255, 255, 255, 0.8); /* Cristal esmerilado claro glassmorphism optimizado */
  border-color: rgba(26, 60, 46, 0.08);
  box-shadow: 0 10px 25px -5px rgba(26, 60, 46, 0.08), 0 0 1px 0 rgba(26, 60, 46, 0.1);
  padding: 0.5rem; /* Symmetrical concentric scrolled padding at original scrolled height */
}

/* Desktop Nav Brand Name */
.nav-brand-desktop {
  display: flex;
  align-items: center;
  padding: 0;
  cursor: pointer;
}

.header-scrolled .nav-brand-desktop {
  color: var(--brand-dark, #111827) !important;
  text-shadow: none;
}

.logo-nav-desktop {
  height: 48px;
  width: 48px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin-left: 0; /* Center horizontally in the menu's left circular edge */
}

.logo-white {
  display: none;
}

.logo-normal {
  display: block;
}

.header-scrolled .logo-white {
  display: block;
}

.header-scrolled .logo-normal {
  display: none;
}


/* Mobile Top Brand Logo (Unfixed) */
.nav-brand-mobile-top {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  line-height: 1;
}

.home-mobile-logo {
  position: absolute !important;
  top: 2.05rem !important;
  left: 1.75rem !important;
  z-index: 50 !important;
}

.subpage-mobile-logo {
  position: absolute !important;
  left: 5.5rem !important;
  top: 2.05rem !important;
  z-index: 50 !important;
}

.subpage-mobile-logo .nav-brand-mobile-top {
  color: var(--brand-dark, #111827) !important;
  text-shadow: none;
}

.home-mobile-logo .mobile-logo-white {
  display: block;
}
.home-mobile-logo .mobile-logo-green {
  display: none;
}
.subpage-mobile-logo .mobile-logo-white {
  display: none;
}
.subpage-mobile-logo .mobile-logo-green {
  display: block;
}

@media (max-width: 480px) {
  .nav-brand-mobile-top {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }
  .subpage-mobile-logo {
    left: 4.75rem !important;
    top: 2.1rem !important;
  }
  .home-mobile-logo {
    top: 2.1rem !important;
    left: 1.5rem !important;
  }
}

/* Desktop Nav Brand Divider Line */
.nav-brand-divider {
  width: 1px;
  height: 1.1rem;
  background-color: rgba(255, 255, 255, 0.22);
  margin-left: -1.5rem; /* Symmetric concentric spacing of 12px (0.75rem) from logo */
  margin-right: -1.5rem; /* Symmetric concentric spacing of 12px (0.75rem) from Inicio link */
  transition: background-color 0.5s ease;
}

.header-scrolled .nav-brand-divider {
  background-color: rgba(26, 60, 46, 0.18);
}

/* Responsive Nav Spacing Adaptations */
@media (max-width: 1280px) {
  #desktop-nav {
    gap: 1.25rem;
  }
  .nav-brand-desktop {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
  }
  .nav-brand-divider {
    margin-left: -0.75rem; /* Symmetric spacing of 8px (0.5rem) from logo */
    margin-right: -0.75rem; /* Symmetric spacing of 8px (0.5rem) from Inicio link */
  }
}
@media (max-width: 1100px) {
  #desktop-nav {
    gap: 0.75rem;
  }
  .nav-brand-desktop {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
  .nav-brand-divider {
    margin-left: -0.375rem; /* Symmetric spacing of 6px (0.375rem) from logo */
    margin-right: -0.375rem; /* Symmetric spacing of 6px (0.375rem) from Inicio link */
  }
}

/* Enlaces de escritorio dentro del Menú */
.nav-link-desktop {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  padding: 0.25rem 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); /* Sombra suave para contraste sobre fondos claros/nubes */
}

.nav-link-desktop:hover {
  color: #ffffff !important; /* Blanco puro en hover para legibilidad óptima */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.header-scrolled .nav-link-desktop {
  color: var(--brand-dark, #111827) !important;
  text-shadow: none; /* Sin sombra en el menú claro scrolled */
}

.header-scrolled .nav-link-desktop:hover {
  color: var(--brand-primary, #1a3c2e) !important; /* Verde corporativo en hover al hacer scroll */
}

/* Animación de línea inferior que se expande desde el centro */
.nav-link-desktop::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--brand-accent, #b5924c);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link-desktop:hover::after {
  width: 100%;
  left: 0;
}

/* Línea inferior en estado Scrolled */
.header-scrolled .nav-link-desktop::after {
  background-color: var(--brand-primary, #1a3c2e);
}

/* Botón CTA dentro de la Cápsula */
#header-cta {
  border-radius: 9999px !important; /* Forzar forma de píldora */
  padding: 0.5rem 1.25rem !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: all 0.3s ease !important;
}

.capsule-cta-initial {
  background-color: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.capsule-cta-initial:hover {
  background-color: #ffffff !important;
  color: var(--brand-primary, #1a3c2e) !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15) !important;
}

.capsule-cta-scrolled {
  background-color: var(--brand-primary, #1a3c2e) !important;
  color: #ffffff !important;
  border: 1px solid var(--brand-primary, #1a3c2e) !important;
}

.capsule-cta-scrolled:hover {
  background-color: var(--brand-secondary, #2d6a4f) !important;
  border-color: var(--brand-secondary, #2d6a4f) !important;
  box-shadow: 0 4px 12px rgba(26, 60, 46, 0.2) !important;
}

/* Spotlight Card (Brillo sutil interactivo que sigue al cursor) */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(181, 146, 76, 0.08), /* Dorado ultra sutil (8%) */
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Asegurar que el contenido de la tarjeta esté sobre el brillo */
.spotlight-card > * {
  position: relative;
  z-index: 2;
}

/* Hero Background Wrapper for Gapless and Ghosting-free Parallax */
#hero-bg-wrapper {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}


/* Eased Image Masking for natural photo-to-background fusion */
.blend-masked-image {
  opacity: 0.92;
  filter: saturate(0.88) brightness(0.93) contrast(1.0);
  /* Mobile default: top is opaque, bottom is transparent. Keep top 45% sharp, mask bottom 25%. */
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 45%,
    rgba(0, 0, 0, 0.7) 60%,
    rgba(0, 0, 0, 0.3) 70%,
    transparent 75%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 45%,
    rgba(0, 0, 0, 0.7) 60%,
    rgba(0, 0, 0, 0.3) 70%,
    transparent 75%
  );
}

/* Desktop: left is transparent, right is opaque. Keep right 60% sharp. */
@media (min-width: 1024px) {
  .blend-masked-image {
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 15%,
      rgba(0, 0, 0, 0.5) 30%,
      #000 50%,
      #000 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 15%,
      rgba(0, 0, 0, 0.5) 30%,
      #000 50%,
      #000 100%
    );
  }
}

/* Eased Color Overlay to match lighting and prevent muddy highlights */
.blend-gradient-overlay {
  /* Mobile: solid on bullets; soft fade from above separator to above Cofundador */
  background: linear-gradient(
    to top,
    var(--brand-primary) 0%,
    var(--brand-primary) 20%,
    rgba(26, 60, 46, 0.65) 23%,
    rgba(26, 60, 46, 0.48) 26%,
    rgba(26, 60, 46, 0.32) 29%,
    rgba(26, 60, 46, 0.18) 32%,
    rgba(26, 60, 46, 0.08) 35%,
    rgba(26, 60, 46, 0.02) 38%,
    transparent 40%
  );
}

@media (min-width: 1024px) {
  /* Desktop: left-to-right blend + bottom darkening for Javier info readability */
  .blend-gradient-overlay {
    background:
      linear-gradient(
        to right,
        var(--brand-primary) 0%,
        rgba(26, 60, 46, 0.92) 10%,
        rgba(26, 60, 46, 0.65) 25%,
        rgba(26, 60, 46, 0.25) 40%,
        transparent 55%,
        transparent 100%
      ),
      linear-gradient(
        to top,
        rgba(26, 60, 46, 0.48) 0%,
        rgba(26, 60, 46, 0.22) 18%,
        transparent 42%
      );
  }
}


/* ============================================
   MOBILE MENU — Brand Header
   ============================================ */

.mobile-menu-brand-header {
  padding: 0.5rem 1.75rem 1.5rem;
}

.mobile-menu-brand-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}

.mobile-menu-brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(26, 60, 46, 0.12), 0 0 0 1px rgba(26, 60, 46, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-menu-brand-link:active .mobile-menu-brand-logo {
  transform: scale(0.95);
}

.mobile-menu-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.mobile-menu-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--brand-dark, #111827);
  line-height: 1.2;
}

.mobile-menu-brand-tagline {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-accent, #b5924c);
  line-height: 1;
}

.mobile-menu-brand-divider {
  margin-top: 1.25rem;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--brand-accent, #b5924c) 0%,
    rgba(181, 146, 76, 0.3) 40%,
    transparent 100%
  );
}

@media (max-width: 380px) {
  .mobile-menu-brand-logo {
    width: 48px;
    height: 48px;
  }

  .mobile-menu-brand-name {
    font-size: 1rem;
  }

  .mobile-menu-brand-tagline {
    font-size: 0.625rem;
  }
}


/* ============================================
   MOBILE-FIRST OPTIMIZATIONS
   ============================================ */

/* 2. Mobile Nav — Staggered entrance animation */
@keyframes nav-link-enter {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.nav-stagger { opacity: 0; }

.mobile-menu-animating .nav-stagger {
  animation: nav-link-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.mobile-menu-animating .nav-stagger:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu-animating .nav-stagger:nth-child(2) { animation-delay: 0.10s; }
.mobile-menu-animating .nav-stagger:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu-animating .nav-stagger:nth-child(4) { animation-delay: 0.20s; }
.mobile-menu-animating .nav-stagger:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu-animating .nav-stagger:nth-child(6) { animation-delay: 0.30s; }
.mobile-menu-animating .nav-stagger:nth-child(7) { animation-delay: 0.35s; }
.mobile-menu-animating .nav-stagger:nth-child(8) { animation-delay: 0.40s; }

/* Mobile hamburger when scrolled (solid background, no glassmorphism) */
.mobile-btn-scrolled {
  background-color: #ffffff !important;
}

/* 3. Service cards — Balanced horizontal layout on mobile */
@media (max-width: 639px) {
  #servicios .grid {
    gap: 1rem !important;
    grid-template-columns: 1fr !important;
  }

  /* Horizontal card: thumbnail left, text right */
  #servicios .service-card {
    flex-direction: row !important;
    align-items: stretch;
    min-height: 0;
  }

  /* Thumbnail: fixed width on the left, stretches to card height */
  #servicios .service-card > div:first-child {
    width: 7.5rem;
    min-width: 7.5rem;
    max-width: 7.5rem;
    aspect-ratio: unset !important;
    border-radius: 2px 0 0 2px !important;
    overflow: hidden;
    align-self: stretch;
    position: relative;
    height: auto;
  }

  #servicios .service-card > div:first-child img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Text content: balanced right side */
  #servicios .service-card > div:last-child {
    padding: 0.875rem 1rem !important;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  /* Category label — compact */
  #servicios .service-card > div:last-child > span:first-child {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 10px !important;
    letter-spacing: 0.12em;
  }

  /* Title — compact but readable */
  #servicios .service-card > div:last-child > h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem !important;
    line-height: 1.25;
  }

  /* Description — clamped to 2 lines */
  #servicios .service-card > div:last-child > p {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    margin-top: 0.1rem !important;
    margin-bottom: 0.4rem !important;
    color: #4b5563 !important;
  }

  /* CTA link — compact and aligned at the bottom */
  #servicios .service-card > div:last-child > div:last-child {
    display: inline-flex !important;
    font-size: 10px !important;
    margin-top: auto !important;
    padding-top: 0.15rem !important;
    line-height: 1;
  }

  #servicios .service-card,
  #servicios .service-card:hover {
    transform: none !important;
  }
}

/* 4. Profile — Limit image height on mobile */
@media (max-width: 1023px) {
  #perfil .rounded-sm.overflow-hidden {
    max-height: 420px;
  }
  #perfil .rounded-sm.overflow-hidden > img {
    object-position: top center;
  }
}

/* 6. Projects — Swipeable carousel on mobile */
@media (max-width: 767px) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Disable hover effects on mobile */
  .spotlight-card::before,
  .spotlight-card:hover::before {
    display: none !important;
    opacity: 0 !important;
  }

  .service-card,
  .service-card:hover {
    transform: none !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03), 0 4px 12px rgba(26, 60, 46, 0.05) !important;
  }

  .group:hover img,
  .service-card:hover img {
    transform: none !important;
  }

  .projects-grid {
    display: flex !important;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x pan-y;
    scroll-snap-type: x mandatory;
    gap: 1rem !important;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .projects-grid::-webkit-scrollbar {
    display: none;
  }
  .projects-grid > * {
    scroll-snap-align: center;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    flex-shrink: 0;
  }
  .projects-grid .flex-grow {
    min-width: 0;
    width: 100%;
  }
}

/* Prevent image container stretching due to image height in flex layouts */
.aspect-16-10,
.projects-grid .aspect-\[16\/10\] {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}
.aspect-16-10 > img,
.projects-grid .aspect-\[16\/10\] > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Carousel dot indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0 0;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #d1d5db;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}
.carousel-dot.active {
  background-color: var(--brand-primary);
  transform: scale(1.4);
}
@media (min-width: 768px) {
  .carousel-dots { display: none; }
}

/* 9. WhatsApp — Lift above cookie banner */
.whatsapp-lifted {
  transform: translateY(-3.5rem);
}
@media (min-width: 640px) {
  .whatsapp-lifted {
    transform: translateY(-3rem);
  }
}

#whatsapp-btn {
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
}
@media (min-width: 640px) {
  #whatsapp-btn {
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Back to home — inner pages (blog, servicios) */
@media (max-width: 1023px) {
  body:has(#back-to-home-btn) .blog-main {
    padding-top: 4.25rem;
  }
}

@media (max-width: 639px) {
  #back-to-home-btn {
    width: 3.375rem !important;
    height: 3.375rem !important;
    min-width: 3.375rem !important;
    min-height: 3.375rem !important;
  }

  #back-to-home-btn svg {
    width: 26px !important;
    height: 26px !important;
  }
}

/* Floating mobile controls — slightly larger tap targets */
@media (max-width: 639px) {
  #mobile-menu-button {
    width: 3.375rem !important;
    height: 3.375rem !important;
    min-width: 3.375rem !important;
    min-height: 3.375rem !important;
  }

  #mobile-menu-button svg {
    width: 26px !important;
    height: 26px !important;
  }

  #whatsapp-btn {
    width: 3.375rem !important;
    height: 3.375rem !important;
    min-width: 3.375rem !important;
    min-height: 3.375rem !important;
  }

  #whatsapp-btn svg {
    width: 1.625rem !important;
    height: 1.625rem !important;
  }
}

footer.safe-area-bottom {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
}
@media (min-width: 640px) {
  footer.safe-area-bottom {
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom)) !important;
  }
}



/* 10. Touch active feedback */
@media (hover: none) and (pointer: coarse) {
  .service-card:active,
  .spotlight-card:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
  }
}

/* Disable button hover effects on mobile/touch screens */
@media (max-width: 1023px) {
  /* Overrides for specific Tailwind hover background classes used in buttons */
  .hover\:bg-gray-50:hover {
    background-color: #ffffff !important;
  }
  .hover\:bg-white:hover {
    background-color: transparent !important;
  }
  .hover\:text-brand-dark:hover {
    color: #ffffff !important;
  }
  .hover\:bg-brand-secondary:hover {
    background-color: var(--brand-primary, #1a3c2e) !important;
  }
  .hover\:bg-brand-gold:hover {
    background-color: var(--brand-accent, #b5924c) !important;
  }
  .hover\:bg-\[\#20bd5a\]:hover {
    background-color: #25D366 !important;
  }
  .hover\:bg-gray-100:hover {
    background-color: transparent !important;
  }
  
  /* Overrides for specific button IDs and classes on mobile */
  #btn-reject-cookies:hover {
    color: #4b5563 !important; /* text-slate-600/gray-600 */
    background-color: transparent !important;
    border-color: #e5e7eb !important; /* border-gray-200 */
  }
  #btn-accept-cookies:hover {
    background-color: var(--brand-primary, #1a3c2e) !important;
    color: #ffffff !important;
  }
  #whatsapp-btn:hover {
    background-color: #25D366 !important;
  }
  #whatsapp-btn:hover svg {
    color: #ffffff !important;
  }
  #mobile-menu-close-button:hover {
    background-color: #f9fafb !important; /* bg-gray-50 */
  }
  
  /* Overrides for group hover interactions and animations on mobile */
  .hover\:-translate-y-1:hover {
    transform: none !important;
  }
  .hover\:shadow-lg:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important; /* shadow-md */
  }
  .group:hover img,
  .service-card:hover img {
    transform: none !important;
  }
  .group:hover .group-hover\:translate-x-1 {
    transform: none !important;
  }
  .nav-link-mobile:hover {
    color: var(--brand-dark, #111827) !important;
  }
  .nav-link-mobile:hover svg {
    transform: none !important;
    color: var(--brand-primary, #1a3c2e) !important;
  }
  
  /* Reducir tamaño de textos y espaciado de enlaces en menú móvil */
  .nav-link-mobile:not(.bg-brand-accent) {
    font-size: 1.2rem !important; /* original text-2xl (1.5rem / 24px) */
    padding-top: 0.625rem !important; /* original py-4 (1rem / 16px) */
    padding-bottom: 0.625rem !important; /* original py-4 (1rem / 16px) */
  }
  
  /* Ajustar tamaño del icono chevron del menú móvil */
  .nav-link-mobile:not(.bg-brand-accent) svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Ajustar el botón "Pedir Cita Ahora" en el menú móvil */
  .nav-link-mobile.bg-brand-accent {
    padding-top: 0.75rem !important; /* original py-4 (1rem) */
    padding-bottom: 0.75rem !important; /* original py-4 (1rem) */
    margin-top: 1.25rem !important; /* original mt-8 (2rem) */
  }
}

/* Javier/Nuria info — text-shadow for readability, no card background */
.ayudas-javier-info,
.nuria-info {
  position: relative;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Background glow in navy blue for contrast, very soft and blurred */
.ayudas-javier-info::before,
.nuria-info::before {
  content: '';
  position: absolute;
  inset: -30px -40px;
  background: radial-gradient(circle, rgba(10, 25, 47, 0.75) 0%, rgba(10, 25, 47, 0.4) 50%, transparent 85%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
  border-radius: 9999px;
}

.ayudas-item-flex {
  display: flex !important;
  align-items: flex-start !important;
}

.ayudas-item-flex:not(:first-child) {
  margin-top: 0.65rem !important; /* Compact vertical gap on mobile */
}

.ayudas-checkmark {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  margin-top: 3px !important;
  flex-shrink: 0 !important;
  margin-right: 8px !important;
}

.ayudas-javier-text {
  font-size: 0.7rem !important;
  font-weight: 300 !important;
  line-height: 1.45 !important;
  color: #e5e7eb !important;
}

@media (min-width: 640px) {
  .ayudas-item-flex:not(:first-child) {
    margin-top: 0.9rem !important; /* Compact gap */
  }
  .ayudas-checkmark {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    margin-top: 4px !important;
    margin-right: 10px !important;
  }
  .ayudas-javier-text {
    font-size: 0.85rem !important;
  }
}

@media (min-width: 1024px) {
  .ayudas-item-flex:not(:first-child) {
    margin-top: 1.1rem !important; /* Compact gap */
  }
  .ayudas-checkmark {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    margin-top: 5px !important;
    margin-right: 10px !important;
  }
  .ayudas-javier-text {
    font-size: 0.95rem !important;
  }
}

.ayudas-container {
  isolation: isolate !important;
}
.ayudas-content-right {
  overflow: hidden !important;
  isolation: isolate !important;
}
.ayudas-content-right img.blend-masked-image,
.ayudas-content-right .blend-gradient-overlay {
  left: -10px !important;
  right: auto !important;
  width: calc(100% + 25px) !important;
  max-width: none !important;
}

/* ============================================
   AYUDAS SECTION — RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 1023px) {
  /* Javier mobile: mask + overlay + text glow control the visible gradient (not global .blend-gradient-overlay alone) */
  .ayudas-content-right img.blend-masked-image {
    top: -38px !important;
    bottom: auto !important;
    height: calc(100% + 38px) !important;
    object-position: center 42% !important;
    mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 32%,
      rgba(0, 0, 0, 0.95) 48%,
      rgba(0, 0, 0, 0.7) 60%,
      rgba(0, 0, 0, 0.35) 72%,
      rgba(0, 0, 0, 0.08) 82%,
      transparent 90%
    ) !important;
    -webkit-mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 32%,
      rgba(0, 0, 0, 0.95) 48%,
      rgba(0, 0, 0, 0.7) 60%,
      rgba(0, 0, 0, 0.35) 72%,
      rgba(0, 0, 0, 0.08) 82%,
      transparent 90%
    ) !important;
  }

  .ayudas-content-right .blend-gradient-overlay {
    background: linear-gradient(
      to top,
      var(--brand-primary) 0%,
      var(--brand-primary) 10%,
      rgba(26, 60, 46, 0.62) 18%,
      rgba(26, 60, 46, 0.42) 28%,
      rgba(26, 60, 46, 0.24) 38%,
      rgba(26, 60, 46, 0.1) 48%,
      rgba(26, 60, 46, 0.03) 56%,
      transparent 62%
    ) !important;
  }

  /* Soft band: solid at bullets → fades out well above Cofundador */
  .ayudas-content-right .ayudas-javier-info::before {
    top: -9.5rem !important;
    right: -3rem !important;
    bottom: -0.35rem !important;
    left: -3rem !important;
    width: auto !important;
    height: auto !important;
    background: linear-gradient(
      to top,
      rgba(26, 60, 46, 0.88) 0%,
      rgba(26, 60, 46, 0.68) 18%,
      rgba(26, 60, 46, 0.48) 38%,
      rgba(26, 60, 46, 0.28) 58%,
      rgba(26, 60, 46, 0.12) 78%,
      rgba(26, 60, 46, 0.03) 92%,
      transparent 100%
    ) !important;
    filter: blur(14px) !important;
    border-radius: 0 !important;
  }
}

/* --- Small screens (< 640px) --- */
@media (max-width: 639px) {
  #ayudas {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .ayudas-container {
    border-radius: 0.5rem !important;
  }

  /* Image panel: taller, show Javier clearly and position text at the bottom */
  .ayudas-content-right {
    min-height: 450px !important;
    max-height: 500px !important;
    padding: 1rem 1.25rem 2rem !important;
  }

  .ayudas-content-right img.blend-masked-image {
    top: -88px !important;
    bottom: auto !important;
    height: calc(100% + 88px) !important;
    object-position: center 44% !important;
  }

  .ayudas-content-right .ayudas-javier-info::before {
    top: -11rem !important;
  }

  .ayudas-content-right .blend-gradient-overlay {
    background: linear-gradient(
      to top,
      var(--brand-primary) 0%,
      var(--brand-primary) 10%,
      rgba(26, 60, 46, 0.62) 18%,
      rgba(26, 60, 46, 0.4) 30%,
      rgba(26, 60, 46, 0.2) 42%,
      rgba(26, 60, 46, 0.06) 54%,
      transparent 64%
    ) !important;
  }

  /* Javier/Nuria info: small and discreet */
  .ayudas-javier-info,
  .nuria-info {
    margin-bottom: 0 !important;
    max-width: 190px !important;
  }

  .ayudas-javier-info {
    margin-left: 0 !important;
  }

  .ayudas-javier-info span,
  .nuria-info span {
    font-size: 0.55rem !important;
    letter-spacing: 0.15em !important;
    margin-bottom: 0.1rem !important;
  }

  .ayudas-javier-info h4,
  .nuria-info h4 {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
  }

  .ayudas-javier-text {
    font-size: 0.65rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0 !important;
  }

  /* Text panel: tight and clean */
  .ayudas-content-left {
    padding: 1.25rem 1.25rem 1.5rem !important;
  }

  .ayudas-content-left .inline-flex {
    margin-bottom: 0.35rem !important;
    gap: 0.35rem !important;
  }

  .ayudas-content-left .inline-flex svg {
    width: 12px !important;
    height: 12px !important;
  }

  .ayudas-content-left .inline-flex span {
    font-size: 0.55rem !important;
  }

  .ayudas-content-left h2 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.15 !important;
  }

  .ayudas-content-left h2 span.block:last-child {
    margin-top: 0.1rem !important;
    font-size: 1.35rem !important;
  }

  .ayudas-content-left .w-12.h-1 {
    width: 2rem !important;
    margin-bottom: 0.6rem !important;
  }

  .ayudas-content-left p {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    margin-bottom: 0.75rem !important;
  }

  .ayudas-content-left .relative.z-10 {
    margin-top: 0.25rem !important;
  }

  .ayudas-content-left .relative.z-10 a {
    padding: 0.65rem 1.1rem !important;
    font-size: 0.6rem !important;
    min-height: 38px !important;
  }
}

/* --- Tablets (640px – 1023px) --- */
@media (min-width: 640px) and (max-width: 1023px) {
  .ayudas-content-left {
    padding: 2rem 2rem 2.5rem !important;
  }

  .ayudas-content-right {
    min-height: 340px !important;
    padding: 1.5rem 2rem 2rem !important;
  }
}

/* --- Desktop (≥ 1024px) --- */
@media (min-width: 1024px) {
  .ayudas-container {
    min-height: 640px !important;
  }

  /* Narrower text panel — leave more room for Javier */
  .ayudas-content-left {
    width: 46% !important;
    padding: 4rem 3rem 4rem 4rem !important;
  }

  /* Vertical separator line between sections */
  .ayudas-content-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: -2.45rem; /* Centered exactly between left text and Javier's text, shifted slightly right */
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1); /* Uniform opacity, matches mobile */
    z-index: 50;
  }

  /* Wider photo panel */
  .ayudas-content-right {
    width: 54% !important;
    padding: 2.5rem !important;
  }

  /* Position Javier info naturally at the bottom of the photo */
  .ayudas-javier-info {
    margin-left: 5rem !important;
    max-width: 260px !important;
  }

  /* Nuria info width on desktop */
  .nuria-info {
    max-width: 260px !important;
  }
}

/* Custom styling for Nuria's profile image */
.nuria-img {
  filter: brightness(0.97) contrast(1.01) !important;
}

/* Custom gradient overlay for Nuria's profile image (keeps text readable) */
.nuria-gradient-overlay {
  background:
    linear-gradient(to top, rgba(17, 24, 39, 0.8) 0%, rgba(17, 24, 39, 0) 100%),
    rgba(0, 0, 0, 0.06) !important;
}

/* --- BLOG ARTICLE CUSTOM STYLES --- */
.blog-main {
  position: relative;
  padding-top: 0.75rem; /* Remove top margin on mobile */
  padding-bottom: 4rem;
  padding-left: 0.5rem; /* Add a tiny bit of margins to the sides on mobile */
  padding-right: 0.5rem;
}

.blog-main > header {
  padding-top: 2.25rem !important; /* Move header/title down a tiny bit on mobile */
}

@media (min-width: 768px) {
  .blog-main > header {
    padding-top: 3.25rem !important; /* Move header/title down a tiny bit on tablet/desktop */
  }
}

@media (min-width: 1024px) {
  .blog-main {
    padding-top: 4.85rem; /* Space for fixed capsule nav — slightly tighter on desktop */
    padding-bottom: 6rem;
    padding-left: 0;
    padding-right: 0;
  }

  .blog-main > header {
    padding-top: 2.65rem !important;
  }
}

.blog-breadcrumbs {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

@media (min-width: 1024px) {
  .blog-breadcrumbs {
    position: absolute;
    top: 1.65rem; /* Aligns vertically with the capsule menu */
    left: 2.5rem;
    width: auto;
    max-width: 22%;
    padding: 0 !important;
    z-index: 60;
  }
}

@media (min-width: 1280px) {
  .blog-breadcrumbs {
    left: 4rem;
    max-width: 35%;
  }
}

.blog-featured-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Landscape on mobile */
  overflow: hidden;
}

.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .blog-featured-image {
    aspect-ratio: 21 / 9; /* Wide landscape on desktop */
  }
}

.blog-content {
  font-family: 'Manrope', sans-serif;
  color: #374151; /* gray-700 */
}

.blog-content p {
  font-size: 1.05rem; /* ~16.8px on mobile for better readability */
  line-height: 1.9;
  margin-bottom: 1.75rem;
  color: #374151;
  font-weight: 300;
  text-align: justify;
}

@media (min-width: 768px) {
  .blog-content p {
    font-size: 1.125rem; /* 18px on tablet/desktop */
  }
}

.blog-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: #1a3c2e; /* brand-primary */
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.35;
}

.blog-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d6a4f; /* brand-secondary */
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.blog-content ul, .blog-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.blog-content li {
  font-size: 1.05rem; /* ~16.8px on mobile for better readability */
  line-height: 1.8;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

@media (min-width: 768px) {
  .blog-content li {
    font-size: 1.125rem; /* 18px on tablet/desktop */
  }
}

.blog-content blockquote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.25rem; /* ~20px on mobile */
  line-height: 1.6;
  border-left: 4px solid #b5924c; /* brand-accent */
  padding-left: 1.5rem;
  margin: 2.25rem 0;
  color: #1a3c2e;
}

@media (min-width: 768px) {
  .blog-content blockquote {
    font-size: 1.35rem; /* 21.6px on tablet/desktop */
  }
}

.blog-content strong {
  font-weight: 700;
  color: #111827;
}

.blog-hero-overlay {
  background: linear-gradient(to top, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.4) 50%, rgba(17, 24, 39, 0.15) 100%);
}

/* Custom Styles for "Mostrar más" Blog Button */
#blog-load-more-btn {
  padding: 0.875rem 2.5rem !important; /* Ensure perfect horizontal padding */
  border: 1.5px solid #b5924c !important; /* Brand accent gold */
  color: #b5924c !important;
  background-color: transparent !important;
  transition: all 0.3s ease-in-out !important;
}

#blog-load-more-btn:hover {
  background-color: #b5924c !important;
  color: #ffffff !important;
}

#blog-load-more-btn svg {
  transition: transform 0.3s ease-in-out !important;
}

/* Collapsed state (Mostrar más) */
#blog-load-more-btn:not(.expanded) svg {
  transform: none !important;
}

#blog-load-more-btn:not(.expanded):hover svg {
  transform: translateY(2px) !important;
}

/* Expanded state (Mostrar menos) */
#blog-load-more-btn.expanded svg {
  transform: rotate(180deg) !important;
}

#blog-load-more-btn.expanded:hover svg {
  transform: translateY(-2px) rotate(180deg) !important;
}

#blog-load-more-container {
  margin-top: 3.5rem !important; /* Extra margin on top for mobile */
}

@media (min-width: 640px) {
  #blog-load-more-container {
    margin-top: 4.5rem !important; /* Margin for tablet and desktop */
  }
}

/* ==========================================================================
   REFORMA DE VISIBILIDAD Y ACCESIBILIDAD MÓVIL (WCAG AA)
   ========================================================================== */

/* 1. Contraste del dorado en fondos claros (Oscurecido a #8b6c2c para cumplir contraste 4.85:1) */
#servicios .text-brand-accent,
#proyectos .text-brand-accent,
.blog-content .text-brand-accent,
.blog-main header .text-brand-accent {
  color: #8b6c2c !important;
}

/* 2. Rediseño de Chips de Proyectos para alto contraste y estética premium (Contraste 7.5:1) */
#proyectos .project-chip {
  background-color: rgba(26, 60, 46, 0.08) !important; /* Fondo verde corporativo traslúcido */
  color: var(--brand-primary) !important; /* Texto verde corporativo oscuro */
  border: 1px solid rgba(26, 60, 46, 0.15) !important;
}

/* 3. Corrección de textos secundarios en el grid de estadísticas de Perfil (Gris slate-400, contraste 6.0:1) */
#stats-grid p.text-gray-500 {
  color: #94a3b8 !important;
}

/* 4. Optimizaciones específicas para pantallas móviles (< 640px y < 768px) */
@media (max-width: 639px) {
  /* Ajustar textos sobre la imagen de Javier/Nuria */
  .ayudas-javier-info,
  .nuria-info {
    max-width: 240px !important; /* Dar más espacio horizontal al texto */
  }

  .ayudas-javier-info span,
  .nuria-info span {
    font-size: 0.75rem !important; /* De 8.8px a 12px */
    font-weight: 600 !important; /* De normal a semi-bold */
    letter-spacing: 0.12em !important;
  }

  .ayudas-javier-info h4,
  .nuria-info h4 {
    font-size: 1.1rem !important; /* De 15.2px a 17.6px */
    margin-bottom: 0.6rem !important;
  }

  .ayudas-javier-text {
    font-size: 0.8rem !important; /* De 10.4px a 12.8px */
    font-weight: 400 !important; /* De light (300) a normal (400) */
    color: #f3f4f6 !important; /* Blanco grisáceo más brillante */
  }

  .ayudas-checkmark {
    width: 13px !important; /* Ajuste proporcional del icono de check */
    height: 13px !important;
    min-width: 13px !important;
    margin-top: 4px !important;
  }
}

@media (max-width: 767px) {
  /* Incrementar legibilidad en descripciones de proyectos (carrusel móvil) */
  .projects-grid p.text-gray-600 {
    font-size: 0.875rem !important; /* De 12px a 14px */
    font-weight: 400 !important; /* De light (300) a normal (400) */
    color: var(--text-main) !important;
  }

  /* Aumentar contraste y sombra del subtítulo del Hero */
  #inicio p {
    font-weight: 400 !important; /* De light (300) a normal (400) */
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85), 0 0 15px rgba(0, 0, 0, 0.5) !important; /* Sombra reforzada */
  }
}

/* 5. Corrección de visibilidad del CTA Widget en el Blog (Estética Premium y WCAG AA) */
.bg-gradient-to-br.from-brand-primary.to-brand-dark {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%) !important;
}

/* Efecto de resplandor (glow) decorativo en el CTA */
.bg-gradient-to-br.from-brand-primary.to-brand-dark > div:first-child {
  background-color: rgba(255, 255, 255, 0.05) !important;
  filter: blur(24px) !important;
  -webkit-filter: blur(24px) !important;
}



/* --- CUSTOM DRAG AND DROP FILE UPLOADER AREA --- */
.file-upload-zone {
  position: relative;
  border: 2px dashed #e5e7eb;
  border-radius: 0.375rem;
  background-color: #f9fafb;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.file-upload-zone:hover {
  background-color: #ffffff;
  border-color: var(--brand-primary);
}

.file-upload-zone.dragover {
  background-color: #ffffff;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px rgba(181, 146, 76, 0.15);
}

.file-upload-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.file-list-preview {
  margin-top: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 1rem;
  transition: all 0.3s ease;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-dark);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-remove {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.file-item-remove:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* ==========================================================================
   UNIFICACIÓN DE TAMAÑOS DE TEXTOS Y BOTONES (MÓVIL Y ACCESIBILIDAD)
   ========================================================================== */

@media (max-width: 767px) {
  /* 1. Botones Principales (CTAs) - Altura consistente de 44px (WCAG), tipografía legible y uniforme */
  #inicio a.inline-flex,
  #servicios a.inline-flex,
  #ayudas a.inline-flex,
  #submit-form-button,
  #blog-load-more-btn,
  .nav-link-mobile.bg-brand-accent,
  main.blog-main header a.inline-flex,
  aside a.w-full {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    font-size: 0.75rem !important; /* 12px (WCAG mínimo recomendado para legibilidad de botones) */
    min-height: 44px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Excepción de ancho completo para formulario y menú móvil */
  #submit-form-button,
  .nav-link-mobile.bg-brand-accent {
    width: 100% !important;
  }

  /* Corrección específica del botón de Ayudas en móvil */
  .ayudas-content-left .relative.z-10 a {
    min-height: 44px !important;
    font-size: 0.75rem !important; /* Aumentado desde 0.6rem (9.6px) */
    padding: 0.75rem 1.5rem !important;
  }

  /* Corrección de tamaño y accesibilidad del Banner de Cookies en móvil */
  #cookie-banner p,
  #cookie-banner div {
    font-size: 0.75rem !important; /* Aumentado desde 11px para legibilidad */
  }

  #cookie-banner button {
    font-size: 0.75rem !important; /* Aumentado desde 10px */
    padding: 0.65rem 1.25rem !important;
    min-height: 40px !important;
  }

  /* 2. Jerarquía de Títulos - Corrección del H2 de Ayudas en móvil */
  .ayudas-content-left h2 {
    font-size: 1.875rem !important; /* Unificado con text-3xl (30px) del resto de H2s */
    line-height: 1.25 !important;
  }
  
  .ayudas-content-left h2 span.block:last-child {
    font-size: 1.875rem !important; /* Unificado con text-3xl */
    margin-top: 0.25rem !important;
  }
}

@media (min-width: 768px) {
  /* Unificar botones principales en escritorio */
  #inicio a.inline-flex,
  #servicios a.inline-flex,
  #ayudas a.inline-flex,
  #submit-form-button,
  #blog-load-more-btn,
  main.blog-main header a.inline-flex,
  aside a.w-full {
    font-size: 0.8125rem !important; /* Unificado a 13px */
    padding-top: 0.875rem !important;
    padding-bottom: 0.875rem !important;
    min-height: 48px !important;
  }
}
