/*
Theme Name:  TourTheme
Theme URI:   https://webarabhost.com/tourtheme
Author:      WebArabHost
Author URI:  https://webarabhost.com
Description: Premium Arabic-first WordPress tourism theme for destinations, hotels, travel guides, and offers. Fully RTL-ready, lightweight, and optimised for Core Web Vitals. No premium plugin dependency.
Version:     1.0.3
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tourtheme
Domain Path: /languages
Tags:        rtl-language, arabic, travel, tourism, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, block-patterns, wide-blocks

/* === Reset & Base ====================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--tt-text, #1a1a1a);
	background-color: var(--tt-background, #ffffff);
	direction: ltr;
}

body.rtl,
html[dir="rtl"] body {
	direction: rtl;
	text-align: right;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--tt-primary, #0069d9);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

/* === Typography ======================================================== */
h1, h2, h3, h4, h5, h6 {
	line-height: 1.3;
	font-weight: 700;
	margin-bottom: 0.5em;
}

p {
	margin-bottom: 1rem;
}

ul, ol {
	padding-inline-start: 1.5rem;
	margin-bottom: 1rem;
}

/* === Layout ============================================================ */
.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-content {
	flex: 1;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 1.25rem;
}

/* === Skip Link ========================================================= */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	z-index: 9999;
	padding: 0.5rem 1rem;
	background: #000;
	color: #fff;
	font-size: 0.875rem;
}

.skip-link:focus {
	top: 0;
}

