/*
 Theme Name:   Twenty Twenty-Five Child Aliving
 Description:  Tema hijo de Twenty Twenty-Five para Aliving
 Author:       Javier Mondéjar
 Template:     twentytwentyfive
 Version:      1.0.0
 Text Domain:  twentytwentyfive-child
*/


:root {
    --primary-color: #B3892D;   
    --secondary-color: #0D1B2A;  
    --primary-500: #D4AF37;
    --primary-300: #E6C98B;
    --secondary-300: #193C5E;
    --text-color: #333333;       /* Charcoal */
    --bg-color: #F8F6F2;         /* Off-White */
    --light-sand: #E8E2D5;       /* Light Sand */
    --white: #FFFFFF;            /* Pure White */
    --text-light: #8A8A8A;       /* Light Gray para texto secundario */
    /* Accesibilidad */
    --color-focus: #000000;   
    /* Escala de grises cálida */
  --neutral-900: #222222;
  --neutral-700: #444444;
  --neutral-500: #666666;
  --neutral-50:  #F7F5F1;
  --neutral-100: #ECE9E4;  
    /* Estados */
    --success-500: #3B8C6E;
    --warning-500: #B56127;   /* Color de contorno de foco de alto contraste */
    
    /* Variables para sticky optimizado */
    --alv-sticky-top: 20px;
    
    /* Tipografía fluida */
    --font-size-base: clamp(0.9375rem, 2.5vw, 1rem); /* 15px-16px */
    --font-size-h1: clamp(2.5rem, 6vw, 3rem);        /* 40px-48px */
    --font-size-h2: clamp(2rem, 4.8vw, 2.5rem);      /* 32px-40px */
    --font-size-h3: clamp(1.5rem, 3.8vw, 2rem);      /* 24px-32px */
    --font-size-h4: clamp(1.25rem, 3vw, 1.5rem);     /* 20px-24px */
    --font-size-h5: clamp(1.125rem, 2.5vw, 1.25rem); /* 18px-20px */
    --font-size-h6: clamp(1rem, 2vw, 1.125rem);      /* 16px-18px */
    
    /* Espaciado */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 0.75rem;   /* 12px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-xxl: 3rem;     /* 48px */

    /* Radio de bordes */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
  }
  
  /* ==========================================================================
     TIPOGRAFÍA
     ========================================================================== */
  
  /* Configuración base de tipografía */
  body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.625;
    color: var(--text-color);
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Jerarquía de encabezados */
  h1, .h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
  }
  
  h2, .h2 {
    font-size: var(--font-size-h2);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
  }
  
  h3, .h3 {
    font-size: var(--font-size-h3);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
  }
  
  h4, .h4 {
    font-size: var(--font-size-h4);
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
  }
  
  h5, .h5 {
    font-size: var(--font-size-h5);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
  }
  
  h6, .h6 {
    font-size: var(--font-size-h6);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
  }
  
  /* Párrafos y texto */
  p {
    margin-bottom: var(--spacing-md);
  }
  
  /* Clases utilitarias de texto */
  .text-small {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .text-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 400;
  }
  
  .text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .text-light {
    color: var(--text-light);
  }
  
  /* ==========================================================================
     BOTONES
     ========================================================================== */
  
  /* Estilos base para botones */
  .ast-button,
  .button,
  .wp-block-button__link,
  .btn,
  button[type="submit"],
  input[type="submit"],
  input[type="button"] {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    cursor: pointer;
    min-height: 44px; /* Accesibilidad táctil */
    min-width: 44px;
    text-align: center;
    line-height: 1.4;
  }
  
  /* Estados de botones */
  .ast-button:hover,
  .button:hover,
  .wp-block-button__link:hover,
  .btn:hover,
  button[type="submit"]:hover,
  input[type="submit"]:hover,
  input[type="button"]:hover {
    background-color: var(--primary-color);
    color: var(--white);
  }
  
  .ast-button:focus,
  .button:focus,
  .wp-block-button__link:focus,
  .btn:focus,
  button[type="submit"]:focus,
  input[type="submit"]:focus,
  input[type="button"]:focus {
    outline: 3px solid currentColor;
    outline-offset: 2px;
  }
  
  /* Botón secundario */
  .btn-secondary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
  }
  
  .btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
  }
  
  /* Botón deshabilitado */
  .ast-button:disabled,
  .button:disabled,
  .btn:disabled,
  button[type="submit"]:disabled,
  input[type="submit"]:disabled,
  input[type="button"]:disabled {
    background-color: var(--text-light);
    border-color: var(--text-light);
    color: var(--white);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
  }
  
  /* Botón secundario genérico (p.ej. «Atrás» en formularios multistep) */
  button.secondary,
  .button.secondary,
  .btn-secondary,
  input[type="button"].secondary,
  input[type="submit"].secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    text-align: center;
    line-height: 1.4;
  }

  button.secondary:hover:not(:disabled),
  .button.secondary:hover:not(:disabled),
  .btn-secondary:hover:not(:disabled),
  input[type="button"].secondary:hover:not(:disabled),
  input[type="submit"].secondary:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--white);
  }
  
  /* ==========================================================================
     FORMULARIOS
     ========================================================================== */
  
  /* Campos de formulario */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  textarea,
  select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--light-sand);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    /* Evitar que el padding y el borde sumen al 100% y provoquen desbordes */
    box-sizing: border-box;
  }
  
  input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="password"]:focus,
  input[type="tel"]:focus,
  input[type="url"]:focus,
  input[type="search"]:focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
  }
  
  /* Labels */
  label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-color);
  }
  
  /* ==========================================================================
     ELEMENTOS DE CONTENIDO
     ========================================================================== */
  
  /* Citas */
  blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg); /* añadido para equilibrar la sangría */
    margin: var(--spacing-xl) 0;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-color);
  }
  
  blockquote p:last-child {
    margin-bottom: 0;
  }
  
  /* Código */
  code {
    background-color: var(--light-sand);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text-color);
  }
  
  pre {
    background-color: var(--light-sand);
    padding: var(--spacing-md);
    border-radius: 6px;
    overflow-x: auto;
    margin: var(--spacing-md) 0;
  }
  
  pre code {
    background-color: transparent;
    padding: 0;
  }
  
  /* Tablas */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
  }
  
  th,
  td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--light-sand);
    text-align: left;
  }
  
  th {
    background-color: var(--light-sand);
    font-weight: 600;
    color: var(--text-color);
  }
  
  /* Listas */
  ul,
  ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
  }
  
  li {
    margin-bottom: var(--spacing-xs);
  }
  
  /* ==========================================================================
     UTILIDADES RESPONSIVE
     ========================================================================== */
  
  /* Breakpoints intermedios para móviles */
  @media (max-width: 480px) {
    .container {
      padding: 0 1rem;
    }
    
    .ast-button,
    .button,
    .wp-block-button__link,
    .btn {
      min-height: 44px;
      min-width: 44px;
      padding: var(--spacing-sm) var(--spacing-md);
    }
    
    h1, .h1 {
      margin-bottom: var(--spacing-md);
    }
  }
  
  @media (max-width: 360px) {
    .container {
      padding: 0 0.75rem;
    }
    
    :root {
      --font-size-h1: 2rem;
      --font-size-h2: 1.75rem;
    }
  }
  
  /* Tablets - Optimizar columnas de texto */
  @media (min-width: 768px) and (max-width: 991px) {
    .ast-container {
      max-width: 90%;
    }
    
    .entry-content {
      padding: 0 1rem;
    }
    
    .entry-content p,
    .entry-content li {
      max-width: none; /* Allow full width */
    }
    
    /* Reducir espaciado vertical excesivo */
    .ast-separate-container .ast-article-post {
      margin-bottom: 2rem;
    }
    
    .wp-block-group {
      margin-bottom: 2rem;
    }
  }
  
  /* Formularios responsive */
  @media (min-width: 481px) and (max-width: 767px) {
    .wp-block-group.contact-form {
      max-width: 90%;
      margin: 0 auto;
    }
    
    .wp-block-group.contact-form .wp-block-columns {
      flex-direction: column;
    }
    
    .wp-block-group.contact-form input,
    .wp-block-group.contact-form textarea {
      width: 100%;
      margin-bottom: 1rem;
    }
  }

  @media (max-width: 480px) {
    .contact-form {
      max-width: 100%;
      padding-inline: var(--spacing-md);
    }
    .contact-form .actions {
      flex-direction: column;
      gap: var(--spacing-sm);
    }
    .contact-form .actions button {
      width: 100%;
    }
  }
  
  /* -------------------------------------------------------------------------
   FORM FIELDSETS COMO “CAJAS”
   ------------------------------------------------------------------------- */

