/*
Theme Name: Imagine Bali Tour
Theme URI: https://imaginebalitour.com
Author: Imagine Bali Tour
Description: Simple, fast tour theme for Imagine Bali Tour. Tours post type, WhatsApp inquiry (price per car, up to 7 pax), Svelte-powered animations.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ibt
*/

:root {
	--c-primary: #0f6b63;
	--c-primary-d: #0a4d47;
	--c-accent: #f08a24;
	--c-wa: #25d366;
	--c-wa-d: #1aa851;
	--c-bg: #ffffff;
	--c-alt: #f6f3ee;
	--c-text: #1c2526;
	--c-muted: #5f6b6c;
	--c-line: #e6e1d8;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 6px 20px rgba(16, 40, 38, .08);
	--container: 1140px;
	--gap: 16px;
	--sec: 44px;
	--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-d); }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.5vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 17px; }
p { margin: 0 0 10px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: #fff; padding: 6px 10px; }
.skip-link:focus { left: 8px; }
.ibt-icon { display: inline-flex; width: 1.1em; height: 1.1em; flex: none; }
.ibt-icon svg { width: 100%; height: 100%; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: 999px; border: 0; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; white-space: nowrap; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-d); color: #fff; }
.btn-wa { background: var(--c-wa); color: #fff; box-shadow: 0 4px 14px rgba(37, 211, 102, .3); }
.btn-wa:hover { background: var(--c-wa-d); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary); }
.btn-ghost { background: transparent; color: var(--c-primary); border: 1.5px solid var(--c-line); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line); transition: background .3s, border-color .3s, box-shadow .3s; }
.site-header.is-overlay { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; }
.site-header.is-overlay:not(.is-scrolled) .brand-text, .site-header.is-overlay:not(.is-scrolled) .menu a, .site-header.is-overlay:not(.is-scrolled) .nav-toggle { color: #fff; }
.site-header.is-scrolled { background: rgba(255, 255, 255, .96); border-color: var(--c-line); box-shadow: 0 2px 12px rgba(0, 0, 0, .05); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--c-text); }
.brand-logo { width: auto; max-width: 220px; object-fit: contain; }
.brand-default, .brand-on-dark { display: flex; align-items: center; gap: 8px; }
.brand-on-dark { display: none; }
.site-header.has-light-logo:not(.is-scrolled) .brand-default { display: none; }
.site-header.has-light-logo:not(.is-scrolled) .brand-on-dark { display: flex; }
@media (max-width: 600px) { .brand-logo { max-height: 34px; } }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--c-primary), #1fa38f); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.brand-text { font-size: 16px; color: var(--c-text); transition: color .3s; }
.brand-text b { color: var(--c-accent); margin: 0 2px; }
.main-nav { margin-left: auto; }
.menu { display: flex; gap: 2px; }
.menu a { display: block; padding: 6px 11px; border-radius: 999px; color: var(--c-text); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.menu a:hover, .menu .current-menu-item > a { background: rgba(15, 107, 99, .08); color: var(--c-primary); }
.header-cta { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--c-text); font-size: 22px; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.header-cta { margin-left: auto; }
	.main-nav { position: absolute; top: 60px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); padding: 8px 16px; transform-origin: top; transform: scaleY(.9); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
	.main-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
	.menu { flex-direction: column; }
	.site-header.is-overlay .main-nav .menu a { color: var(--c-text); }
}

/* Hero */
.hero, .page-hero { position: relative; isolation: isolate; color: #fff; background: linear-gradient(135deg, #0a4d47 0%, #0f6b63 45%, #1f9a86 100%); overflow: hidden; }
.hero { min-height: min(88vh, 680px); display: flex; align-items: center; padding: 90px 0 50px; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: heroZoom 18s ease-out both; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 25, 24, .35) 0%, rgba(5, 25, 24, .55) 100%); }
.hero:not(.has-image) .hero-shade, .page-hero:not(.has-image) .hero-shade { background: radial-gradient(circle at 85% 20%, rgba(240, 138, 36, .35), transparent 45%), radial-gradient(circle at 10% 90%, rgba(255, 255, 255, .12), transparent 40%); }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-inner { max-width: var(--container); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 6px; }
.hero .eyebrow { background: rgba(255, 255, 255, .14); color: #fff; padding: 4px 10px; border-radius: 999px; }
.hero-title { font-size: clamp(32px, 6vw, 60px); max-width: 760px; margin-bottom: 10px; }
.hero-words { display: block; color: var(--c-accent); min-height: 1.2em; }
.hero-sub { font-size: 17px; max-width: 560px; opacity: .92; margin-bottom: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; background: rgba(0, 0, 0, .25); padding: 6px 12px; border-radius: 999px; }

.page-hero { padding: 96px 0 30px; }
.page-hero.has-image { padding-top: 160px; }
.page-hero.slim { padding: 36px 0 26px; }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .hero-sub { margin: 0; font-size: 15px; }
.crumbs { font-size: 13px; opacity: .85; margin-bottom: 6px; }
.crumbs a { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .16); border-radius: 999px; }
.chip-accent { background: var(--c-accent); }

