/*
Theme Name: M-Tour Travel
Theme URI: https://m-onetech.com/
Author: M-Onetech
Description: Travel marketplace theme built for the M-Tour Engine plugin. Home page sections are plugin widgets (blocks / Elementor), and the theme ships a one-click demo import.
Version: 1.3.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: m-tour-travel
Tags: travel, tours, custom-menu, featured-images, translation-ready
*/

:root {
	--mtt-accent: #00846a;
	--mtt-accent-dark: #00604c;
	--mtt-tint: #e6f5f1;
	--mtt-footer: #000;
	--mtt-ink: #1a1a1a;
	--mtt-muted: #666;
	--mtt-border: #e3e5e8;
	--mtt-soft: #f6f7f8;
	--mtt-radius: 10px;
	--mtt-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--mtt-ink); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--mtt-accent); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--mtt-ink); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 14px; }

/* Plugin accent -> theme accent (same elements the plugin declares its variables on) */
:root, body .mtour-archive, body .mtour-single, body .mtour-wizard, body .mtour-search, body .mtour-filter, body .mtour-account, body .mtour-terms {
	--mtour-accent: var(--mtt-accent);
	--mtour-radius: 10px;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--mtt-accent); }
.mtour-callout--mint { background: var(--mtt-tint); }
.mtour-btn:hover, .btn:hover { background: var(--mtt-accent-dark); filter: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--mtt-border); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 28px; max-width: var(--mtt-max); margin: 0 auto; padding: 10px 16px; min-height: 60px; }
.site-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px; color: var(--mtt-accent); text-decoration: none; }
.site-brand img { max-height: 36px; width: auto; }
.site-brand small { display: block; font-size: .55rem; font-weight: 500; color: var(--mtt-muted); letter-spacing: 0; }
.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--mtt-ink); font-size: .9rem; font-weight: 500; text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--mtt-soft); }
.main-nav li { position: relative; }
.main-nav .sub-menu { position: absolute; left: 0; top: 100%; display: none; min-width: 200px; padding: 6px; background: #fff; border: 1px solid var(--mtt-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .1); flex-direction: column; gap: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.site-header__actions { display: flex; align-items: center; gap: 12px; }
.btn { display: inline-block; padding: 9px 20px; border: 0; border-radius: 8px; background: var(--mtt-accent); color: #fff; font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--mtt-accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--mtt-accent); border: 1px solid var(--mtt-accent); }
.btn--ghost:hover { background: var(--mtt-accent); color: #fff; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--mtt-border); border-radius: 8px; background: #fff; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--mtt-ink); }

/* Generic content */
.site-main { min-height: 50vh; }
.container { max-width: var(--mtt-max); margin: 0 auto; padding: 32px 16px; }
.container--narrow { max-width: 820px; }
.entry-title { margin-top: 0; }
.entry-content > *:first-child { margin-top: 0; }
.page-head { background: var(--mtt-soft); border-bottom: 1px solid var(--mtt-border); }
.page-head .container { padding-top: 28px; padding-bottom: 28px; }
.page-head h1 { margin: 0; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.post-card { border: 1px solid var(--mtt-border); border-radius: var(--mtt-radius); overflow: hidden; background: #fff; }
.post-card__body { padding: 16px; }
.post-card h2 { margin: 0 0 6px; font-size: 1.1rem; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card .meta { color: var(--mtt-muted); font-size: .85rem; }
.pagination, .nav-links { display: flex; gap: 8px; margin-top: 24px; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--mtt-border); border-radius: 6px; text-decoration: none; }
.page-numbers.current { background: var(--mtt-accent); color: #fff; border-color: var(--mtt-accent); }

/* Home sections built from plugin widgets */
.home-page .entry-content { margin: 0; }
.mt-section { max-width: var(--mtt-max); margin: 0 auto; padding: 36px 16px; }
.mt-section > h2 { margin: 0 0 22px; text-align: center; font-size: 1.6rem; }
.mt-section--narrow { max-width: 760px; }
.mt-section .mtour-terms--tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mt-section .mtour-terms--photo { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mt-section .mtour-terms--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mt-section--links { padding-top: 12px; }
.mt-section--links h2 { text-align: left; font-size: 1.1rem; margin-bottom: 10px; }
.mt-hero .mtour-hero { margin: 0; }
.wp-block-group.mt-bleed { max-width: none; padding: 0; margin: 0; }
.mt-bleed > * { margin-top: 0; margin-bottom: 0; }

/* Archive (tours, destinations, countries, categories) */
.mtour-archive { max-width: var(--mtt-max); }
.mtour-archive__header h1 { margin: 0 0 14px; font-size: 1.9rem; }
.mt-breadcrumbs { font-size: .8rem; color: var(--mtt-muted); margin: 0 0 8px; }
.mt-breadcrumbs a { color: inherit; text-decoration: none; }
.mt-breadcrumbs a:hover { text-decoration: underline; }
.mt-term-desc { max-width: 820px; color: var(--mtt-muted); margin: 0 0 16px; }
.mtour-archive .mtour-card, .mtour-single .mtour-card, .mt-section .mtour-card { border: 0; border-radius: 12px; background: transparent; }
.mtour-card__image { border-radius: 12px; overflow: hidden; }
.mtour-card__body { padding: 10px 2px; }
.mtour-card__title { font-size: .98rem; }
.mtour-card__title a:hover { text-decoration: underline; }

/* Single tour */
.mtour-single { max-width: var(--mtt-max); }
.mtour-single h1 { font-size: 1.8rem; margin: 0 0 6px; }
.mtour-gallery-wrap { margin-bottom: 24px; }
.mtour-gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: 440px; max-height: none; gap: 6px; border-radius: 12px; }
.mtour-gallery a:first-child { grid-row: span 2; }
.mtour-gallery a:nth-child(4):last-child { grid-column: span 2; }
.mtour-gallery:has(a:only-child) { grid-template-columns: 1fr; grid-template-rows: 1fr; }

.mtour-single section { padding: 22px 0; border-top: 1px solid var(--mtt-border); }
.mtour-single section:first-of-type { border-top: 0; }
.mtour-single h2 { font-size: 1.35rem; margin: 0 0 12px; }
.mtour-booking-box { border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .1); }
.mtour-booking-box__price strong { font-size: 1.8rem; color: var(--mtt-ink); }
.mtour-btn { background: var(--mtt-accent); border-radius: 8px; }
.mtour-btn--ghost { background: transparent; }

/* Footer */
.site-footer { margin-top: 48px; background: var(--mtt-footer); color: #cfd2d4; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__inner { max-width: var(--mtt-max); margin: 0 auto; padding: 40px 16px 24px; }
.social { display: flex; justify-content: center; gap: 22px; margin: 0 0 28px; padding: 0; list-style: none; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; }
.footer-menu ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 24px; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid #2b2b2b; font-size: .78rem; color: #9a9ea1; }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.main-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; background: #fff; border-bottom: 1px solid var(--mtt-border); padding: 8px 16px 16px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav .sub-menu { position: static; display: flex; border: 0; box-shadow: none; padding-left: 14px; }
	.site-header__actions { display: none; }
	.mt-section .mtour-terms--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mt-section .mtour-terms--photo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mt-section .mtour-terms--list { grid-template-columns: 1fr; }
	.mtour-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; height: 260px; }
	.mtour-gallery a:nth-child(n+3) { display: none; }
	.mtour-gallery a:first-child { grid-row: auto; }
	.footer-menu ul { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