fieldset {
  border: 0; /* quitamos borde HTML por defecto */
  background-color: var(--neutral-50); /* color claro definido en :root */
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

legend {
  font-weight: 600;
  color: var(--text-color);
  display: inline-block; /* evita que el fondo se expanda toda la línea */
  padding: var(--spacing-xs); 
  text-align: left;
  margin-bottom: 1em;
  background-color: var(--neutral-50);
  border-radius: var(--radius-md);
  
  
}

/* Espaciado interno label+input para separar correctamente */
fieldset > label {
  margin-top: var(--spacing-md);
}
fieldset > label:first-of-type {
  margin-top: 0;
}
  
  /* ==========================================================================
     MEJORAS DE ACCESIBILIDAD
     ========================================================================== */
  
  /* Focus visible mejorado */
  *:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
  }
  
  /* Mejorar contraste para enlaces */
  a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
  }
  
  a:hover {
    color: var(--primary-color);
  }
  
  /* Skip link para navegación con teclado */
  .skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 999999;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 3px;
  }
  
  .skip-link:focus {
    top: 6px;
  }
  
  /* ==========================================================================
     PERSONALIZACIONES ESPECÍFICAS DE twentytwentyfive
     ========================================================================== */
  
  /* Identificador del tema hijo */
  .twenty-child-theme {
    font-family: inherit; /* Clase añadida por functions.php para identificar el tema hijo */
  }
  
  /* Personalización del header */
  .site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--light-sand);
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Personalización del footer */
  .site-footer {
    background-color: var(--light-sand);
    color: var(--text-color);
  }
  
  /* Personalización de la navegación */
  .main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
  }
  
  .main-navigation a:hover {
    color: var(--primary-color);
  }
  
  /* Personalización de widgets */
  .widget-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
  }
  
  /* ==========================================================================
     HYPHENATION Y OPTIMIZACIONES TIPOGRÁFICAS
     ========================================================================== */
  
  /* Mejorar la lectura en párrafos largos */
  p,
  li,
  blockquote {
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Optimizar kerning y renderizado */
  h1, h2, h3, h4, h5, h6 {
    font-kerning: normal;
    text-rendering: optimizeLegibility;
  }
  
  /* ==========================================================================
     ANIMACIONES SUAVES
     ========================================================================== */
  
  /* Reducir animaciones para usuarios que prefieren menos movimiento */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* ==========================================================================
     PRINT STYLES
     ========================================================================== */
  
  @media print {
    * {
      background: transparent !important;
      color: black !important;
      box-shadow: none !important;
      text-shadow: none !important;
    }
    
    a,
    a:visited {
      text-decoration: underline;
    }
    
    .site-header,
    .site-footer,
    .sidebar {
      display: none;
    }
  }
  
  /* ==========================================================================
     TARJETAS
     ========================================================================== */
  
  .card {
    background-color: var(--white);
    border: 1px solid var(--light-sand);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    transition: all 0.3s ease;
  }
  
  /* ==========================================================================
      SECTION SPACING
      ========================================================================== */
  
  .section {
    margin-bottom: var(--spacing-xxl);
  }
  
  /* ==========================================================================
      SWATCHES
      ========================================================================== */
  
  .swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }
  
  .swatch {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding-bottom: var(--spacing-xs);
    text-align: center;
  }
  
  .swatch.gold {
    background-color: var(--primary-color);
  }
  .swatch.blue {
    background-color: var(--secondary-color);
  }
  .swatch.charcoal {
    background-color: var(--text-color);
  }
  .swatch.offwhite {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--light-sand);
  }
  .swatch.lightsand {
    background-color: var(--light-sand);
    color: var(--text-color);
    border: 1px solid var(--text-color);
  }
  .swatch.success {
    background-color: #4CAF50;
  }
  .swatch.alert {
    background-color: #D32F2F;
  }
  
  /* ==========================================================================
      BUTTON ALIASES
      ========================================================================== */
  
  .btn-primary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
  }

  .btn-primary:hover {
    background-color: color-mix(in srgb, var(--primary-color) 15%, transparent); /* sutil velo primario */
    color: var(--primary-color);
  }
  
  /* ==========================================================================
      BLOQUES – ANCHO GLOBAL (Twenty Twenty-Five)
      ========================================================================== */

   /* Contenido de entradas/páginas */
   .entry-content,
   .wp-block-post-content {
     width: min(var(--wp--style--global--content-size, 100%), 100%);
     margin-inline: auto; /* centra a izquierda y derecha */
   }

   /* Asegura que los bloques alineados wide o full sigan sobresaliendo correctamente */
   .wp-block-post-content > .alignwide {
     width: min(var(--wp--style--global--wide-size, 1200px), 100%);
     margin-inline: auto;
   }

   .wp-block-post-content > .alignfull {
     width: 100%;
     margin-left: calc(-1 * var(--wp--style--root--padding-left));
     margin-right: calc(-1 * var(--wp--style--root--padding-right));
   }

   /* ==========================================================================
      OCULTAR TÍTULO EN PÁGINAS
      ========================================================================== */

   body.page .wp-block-post-title,
   body.page h1.entry-title {
     display: none;
   }
  
  /* ==========================================================================
     SKIP LINK TARGET (ACCESIBILIDAD)
     ========================================================================== */

     .wp--skip-link--target {
      position: static;
      width: 0;
      height: 0;
      overflow: hidden;
    }
  
  /* ==========================================================================
     AJUSTE FINAL DEL CONTENEDOR PRINCIPAL / SKIP LINK TARGET
     ========================================================================== */

   
  
  html, body {
    overflow-x: hidden;
  }
  
  /* ==========================================================================
     CORRECCIÓN ALIGNFULL DESPLAZADO POR SCROLLBAR
     ========================================================================== */

  .wp-site-blocks > .alignfull {
    width: 100%;
    margin-left: calc(-1 * var(--wp--style--root--padding-left));
    margin-right: calc(-1 * var(--wp--style--root--padding-right));
  }
  
  /* ==========================================================================
     ELIMINAR ESPACIO DEL CONTENEDOR DEL TÍTULO
     ========================================================================== */

    body.page .entry-header,
    body.page .entry-header * {
      display: none !important;
      margin: 0 !important;
      padding: 0 !important;
      height: 0 !important;
    }
  
  
  
  /* ==========================================================================
     CORRECCIÓN CUANDO WP AGREGA .alignfull AL CONTENIDO
     ========================================================================== */

    /* Si el bloque de contenido tiene alignfull, anulamos su ancho y márgenes */
    /*
    .wp-block-post-content.alignfull,
    .entry-content.alignfull {
      width: min(var(--wp--style--global--content-size, 100%), 100%) !important;
      margin-left: auto !important;
      margin-right: auto !important;
      padding-left: var(--wp--style--root--padding-left, 0) !important;
      padding-right: var(--wp--style--root--padding-right, 0) !important;
    }

    /* Evitar que los wide y full internos rompan el centrado */
    /*
    .wp-block-post-content.alignfull > .alignfull:not(.hero) {
      width: 100% !important;
      margin-left: 0;
      margin-right: 0;
    }
    */
  
  /* Eliminar el padding superior automático que WordPress
     mete en el primer contenedor de la página */
  .wp-block-group.has-global-padding:first-child {
    padding-top: 0 !important;
  }
  
  /* Quitar padding superior al primer Group con global-padding dentro de la estructura de bloques */
  .wp-site-blocks > .wp-block-group.has-global-padding:first-of-type {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  
  /* ==========================================================================
     ELIMINAR MARGIN-TOP DEL PRIMER BLOQUE DE CONTENIDO
     ========================================================================== */

  .entry-content > *:first-child,
  .wp-block-post-content > *:first-child {
    margin-block-start: 0 !important; /* para navegadores lógicos */
    margin-top: 0 !important;         /* fallback */
  }
  
  /* ==========================================================================
     ELIMINAR MARGIN-TOP Y PADDING-TOP DEL TEMA PADRE (SOLO PRIMERA SECCIÓN)
     ========================================================================== */
  
  /* Eliminar el margin-top que aplica el tema padre Twenty Twenty Five
     SOLO en el elemento main (primera sección de la página)
     style="margin-top:var(--wp--preset--spacing--60)" 
     Requiere !important para anular estilos inline */
  body main.wp-block-group[style*="margin-top"] {
    margin-top: 0 !important;
  }
  
  /* Eliminar el padding-top que aplica el tema padre Twenty Twenty Five
     SOLO en el primer grupo dentro del main (primera sección)
     style="padding-top:var(--wp--preset--spacing--60)"
     Requiere !important para anular estilos inline */
  body main.wp-block-group > .wp-block-group:first-child[style*="padding-top"] {
    padding-top: 0 !important;
  }
  
  /* FAQ component -----------------------------------------------------------*/
  .faqs details {
    border: 1px solid var(--light-sand);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--bg-color);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }

  .faqs details:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .faqs details[open] {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .faqs details summary {
    cursor: pointer;
    font-weight: 600;
    position: relative;
    padding-right: 2rem;
    list-style: none;
  }

  .faqs details summary::-webkit-details-marker { display: none; }

  .faqs details summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-weight: 700;
  }

  .faqs details[open] summary::after {
    content: '–';
  }
  
  /* ==========================================================================
     HERO – CENTRAR CONTENIDO
     ========================================================================== */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center; /* centra verticalmente */
    align-items: center;     /* centra horizontalmente */
    text-align: center;
    width: 100%;
  }

  /* Asegura que un wrapper interno no limite el ancho */
  .hero > .wp-block-group,
  .hero > div {
    width: min(var(--wp--style--global--wide-size, 1200px), 100%);
    margin-inline: auto; /* centra con respecto al viewport */
  }
  
  /* ==========================================================================
   ALIVING – FORMULARIO MULTISTEP
   Estilos básicos para controlar visibilidad de pasos y barra de progreso.
   ========================================================================== */
