/* ============================================
 * Viajamundi – TOKENS + COMPAT ASTRA / WP
 * ============================================ */

:root {
  /* --- Paleta Viajamundi (canónica) --- */
  --vm-brand:      #1e293b;
  --vm-brand-700:  #16243a;
  --vm-brand-900:  #0b1220;

  --vm-border:     #e5e7eb;
  --vm-border-dark:#ccc;
  --vm-border-darker:#777777;
  --vm-muted:      #60656b;
  --vm-soft:       #f8fafc;
  --vm-soft-active:#f0f5fa;

  --vm-danger:     #b32d2e;
  --vm-warn-bg:    #fff3d6;
  --vm-warn-text:  #8a5b00;
  --vm-warn-border:#ffd86b;

  --vm-accent:     #2563eb; /* Azul principal */
  --vm-accent-2:   #22c55e; /* Verde ok / éxito */

  --vm-link:       #045cb4;
  --vm-link-hover: #034a91;

  --vm-track:      #e5e7eb;
  --vm-upload-bg:  #f8fafc;
  --vm-amber:      #f59e0b;

  --vm-white:      #fff;

  --vm-radius-lg:    18px;
  --vm-radius-md:    12px;
  --vm-radius-sm:    10px;

  --vm-shadow:       0 10px 30px rgba(2, 6, 23, .06);
  --vm-shadow-soft:  0 6px 18px rgba(2, 6, 23, .05);

  /* --------------------------------------------
   * Capa de compatibilidad Astra (mapeo de vars)
   * -------------------------------------------- */

  --ast-border-color: var(--vm-border);

  --ast-global-color-0: var(--vm-accent);      /* Primary */
  --ast-global-color-1: #1d4ed8;              /* Azul oscuro */
  --ast-global-color-2: var(--vm-brand);      /* Texto principal */
  --ast-global-color-3: #334155;              /* Texto secundario */
  --ast-global-color-4: var(--vm-soft);       /* Fondos suaves */
  --ast-global-color-5: #ffffff;              /* Blanco */
  --ast-global-color-6: var(--vm-border);     /* Bordes */
  --ast-global-color-7: var(--vm-brand-900);  /* Fondos oscuros */
  --ast-global-color-8: var(--vm-brand-900);

  --ast-comment-inputs-background: #f9fafb;
  --ast-code-block-background:     #eceff3;
  --ast-widget-bg-color:           var(--vm-soft);
  --ast-wc-container-head-bg-color:var(--vm-soft);
  --ast-title-layout-bg:           #eeeeee;
  --ast-search-border-color:       var(--vm-border);
  --ast-lifter-hover-bg:           #e6e6e6;
  --ast-gallery-block-color:       #000000;

  --ast-bg-style-guide:            #f8fafc;
  --ast-shadow-style-guide:        0 0 4px 0 #00000057;
  --ast-global-dark-bg-style:      #ffffff;
  --ast-global-dark-lfs:           #fbfbfb;

  --srfm-color-input-label:        var(--vm-brand);

  /* Gutenberg presets enganchados a nuestra paleta */
  --wp--preset--color--black: #000000;
  --wp--preset--color--white: #ffffff;

  --wp--preset--color--ast-global-color-0: var(--ast-global-color-0);
  --wp--preset--color--ast-global-color-1: var(--ast-global-color-1);
  --wp--preset--color--ast-global-color-2: var(--ast-global-color-2);
  --wp--preset--color--ast-global-color-3: var(--ast-global-color-3);
  --wp--preset--color--ast-global-color-4: var(--ast-global-color-4);
  --wp--preset--color--ast-global-color-5: var(--ast-global-color-5);
  --wp--preset--color--ast-global-color-6: var(--ast-global-color-6);
  --wp--preset--color--ast-global-color-7: var(--ast-global-color-7);
  --wp--preset--color--ast-global-color-8: var(--ast-global-color-8);

  /* Dimensiones / paddings Astra que quieres mantener */
  --wp--style--block-gap: 24px;

  --wp--custom--ast-default-block-top-padding:    3em;
  --wp--custom--ast-default-block-right-padding:  3em;
  --wp--custom--ast-default-block-bottom-padding: 3em;
  --wp--custom--ast-default-block-left-padding:   3em;

  --wp--custom--ast-container-width:       1200px;
  --wp--custom--ast-content-width-size:    1200px;
  --wp--custom--ast-wide-width-size:       calc(
      1200px +
      var(--wp--custom--ast-default-block-left-padding) +
      var(--wp--custom--ast-default-block-right-padding)
  );

  --ast-normal-container-width: 1200px;
  --ast-narrow-container-width: 1000px;

  --ast-blog-title-font-weight: 600;
  --ast-blog-meta-weight:  600;
}

