/*
Theme Name: Oytel for Divi
Theme URI: https://oytel.link
Author: Oytel
Author URI: https://oytel.link
Description: Per-region themed Oytel travel intelligence child theme for Divi. Detects domain (oytel.asia/eu/us/link/co.uk) and applies the correct regional design tokens. Design system sourced from WHYBLE_NODE packages/oytel.
Template: Divi
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oytel-divi
Tags: child-theme, divi, oytel, travel, responsive, multi-domain
*/

/* ================================================================
   OYTEL DESIGN SYSTEM v2.0.0
   Per-region tokens are injected inline by functions.php
   (oytel_divi_generate_token_css). This file provides structural
   styles that work with any regional color palette.

   Source: WHYBLE_NODE packages/oytel/static/css/
   ================================================================ */

/* Reset & Base */
.oytel-theme {
  background: var(--oytel-color-surface-canvas, #ffffff);
  color: var(--oytel-color-text-primary, #0d1b1e);
  font-family: var(--oytel-font-interface, Inter, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.oytel-theme * {
  box-sizing: border-box;
}

/* Container */
.oytel-container {
  width: min(calc(100% - 48px), var(--oytel-container-max, 1280px));
  margin-inline: auto;
}

/* Section */
.oytel-section {
  padding-block: var(--oytel-section-space, clamp(1rem, 3vw, 2rem));
}

.oytel-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--oytel-card-gap, 1.25rem);
  color: var(--oytel-color-text-primary);
}

/* ================================================================
   HERO — from components/hero/hero.css
   ================================================================ */
.oytel-hero {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: var(--oytel-hero-min-height, 560px);
  box-sizing: border-box;
  padding: 0;
  background: var(--oytel-color-shell-dark, #071f26);
  color: #fff;
  overflow: hidden;
}

.oytel-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(31, 166, 156, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(10, 79, 70, 0.08) 0%, transparent 45%);
  pointer-events: none;
}

.oytel-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--oytel-container-max, 1280px);
  margin: 0 auto;
  padding-top: clamp(24px, 3vh, 36px);
  padding-bottom: clamp(32px, 4vh, 56px);
  box-sizing: border-box;
  animation: oytel-hero-reveal 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes oytel-hero-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.oytel-eyebrow {
  margin: 0 0 8px;
  color: var(--oytel-color-brand-primary);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.oytel-hero .oytel-eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.oytel-hero__content h1 {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0;
  color: inherit;
  max-width: 100%;
}

.oytel-hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  margin: 0.5rem 0 0;
  max-width: 52ch;
}

/* Hero tabs */
.oytel-hero__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.oytel-hero__tab {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border: 1px solid currentColor;
  border-radius: var(--oytel-radius-pill, 9999px);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease;
}

.oytel-hero__tab.is-active,
.oytel-hero__tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

/* Hero search */
.oytel-hero__search {
  margin-top: 1rem;
  width: 100%;
  max-width: 900px;
}

.oytel-search-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--oytel-radius-card, 0.875rem);
  box-shadow: var(--oytel-shadow-hero, 0 24px 60px rgba(7, 31, 38, 0.18));
}

.oytel-search-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.oytel-search-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--oytel-color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.oytel-search-field input,
.oytel-search-field select {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--oytel-color-border-default);
  border-radius: var(--oytel-radius-control, 0.625rem);
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  color: var(--oytel-color-text-primary);
  outline: none;
  transition: border-color 150ms ease;
}

.oytel-search-field input:focus,
.oytel-search-field select:focus {
  border-color: var(--oytel-color-focus-ring);
}

/* Quick routes chips */
.oytel-hero__quick-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.oytel-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: var(--oytel-radius-pill, 9999px);
  background: var(--oytel-color-surface-card);
  border: 1px solid var(--oytel-color-border-default);
  color: var(--oytel-color-text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.oytel-chip:hover {
  background: var(--oytel-color-surface-muted);
}

.oytel-hero .oytel-chip {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.oytel-hero .oytel-chip:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ================================================================
   BUTTONS — from oytel.css
   ================================================================ */
.oytel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--oytel-radius-button, 0.625rem);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--oytel-color-brand-primary);
  color: var(--oytel-color-text-inverse);
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.oytel-button:hover {
  background: color-mix(in srgb, var(--oytel-color-brand-primary) 88%, black);
}

.oytel-button--primary {
  background: var(--oytel-color-brand-primary);
  color: var(--oytel-color-text-inverse);
}

.oytel-button--secondary {
  background: var(--oytel-color-surface-muted);
  color: var(--oytel-color-text-primary);
  border-color: var(--oytel-color-border-default);
}

.oytel-button--ghost {
  background: transparent;
  color: var(--oytel-color-brand-primary);
  border: 1px solid var(--oytel-color-border-default);
}

