/* =============================================================
   FIX 2026-05-27: Modo claro/oscuro + buscador IA PC legible
   - Aplica variables del tema en html para que afecte PC y móvil.
   - Corrige colores del buscador IA y resultados en modo claro/oscuro.
============================================================= */
html[data-theme="light"],
html.theme-light{
  --dark:#F7F3EA;
  --dark2:#FFFFFF;
  --dark3:#EFE7D8;
  --text:#1B2430;
  --text2:#4B5563;
  --text3:#6B7280;
  color-scheme:light;
  background:#F7F3EA!important;
}
html[data-theme="dark"],
html.theme-dark{
  --dark:#0A0E1A;
  --dark2:#111827;
  --dark3:#1E2A3B;
  --text:#F5F0E8;
  --text2:#BFB89E;
  --text3:#8A8070;
  color-scheme:dark;
  background:#0A0E1A!important;
}
html[data-theme="light"] body,
body[data-theme="light"],
body.theme-light{
  background:#F7F3EA!important;
  color:#1B2430!important;
}
html[data-theme="dark"] body,
body[data-theme="dark"],
body.theme-dark{
  background:#0A0E1A!important;
  color:#F5F0E8!important;
}

/* NAV y menú para que sí cambien de tema en PC y móvil */
html[data-theme="light"] #mainNav,
html.theme-light #mainNav,
body.theme-light #mainNav{
  background:rgba(255,255,255,.96)!important;
  border-bottom-color:rgba(154,122,46,.25)!important;
  box-shadow:0 8px 28px rgba(27,36,48,.08)!important;
}
html[data-theme="dark"] #mainNav,
html.theme-dark #mainNav,
body.theme-dark #mainNav{
  background:rgba(10,14,26,.96)!important;
  border-bottom-color:rgba(201,168,76,.18)!important;
  box-shadow:none!important;
}
html[data-theme="light"] .nav-logo span,
html.theme-light .nav-logo span,
body.theme-light .nav-logo span{color:#1B2430!important;}
html[data-theme="dark"] .nav-logo span,
html.theme-dark .nav-logo span,
body.theme-dark .nav-logo span{color:#F5F0E8!important;}
html[data-theme="light"] .hamburger span,
html.theme-light .hamburger span,
body.theme-light .hamburger span{background:#1B2430!important;}
html[data-theme="dark"] .hamburger span,
html.theme-dark .hamburger span,
body.theme-dark .hamburger span{background:#BFB89E!important;}

/* Secciones y tarjetas principales */
html[data-theme="light"] .section,
html.theme-light .section,
body.theme-light .section{background:#F7F3EA!important;}
html[data-theme="light"] .section[style],
html.theme-light .section[style],
body.theme-light .section[style]{background:#F1E7D7!important;}
html[data-theme="dark"] .section,
html.theme-dark .section,
body.theme-dark .section{background:#0A0E1A!important;}
html[data-theme="dark"] .section[style],
html.theme-dark .section[style],
body.theme-dark .section[style]{background:rgba(255,255,255,.015)!important;}

/* Buscador IA de PC: input, botón y resultados */
.desktop-ai-search{isolation:isolate;}
html[data-theme="light"] .desktop-ai-box,
html.theme-light .desktop-ai-box,
body.theme-light .desktop-ai-box{
  background:#FFFFFF!important;
  border-color:rgba(154,122,46,.38)!important;
  box-shadow:0 8px 24px rgba(27,36,48,.10)!important;
}
html[data-theme="dark"] .desktop-ai-box,
html.theme-dark .desktop-ai-box,
body.theme-dark .desktop-ai-box{
  background:rgba(255,255,255,.055)!important;
  border-color:rgba(201,168,76,.35)!important;
  box-shadow:0 6px 18px rgba(0,0,0,.12)!important;
}
html[data-theme="light"] #desktopAiInput,
html.theme-light #desktopAiInput,
body.theme-light #desktopAiInput{
  color:#1B2430!important;
  -webkit-text-fill-color:#1B2430!important;
  caret-color:#9A7A2E!important;
}
html[data-theme="light"] #desktopAiInput::placeholder,
html.theme-light #desktopAiInput::placeholder,
body.theme-light #desktopAiInput::placeholder{color:#6B7280!important;opacity:1!important;}
html[data-theme="dark"] #desktopAiInput,
html.theme-dark #desktopAiInput,
body.theme-dark #desktopAiInput{
  color:#F5F0E8!important;
  -webkit-text-fill-color:#F5F0E8!important;
  caret-color:#C9A84C!important;
}
html[data-theme="dark"] #desktopAiInput::placeholder,
html.theme-dark #desktopAiInput::placeholder,
body.theme-dark #desktopAiInput::placeholder{color:rgba(245,240,232,.62)!important;opacity:1!important;}

html[data-theme="light"] .desktop-ai-results,
html.theme-light .desktop-ai-results,
body.theme-light .desktop-ai-results{
  background:#FFFFFF!important;
  border-color:rgba(154,122,46,.32)!important;
  box-shadow:0 22px 60px rgba(27,36,48,.18)!important;
  color:#1B2430!important;
}
html[data-theme="dark"] .desktop-ai-results,
html.theme-dark .desktop-ai-results,
body.theme-dark .desktop-ai-results{
  background:rgba(10,14,26,.98)!important;
  border-color:rgba(201,168,76,.28)!important;
  box-shadow:0 22px 60px rgba(0,0,0,.38)!important;
  color:#F5F0E8!important;
}
html[data-theme="light"] .desktop-ai-result,
html.theme-light .desktop-ai-result,
body.theme-light .desktop-ai-result{background:transparent!important;border-color:transparent!important;}
html[data-theme="light"] .desktop-ai-result:hover,
html.theme-light .desktop-ai-result:hover,
body.theme-light .desktop-ai-result:hover{background:#F8F3E8!important;border-color:rgba(154,122,46,.28)!important;}
html[data-theme="dark"] .desktop-ai-result:hover,
html.theme-dark .desktop-ai-result:hover,
body.theme-dark .desktop-ai-result:hover{background:rgba(201,168,76,.10)!important;border-color:rgba(201,168,76,.22)!important;}
html[data-theme="light"] .desktop-ai-result b,
html.theme-light .desktop-ai-result b,
body.theme-light .desktop-ai-result b{color:#1B2430!important;}
html[data-theme="light"] .desktop-ai-result span,
html.theme-light .desktop-ai-result span,
body.theme-light .desktop-ai-result span{color:#4B5563!important;}
html[data-theme="light"] .desktop-ai-empty,
html.theme-light .desktop-ai-empty,
body.theme-light .desktop-ai-empty{color:#4B5563!important;}
html[data-theme="dark"] .desktop-ai-result b,
html.theme-dark .desktop-ai-result b,
body.theme-dark .desktop-ai-result b{color:#F5F0E8!important;}
html[data-theme="dark"] .desktop-ai-result span,
html.theme-dark .desktop-ai-result span,
body.theme-dark .desktop-ai-result span{color:#8A8070!important;}
html[data-theme="dark"] .desktop-ai-empty,
html.theme-dark .desktop-ai-empty,
body.theme-dark .desktop-ai-empty{color:#BFB89E!important;}

/* Buscador móvil por consistencia */
html[data-theme="light"] .mobile-tour-search-box,
html.theme-light .mobile-tour-search-box,
body.theme-light .mobile-tour-search-box,
html[data-theme="light"] .mobile-search-results,
html.theme-light .mobile-search-results,
body.theme-light .mobile-search-results{
  background:#FFFFFF!important;
  color:#1B2430!important;
  border-color:rgba(154,122,46,.28)!important;
}
html[data-theme="light"] #mobileSearchInput,
html.theme-light #mobileSearchInput,
body.theme-light #mobileSearchInput{
  color:#1B2430!important;
  -webkit-text-fill-color:#1B2430!important;
}
html[data-theme="dark"] #mobileSearchInput,
html.theme-dark #mobileSearchInput,
body.theme-dark #mobileSearchInput{
  color:#F5F0E8!important;
  -webkit-text-fill-color:#F5F0E8!important;
}

/* Botón claro/oscuro reconstruido por el menú */
#mobileThemeToggle,
[data-theme-toggle]{cursor:pointer!important;user-select:none!important;touch-action:manipulation!important;}
html[data-theme="light"] #mobileThemeToggle,
html.theme-light #mobileThemeToggle,
body.theme-light #mobileThemeToggle,
html[data-theme="light"] [data-theme-toggle],
html.theme-light [data-theme-toggle],
body.theme-light [data-theme-toggle]{background:#F2E8D3!important;color:#1B2430!important;border-color:rgba(154,122,46,.34)!important;}
html[data-theme="dark"] #mobileThemeToggle,
html.theme-dark #mobileThemeToggle,
body.theme-dark #mobileThemeToggle,
html[data-theme="dark"] [data-theme-toggle],
html.theme-dark [data-theme-toggle],
body.theme-dark [data-theme-toggle]{background:rgba(201,168,76,.12)!important;color:#C9A84C!important;border-color:rgba(201,168,76,.45)!important;}
