/*
Theme Name: Halal Travel
Theme URI: https://www.halaltravelblog.com/
Description: Premium Muslim-friendly travel editorial theme.
Author: Halal Travel Blog
Version: 0.1.9
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: halaltravel
License: GPL-2.0-or-later
*/

/* ---------- Design tokens ---------- */
:root {
  --ht-forest: #17382a;
  --ht-forest-2: #214d3a;
  --ht-ivory: #faf6ec;
  --ht-sand: #efe4cb;
  --ht-beige: #d9c9a8;
  --ht-gold: #b8923a;
  --ht-gold-2: #d4ad57;
  --ht-gold-ink: #7a5c12; /* darker gold for text on light backgrounds (AA contrast) */
  --ht-ink: #1c211e;
  --ht-muted: #5c655f;
  --ht-line: #e2d8bf;
  --ht-white: #fff;
  --ht-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --ht-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ht-radius: 14px;
  --ht-shadow: 0 8px 28px rgba(23, 56, 42, .12);
  --ht-wrap: 1180px;
  --ht-gap: clamp(1rem, 2.4vw, 1.75rem);
  --ht-section: clamp(2.75rem, 7vw, 5.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ht-ivory); color: var(--ht-ink);
  font: 17px/1.7 var(--ht-sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ht-forest-2); text-underline-offset: 3px; }