/* ================================================================
   CARDS — from oytel.css
   ================================================================ */
.oytel-card {
  background: var(--oytel-color-surface-card);
  color: var(--oytel-color-text-primary);
  border: 1px solid var(--oytel-color-border-muted);
  border-radius: var(--oytel-radius-card, 0.875rem);
  box-shadow: var(--oytel-shadow-card);
  overflow: hidden;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.oytel-card:hover {
  box-shadow: var(--oytel-shadow-card-hover);
  transform: translateY(-2px);
}

.oytel-destination-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.oytel-destination-card__body {
  padding: 1.25rem;
}

.oytel-destination-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.oytel-destination-card__meta {
  font-size: 0.875rem;
  color: var(--oytel-color-text-secondary);
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* ================================================================
   WHY OYTEL — from homepage.py OytelWhyOytel
   ================================================================ */
.oytel-why {
  background: var(--oytel-color-surface-muted);
}

.oytel-why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--oytel-card-gap, 1.25rem);
}

.oytel-why__item {
  padding: 1.5rem;
  background: var(--oytel-color-surface-card);
  border-radius: var(--oytel-radius-card, 0.875rem);
  border: 1px solid var(--oytel-color-border-muted);
}

.oytel-why__item h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--oytel-color-brand-primary);
}

.oytel-why__item p {
  font-size: 0.9375rem;
  color: var(--oytel-color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ================================================================
   REGIONAL HERO OVERLAYS — from themes/asia.css, eu.css, us.css, link.css
   ================================================================ */
[data-theme="oytel-asia"] .oytel-hero {
  background:
    linear-gradient(100deg, rgba(45, 212, 191, 0.35) 0%, rgba(45, 212, 191, 0) 60%),
    var(--oytel-color-shell-dark);
}

[data-theme="oytel-eu"] .oytel-hero {
  background:
    linear-gradient(100deg, rgba(30, 64, 175, 0.35) 0%, rgba(30, 64, 175, 0) 60%),
    var(--oytel-color-shell-dark);
}

[data-theme="oytel-us"] .oytel-hero {
  background:
    linear-gradient(100deg, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0) 60%),
    var(--oytel-color-shell-dark);
}

[data-theme="oytel-link"] .oytel-hero {
  background:
    linear-gradient(100deg, rgba(11, 129, 122, 0.35) 0%, rgba(11, 129, 122, 0) 60%),
    var(--oytel-color-shell-dark);
}

/* ================================================================
   DIVI OVERRIDES — make Divi respect Oytel tokens
   ================================================================ */
.oytel-theme #main-header,
.oytel-theme #top-header {
  font-family: var(--oytel-font-interface, Inter, system-ui, sans-serif);
}

.oytel-theme #main-header {
  background: var(--oytel-color-surface-card, #ffffff);
  border-bottom: 1px solid var(--oytel-color-border-muted);
}

.oytel-theme #main-header a {
  color: var(--oytel-color-text-primary, #0d1b1e);
}

.oytel-theme .et_pb_button {
  border-radius: var(--oytel-radius-button, 0.625rem);
  font-family: var(--oytel-font-interface, Inter, system-ui, sans-serif);
  font-weight: 700;
}

.oytel-theme h1,
.oytel-theme h2,
.oytel-theme h3,
.oytel-theme h4,
.oytel-theme h5,
.oytel-theme h6 {
  font-family: var(--oytel-font-interface, Inter, system-ui, sans-serif);
  letter-spacing: -0.02em;
}

.oytel-theme a {
  color: var(--oytel-color-brand-primary);
}

.oytel-theme a:hover {
  color: var(--oytel-color-brand-accent);
}

.oytel-theme #footer-bottom {
  background: var(--oytel-color-shell-dark, #071f26);
  color: rgba(255, 255, 255, 0.7);
}

.oytel-theme #footer-bottom a {
  color: rgba(255, 255, 255, 0.85);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .oytel-search-row {
    grid-template-columns: 1fr 1fr;
  }

  .oytel-search-row .oytel-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .oytel-hero {
    min-height: auto;
    padding: 0 var(--oytel-section-space, 1rem) var(--oytel-section-space, 2rem);
  }

  .oytel-hero__content h1 {
    font-size: clamp(1.25rem, 5.5vw, 2rem);
  }

  .oytel-search-row {
    grid-template-columns: 1fr;
  }

  .oytel-why__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .oytel-hero {
    position: sticky;
    top: 0;
    height: 650px;
  }
}

/* ================================================================
   ACCESSIBILITY — from foundation/accessibility.css
   ================================================================ */
:focus-visible {
  outline: 2px solid var(--oytel-color-focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