.step:not(.active) {
  display: none;
}
.step.active {
  display: block;
  animation: fade 0.25s ease-in;
}
@keyframes fade {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}
#progress {
  width: 100%;
  height: 6px;
  background: var(--light-sand);
  border-radius: 3px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
#progressBar {
  height: 100%;
  width: 0%;
  background: var(--secondary-300);
  transition: width 0.3s ease;
}
#progressStatus {
  font-size: 0.8rem;
  color: var(--text-light);
}
.actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

/* Botones dentro de contenedores .actions → base compartida */
.actions button {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* tamaño táctil */
  min-width: 44px;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  background-color: transparent; /* sobrescrito por variantes */
  color: var(--primary-color);
}
  
  /* Botón “primario” dentro de contenedores .actions */
  .actions button:not(.secondary) {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
    transition: background-color 0.25s ease;
  }

  .actions button:not(.secondary):hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--primary-color) 85%, #000 15%);
  }
  
  /* Unificación de estilo para TODOS los campos de texto (excluye checkbox/radio/range/file) */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
  textarea,
  select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--light-sand);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }

  /* Estado :focus coherente */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
  }
  
  select {
     /* Custom dropdown arrow */
     -webkit-appearance: none;
     -moz-appearance: none;
     appearance: none;
     color: inherit;
     background-color: var(--white);
     background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'><polyline points='1 1 6 6 11 1' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
     background-repeat: no-repeat;
     background-position: right var(--spacing-md) center;
     background-size: 12px 7px;
     padding-right: calc(var(--spacing-md) * 2 + 14px); /* espacio para la flecha */
   }
   /* Ocultar flecha por defecto en IE */
   select::-ms-expand { display: none; }