a:hover { color: var(--ht-gold-ink); }
h1, h2, h3, h4 { font-family: var(--ht-serif); line-height: 1.2; color: var(--ht-forest); margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.2em; }
.ht-wrap { width: min(100% - 2rem, var(--ht-wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 999; background: var(--ht-gold); color: #000; padding: .6rem 1rem; clip: auto; width: auto; height: auto; }
:focus-visible { outline: 3px solid var(--ht-gold); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.ht-btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; font: 600 .95rem var(--ht-sans);
  text-decoration: none; background: var(--ht-gold); color: #1a1405; border: 2px solid var(--ht-gold);
  transition: background .2s, color .2s, transform .2s;
}
.ht-btn:hover { background: var(--ht-gold-2); color: #1a1405; transform: translateY(-1px); }
.ht-btn--ghost { background: transparent; color: var(--ht-white); border-color: rgba(255,255,255,.7); }
.ht-btn--ghost:hover { background: var(--ht-white); color: var(--ht-forest); }

/* ---------- Header ---------- */
.ht-topbar { background: var(--ht-forest); color: var(--ht-sand); font-size: .8rem; }
.ht-topbar .ht-wrap { display: flex; justify-content: space-between; padding: .45rem 0; gap: 1rem; }
.ht-header { background: var(--ht-ivory); border-bottom: 1px solid var(--ht-line); position: sticky; top: 0; z-index: 50; }
.ht-header .ht-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.ht-brand { white-space: nowrap; font: 700 1.55rem/1 var(--ht-serif); color: var(--ht-forest); text-decoration: none; letter-spacing: .01em; }
.ht-brand span { color: var(--ht-gold); }
.ht-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.ht-nav a { display: block; padding: .55rem .85rem; color: var(--ht-forest); text-decoration: none; font-weight: 600; font-size: .92rem; border-radius: 999px; }
.ht-nav a:hover, .ht-nav .current-menu-item > a { background: var(--ht-sand); color: var(--ht-forest); }
/* dropdowns: hover, keyboard focus, and always-open on mobile */
.ht-nav li { position: relative; }
.ht-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .4em; height: .4em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
@media (min-width: 1101px) {
  .ht-nav .sub-menu { display: block; position: absolute; left: 0; top: 100%; min-width: 190px; background: var(--ht-white); border: 1px solid var(--ht-line); border-radius: 12px; box-shadow: var(--ht-shadow); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 60; flex-direction: column; }
  .ht-nav li:hover > .sub-menu, .ht-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
  .ht-nav .sub-menu a { border-radius: 8px; font-weight: 500; }
}
@media (max-width: 1100px) { .ht-nav .sub-menu { display: block; padding-left: 1rem; } .ht-nav .menu-item-has-children > a::after { display: none; } }
.ht-burger { display: none; background: none; border: 1px solid var(--ht-line); border-radius: 10px; padding: .55rem .7rem; color: var(--ht-forest); cursor: pointer; }
.ht-burger svg { display: block; }
@media (max-width: 1100px) {
  .ht-burger { display: block; }
  .ht-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ht-ivory); border-bottom: 1px solid var(--ht-line); display: none; padding: .5rem 1rem 1rem; }
  .ht-nav.is-open { display: block; }
  .ht-nav ul { flex-direction: column; }
  .ht-header .ht-wrap { position: relative; }
}

/* ---------- Hero ---------- */
.ht-hero { position: relative; min-height: min(78vh, 640px); display: grid; align-items: end; color: #fff; background: var(--ht-forest) center/cover no-repeat; isolation: isolate; }
.ht-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ht-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,30,21,.25) 0%, rgba(10,30,21,.78) 100%); z-index: -1; }
.ht-hero__inner { padding: clamp(3rem, 8vw, 6rem) 0; max-width: 760px; }
.ht-eyebrow { display: inline-block; font: 700 .75rem var(--ht-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ht-gold-2); margin-bottom: .9rem; }
.ht-hero h1 { color: #fff; }
.ht-hero p { font-size: 1.1rem; max-width: 56ch; color: #f4ecd7; }
.ht-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }

/* ---------- Sections ---------- */
.ht-section { padding: var(--ht-section) 0; }
.ht-section--sand { background: var(--ht-sand); }
.ht-section--forest { background: var(--ht-forest); color: var(--ht-sand); }
.ht-section--forest h2, .ht-section--forest h3 { color: #fff; }
.ht-section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.ht-section__head h2 { margin: 0; }
.ht-section__head p { margin: .3rem 0 0; color: var(--ht-muted); }
.ht-link-more { font-weight: 700; text-decoration: none; color: var(--ht-forest-2); border-bottom: 2px solid var(--ht-gold); }

/* ---------- Grids and cards ---------- */
.ht-grid { display: grid; gap: var(--ht-gap); }
.ht-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ht-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.ht-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.ht-card { background: var(--ht-white); border-radius: var(--ht-radius); overflow: hidden; box-shadow: 0 1px 0 var(--ht-line), 0 6px 18px rgba(23,56,42,.06); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.ht-card:hover { transform: translateY(-3px); box-shadow: var(--ht-shadow); }
.ht-card__img { aspect-ratio: 3 / 2; background: var(--ht-beige); overflow: hidden; }
.ht-card__img img { width: 100%; height: 100%; object-fit: cover; }
.ht-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.ht-card__cat { font: 700 .72rem var(--ht-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ht-gold-ink); text-decoration: none; }
.ht-card h3 { margin: 0; font-size: 1.15rem; }
.ht-card h3 a { color: var(--ht-forest); text-decoration: none; }
.ht-card h3 a::after { content: ""; position: absolute; inset: 0; }
.ht-card { position: relative; }
.ht-card__meta { font-size: .82rem; color: var(--ht-muted); margin-top: auto; }
.ht-card--tile { color: #fff; min-height: 240px; justify-content: end; background: var(--ht-forest) center/cover; isolation: isolate; }
.ht-card--tile .ht-tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ht-card--tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,30,21,.7) 0%, rgba(10,30,21,.35) 45%, rgba(10,30,21,.85) 100%); z-index: -1; }
.ht-card--tile h3 a { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.ht-card--tile .ht-card__meta { text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ht-card--tile .ht-card__meta { color: var(--ht-sand); }
.ht-feature { display: grid; gap: var(--ht-gap); grid-template-columns: 1fr; }
@media (min-width: 900px) { .ht-feature { grid-template-columns: 1.4fr 1fr; } .ht-feature .ht-card:first-child .ht-card__img { aspect-ratio: 16 / 10; } .ht-feature__side { display: grid; gap: var(--ht-gap); } }

/* ---------- Article ---------- */
.ht-article-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; max-width: 820px; }
.ht-article-hero { border-radius: var(--ht-radius); overflow: hidden; margin-bottom: 2rem; }
.ht-article-hero img { width: 100%; max-height: 560px; object-fit: cover; }
.ht-article-meta { color: var(--ht-muted); font-size: .9rem; display: flex; gap: .4rem 1rem; flex-wrap: wrap; }
.ht-layout { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
.ht-layout > * { min-width: 0; }
@media (min-width: 1000px) { .ht-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.ht-content { max-width: 760px; font-size: 1.07rem; }
.ht-content h2 { margin-top: 2.2rem; }
.ht-content img { border-radius: 10px; margin: 1.5rem auto; }
.ht-content figure { margin: 1.5rem 0; }
.ht-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--ht-muted); text-align: center; }
.ht-content blockquote { border-left: 4px solid var(--ht-gold); margin: 1.5rem 0; padding: .2rem 1.2rem; background: var(--ht-sand); border-radius: 0 10px 10px 0; }
.ht-content .alignleft { float: left; margin: .3rem 1.2rem 1rem 0; }
.ht-content .alignright { float: right; margin: .3rem 0 1rem 1.2rem; }
.ht-content .aligncenter { margin-inline: auto; }
.ht-content::after { content: ""; display: block; clear: both; }
.ht-toc { background: var(--ht-white); border: 1px solid var(--ht-line); border-radius: var(--ht-radius); padding: 1rem 1.25rem; margin-bottom: 1.8rem; }
.ht-toc strong { font-family: var(--ht-serif); color: var(--ht-forest); }
.ht-toc ol { margin: .5rem 0 0; padding-left: 1.2rem; }
.ht-crumbs { font-size: .85rem; color: var(--ht-muted); padding-top: 1.2rem; }
.ht-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.ht-crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--ht-beige); }
.ht-crumbs a { color: var(--ht-muted); }
.ht-share { display: flex; gap: .5rem; flex-wrap: wrap; margin: 2rem 0; align-items: center; }
.ht-share a { padding: .45rem .9rem; border: 1px solid var(--ht-line); border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 600; background: var(--ht-white); }
.ht-tags a { display: inline-block; background: var(--ht-sand); padding: .25rem .7rem; border-radius: 999px; font-size: .82rem; text-decoration: none; margin: 0 .3rem .4rem 0; }
.ht-aside .ht-box { background: var(--ht-white); border: 1px solid var(--ht-line); border-radius: var(--ht-radius); padding: 1.2rem; margin-bottom: 1.2rem; }
.ht-disclosure { font-size: .82rem; color: var(--ht-muted); border-top: 1px solid var(--ht-line); margin-top: 2rem; padding-top: 1rem; }
.ht-updated { background: var(--ht-sand); border-radius: 8px; padding: .5rem .9rem; font-size: .85rem; display: inline-block; }

