/*
 * layout.css — Page-specific layouts
 *
 * Depends on: tokens.css, base.css, components.css (must be loaded first)
 *
 * Contents:
 *   1.  Section variants (surface, teal-light)
 *   2.  Hero
 *   3.  How it works (steps)
 *   4.  Benefits grid (Why OOE)
 *   5.  Booking form section
 *   6.  Specialisations grid
 *   7.  Testimonials (hidden)
 *   8.  Contact strip
 *   9.  About page
 *   10. Contact page
 *   11. Legal pages (Privacy, Terms)
 */


/* ══════════════════════════════════════════════════════════════════
   1. SECTION VARIANTS
   ══════════════════════════════════════════════════════════════════ */

.section--surface {
  background-color: var(--color-surface);
}

.section--teal-light {
  background-color: var(--color-primary-light);
}

.section--dark {
  background-color: var(--color-primary);
  color: #ffffff;
}

.section--dark .section-title,
.section--dark h2,
.section--dark h3 {
  color: #ffffff;
}

.section--dark p {
  color: rgba(255, 255, 255, 0.85);
}


/* ══════════════════════════════════════════════════════════════════
   2. HERO
   ══════════════════════════════════════════════════════════════════ */

.hero {
  background-color: #134659;
  background-image:
    linear-gradient(155deg, rgba(10, 46, 63, 0.82) 0%, rgba(19, 70, 89, 0.68) 40%, rgba(27, 95, 122, 0.58) 100%),
    url('../images/hero_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-block: 2.5rem;
  color: #ffffff;
}

@media (min-width: 1024px) {
  .hero {
    padding-block: var(--space-12);
    min-height: 45vh;
    display: flex;
    align-items: center;
  }
}

.hero__inner {
  max-width: 44rem;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 700;
  color: #ffffff;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.hero__subhead {
  font-size: var(--text-lead);
  color: rgba(255, 255, 255, 0.82);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-8);
  max-width: 42rem;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero__phone {
  display: inline-block;
  font-size: var(--text-small);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero__phone:hover,
.hero__phone:visited {
  color: #ffffff;
  text-decoration: underline;
}


/* ══════════════════════════════════════════════════════════════════
   3. HOW IT WORKS (STEPS)
   ══════════════════════════════════════════════════════════════════ */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10, 2.5rem);
  list-style: none;
  padding: 0;
  counter-reset: steps;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    position: relative;
  }

  /* Connector line between steps */
  .steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(16.66% + 24px);
    right: calc(16.66% + 24px);
    height: 2px;
    background: repeating-linear-gradient(
      to right,
      var(--color-border) 0,
      var(--color-border) 8px,
      transparent 8px,
      transparent 16px
    );
    pointer-events: none;
  }
}