/* -------------------------------------------------------------------------
   ESTILOS PARA LAS OPCIONES DE LOS SELECT (desplegables)
   ------------------------------------------------------------------------- */

select option {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--white);
  color: var(--text-color);
}

/* Estado al pasar ratón o enfocar (no soportado en todos los navegadores) */
select option:hover,
select option:focus {
  background-color: var(--primary-300);
  color: var(--secondary-color);
}

/* Opción seleccionada */
select option:checked {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Asegura que los inputs numéricos mantengan el ancho del contenedor y no sobresalgan */
input[type="number"] {
  width: 100%;
  box-sizing: border-box; /* igual que otros campos */
  -moz-appearance: textfield; /* quita flechas en Firefox */
  appearance: textfield; /* estándar */
}

/* Oculta flechas en Chrome / Safari */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* ==========================================================================
   CALCULADORA DE RENTABILIDAD
   ========================================================================== */

/* Contenedor de la calculadora */
.rent-calculator {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

/* Resultados completos del cálculo */
.calculation-results {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: var(--spacing-xl);
    border: 1px solid var(--light-sand);
}

.calculation-results h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.calculation-results h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-lg);
    border-bottom: 2px solid var(--light-sand);
    padding-bottom: var(--spacing-xs);
}

.calculation-results h5 {
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
    font-size: var(--font-size-base);
}