/* ---------- Footer ---------- */
.ht-footer { background: var(--ht-forest); color: var(--ht-sand); padding: 3.5rem 0 1.5rem; margin-top: 0; }
.ht-footer h4 { color: #fff; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--ht-sans); }
.ht-footer a { color: var(--ht-sand); text-decoration: none; }
.ht-footer a:hover { color: var(--ht-gold-2); }
.ht-footer ul { list-style: none; padding: 0; margin: 0; }
.ht-footer li { margin: .35rem 0; }
.ht-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ht-footer__base { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .82rem; color: #c9bf9f; }

/* ---------- Misc ---------- */
.ht-search-form { display: flex; gap: .5rem; }
.ht-search-form input[type=search] { flex: 1; padding: .8rem 1rem; border-radius: 999px; border: 1px solid var(--ht-line); font: inherit; background: #fff; }
.ht-pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.ht-pagination .page-numbers { padding: .5rem .9rem; border: 1px solid var(--ht-line); border-radius: 999px; text-decoration: none; background: #fff; }
.ht-pagination .current { background: var(--ht-forest); color: #fff; border-color: var(--ht-forest); }
.ht-page-head { background: var(--ht-sand); padding: clamp(2rem, 6vw, 4rem) 0; margin-bottom: 2.5rem; }
.ht-page-head p { color: var(--ht-muted); max-width: 60ch; margin: 0; }
.ht-notice { background: var(--ht-white); border: 1px dashed var(--ht-gold); border-radius: var(--ht-radius); padding: 1rem 1.2rem; color: var(--ht-muted); }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: #fff; border: 1px solid var(--ht-line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond input[type=url], .comment-respond textarea { width: 100%; padding: .7rem .9rem; border: 1px solid var(--ht-line); border-radius: 10px; font: inherit; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Topic chips ---------- */
.ht-chips { background: var(--ht-ivory); border-bottom: 1px solid var(--ht-line); }
.ht-chips .ht-wrap { display: flex; gap: .6rem; flex-wrap: wrap; padding: 1rem 0; align-items: center; }
.ht-chips strong { font: 700 .75rem var(--ht-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ht-muted); margin-right: .4rem; }
.ht-chip { padding: .45rem 1rem; border: 1px solid var(--ht-beige); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--ht-forest); background: var(--ht-white); }
.ht-chip:hover { background: var(--ht-forest); color: #fff; border-color: var(--ht-forest); }

/* ---------- Search form ---------- */
.ht-search-form { display: flex; gap: .5rem; max-width: 520px; }
.ht-search-form input[type=search] { flex: 1; min-width: 0; padding: .75rem 1.1rem; border-radius: 999px; border: 1px solid var(--ht-beige); font: inherit; background: #fff; color: var(--ht-ink); }
.ht-search-form button { padding: .75rem 1.3rem; border-radius: 999px; border: 0; background: var(--ht-forest); color: #fff; font: 600 .92rem var(--ht-sans); cursor: pointer; }
.ht-search-form button:hover { background: var(--ht-forest-2); }
.ht-aside .ht-search-form { max-width: none; }
.ht-aside .ht-search-form button { padding-inline: 1rem; }

/* ---------- Mobile hardening (old content contains fixed-width embeds, tables and tiny headings) ---------- */
.ht-content { overflow-wrap: anywhere; }
.ht-content iframe, .ht-content embed, .ht-content object, .ht-content video { max-width: 100%; }
.ht-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.ht-content td, .ht-content th { border: 1px solid var(--ht-line); padding: .35rem .6rem; }
.ht-content pre { max-width: 100%; overflow-x: auto; }
.ht-content img { max-width: 100%; height: auto; }
.ht-content h5, .ht-content h6 { font-size: 1rem; font-family: var(--ht-sans); }
.ht-card__cat, .ht-eyebrow { font-size: .76rem; }
/* comfortable tap targets (44px guideline) for navigation-type links */
.ht-brand { display: inline-block; padding: .7rem 0; }
/* The site logo is white artwork on black, so the header bar is black to match it. */
.custom-logo-link { display: inline-flex; align-items: center; line-height: 0; margin: .4rem 0; }
.custom-logo-link img { display: block; height: auto; width: auto; max-height: 48px; max-width: 100%; }
.ht-header { background: #1f1f1f; border-bottom-color: #1f1f1f; }
.ht-header .ht-brand { color: #fff; }
.ht-nav a { color: #fff; }
.ht-nav a:hover, .ht-nav .current-menu-item > a { background: rgba(255, 255, 255, .16); color: #fff; }
.ht-burger { color: #fff; border-color: rgba(255, 255, 255, .4); }
@media (max-width: 1100px) { .ht-nav { background: #1f1f1f; border-bottom-color: #1f1f1f; } }
@media (min-width: 1101px) { .ht-nav .sub-menu a { color: var(--ht-forest); } .ht-nav .sub-menu a:hover { background: var(--ht-sand); color: var(--ht-forest); } }
.ht-crumbs a { display: inline-block; padding: .55rem .25rem; }
.ht-crumbs li { display: flex; align-items: center; }
.ht-footer li a { display: inline-block; padding: .45rem 0; }
a.ht-eyebrow { padding: .55rem 0; margin-bottom: 0; }
.ht-tags a { padding: .55rem .9rem; margin: 0 .4rem .5rem 0; }
.ht-share a { padding: .65rem 1rem; }
.ht-nav a { padding: .8rem .95rem; }
.ht-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 1101px) { .ht-nav a { padding: .55rem .85rem; } }

.comment-respond input[type=submit], .comment-respond button[type=submit] { min-height: 44px; padding: .75rem 1.5rem; border: 0; border-radius: 999px; background: var(--ht-forest); color: #fff; font: 600 .95rem var(--ht-sans); cursor: pointer; }
.comment-respond input[type=submit]:hover { background: var(--ht-forest-2); }
.ht-crumbs a { padding: .7rem .25rem; }
/* Third level (country flyout beside the region) on wide screens */
@media (min-width: 1101px) {
  .ht-nav .sub-menu .sub-menu { left: calc(100% + 4px); top: -.4rem; }
  .ht-nav .sub-menu .menu-item-has-children > a::after { transform: rotate(-45deg); float: right; margin-top: .45em; }
}

/* Contact Form 7 */
.wpcf7 form p { margin: 0 0 1.1rem; }
.wpcf7 label { display: block; font-weight: 600; color: var(--ht-forest); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="url"], .wpcf7 textarea {
  display: block; width: 100%; max-width: 640px; margin-top: .35rem; padding: .75rem 1rem; font: inherit; color: var(--ht-ink);
  background: var(--ht-white); border: 1px solid var(--ht-beige); border-radius: 10px;
}
.wpcf7 textarea { min-height: 9rem; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 3px solid var(--ht-gold); outline-offset: 1px; border-color: var(--ht-gold); }
.wpcf7 input[type="submit"] { padding: .8rem 1.75rem; border: 2px solid var(--ht-gold); border-radius: 999px; background: var(--ht-gold); color: #1a1405; font: 600 .95rem var(--ht-sans); cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--ht-gold-2); }
.wpcf7-not-valid-tip, .wpcf7 form .wpcf7-response-output { font-size: .9rem; }

/* Standard post building blocks (see includes/editor-standards.php) */
.ht-content .wp-block-group.is-style-ht-callout { background: var(--ht-white); border: 1px solid var(--ht-line); border-left: 5px solid var(--ht-gold); border-radius: var(--ht-radius); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.ht-content .wp-block-group.is-style-ht-callout > :first-child { margin-top: 0; }
.ht-content .wp-block-group.is-style-ht-callout > :last-child { margin-bottom: 0; }
.ht-content .wp-block-group.is-style-ht-callout h3 { font-size: 1.15rem; }
.ht-content .wp-block-columns { gap: 1.25rem; margin: 1.5rem 0; }
.ht-content .wp-block-columns .wp-block-image { margin: 0; }
.ht-content .wp-block-image img { height: auto; }
