/* ============================================================
   Traveronto — global.css
   Global tokens, resets, typography, buttons, cards, helpers
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #E74E35;
  --primary-dark: #c93d26;
  --dark: #1A1A2E;
  --dark-soft: #25253f;
  --light: #F5F5F5;
  --white: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6b6b7b;
  --border: #e7e7ec;
  --gold: #f5a623;
  --green: #1f9d57;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
  --transition: 0.2s ease;

  --container-max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Prevent any horizontal scroll/overflow site-wide */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Media never overflows its column */
img, svg, video, iframe { max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.15;
  color: var(--dark);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 48px); }
h2 { font-size: clamp(1.5rem, 3.5vw, 32px); }
h3 { font-size: clamp(1.15rem, 2vw, 22px); }
small, .small { font-size: 13px; }

p { color: var(--text-muted); overflow-wrap: break-word; }

/* Consistent section heading scale (BUG 7) */
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; color: var(--dark); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

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

.container-tr {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Section rhythm ---------- */
.section {
  padding-top: 80px;
  padding-bottom: 80px;
}
.section-sm {
  padding-top: 56px;
  padding-bottom: 56px;
}

.section-head {
  margin-bottom: 48px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-head p {
  font-size: 18px;
  margin-top: 12px;
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */
.btn-tr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-tr:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231, 78, 53, 0.28);
}
.btn-tr:focus-visible { outline: 3px solid rgba(231, 78, 53, 0.4); outline-offset: 2px; }

.btn-tr-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-tr-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-tr-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.btn-tr-light:hover {
  background: var(--white);
  color: var(--dark);
  border-color: var(--white);
}

.btn-tr-block { width: 100%; }

/* ---------- Cards ---------- */
.card-tr {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.card-tr.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ---------- Badges ---------- */
.badge-tr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.badge-soft { background: rgba(231, 78, 53, 0.1); color: var(--primary); }
.badge-score { background: var(--dark); color: #fff; padding: 6px 10px; border-radius: 8px; }

/* ---------- Utility ---------- */
.bg-light-tr { background: var(--light); }
.bg-dark-tr { background: var(--dark); color: #fff; }
.bg-primary-tr { background: var(--primary); color: #fff; }
.text-primary-tr { color: var(--primary) !important; }
.text-muted-tr { color: var(--text-muted) !important; }
.fw-900 { font-weight: 900; }

.bg-dark-tr h1, .bg-dark-tr h2, .bg-dark-tr h3 { color: #fff; }
.bg-dark-tr p { color: rgba(255, 255, 255, 0.72); }

/* Image placeholder fallback (when picsum is offline) */
.img-cover { width: 100%; height: 100%; object-fit: cover; background: linear-gradient(135deg, #e9e9ef, #d6d6e0); }

/* Focus visibility globally */
:focus-visible { outline: 3px solid rgba(231, 78, 53, 0.45); outline-offset: 2px; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Responsive type + section padding */
@media (max-width: 768px) {
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
  .section { padding-top: 48px; padding-bottom: 48px; }
  .section-sm { padding-top: 36px; padding-bottom: 36px; }
  .section-head { margin-bottom: 32px; }
  .container-tr { padding-left: 18px; padding-right: 18px; }
}

/* ── Page Hero (inner pages via box-hero.blade.php) ─────────────────── */
.tr-page-hero {
  position: relative;
  background: var(--dark);
  background-size: cover;
  background-position: center;
  padding: 120px 0 60px;
  text-align: center;
  color: #fff;
}
.tr-page-hero__title {
  color: #fff;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  margin-bottom: 14px;
}
.tr-breadcrumb {
  justify-content: center;
  background: transparent;
  padding: 0;
  margin: 0;
}
.tr-breadcrumb .breadcrumb-item a { color: rgba(255,255,255,0.80); text-decoration: none; }
.tr-breadcrumb .breadcrumb-item a:hover { color: #fff; }
.tr-breadcrumb .breadcrumb-item.active { color: var(--primary); }
.tr-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.50); }
@media (max-width: 767px) {
  .tr-page-hero { padding: 100px 0 48px; }
}

/* ── Traveronto: kill any body/wrapper top space injected by Mytravel compat CSS ── */
body,
html { margin-top: 0 !important; padding-top: 0 !important; }
.bravo_wrap { margin-top: 0 !important; padding-top: 0 !important; }
/* page-template-content must flush to top so hero starts at top of viewport */
.page-template-content { margin-top: 0 !important; padding-top: 0 !important; }


/* ============================================================
   Typeahead loading indicator (.ta-loader)
   A small spinning arc shown inside the right edge of any
   typeahead / autocomplete input while results are loading.
   Theme color: var(--primary) = #E74E35
   ============================================================ */

/* Wrapper that holds both the input and the loader icon —
   must be position:relative so the loader can be anchored. */
.ta-loader-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* ── Base spinner — used inside position:relative wrappers ── */
.ta-loader {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border: 2px solid rgba(231, 78, 53, 0.20);   /* faint primary ring  */
  border-top-color: var(--primary);             /* solid primary arc   */
  border-radius: 50%;
  pointer-events: none;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
  /* spin is applied only when active — avoids animating a hidden element */
}

/* Visible + spinning state — JS adds this class */
.ta-loader.ta-loader-active {
  opacity: 1;
  animation: ta-spin 0.65s linear infinite;
}

@keyframes ta-spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

/* When the loader is visible, pull the input text away from the
   right edge so it never sits behind the spinner */
.ta-loader-wrap .ta-loader.ta-loader-active ~ input,
.ta-loader-wrap input.has-ta-loader {
  padding-right: 34px !important;
}

/* ── Flight city inputs (.hdr-city-inp-wrap) ──
   The wrapper already uses display:flex and position:relative.
   Spinner overlays the right edge; right:36px leaves room for
   the chevron (which is already hidden on home via
   .home-flight-form-wrap, and hidden globally below). */
.hdr-city-inp-wrap {
  position: relative;
}
.hdr-city-inp-wrap .ta-loader {
  right: 8px;
}

/* The trigger <input> IS the searchable field — the chevron
   reads as a <select> affordance and is redundant.
   Hide it globally; .home-flight-form-wrap already hides it
   for the homepage context. */
.hdr-city-inp-wrap .chev {
  display: none !important;
}

/* ── Hotel destination (.control-icon-wrap) ── */
.control-icon-wrap {
  position: relative;
}
.control-icon-wrap .ta-loader {
  right: 10px;
}

/* ── Hotel search page (legacy Bootstrap input-group) ──
   input-group uses display:flex but is NOT position:relative
   by default (Bootstrap sets it), so we can still use absolute.
   Place the spinner at the right end, vertically centred. */
.input-group {
  position: relative;
}
.input-group > .ta-loader {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border: 2px solid rgba(231, 78, 53, 0.20);
  border-top-color: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 5;
}
.input-group > .ta-loader.ta-loader-active {
  opacity: 1;
  animation: ta-spin 0.65s linear infinite;
}