.result-summary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-500));
    color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.main-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.annual-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-base);
    opacity: 0.9;
}

.location-info {
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.location-info p {
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.location-info p:last-child {
    margin-bottom: 0;
}

.multipliers-breakdown {
    margin-bottom: var(--spacing-md);
}

.multiplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.multiplier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-color);
    border-radius: var(--radius-sm);
    border: 1px solid var(--light-sand);
}

.multiplier-item.total {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.multiplier-label {
    font-size: var(--font-size-sm);
    color: inherit;
}

.multiplier-value {
    font-weight: 600;
    color: inherit;
}

.income-breakdown {
    margin-bottom: var(--spacing-md);
}

.income-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background-color: var(--bg-color);
    border-radius: var(--radius-sm);
    border: 1px solid var(--light-sand);
}

.income-item.final {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.costs-breakdown {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-md);
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    background-color: #fff5f5;
    border-radius: var(--radius-sm);
    border: 1px solid #fed7d7;
}

.cost-item.total {
    background-color: #e53e3e;
    color: var(--white);
    font-weight: 600;
}

.cost-item .label {
    font-size: var(--font-size-sm);
    color: inherit;
}

.cost-item .value {
    font-weight: 600;
    color: inherit;
}

.disclaimer {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.disclaimer p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    font-weight: 600;
}