/* USP */
.usp { background: #fff; border-bottom: 1px solid var(--c-line); }
.usp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.usp-item { display: flex; align-items: center; gap: 10px; }
.usp-item > .ibt-icon { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: rgba(15, 107, 99, .08); color: var(--c-primary); }
.usp-item strong { display: block; font-size: 14px; }
.usp-item span { font-size: 12.5px; color: var(--c-muted); }
@media (max-width: 860px) { .usp-grid { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
.section { padding: var(--sec) 0; }
.section-alt { background: var(--c-alt); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head.center { justify-content: center; text-align: center; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 700; font-size: 14px; }
.empty { padding: 20px; text-align: center; color: var(--c-muted); background: var(--c-alt); border-radius: var(--radius); }

/* Tour cards */
.tour-grid, .post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 960px) { .tour-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tour-grid, .post-grid { grid-template-columns: 1fr; } }
.tour-card, .post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s; height: 100%; }
.tour-card:hover, .post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }
.tour-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-alt); }
.tour-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tour-card:hover .tour-media img, .post-card:hover .tour-media img { transform: scale(1.06); }
.tour-ph { position: absolute; inset: 0; background: linear-gradient(135deg, #0f6b63, #1f9a86 60%, #f0a050); }
.tour-ph::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M0 60 L30 25 L45 40 L65 15 L100 60Z' fill='%23ffffff' fill-opacity='.18'/%3E%3Ccircle cx='78' cy='14' r='6' fill='%23ffffff' fill-opacity='.35'/%3E%3C/svg%3E") center bottom / cover no-repeat; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--c-accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.tour-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.tour-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--c-muted); margin-bottom: 4px; }
.tour-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tour-title { margin: 0 0 4px; font-size: 16.5px; }
.tour-title a { color: var(--c-text); }
.tour-title a:hover { color: var(--c-primary); }
.tour-excerpt { font-size: 13.5px; color: var(--c-muted); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tour-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--c-line); }
.price strong { display: block; font-size: 17px; color: var(--c-primary); line-height: 1.1; }
.price small { font-size: 12px; color: var(--c-muted); }
.price.big strong { font-size: 26px; display: inline; }
.price.big small { margin-left: 4px; font-size: 14px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); counter-reset: s; }
.steps li { position: relative; background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--c-line); }
.steps strong { display: block; font-size: 16px; margin: 8px 0 2px; }
.steps p { margin: 0; color: var(--c-muted); font-size: 14px; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c-accent); color: #fff; font-weight: 800; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* Stats */
.stats-wrap { background: var(--c-primary); color: #fff; padding: 28px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.stats .ssr { font-size: 30px; font-weight: 800; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* CTA */
.cta { padding: 0 0 var(--sec); }
.section + .cta, .stats-wrap + .cta { padding-top: var(--sec); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, var(--c-accent), #f5a94f); color: #fff; padding: 22px 24px; border-radius: var(--radius); }
.cta-inner h2 { margin-bottom: 4px; }
.cta-inner p { margin: 0; opacity: .95; }
@media (max-width: 700px) { .cta-inner { flex-direction: column; align-items: flex-start; } }

/* Single tour */
.tour-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-top: 24px; padding-bottom: var(--sec); align-items: start; }
.tour-aside { position: sticky; top: 76px; }
.admin-bar .tour-aside { top: 108px; }
@media (max-width: 900px) { .tour-layout { grid-template-columns: 1fr; } .tour-aside { position: static; order: -1; } }
.lead { font-size: 17px; color: var(--c-text); font-weight: 500; }
.entry > * + * { margin-top: 10px; }
.entry img { border-radius: var(--radius-sm); }
.box { margin-top: 18px; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--radius); }
.box h2 { font-size: 18px; margin-bottom: 10px; }
.box.incl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .box.incl { grid-template-columns: 1fr; } }
.list-check li, .list-x li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 14.5px; }
.list-check .ibt-icon { color: var(--c-primary); margin-top: 3px; }
.list-x .ibt-icon { color: #c4453c; margin-top: 3px; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--c-line); }
.timeline li { position: relative; display: flex; gap: 10px; padding: 5px 0; font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; left: -17px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--c-primary); }
.timeline time { font-weight: 700; color: var(--c-primary); min-width: 48px; }
.booking-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }

/* Gallery */
.tour-gallery { margin-bottom: 18px; }
.gallery-ssr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-ssr img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

/* Footer */
.site-footer { background: #0b2c2a; color: rgba(255, 255, 255, .78); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-top: 36px; padding-bottom: 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 18px; } }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: #fff; }
.brand-light .brand-text { color: #fff; }
.footer-about p { margin: 10px 0; max-width: 380px; }
.footer-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.footer-list .ibt-icon { color: var(--c-accent); }
.socials { display: flex; flex-wrap: wrap; gap: 6px; }
.socials a { padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; font-size: 13px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }

/* Misc */
.pagination { margin-top: 20px; }
.pagination .nav-links { display: flex; gap: 4px; justify-content: center; }
.pagination .page-numbers { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--c-line); }
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.notfound { padding: 80px 0; }
.big-404 { font-size: 90px; font-weight: 800; color: var(--c-accent); line-height: 1; margin: 0; }

/* Reveal on scroll (activated by JS) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Svelte islands: hide server fallback until component mounts (keeps layout) */
.js [data-svelte]:not(.is-mounted) > .ssr { visibility: hidden; }
.js [data-svelte] .ssr [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
}