/* ============================================
 * 1) RESET SUAVE + BOX MODEL
 * ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Que el body sea siempre el lienzo base */
html, body {
  margin: 0;
  padding: 0;
}

/* ============================================
 * 2) TIPOGRAFÍA / TEXTO GENERAL
 * ============================================ */

body {
  color: var(--ast-global-color-3);
  background-color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Parrafos / bloques de texto */
p {
  margin: 0 0 1.75em;
}

b, strong {
  font-weight: 700;
}

em, i, dfn, cite {
  font-style: italic;
}

/* Listas */
ul, ol {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}

ul {
  list-style: disc;
}

ol {
  list-style: decimal;
}

li > ul,
li > ol {
  margin-top: 0.5em;
  margin-bottom: 0;
}

dt {
  font-weight: 600;
}

dd {
  margin: 0 0 1em 1.5em;
}

/* --- Labels --- */
label {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--vm-brand-700);
    cursor: pointer;
}

/* Input asociado recibe foco */
input:focus + label,
textarea:focus + label,
select:focus + label {
    color: var(--vm-brand);
}

/* Titulares */

header.entry-header .entry-title,
.entry-content :where(h1),
h1 {
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
}

h2,
.entry-content :where(h2) {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
}

h3,
.entry-content :where(h3) {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

h4,
.entry-content :where(h4) {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

h5,
.entry-content :where(h5) {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

h6,
.entry-content :where(h6) {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.entry-content :where(h1), h1,
.entry-content :where(h2), h2,
.entry-content :where(h3), h3,
.entry-content :where(h4), h4,
.entry-content :where(h5), h5,
.entry-content :where(h6), h6 {
  color: var(--vm-brand);
  margin: 0 0 0.7em;
}

/* Bloques preformateados / código */

pre {
  background: var(--ast-code-block-background);
  font-family: "Courier 10 Pitch", Courier, monospace;
  margin: 0 0 1.6em;
  padding: 1.6em;
  overflow: auto;
  max-width: 100%;
  font-size: 0.95em;
}

code, kbd, samp {
  font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
  font-size: 0.95em;
}

/* Citas */

blockquote {
  border-left: 4px solid var(--ast-border-color);
  padding: 16px 20px;
  margin: 1.5em 0 1.5em 0;
  font-style: italic;
  color: var(--vm-muted);
  background-color: #f9fafb;
}

/* HR */

hr {
  border: 0;
  height: 1px;
  background-color: var(--vm-border);
  margin: 2em 0;
}

/* Selección de texto */

::selection {
  color: #ffffff;
  background: var(--vm-accent);
}

/* ============================================
 * 3) ENLACES
 * ============================================ */

a {
  color: var(--vm-link);
  text-decoration: none;
  background-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--vm-link-hover);
  text-decoration: none;
}

a:focus {
  outline: 2px solid var(--vm-accent);
  outline-offset: 2px;
}

*:focus {
    outline: none !important;
    border-style: none !important;
}

/* ============================================
 * 4) LAYOUT / CONTENEDOR / UTILIDADES
 * ============================================ */

#content {
    min-height: calc(100vh - 227px);
}

.ast-container,
.ast-container-fluid {
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Ancho máximo “content width” */
.ast-container {
  max-width: 1240px;
}

/* Margen inferior en single y archive */
.ast-page-builder-template .site-content>.ast-container {
    max-width: 100%;
    padding: 0;
    margin: 0 0 56px 0;
}

.ast-row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -20px;
  margin-right: -20px;
}

/* Columnas básicas compat Astra */
.ast-grid-common-col {
  position: relative;
  min-height: 1px;
  padding-left: 20px;
  padding-right: 20px;
}

.ast-float {
  float: left;
}

.ast-full-width { width: 100%; }
.ast-width-50   { width: 50%; }

/* Breakpoints heredados de Astra (por compat) */
@media (min-width: 768px) {
  .ast-width-md-4  { width: 33.3333%; }
  .ast-width-md-6  { width: 50%; }
  .ast-width-md-3  { width: 25%; }
  .ast-width-md-66 { width: 66.6667%; }
}

@media (min-width: 992px) {
  .ast-width-lg-33 { width: 33.3333%; }
  .ast-width-lg-16 { width: 16.6667%; }
  .ast-width-lg-50 { width: 50%; }
  .ast-width-lg-66 { width: 66.6667%; }
}

/* Flex helpers básicos (compat Astra, pero genéricos) */

.ast-flex {
  display: flex;
  flex-wrap: wrap;
}

.ast-inline-flex {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.ast-flex-1 {
  flex: 1 1 auto;
}

.ast-justify-content-flex-start { justify-content: flex-start; }
.ast-justify-content-flex-end   { justify-content: flex-end; }
.ast-justify-content-center     { justify-content: center; }
.ast-justify-content-space-between { justify-content: space-between; }
.ast-justify-content-space-around  { justify-content: space-around; }

/* Clearfix genérico */

.clear::before,
.clear::after,
.ast-container::before,
.ast-container::after,
.ast-row::before,
.ast-row::after,
.site-content::before,
.site-content::after,
.site-header::before,
.site-header::after,
.site-footer::before,
.site-footer::after {
  content: "";
  display: table;
}

.clear::after,
.ast-container::after,
.ast-row::after,
.site-content::after,
.site-header::after,
.site-footer::after {
  clear: both;
}

/* ----- Single Posts ----- */
.single .entry-header {
    margin-bottom: 2em;
}
.ast-page-builder-template .entry-header {
    margin-top: 2em;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ============================================
 * 5) MEDIA / IMÁGENES / EMBEDS
 * ============================================ */

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

embed,
iframe,
object,
.entry-content[data-ast-blocks-layout] > embed,
.entry-content[data-ast-blocks-layout] > iframe,
.entry-content[data-ast-blocks-layout] > object {
  max-width: 100%;
}

/* ============================================
 * 6) TABLAS
 * ============================================ */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-width: 1px 0 0 1px;
  border-style: solid;
  border-color: var(--ast-border-color);
  margin: 0 0 1.5em;
}

td, th {
  border-width: 0 1px 1px 0;
  border-style: solid;
  border-color: var(--ast-border-color);
  padding: 0.7em 1em;
}

th {
  font-weight: 600;
}

/* ============================================
 * 7) FORMULARIOS / BOTONES
 * ============================================ */

/* Tipografía base en campos */
.ast-button,
.button,
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.6;
  color: var(--vm-brand);
}

/* Inputs / textareas */

input[type="email"],
input[type="number"],
input[type="password"],
input[type="reset"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
select,
textarea {
  background-color: var(--vm-white);
  border: 1px solid var(--ast-border-color);
  border-radius: 4px;
  padding: 0.75em;
  color: var(--vm-brand);
  box-shadow: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  font-size: 15px;
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="reset"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--vm-accent);
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Botones (HTML + compat Astra) */

.ast-button,
.button,
button,
input[type="button"],
input[type="submit"] {
  display: inline-block;
  background-color: var(--vm-accent);
  border: none;
  color: #ffffff;
  padding: 15px 30px;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
  transition: background-color 0.15s ease, transform 0.08s ease;
}

.ast-button:hover,
.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.ast-button:focus,
.button:focus,
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus {
  background-color: var(--vm-brand-700);
  color: #ffffff;
}

.ast-button:active,
.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active {
}

/* Rangos (range input) – un estilo neutro */

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  border: none;
  padding: 0;
  margin: 6px 0;
  background: transparent;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: var(--vm-track);
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  background: var(--vm-accent);
  margin-top: -5px;
}

input[type="range"]::-moz-range-track {
  height: 8px;
  background: var(--vm-track);
  border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 999px;
  background: var(--vm-accent);
}

/* Elimina la 'X' nativa en navegadores WebKit (Chrome, Safari, etc.) */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/*  Elimina la 'X' en algunos navegadores (ej. IE/Edge antiguo) */
input[type="text"]::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

fieldset {
    border: 1px solid var(--vm-border);
    margin: 0 0;
    padding: .35em .625em .75em;
}

/* ============================================
 * 8) HELPERS WORDPRESS (alineaciones, caption)
 * ============================================ */

.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1.5em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Captions */

.wp-caption {
  margin-bottom: 1.5em;
  max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption .wp-caption-text {
  font-size: 0.9em;
  color: var(--vm-muted);
  margin: 0.8em 0 0;
  text-align: center;
}

/* Screen reader only */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 2px;
  box-shadow: 0 0 2px 2px rgba(0,0,0,0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ============================================
 * 9) PEQUEÑOS AJUSTES DE ENTRADA / CONTENIDO
 * ============================================ */

/* Últimos elementos dentro de contenido sin margen extra */
.entry-content > :last-child,
.entry-summary > :last-child,
.page-content > :last-child {
  margin-bottom: 0;
}


/* Menu toggle */
.ast-no-menu-items .main-navigation {
    display: none
}

.ast-menu-toggle {
    display: none;
    background: 0 0;
    color: inherit;
    border-style: dotted;
    border-color: transparent
}

.ast-menu-toggle:focus,.ast-menu-toggle:hover {
    background: 0 0;
    border-color: inherit;
    color: inherit
}

.ast-menu-toggle:focus {
    outline: thin dotted
}

.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children>.ast-menu-toggle {
    display: inline-block;
    position: absolute;
    font-size: inherit;
    top: -1px;
    right: 20px;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0 .907em;
    font-weight: 400;
    line-height: inherit;
    transition: all .2s
}

.ast-header-break-point .main-header-bar .main-header-bar-navigation .ast-submenu-expanded>.ast-menu-toggle .icon-arrow svg,.ast-header-break-point .main-header-bar .main-header-bar-navigation .ast-submenu-expanded>.ast-menu-toggle::before {
    transform: rotateX(180deg)
}

.ast-icon svg:not([fill]) {
    fill: currentColor;
}

.ast-icon.icon-arrow svg {
    height: .6em;
    width: .6em;
    position: relative;
    margin-left: 10px;
}

/* -------------------------------
   10) Mini-modal de CONFIRMACIÓN
   Confirm dialog reutilizable
   ------------------------------- */
.vm-modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 10070;
}
.vm-confirm {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 10080;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    width: min(480px, 92vw);
    border: 1px solid var(--vm-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.vm-confirm h3{ margin:0 0 6px; color:var(--vm-brand); font-size: 22.5px; }
.vm-confirm p{ margin:0 0 14px; color:#374151; font-size: 16.3px; }
.vm-confirm-actions{ display:flex; justify-content:flex-end; gap:8px; }
.vm-confirm .button {
    --btn-pad-y: 8px;
    --btn-pad-x: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--vm-border-dark) !important;
    background: #fff;
    color: var(--vm-brand);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color .12s 
ease, background-color .12s 
ease, transform .04s 
ease;
}
.vm-confirm .vm-confirm-cancel {
    border: 1px solid var(--vm-border) !important;
}
.vm-confirm .vm-confirm-cancel:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}
.vm-confirm-ok {
    background: var(--vm-brand) !important;
    border-color: var(--vm-brand) !important;
    color: #fff !important;
}
.vm-confirm-ok:hover {
    opacity: .92;
}