/* === Site Header ======================================================= */
.site-header {
	background-color: var(--tt-surface, #ffffff);
	border-bottom: 1px solid var(--tt-border, #e5e5e5);
	padding-block: 1rem;
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.tourtheme-language-switcher__list {
	display: flex;
	gap: 0.25rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.tourtheme-language-switcher__item a {
	display: block;
	padding: 0.35rem 0.5rem;
	border-radius: 4px;
	font-size: 0.85rem;
}

.tourtheme-language-switcher__item.is-current-language a {
	background: #f0f0f0;
	font-weight: 600;
}

.site-title {
	font-size: 1.5rem;
	margin: 0;
}

.site-title a {
	color: inherit;
}

.site-description {
	font-size: 0.8rem;
	color: #666;
	margin: 0;
}

/* === Navigation ======================================================== */
.main-navigation {
	display: flex;
	align-items: center;
}

.main-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 0.25rem;
}

.main-navigation ul li a {
	display: block;
	padding: 0.5rem 0.75rem;
	color: var(--tt-text, #1a1a1a);
	font-weight: 500;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
	background-color: #f0f0f0;
	text-decoration: none;
}

/* Sub-menus */
.main-navigation ul ul {
	display: none;
	position: absolute;
	background: var(--tt-surface, #fff);
	border: 1px solid var(--tt-border, #e5e5e5);
	border-radius: 4px;
	min-width: 180px;
	z-index: 200;
	flex-direction: column;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
	display: flex;
}

.main-navigation ul li {
	position: relative;
}

/* Menu toggle for mobile */
.menu-toggle {
	display: none;
	background: none;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 0.4rem 0.6rem;
	cursor: pointer;
	font-size: 1.25rem;
}

/* === Hero / Front Page ================================================= */
.hero-section {
	background: linear-gradient(135deg, var(--tt-primary, #006b5e) 0%, var(--tt-secondary, #00a896) 100%);
	color: #fff;
	padding-block: 5rem;
	text-align: center;
}

.hero-section h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	margin-bottom: 1rem;
}

.hero-section p {
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	opacity: 0.9;
	max-width: 600px;
	margin-inline: auto;
}

/* === Cards ============================================================= */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	padding-block: 2rem;
}

.archive-layout-grid.archive-columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-layout-grid.archive-columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-layout-grid.archive-columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-layout-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	padding-block: 2rem;
}

.archive-layout-list .card {
	display: grid;
	grid-template-columns: minmax(220px, 320px) 1fr;
	align-items: stretch;
}

.archive-layout-list .card-thumbnail {
	height: 100%;
}

.archive-layout-list .card-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.card {
	background: var(--tt-surface, #fff);
	border: 1px solid var(--tt-border, #e5e5e5);
	border-radius: var(--tt-radius, 8px);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.card-thumbnail {
	aspect-ratio: 16/9;
	overflow: hidden;
}

.card-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.card:hover .card-thumbnail img {
	transform: scale(1.05);
}

.card-body {
	padding: 1.25rem;
}

.card-title {
	font-size: 1.125rem;
	margin-bottom: 0.5rem;
}

.card-excerpt {
	font-size: 0.9rem;
	color: var(--tt-muted, #555);
	margin-bottom: 1rem;
}

.card-meta {
	font-size: 0.8rem;
	color: var(--tt-muted, #888);
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

/* === Badges ============================================================ */
.badge {
	display: inline-block;
	padding: 0.2em 0.6em;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 3px;
	line-height: 1;
}

.badge-destination { background: #e8f5e9; color: #2e7d32; }
.badge-hotel       { background: #e3f2fd; color: #1565c0; }
.badge-guide       { background: #fff8e1; color: #f57f17; }
.badge-offer       { background: #fce4ec; color: #c62828; }

/* === Buttons =========================================================== */
.btn {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	border-radius: var(--tt-button-radius, 4px);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.2s ease, color 0.2s ease;
	border: 2px solid transparent;
}

.btn-primary {
	background: var(--tt-primary, #006b5e);
	color: #fff;
}

.btn-primary:hover {
	background: color-mix(in srgb, var(--tt-primary, #006b5e) 85%, #000);
	text-decoration: none;
}

.btn-outline {
	background: transparent;
	border-color: var(--tt-primary, #006b5e);
	color: var(--tt-primary, #006b5e);
}

.btn-outline:hover {
	background: var(--tt-primary, #006b5e);
	color: #fff;
	text-decoration: none;
}

/* === Content Area ====================================================== */
.content-area {
	padding-block: var(--tt-section-spacing, 3rem);
}

.entry-header {
	margin-bottom: 1.5rem;
}

.entry-title {
	font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.entry-meta {
	font-size: 0.85rem;
	color: #888;
	margin-top: 0.5rem;
}

.entry-meta a {
	color: #888;
}

.entry-content {
	max-width: 72ch;
}

.entry-content > * + * {
	margin-top: 1rem;
}

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e5e5;
	font-size: 0.85rem;
	color: #888;
}

.tourtheme-sticky-contact-bar {
	display: none;
}

/* === Sidebar =========================================================== */
.widget-area {
	margin-top: 2rem;
}

.widget {
	margin-bottom: 2rem;
}

.widget-title {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #006b5e;
}

/* === Pagination ======================================================== */
.navigation {
	margin-block: 2rem;
}

.nav-links {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 4px;
	border: 1px solid #e5e5e5;
	color: #1a1a1a;
	font-size: 0.9rem;
	transition: background-color 0.2s ease;
}

.page-numbers.current,
.page-numbers:hover {
	background: #006b5e;
	color: #fff;
	border-color: #006b5e;
	text-decoration: none;
}

/* === Comments ========================================================== */
.comments-area {
	margin-top: 3rem;
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment {
	padding-block: 1rem;
	border-bottom: 1px solid #f0f0f0;
}

.comment-author {
	font-weight: 600;
}

.comment-metadata {
	font-size: 0.8rem;
	color: #888;
}

/* === Search Form ======================================================= */
.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-field {
	flex: 1;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
}

.search-submit {
	padding: 0.5rem 1rem;
	background: #006b5e;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1rem;
}

/* === 404 Page ========================================================== */
.error-404 {
	text-align: center;
	padding-block: 5rem;
}

.error-404 .page-title {
	font-size: 6rem;
	color: #e5e5e5;
	margin-bottom: 0;
}

/* === Footer ============================================================ */
.site-footer {
	background: #1a1a1a;
	color: #ccc;
	padding-block: 2.5rem;
	margin-top: auto;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-widget-title {
	color: #fff;
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

.site-footer a {
	color: #ccc;
}

.site-footer a:hover {
	color: #fff;
}

.footer-bottom {
	border-top: 1px solid #333;
	padding-top: 1.25rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.85rem;
}

/* === Destination Single ================================================ */
.destination-meta,
.hotel-meta,
.guide-meta,
.offer-meta {
	background: #f9f9f9;
	border-radius: 8px;
	padding: 1.25rem;
	margin-bottom: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.destination-meta dt,
.hotel-meta dt,
.guide-meta dt,
.offer-meta dt {
	font-size: 0.8rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.destination-meta dd,
.hotel-meta dd,
.guide-meta dd,
.offer-meta dd {
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a1a;
	margin-inline-start: 0;
}

/* === Price / Offer Highlight =========================================== */
.price-tag {
	font-size: 1.5rem;
	font-weight: 700;
	color: #c62828;
}

.price-original {
	text-decoration: line-through;
	color: #888;
	font-size: 1rem;
	margin-inline-end: 0.5rem;
}

/* === Accessibility ===================================================== */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	left: 0.3125rem;
	top: 0.3125rem;
	width: auto;
	z-index: 100000;
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0,0,0,0.6);
	color: #21759b;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: normal;
	padding: 1rem 1.5rem;
	text-decoration: none;
}

/* === Responsive ======================================================== */
@media (max-width: 768px) {
	.archive-layout-grid.archive-columns-2,
	.archive-layout-grid.archive-columns-3,
	.archive-layout-grid.archive-columns-4,
	.archive-layout-list .card {
		grid-template-columns: 1fr;
	}

	body.single-tourtheme_destination,
	body.single-tourtheme_hotel,
	body.single-tourtheme_offer {
		padding-bottom: 5.5rem;
	}

	.tourtheme-sticky-contact-bar {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 110;
		display: flex;
		gap: 0.75rem;
		align-items: center;
		justify-content: center;
		padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 0.96);
		border-top: 1px solid #e5e5e5;
		box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
		backdrop-filter: blur(8px);
	}

	.tourtheme-sticky-contact-bar .btn {
		flex: 1 1 auto;
	}

	.tourtheme-sticky-contact-bar__secondary {
		flex: 0 0 auto;
		font-weight: 600;
	}

	.menu-toggle {
		display: block;
	}

	.main-navigation .nav-menu {
		display: none;
		flex-direction: column;
		width: 100%;
		position: absolute;
		top: 100%;
		inset-inline-start: 0;
		background: #fff;
		border: 1px solid #e5e5e5;
		padding: 1rem;
	}

	.main-navigation.toggled .nav-menu {
		display: flex;
	}

	.site-header .container {
		flex-wrap: wrap;
	}
}

@media (min-width: 769px) {
	.with-sidebar .content-area-inner {
		display: grid;
		grid-template-columns: 1fr 300px;
		gap: 2rem;
		align-items: start;
	}

	html[dir="rtl"] .with-sidebar .content-area-inner {
		grid-template-columns: 300px 1fr;
	}
}
