.appearance-control { order: 2; margin-left: auto; margin-right: 14px; }
.appearance-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #d9dfdc; border-radius: 50%; background: #fff; color: #263238; font-size: 17px; }
.appearance-toggle:focus-visible { outline: 3px solid #ff8000; outline-offset: 3px; }
.appearance-menu { min-width: 175px; padding: 6px; border-radius: 12px; }
.appearance-menu .dropdown-item { display: flex; align-items: center; gap: 12px; min-height: 44px; border-radius: 7px; }
.appearance-menu .dropdown-item i { width: 18px; text-align: center; }
.appearance-menu [aria-checked="true"] { background: #fff1df; color: #8e4300; font-weight: 700; }
#navbarContent { order: 1; }
#navbar .menu-toggle { order: 3; }
#navbar .container > .position-relative { order: 4; }
@media (max-width: 991.98px) { .appearance-control { margin-right: 10px; } }
html[data-theme="dark"] {
    --dq-orange: #ff8000;
    --dq-ink: #d8ded9;
    --dq-border: #3b4541;
    --bs-body-bg: #141819;
    --bs-body-color: #c4cdc7;
    --bs-secondary-color: #a2ada6;
    --bs-tertiary-bg: #262e2a;
    --bs-border-color: #3b4541;
    --bs-link-color: #ffac59;
    --bs-link-hover-color: #ffc98f;
    background: #141819 !important;
}
html[data-theme="dark"] body { background: #141819 !important; color: #c4cdc7 !important; }
html[data-theme="dark"] :is(.card, .modal-content, .dropdown-menu, .list-group-item, .offcanvas, .swal2-popup) { background-color: #202724; color: #d2d8d4; border-color: #3b4541; }
html[data-theme="dark"] :is(.bg-white, .bg-light) { background-color: #202724 !important; }
html[data-theme="dark"] :is(.text-dark, .text-black) { color: #d2d8d4 !important; }
html[data-theme="dark"] :is(.text-muted, .text-secondary, .service-category, .service-address, .map-place-copy > span, .map-popup p) { color: #a2ada6 !important; }
html[data-theme="dark"] :is(.form-control, .form-select, input:not([type="checkbox"]):not([type="radio"]), textarea, select) { background-color: #202724; color: #d2d8d4; border-color: #536059; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #aeb9b2 !important; }
html[data-theme="dark"] #navbar.light-bg, html[data-theme="dark"] #navbar, html[data-theme="dark"] .mobile-footer { background: #141819 !important; color: #d2d8d4; border-color: #3b4541; }
html[data-theme="dark"] .mobile-footer :is(a, button), html[data-theme="dark"] .search-icon { color: #d2d8d4; }
html[data-theme="dark"] :is(.floating-results, .search-results, .search-bar .form-control, .search-bar-menu .form-control) { background: #202724 !important; color: #d2d8d4; border-color: #536059; }
html[data-theme="dark"] :is(.floating-results a, .dropdown-item, .breadcrumb-item.active) { color: #d2d8d4; }
html[data-theme="dark"] :is(.floating-results a:hover, .dropdown-item:hover, .dropdown-item:focus) { background: #323e36; color: #fff; }
html[data-theme="dark"] .card.card-popular { background: transparent; }
html[data-theme="dark"] .card.card-popular .card-body > p { color: #a2ada6 !important; }
html[data-theme="dark"] .card.card-popular .card-title a { color: #d2d8d4; }
html[data-theme="dark"] :is(.like-btn, .map-place, .map-place:hover) { color: #d2d8d4; }
html[data-theme="dark"] .catalog-view-controls { background: #262e2a; }
html[data-theme="dark"] .catalog-view-controls .btn { color: #d2d8d4; }
html[data-theme="dark"] .catalog-view-controls [aria-pressed="true"] { color: #202724; }
html[data-theme="dark"] .catalog-view-controls .btn:not([aria-pressed="true"]):hover { background: #3b4541; color: #fff; }
html[data-theme="dark"] form[aria-label="Filtrar servicios de la categoría"] { border-color: #3b4541; }
html[data-theme="dark"] form[aria-label="Filtrar servicios de la categoría"] :is(.form-control, .form-select) { background-color: #202724; color: #d2d8d4; border-color: #536059; }
html[data-theme="dark"] form[aria-label="Filtrar servicios de la categoría"] .btn-outline-secondary { background: #202724; color: #d2d8d4; border-color: #536059; }
html[data-theme="dark"] .service-actions { border-color: #3b4541; }
html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .btn.btn-service { background: #202724 !important; color: #d2d8d4; border-color: #536059; }
html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .service-actions .btn.service-action-primary { background: #ff8000 !important; color: #202724; border-color: #ff8000; }
html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .btn.btn-service i, html[data-theme="dark"] .service-address i { color: #ffac59; }
html[data-theme="dark"] .map-place-copy .map-place-action { color: #ffac59; }
html[data-theme="dark"] .event-description-content a:not(.wp-block-button__link) { color: #ffac59; }
html[data-theme="dark"] .event-description-content a:not(.wp-block-button__link):hover { color: #ffc98f; }
html[data-theme="dark"] .event-card { background: #202724; color: #d2d8d4; border-color: #3b4541; }
html[data-theme="dark"] .event-card:hover { color: #d2d8d4; border-color: #93663d; }
html[data-theme="dark"] .event-card-date { color: #a2ada6; }
html[data-theme="dark"] .event-card-date i { color: #ffac59; }
html[data-theme="dark"] :is(.gm-style-iw-c, .gm-style-iw-d) { background: #202724 !important; color: #d2d8d4; }
html[data-theme="dark"] .gm-style .gm-style-iw-tc::after { background: #202724; }
html[data-theme="dark"] .gm-style-iw-c button > span { filter: none; background-color: #d2d8d4 !important; }
html[data-theme="dark"] .map-popup { color: #d2d8d4; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }
html[data-theme="dark"] .dq-auth h1 { color: #d2d8d4; }
html[data-theme="dark"] .dq-auth :is(label, p) { color: #c4cdc7; }
html[data-theme="dark"] .dq-auth .dq-note { background: #263c39; color: #d0e9e1; }
html[data-theme="dark"] .dq-auth a { color: #ffac59; }
html[data-theme="dark"] .dq-auth input[type="email"] { background: #202724; color: #d2d8d4; border-color: #536059; }

html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .service-actions .service-action-primary i { color: #263238; }
html[data-theme="dark"] .gm-style-iw-d { scrollbar-color: #64736a #202724; }
html[data-theme="dark"] .gm-style-iw-d::-webkit-scrollbar,
html[data-theme="dark"] .gm-style-iw-d::-webkit-scrollbar-track,
html[data-theme="dark"] .gm-style-iw-d::-webkit-scrollbar-track-piece,
html[data-theme="dark"] .gm-style-iw-d::-webkit-scrollbar-corner { background: #202724 !important; }
html[data-theme="dark"] .gm-style-iw-d::-webkit-scrollbar-thumb { background: #64736a !important; border-radius: 8px; }

html[data-theme="dark"] .service-heading-copy a.btn-back-menu { color: #a2ada6 !important; }

/* La cabecera conserva la transparencia sobre el video de portada. */
html[data-theme="dark"] #navbar.navbar-home:not(.light-bg) { background: transparent !important; border-color: transparent; }
#navbar.navbar-home:not(.light-bg) .appearance-toggle { background: rgb(20 24 25 / 45%); border-color: rgb(255 255 255 / 35%); color: #fff; backdrop-filter: blur(8px); }
html[data-theme="dark"] #navbar.navbar-home:not(.light-bg) .search-bar .form-control { background: #ffffffe0 !important; color: #263238; }
html[data-theme="dark"] #navbar.navbar-home:not(.light-bg) .search-bar .form-control::placeholder { color: #62696c !important; }
html[data-theme="dark"] #navbar.navbar-home:not(.light-bg) .search-icon { color: #263238; }
html[data-theme="dark"] .appearance-toggle { background: #202724; color: #d2d8d4; border-color: #536059; }
html[data-theme="dark"] .appearance-menu [aria-checked="true"] { background: #47321e; color: #ffc98f; }
html[data-theme="dark"] .card-slider { background: #141819 !important; }
/* Luz de acento contenida, sin aplicar filtros a fotografías. */
html[data-theme="dark"] :is(.btn-signin, .hero-explore-button, .catalog-view-controls [aria-pressed="true"], .map-popup-link) { box-shadow: 0 0 18px rgb(255 128 0 / 16%), 0 3px 10px rgb(0 0 0 / 18%); }
html[data-theme="dark"] :is(.btn-signin, .hero-explore-button, .map-popup-link):hover { box-shadow: 0 0 24px rgb(255 128 0 / 25%); }
html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .service-actions .btn.btn-service { box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%), 0 0 12px rgb(255 128 0 / 5%); }
html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .service-actions .btn.service-action-primary { box-shadow: 0 0 20px rgb(255 128 0 / 18%); }
html[data-theme="dark"] #content:is([data-page="servicioTuristico"], [data-page="evento"]) .service-actions .btn.btn-service:hover { box-shadow: 0 0 18px rgb(255 128 0 / 15%); }
html[data-theme="dark"] .service-actions .btn-service i { filter: drop-shadow(0 0 5px rgb(255 128 0 / 22%)); }
html[data-theme="dark"] .card.card-popular:hover .popular-slider { box-shadow: 0 0 20px rgb(255 128 0 / 10%); }

/* Portada móvil: medios detrás de la cabecera y búsqueda sin espacio de flujo. */
.home-content { position: relative; }
@media (max-width: 991.98px) {
    #navbar.navbar-home { min-height: 64px; }
    #navbar.navbar-home:not(.light-bg) { background: transparent !important; }
    .home-mobile-search { position: absolute; top: 76px; left: 0; right: 0; z-index: 300; }
    .home-mobile-search .search-bar-menu { top: 0; height: 44px; margin: 0; }
    html[data-theme] .home-mobile-search .form-control { background: rgb(255 255 255 / 94%) !important; color: #263238; }
    html[data-theme] .home-mobile-search .form-control::placeholder { color: #62696c !important; }
    html[data-theme] .home-mobile-search .search-icon { color: #62696c; z-index: 2; }
    #navbar #installPWA { width: 36px; height: 36px; padding: 0 !important; margin: 0 0 0 8px !important; flex: 0 0 36px; }
    #installPWA .install-label { display: none; }
    .appearance-control { margin-right: 8px; }
}
@media (max-width: 767.98px) {
    .home-content .hero-motion-toggle { bottom: 42px; padding: 5px 9px; font-size: .8rem; }
    .home-content .main-swiper > .swiper-pagination { bottom: 12px; }
}

/* Texto oscuro más suave: títulos, lectura y metadatos con intensidades distintas. */
html[data-theme="dark"] #content :is(h1, h2, h3, h4, h5) { color: #d8ded9; }
html[data-theme="dark"] .card.card-popular .card-title a { color: #ced6d0; }
html[data-theme="dark"] .card.card-popular :is(.like-count, .avg-score) { color: #b7c2ba; }
html[data-theme="dark"] .mobile-footer :is(a, button), html[data-theme="dark"] #mobileMenu .nav-link { color: #c4cdc7; }

/* Textos sobre fotografías: conservar blanco y pesos tipográficos del diseño base. */
html[data-theme="dark"] #content .main-swiper :is(.gradient-title, .text-category h1, .overlay p),
html[data-theme="dark"] :is(.experience-copy, .experience-category, .route-banner, .route-banner:hover, .route-banner-copy > span, .card-overlay, .zone-title) { color: #fff; }
html[data-theme="dark"] #content .main-swiper .gradient-title { -webkit-text-fill-color: #fff; }
html[data-theme="dark"] #content .zone-title { color: #fff; }

/* Buscador sobre cabecera oscura: relieve suave y foco cálido. */
html[data-theme="dark"] #navbar:is(.light-bg, :not(.navbar-home)) .search-bar {
    height: 44px;
    border-color: #66513d;
    background: linear-gradient(135deg, #252d29, #1d2421);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%), 0 0 16px rgb(255 128 0 / 7%);
    transition: border-color .2s ease, box-shadow .2s ease;
}
html[data-theme="dark"] #navbar:is(.light-bg, :not(.navbar-home)) .search-bar:hover {
    border-color: #93663d;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%), 0 0 20px rgb(255 128 0 / 12%);
}
html[data-theme="dark"] #navbar:is(.light-bg, :not(.navbar-home)) .search-bar:focus-within {
    border-color: #ff9a38;
    box-shadow: 0 0 0 3px rgb(255 128 0 / 12%), 0 0 24px rgb(255 128 0 / 18%);
}
html[data-theme="dark"] #navbar:is(.light-bg, :not(.navbar-home)) .search-bar .form-control {
    height: 100%;
    background: transparent !important;
    color: #d2d8d4;
    border: 0;
    outline: none;
    box-shadow: none;
}
html[data-theme="dark"] #navbar:is(.light-bg, :not(.navbar-home)) .search-bar .search-icon { color: #ffb36b; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
    html[data-theme="dark"] #navbar .search-bar { transition: none; }
}

html[data-theme="dark"] :is(.route-intro, #infoRuta) { color: #a2ada6; }
html[data-theme="dark"] .route-actions .btn { background: #202724; border-color: #536059; color: #c4cdc7; box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%), 0 0 12px rgb(255 128 0 / 5%); }
html[data-theme="dark"] .route-actions .btn i { color: #ffac59; }
html[data-theme="dark"] .route-actions .btn:hover { background: #2d3730; border-color: #a67242; color: #d8ded9; }
html[data-theme="dark"] .route-actions .route-primary, html[data-theme="dark"] .route-export, html[data-theme="dark"] .route-add-destination { background: #ff8000; color: #263238; border-color: #ff8000; box-shadow: 0 0 20px rgb(255 128 0 / 18%); }
html[data-theme="dark"] .route-actions .route-primary i { color: inherit; }
html[data-theme="dark"] :is(.route-map, .route-stops .list-group-item, #listaModalDestinos .list-group-item) { border-color: #3b4541; }

html[data-theme="dark"] #modalDestinos .modal-header { background: #202724; border-color: #3b4541; }

html[data-theme="dark"] .route-actions .route-primary:hover, html[data-theme="dark"] .route-export:hover, html[data-theme="dark"] .route-add-destination:hover { background: #f5932f; border-color: #f5932f; color: #263238; }
#modalDestinos :is(button, input):focus-visible { outline: 3px solid #b45600; outline-offset: 3px; }

html[data-theme="dark"] :is(.profile-intro, .profile-email, .profile-note, .profile-empty) { color: #a2ada6; }
html[data-theme="dark"] :is(.profile-panel, .profile-place, .profile-actions .btn, .profile-secondary) { background: #202724; border-color: #3b4541; color: #c4cdc7; }
html[data-theme="dark"] .profile-place:hover { border-color: #93663d; }
html[data-theme="dark"] .profile-empty { border-color: #46544b; }
html[data-theme="dark"] .profile-avatar { background: #3a2e20; color: #ffac59; }
html[data-theme="dark"] .profile-status { background: #233c2e; color: #9cc8ac; }
html[data-theme="dark"] :is(.profile-actions .btn i, .profile-panel h2 i, .profile-section-title i) { color: #ffac59; }
html[data-theme="dark"] .profile-actions .profile-primary { background: #ff8000; color: #263238; border-color: #ff8000; box-shadow: 0 0 18px rgb(255 128 0 / 14%); }
html[data-theme="dark"] .profile-actions .profile-primary i { color: inherit; }
html[data-theme="dark"] :is(.profile-actions .btn, .profile-secondary):hover { background: #2d3730; border-color: #a67242; color: #d8ded9; }
html[data-theme="dark"] .profile-actions .profile-primary:hover { background: #f5932f; color: #263238; }
html[data-theme="dark"] .profile-photo-empty { background: #2c3530; color: #a2ada6; }

html[data-theme="dark"] .section-heading p { color: #a2ada6; }
html[data-theme="dark"] .section-heading::before { box-shadow: 0 0 10px rgb(255 128 0 / 18%); }