.disclaimer ul {
    margin: 0;
    padding-left: var(--spacing-lg);
}

.disclaimer li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.disclaimer li:last-child {
    margin-bottom: 0;
}

/* Responsividad para resultados */
@media (max-width: 768px) {
    .calculation-results {
        padding: var(--spacing-md);
    }
    
    .main-result,
    .annual-result {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }
    
    .multiplier-grid {
        grid-template-columns: 1fr;
    }
    
    .income-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }
    
    .cost-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }
}

/* ==========================================================================
   OVERRIDE GLOBAL WIDTH & PADDING (child theme)
   ========================================================================== */

.wp-site-blocks {
  --wp--style--global--content-size: 100%;  /* ocupa todo el viewport */
  --wp--style--global--wide-size: 120ch;    /* ancho para alignwide */
}

/* ==========================================================================
   MICRO-INTERACCIONES SUTILES (Regla 4)
   ========================================================================== */

/* Transiciones sutiles para botones */
.wp-block-button__link,
.wp-element-button {
  transition: all 200ms ease-out;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Transiciones para grupos e imágenes */
.wp-block-group {
  transition: transform 180ms ease-out;
}

.wp-block-image img {
  transition: transform 200ms ease-out, opacity 150ms ease-out;
}

.wp-block-image:hover img {
  transform: scale(1.02);
}

/* Transiciones para elementos con fondo */
.has-background {
  transition: box-shadow 200ms ease-out;
}

/* Focus states mejorados para accesibilidad */
.wp-block-button__link:focus,
.wp-element-button:focus {
  outline: 2px solid var(--wp--preset--color--focus);
  outline-offset: 2px;
  transition: outline 150ms ease-out;
}

/* ==========================================================================
   SISTEMA DE ESTRELLAS PROFESIONAL
   ========================================================================== */

:root {
  /* Variables específicas para el sistema de estrellas */
  --star-size: 1.25rem;
  --star-size-small: 1rem;
  --star-size-large: 1.5rem;
  --star-spacing: 0.125rem;
  --star-color-filled: #FFD700;  /* Amarillo dorado típico de reviews */
  --star-color-empty: var(--light-sand);
  --star-color-half: #FFA000;    /* Amarillo más oscuro para medias estrellas */
  --star-border-width: 1px;
  --star-transition: all 0.2s ease;
}

/* Contenedor base de estrellas */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--star-spacing);
  font-size: 0; /* Elimina espacios entre elementos inline */
  line-height: 1;
}

/* Estrella individual */
.star-rating .star {
  position: relative;
  display: inline-block;
  width: var(--star-size);
  height: var(--star-size);
  transition: var(--star-transition);
}

/* SVG de la estrella usando CSS */
.star-rating .star::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8E2D5' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Estrella llena */
.star-rating .star.filled::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700' stroke='%23FFD700' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26'/%3E%3C/svg%3E");
}

/* Estrella media */
.star-rating .star.half::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cdefs%3E%3ClinearGradient id='half' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='50%25' style='stop-color:%23FFD700;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%23E8E2D5;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26' fill='url(%23half)'/%3E%3C/svg%3E");
}

/* Variantes de tamaño */
.star-rating.small {
  --star-size: var(--star-size-small);
}

.star-rating.large {
  --star-size: var(--star-size-large);
}

/* Contenedor de rating con texto */
.rating-display {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-base);
  line-height: 1;
}

.rating-display .rating-text {
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.rating-display .rating-source {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 400;
  margin: 0;
}

/* Componente de rating compacto para badges */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--light-sand);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  transition: var(--star-transition);
}

.rating-badge:hover {
  background-color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.rating-badge .star-rating {
  --star-size: 0.875rem;
}

/* Contenedor para múltiples ratings (Google + Airbnb) */
.ratings-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: center;
}

/* Rating específico para mostrar fuente y valor */
.source-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-sand);
  min-width: 120px;
  transition: var(--star-transition);
}

.source-rating:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.source-rating .source-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.source-rating .rating-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.source-rating .star-rating {
  --star-size: 1rem;
}

/* Clase utilitaria para reemplazar emojis existentes */
.replace-emoji-stars {
  position: relative;
}

.replace-emoji-stars::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--white);
  z-index: 1;
}

/* Estados de accesibilidad */
.star-rating:focus-within {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Soporte para screen readers */
.star-rating[aria-label] {
  position: relative;
}

.star-rating .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .ratings-container {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .source-rating {
    min-width: 100px;
    padding: var(--spacing-sm);
  }
  
  .rating-display {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-xs);
  }
}

