/* Shared responsive hero simulations and polished discovery filters. */
.local-page,
.local-page *,
.local-page *::before,
.local-page *::after,
.tour-page,
.tour-page *,
.tour-page *::before,
.tour-page *::after {
    box-sizing: border-box;
}

.portal-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.local-hero,
.tour-hero {
    isolation: isolate;
    background-image: none !important;
}

.local-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(52px, 5vw, 72px) 0;
    background:
        radial-gradient(circle at 88% 18%, #fed7aa24 0 2px, transparent 3px) 0 0 / 23px 23px,
        linear-gradient(125deg, #7c2d12 0%, #c2410c 58%, #ea580c 100%) !important;
}

.tour-hero {
    padding: clamp(48px, 5vw, 68px) 0 !important;
    background:
        radial-gradient(circle at 88% 18%, #fde68a22 0 2px, transparent 3px) 0 0 / 24px 24px,
        linear-gradient(125deg, #3f1d0b 0%, #7c2d12 55%, #b45309 100%) !important;
}

.tour-hero::before,
.tour-hero::after,
.tour-hero .tour-shell::before,
.tour-hero .tour-shell::after {
    display: none !important;
}

.local-hero .local-shell,
.tour-hero .tour-shell {
    position: relative;
    z-index: 2;
    display: grid !important;
    grid-template-columns: minmax(0, .88fr) minmax(500px, 1.12fr);
    align-items: center;
    gap: clamp(36px, 5vw, 70px);
    min-height: 350px !important;
}

.portal-hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.local-hero .portal-hero-copy > span:first-child {
    display: inline-flex;
    padding: 6px 11px;
    border: 1px solid #ffffff38;
    border-radius: 999px;
    background: #ffffff13;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.local-hero h1,
.tour-hero h1 {
    max-width: none !important;
    letter-spacing: -.025em;
}

.local-hero p,
.tour-hero p {
    max-width: 620px !important;
    line-height: 1.8;
}

.portal-hero-visual {
    position: relative;
    min-width: 0;
    min-height: 350px;
}

.portal-hero-visual::before {
    content: "";
    position: absolute;
    width: 88%;
    height: 88%;
    top: 8%;
    right: 4%;
    border: 1px solid #ffffff26;
    border-radius: 35px;
    background: linear-gradient(145deg, #ffffff16, #ffffff08);
    transform: rotate(4deg);
}

.portal-demo-window {
    position: absolute;
    z-index: 2;
    inset: 5px 0 5px 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ffffff70;
    border-radius: 25px;
    background: #f8fafc;
    color: #0f172a;
    box-shadow: 0 28px 70px #43140752, inset 0 1px 0 #fff;
    animation: portalWindowFloat 6s ease-in-out infinite;
}

.portal-window-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.portal-window-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fb7185;
}

.portal-window-dot:nth-child(2) { background: #fbbf24; }
.portal-window-dot:nth-child(3) { background: #34d399; }

.portal-window-url {
    min-width: 0;
    margin-left: 7px;
    padding: 5px 11px;
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 9px;
    white-space: nowrap;
}

.portal-demo-status {
    position: absolute;
    z-index: 4;
    right: -10px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid #ffffff8c;
    border-radius: 13px;
    background: #fff;
    color: #475569;
    box-shadow: 0 12px 28px #4314073d;
    font-size: 9px;
    font-weight: 700;
    animation: portalStatusFloat 4.5s ease-in-out infinite .6s;
}

.portal-demo-status i {
    color: #10b981;
    animation: portalStatusBlink 1.4s ease-in-out infinite;
}

/* Marketplace simulation */
.market-demo {
    min-height: 0;
    padding: 18px;
    flex: 1;
    background: linear-gradient(180deg, #fffaf7, #fff7ed);
}

.market-demo__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.market-demo__brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #9a3412;
    font: 700 13px Kanit, sans-serif;
}

.market-demo__brand i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #ffedd5;
    color: #ea580c;
}

.market-demo__basket {
    position: relative;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    color: #c2410c;
    box-shadow: 0 5px 14px #9a34121a;
}

.market-demo__basket::after {
    content: "3";
    position: absolute;
    right: -4px;
    top: -5px;
    width: 14px;
    height: 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: 7px;
}

.market-demo__search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    margin: 12px 0;
    padding: 0 12px;
    border: 1px solid #fed7aa;
    border-radius: 11px;
    background: #fff;
    color: #a8a29e;
    font-size: 9px;
}

.market-demo__search i { color: #ea580c; }

.market-demo__heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #78716c;
    font-size: 9px;
}

.market-demo__heading strong { color: #431407; font-size: 11px; }

.market-demo__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.market-demo__card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 15px #9a34120d;
    opacity: 1;
    animation: portalCardIn 6s ease-in-out infinite;
}

.market-demo__card:nth-child(2) { animation-delay: .3s; }
.market-demo__card:nth-child(3) { animation-delay: .6s; }

.market-demo__image {
    height: 72px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ffedd5, #fed7aa);
    color: #c2410c;
    font-size: 23px;
}

.market-demo__card:nth-child(2) .market-demo__image { background: linear-gradient(145deg, #fef3c7, #fde68a); color: #a16207; }
.market-demo__card:nth-child(3) .market-demo__image { background: linear-gradient(145deg, #dcfce7, #bbf7d0); color: #15803d; }

.market-demo__body { padding: 8px; }
.market-demo__title { display: block; overflow: hidden; color: #431407; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.market-demo__seller { display: block; margin-top: 2px; color: #a8a29e; font-size: 7px; }
.market-demo__price { display: block; margin-top: 5px; color: #ea580c; font-size: 9px; font-weight: 800; }

/* Tourism map simulation */
.tour-demo {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
}

.tour-demo__side {
    padding: 16px 12px;
    background: #7c2d12;
    color: #fff;
}

.tour-demo__logo {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 23px;
    border-radius: 11px;
    background: #fbbf24;
    color: #7c2d12;
}

.tour-demo__nav { display: grid; gap: 10px; }
.tour-demo__nav span { height: 7px; border-radius: 10px; background: #ffffff2e; }
.tour-demo__nav span:first-child { background: #ffffffb3; }
.tour-demo__nav span:nth-child(2) { width: 76%; }
.tour-demo__nav span:nth-child(3) { width: 88%; }

.tour-demo__map {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 30%, #bae6fd 0 30px, transparent 31px),
        linear-gradient(35deg, transparent 47%, #d6d3d1 48% 51%, transparent 52%),
        linear-gradient(145deg, transparent 45%, #e7e5e4 46% 49%, transparent 50%),
        linear-gradient(90deg, transparent 48%, #e7e5e4 49% 51%, transparent 52%),
        #f5f5f4;
    background-size: auto, 125px 125px, 155px 155px, 105px 105px, auto;
}

.tour-demo__map::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -70px;
    bottom: -100px;
    border-radius: 45% 55% 50% 50%;
    background: #dcfce7;
    transform: rotate(22deg);
}

.tour-demo__search {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 37px;
    padding: 0 12px;
    border: 1px solid #e7e5e4;
    border-radius: 11px;
    background: #fff;
    color: #a8a29e;
    box-shadow: 0 6px 16px #29252414;
    font-size: 9px;
}

.tour-demo__search i { color: #d97706; }

.tour-demo__pin {
    position: absolute;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #ea580c;
    color: #fff;
    box-shadow: 0 6px 13px #43140738;
    transform: rotate(-45deg);
    animation: portalPin 4s ease-in-out infinite;
}

.tour-demo__pin i { font-size: 9px; transform: rotate(45deg); }
.tour-demo__pin.one { left: 25%; top: 42%; }
.tour-demo__pin.two { right: 22%; top: 34%; background: #16a34a; animation-delay: .5s; }
.tour-demo__pin.three { left: 49%; bottom: 19%; background: #2563eb; animation-delay: 1s; }

.tour-demo__place {
    position: absolute;
    z-index: 3;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 9px;
    border: 1px solid #fff;
    border-radius: 12px;
    background: #fffffff2;
    box-shadow: 0 8px 20px #2925241f;
}

.tour-demo__place-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fef3c7;
    color: #b45309;
}

.tour-demo__place strong { display: block; font-size: 9px; }
.tour-demo__place small { display: block; margin-top: 2px; color: #a8a29e; font-size: 7px; }
.tour-demo__route { padding: 5px 8px; border-radius: 8px; background: #d97706; color: #fff; font-size: 7px; font-weight: 800; }

/* Search and filter polish */
.local-main,
.tour-main {
    background: linear-gradient(180deg, #fffaf7 0%, #fff 100%);
}

.local-filter {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px !important;
    border: 1px solid #fed7aa !important;
    border-radius: 19px !important;
    background: #fff !important;
    box-shadow: 0 12px 32px #9a34120d;
}

.local-filter::before {
    content: "\f002";
    position: absolute;
    z-index: 2;
    left: 29px;
    top: 50%;
    color: #ea580c;
    font: 900 15px/1 "Font Awesome 6 Free";
    transform: translateY(-50%);
    pointer-events: none;
}

.local-filter input {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 16px 0 45px !important;
    border: 1px solid #fed7aa !important;
    border-radius: 13px !important;
    font: 400 15px Prompt, sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.local-filter input:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 4px #f973161a;
}

.local-filter button {
    min-width: 118px;
    height: 52px;
    border: 0;
    border-radius: 13px !important;
    background: #ea580c;
    color: #fff;
    font: 700 14px Prompt, sans-serif;
    box-shadow: 0 9px 20px #ea580c2b;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.local-filter button:hover { transform: translateY(-2px); box-shadow: 0 13px 24px #ea580c38; }
.local-results { margin: 0 0 18px; color: #9a3412; font-size: 14px; }
.local-results strong { font-size: 18px; }

.tour-toolbar {
    align-items: center;
    padding: 12px;
    border: 1px solid #fde68a;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px #78350f0d;
}

.tour-search input {
    height: 52px;
    padding-left: 45px !important;
    border-color: #fcd34d !important;
    border-radius: 13px !important;
    font: 400 15px Prompt, sans-serif;
    transition: border-color .2s, box-shadow .2s;
}

.tour-search input:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px #f59e0b1a;
}

.tour-search i { top: 50% !important; transform: translateY(-50%); }
.tour-chips { scrollbar-width: thin; scrollbar-color: #fcd34d transparent; }
.tour-chip { min-height: 42px; transition: transform .2s, box-shadow .2s; }
.tour-chip:hover { transform: translateY(-1px); box-shadow: 0 7px 15px #92400e12; }

@keyframes portalWindowFloat {
    0%, 100% { transform: translateY(0) rotate(-.25deg); }
    50% { transform: translateY(-7px) rotate(.15deg); }
}

@keyframes portalStatusFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes portalStatusBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .42; transform: scale(.8); }
}

@keyframes portalCardIn {
    0%, 100% { opacity: .82; transform: translateY(3px); }
    18%, 86% { opacity: 1; transform: none; }
}

@keyframes portalPin {
    0%, 100% { transform: translateY(0) rotate(-45deg); }
    50% { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 1050px) {
    .local-hero .local-shell,
    .tour-hero .tour-shell {
        grid-template-columns: minmax(0, 1fr) minmax(430px, .95fr);
        gap: 32px;
    }
}

@media (max-width: 880px) {
    .local-hero .local-shell,
    .tour-hero .tour-shell {
        grid-template-columns: 1fr;
    }
    .portal-hero-copy { max-width: 680px; }
    .portal-hero-visual { width: min(620px, 96%); margin: 4px auto 0; }
    .tour-hero h1,
    .tour-hero p { max-width: 100% !important; }
}

@media (max-width: 640px) {
    .local-hero,
    .tour-hero { padding: 42px 0 !important; }
    .portal-hero-visual { width: 100%; min-height: 330px; }
    .portal-demo-window { inset: 4px 0; border-radius: 20px; }
    .market-demo { padding: 14px; }
    .market-demo__grid { gap: 6px; }
    .market-demo__image { height: 62px; }
    .tour-demo { grid-template-columns: 58px minmax(0, 1fr); }
    .tour-demo__side { padding: 14px 10px; }
    .portal-demo-status { right: 7px; bottom: 12px; }
    .local-filter { grid-template-columns: minmax(0, 1fr); }
    .local-filter::before { top: 38px; }
    .local-filter button { width: 100%; }
    .tour-toolbar { padding: 10px; }
}

@media (max-width: 420px) {
    .portal-hero-visual { min-height: 315px; }
    .market-demo__card:nth-child(3) { display: none; }
    .market-demo__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tour-demo__place { grid-template-columns: 32px minmax(0, 1fr); }
    .tour-demo__place-icon { width: 32px; height: 32px; }
    .tour-demo__route { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-demo-window,
    .portal-demo-status,
    .portal-demo-status i,
    .market-demo__card,
    .tour-demo__pin {
        animation: none !important;
    }
    .market-demo__card { opacity: 1; }
}