.step {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Mobile: horizontal layout per step */
@media (max-width: 767px) {
  .step {
    flex-direction: row;
    gap: var(--space-4);
    align-items: flex-start;
  }
  .step__icon-wrap {
    flex-shrink: 0;
  }
}

.step__icon-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  background-color: var(--color-primary-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.step__icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.step__num {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background-color: var(--color-accent);
  color: var(--color-text);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.step__content {
  flex: 1;
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.step__body {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}


/* ══════════════════════════════════════════════════════════════════
   4. BENEFITS GRID (WHY OOE)
   ══════════════════════════════════════════════════════════════════ */

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ══════════════════════════════════════════════════════════════════
   5. BOOKING FORM SECTION
   ══════════════════════════════════════════════════════════════════ */

#booking-form {
  scroll-margin-top: 80px; /* offset for sticky nav if added later */
}

.form-section-header {
  margin-bottom: var(--space-8);
}

.form-section-header .section-title {
  text-align: left;
}

.form-section-header .section-subtitle {
  text-align: left;
}

/* Form vertical rhythm */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  background-color: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .booking-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    padding: var(--space-8);
  }

  /* Row 1: name (col 1) | email (col 2) | phone (col 3) */
  .booking-form .form-group:has(#email) { grid-column: 2; }
  .booking-form .form-group:has(#phone) { grid-column: 3; }

  /* Row 2: contact method (cols 1–2) | trip type (col 3, auto-placed) */
  .booking-form .form-fieldset:has([name="contact_method"]) { grid-column: span 2; }

  /* Full-width: conditional sections, traveller row, travel class, notes, submit */
  .booking-form #fields-oneway,
  .booking-form #fields-return,
  .booking-form #fields-multicity,
  .booking-form .form-row--3,
  .booking-form .form-group:has(#travel-class),
  .booking-form .form-group:has(#notes),
  .booking-form .form-group:has(#booking-submit) {
    grid-column: 1 / -1;
  }
}

/* Submit button — full width on mobile, auto on desktop */
#booking-submit {
  width: 100%;
}

@media (min-width: 640px) {
  #booking-submit {
    width: auto;
    min-width: 220px;
  }
}

/* Conditional trip-type field groups */
.form-conditional {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Multi-city legs — built in Phase 5 */
.leg-group {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  position: relative;
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .leg-group {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
  }
}

.leg-group__label {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  grid-column: 1 / -1;
  margin-bottom: var(--space-2);
}

.legs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.leg-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Form row — two fields side by side on tablet+ */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-row--3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .form-row--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Thank-you state (replaces form after successful submission) */
.form-thankyou {
  display: none;
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

.form-thankyou.is-visible {
  display: block;
}

.form-thankyou__icon {
  width: 64px;
  height: 64px;
  color: var(--color-success);
  margin: 0 auto var(--space-6);
}

.form-thankyou__heading {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.form-thankyou__body {
  font-size: var(--text-lead);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  max-width: 36rem;
  margin-inline: auto;
}


/* ══════════════════════════════════════════════════════════════════
   6. SPECIALISATIONS GRID
   ══════════════════════════════════════════════════════════════════ */

.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .spec-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.spec-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-bg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.spec-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Image placeholder — replace with real <img> in Phase 9 */
.spec-card__image {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.spec-card__image--iraq {
  background: linear-gradient(135deg, #0D3446 0%, #1B5F7A 100%);
}

.spec-card__image--uae {
  background: linear-gradient(135deg, #1B4F7A 0%, #2980b9 100%);
}

.spec-card__image--world {
  background: linear-gradient(135deg, #134659 0%, #1B7A6A 100%);
}

.spec-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spec-card__image-icon {
  color: rgba(255, 255, 255, 0.35);
  width: 72px;
  height: 72px;
}

.spec-card__body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.spec-card__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  line-height: var(--leading-snug);
}

.spec-card__text {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  flex: 1;
}


/* ══════════════════════════════════════════════════════════════════
   7. TESTIMONIALS (HIDDEN)
   ══════════════════════════════════════════════════════════════════ */

.testimonials {
  /* Hidden until testimonials are collected.
     To enable: remove the display:none in the HTML. */
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial {
  background-color: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.testimonial__quote {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  font-style: italic;
}

.testimonial__quote::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-accent);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-2);
}

.testimonial__author strong {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  font-size: var(--text-body);
}

.testimonial__author span {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}


/* ══════════════════════════════════════════════════════════════════
   9. ABOUT PAGE
   ══════════════════════════════════════════════════════════════════ */

.page-hero {
  background-color: var(--color-primary-light);
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}

.page-hero__label {
  margin-bottom: var(--space-3);
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.page-hero__lead {
  font-size: var(--text-lead);
  color: var(--color-text-muted);
  max-width: 44rem;
  line-height: var(--leading-normal);
}

@media (min-width: 1024px) {
  .page-hero {
    padding-block: var(--space-16);
  }
}

/* About page body prose sections */
.prose-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.prose-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.prose-section p {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.prose-section p:last-child {
  margin-bottom: 0;
}

.prose-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.prose-section ul li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.prose-section ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.55em;
}

/* Credentials block */
.credentials-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.credential {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent);
}

.credential__icon {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.credential__title {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.credential__body {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

/* CTA strip */
.cta-strip {
  background-color: var(--color-primary);
  padding-block: var(--space-16);
  text-align: center;
  color: #ffffff;
}

.cta-strip h2 {
  font-family: var(--font-display);
  color: #ffffff;
  font-size: var(--text-h2);
  margin-bottom: var(--space-4);
}

.cta-strip p {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: var(--space-8);
  font-size: var(--text-lead);
}

/* Team section (hidden until populated) */
.team {
  /* To enable: remove display:none in HTML */
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-6);
}

.team-member__photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.team-member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member__name {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.team-member__role {
  font-size: var(--text-small);
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.team-member__bio {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}


/* ══════════════════════════════════════════════════════════════════
   10. CONTACT PAGE
   ══════════════════════════════════════════════════════════════════ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
  }
}

.contact-detail-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.contact-detail__icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-detail__label {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-1);
}

.contact-detail__value {
  color: var(--color-text);
  line-height: var(--leading-normal);
}

.contact-detail__value a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-detail__value a:hover {
  text-decoration: underline;
}

.contact-detail__value p {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  margin-top: var(--space-1);
}


/* Contact form heading and intro */
.contact-form-heading {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.contact-form-intro {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.contact-form-intro a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Submit button full-width on mobile */
#contact-submit {
  width: 100%;
}

@media (min-width: 640px) {
  #contact-submit {
    width: auto;
    min-width: 180px;
  }
}


/* ══════════════════════════════════════════════════════════════════
   11. LEGAL PAGES (PRIVACY, TERMS)
   ══════════════════════════════════════════════════════════════════ */

.legal-page {
  padding-block: var(--space-16);
}

.legal-header {
  margin-bottom: 2.5rem;
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.legal-header .last-updated {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}

/* Body sections */
.legal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.legal-body h2 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.legal-body p {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.legal-body p:last-child {
  margin-bottom: 0;
}

.legal-body ul,
.legal-body ol {
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.legal-body li {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.legal-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.legal-body a {
  color: var(--color-primary);
  text-decoration: underline;
}