@media (max-width: 480px) {
  .star-rating {
    --star-size: 1rem;
  }
  
  .star-rating.large {
    --star-size: 1.25rem;
  }
  
  .source-rating .rating-value {
    font-size: 1.125rem;
  }
}

/* Integración con bloques de WordPress existentes */
.wp-block-paragraph .star-rating {
  vertical-align: middle;
}

/* Para mantener compatibilidad con bloques UAGB existentes */
.uag-star-rating .star-rating {
  display: inline-flex;
}

/* ==========================================================================
   REGLAS DE DISEÑO PREMIUM APLICADAS
   ========================================================================== */

/* ==========================================================================
   PLATAFORMAS LOGOS - CARRUSEL UNIVERSAL
   ========================================================================== */

/* Carrusel para todos los tamaños */
.platforms-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  gap: 2rem;
  margin: 0 auto;
  max-width: 1000px;
  padding: 1rem 0;
  
  /* Ocultar scrollbar en todos los navegadores */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE y Edge */
  
  /* Indicador sutil de scroll en desktop */
  position: relative;
}

.platforms-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari y Opera */
}

/* Contenedor con botones de navegación */
.platforms-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* Botones de navegación del carrusel (solo PC y tablet) */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 16px rgba(179, 137, 45, 0.3);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
  left: -60px;
}

.carousel-nav.next {
  right: -60px;
}

/* En tablets, mostrar botones dentro del contenedor */
@media (max-width: 991px) and (min-width: 769px) {
  .carousel-nav.prev {
    left: 10px;
  }
  
  .carousel-nav.next {
    right: 10px;
  }
}

/* Ocultar botones en móviles (el scroll táctil es más intuitivo) */
@media (max-width: 768px) {
  .carousel-nav {
    display: none !important;
  }
}

/* 
JavaScript necesario para los botones (agregar al final del HTML):
<script>
document.addEventListener('DOMContentLoaded', function() {
  const prevBtn = document.querySelector('.carousel-nav.prev');
  const nextBtn = document.querySelector('.carousel-nav.next');
  const platformsGrid = document.querySelector('.platforms-grid');
  
  if (prevBtn && nextBtn && platformsGrid) {
    const scrollAmount = 280; // Ajusta según el ancho de tus elementos
    
    prevBtn.addEventListener('click', function() {
      platformsGrid.scrollBy({
        left: -scrollAmount,
        behavior: 'smooth'
      });
    });
    
    nextBtn.addEventListener('click', function() {
      platformsGrid.scrollBy({
        left: scrollAmount,
        behavior: 'smooth'
      });
    });
  }
});
</script>
*/

/* Override WordPress Gutenberg flex styles */
.wp-block-group.platforms-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}

.platform-logo {
  flex: 0 0 140px !important; /* Flex basis específico para evitar diferencias */
  min-width: 140px; /* Ancho mínimo para desktop */
  max-width: 140px; /* Evitar que el primer elemento sea más grande */
  width: 140px; /* Ancho fijo para todos los elementos */
  padding: 1rem 1.5rem !important;
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--light-sand);
  transition: var(--star-transition);
  opacity: 0.8;
  filter: grayscale(50%);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box; /* Asegurar que padding no afecte el ancho total */
}

.platform-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.platform-logo p {
  margin: 0;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  color: var(--neutral-700);
}

/* Tablet: Reduce gaps */
@media (max-width: 991px) {
  .platforms-grid {
    gap: 1.5rem;
  }
  
  .platform-logo {
    flex: 0 0 120px !important; /* Flex basis específico para tablet */
    min-width: 120px;
    max-width: 120px;
    width: 120px; /* Ancho fijo para tablet */
    padding: 0.75rem 1.25rem !important;
  }
  
  .platform-logo p {
    font-size: 1.1rem !important;
  }
}

/* Mobile: Ajustes específicos */
@media (max-width: 768px) {
  .platforms-grid {
    gap: 1rem;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .platform-logo {
    flex: 0 0 120px !important; /* Flex basis específico para móvil */
    min-width: 120px;
    max-width: 120px;
    width: 120px; /* Ancho fijo para móvil */
    padding: 0.75rem 1rem !important;
  }
  
  .platform-logo:hover {
    transform: none; /* Deshabilitar hover en móvil */
    box-shadow: none;
  }
  
  .platform-logo p {
    font-size: 1rem !important;
    font-weight: 600 !important;
  }
  
  /* Gradiente al final para indicar más contenido */
  .platforms-grid::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to left, var(--white) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
  }
  
  /* Wrapper para el gradiente */
  .platforms-grid {
    position: relative;
  }
}

/* Extra small mobile */
@media (max-width: 480px) {
  .platform-logo {
    flex: 0 0 100px !important; /* Flex basis específico para móvil pequeño */
    min-width: 100px;
    max-width: 100px;
    width: 100px; /* Ancho fijo para móvil pequeño */
    padding: 0.5rem 0.75rem !important;
  }
  
  .platform-logo p {
    font-size: 0.9rem !important;
  }
  
  .platforms-grid {
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Animación de entrada para todos los platform-logo */
.platform-logo {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.platform-logo:nth-child(1) { animation-delay: 0.1s; }
.platform-logo:nth-child(2) { animation-delay: 0.2s; }
.platform-logo:nth-child(3) { animation-delay: 0.3s; }
.platform-logo:nth-child(4) { animation-delay: 0.4s; }
.platform-logo:nth-child(5) { animation-delay: 0.5s; }
.platform-logo:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 0.7;
    transform: translateY(0);
  }
}

/* Indicadores de scroll en móvil (opcional) */
@media (max-width: 768px) {
  .platforms-grid {
    /* Sombra izquierda para indicar scroll */
    background: 
      radial-gradient(ellipse at left, rgba(0,0,0,0.1) 0%, transparent 70%) 0 center,
      radial-gradient(ellipse at right, rgba(0,0,0,0.1) 0%, transparent 70%) 100% center;
    background-size: 20px 100%, 20px 100%;
    background-attachment: scroll, scroll;
    background-repeat: no-repeat;
  }
}

/* Mejor accesibilidad en móvil */
@media (max-width: 768px) {
  .platform-logo:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-md);
  }
  
  /* Mejorar el área táctil */
  .platform-logo {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

body{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Make editor canvas widths match front-end overrides */
.editor-styles-wrapper {
  --wp--style--global--content-size: 100%;
  --wp--style--global--wide-size: 120ch;
}

/* ==========================================================================
   STICKY CALCULADORA - OPTIMIZADO PARA ELIMINAR PARPADEO
   ========================================================================== */

#calculadora {
  position: relative; /* Necesario para que position: absolute del sticky funcione */
}

.calculadora-sticky-info {
  /* Transiciones suaves solo en propiedades que no afecten el layout */
  transition: opacity 0.2s ease, transform 0.2s ease;
  /* Evitar cambios de ancho/altura inesperados */
  box-sizing: border-box;
  /* Asegurar que mantenga su espacio sin placeholder */
  contain: layout style;
}

/* =================================
   SHORTCODE: Formulario Aliving
   ================================= */

.aliving-contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.aliving-contact-form h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-h2);
}

/* Barra de progreso */
.aliving-progress {
  width: 100%;
  height: 8px;
  background-color: var(--neutral-100);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.aliving-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-500));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-status {
  display: block;
  color: var(--neutral-500);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

/* Formulario */
.aliving-form .step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.aliving-form .step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.aliving-form label {
  display: block;
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
  font-weight: 500;
}

.aliving-form input,
.aliving-form select,
.aliving-form textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--neutral-100);
  border-radius: 8px;
  font-size: var(--font-size-base);
  margin-top: var(--spacing-xs);
  transition: border-color 0.2s ease;
  background: var(--white);
}

.aliving-form input:focus,
.aliving-form select:focus,
.aliving-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(179, 137, 45, 0.1);
}

.aliving-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Botones */
.aliving-form .actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  justify-content: flex-end;
}

.aliving-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: 8px;
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--primary-color);
  color: var(--white);
  min-width: 120px;
}

.aliving-btn:hover {
  background: var(--primary-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(179, 137, 45, 0.2);
}

.aliving-btn:active {
  transform: translateY(0);
}

.aliving-btn.secondary {
  background: transparent;
  color: var(--neutral-500);
  border: 2px solid var(--neutral-100);
}

.aliving-btn.secondary:hover {
  background: var(--neutral-50);
  color: var(--text-color);
  border-color: var(--neutral-500);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aliving-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Pantalla de éxito */
.success-message {
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.success-message h3 {
  color: var(--success-500);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-h3);
}

.success-message p {
  color: var(--neutral-500);
  font-size: var(--font-size-base);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .aliving-contact-form {
    margin: 0 var(--spacing-md);
    padding: var(--spacing-md);
  }
  
  .aliving-form .actions {
    flex-direction: column-reverse;
  }
  
  .aliving-btn {
    width: 100%;
  }
}

/* Estados de validación */
.aliving-form input:invalid,
.aliving-form select:invalid,
.aliving-form textarea:invalid {
  border-color: var(--warning-500);
}

.aliving-form input:valid,
.aliving-form select:valid,
.aliving-form textarea:valid {
  border-color: var(--success-500);
}
