/* =============================================================
   OneDream Travel — Custom CSS
   Tailwind handles utilities; this file covers:
   - CSS variables
   - Animations & keyframes
   - Custom component classes
   - Navbar scroll behavior
   ============================================================= */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --odt-blue:       #002168;
  --odt-blue-light: #1e4a8c;
  --odt-gold:       #feba02;
  --odt-gold-light: #feb662;
}

/* ── Navbar — always white (matching original design) ───────── */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.app-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 33, 104, 0.12);
}

/* Dropdown menus */
.dropdown-menu {
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.group:hover .dropdown-menu {
  transform: translateY(0);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes starPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.2); opacity: 0.8; }
}

@keyframes dotFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes dreamPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 186, 2, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(254, 186, 2, 0); }
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Animation utility classes ──────────────────────────────── */
.animate-fade-in  { animation: fadeIn  0.6s ease-out both; }
.animate-slide-up { animation: slideUp 0.6s ease-out both; }

/* ── Logo animations ────────────────────────────────────────── */

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInGlobe {
  from { opacity: 0; transform: scale(0.8) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes dotMovePath {
  0%   { transform: translate(1px,  3px);  opacity: 0.3; }
  8%   { transform: translate(3px,  2px);  opacity: 0.8; }
  15%  { transform: translate(6px,  1px);  opacity: 1;   }
  25%  { transform: translate(10px,-1px);  opacity: 1;   }
  35%  { transform: translate(14px,-3px);  opacity: 1;   }
  45%  { transform: translate(18px,-5px);  opacity: 1;   }
  55%  { transform: translate(21px,-7px);  opacity: 1;   }
  65%  { transform: translate(24px,-9px);  opacity: 0.9; }
  75%  { transform: translate(26px,-11px); opacity: 0.7; }
  85%  { transform: translate(28px,-13px); opacity: 0.4; }
  95%  { transform: translate(30px,-15px); opacity: 0.1; }
  100% { transform: translate(31px,-16px); opacity: 0;   }
}

@keyframes dotMovePathFast {
  0%   { transform: translate(1px,  3px);  opacity: 0.3; }
  10%  { transform: translate(4px,  1px);  opacity: 1;   }
  20%  { transform: translate(8px, -1px);  opacity: 1;   }
  30%  { transform: translate(12px,-3px);  opacity: 1;   }
  40%  { transform: translate(16px,-5px);  opacity: 1;   }
  50%  { transform: translate(20px,-7px);  opacity: 1;   }
  60%  { transform: translate(23px,-9px);  opacity: 1;   }
  70%  { transform: translate(26px,-11px); opacity: 0.8; }
  80%  { transform: translate(28px,-13px); opacity: 0.5; }
  90%  { transform: translate(30px,-15px); opacity: 0.2; }
  100% { transform: translate(31px,-16px); opacity: 0;   }
}

@keyframes fadeInTagline {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes professionalPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1);   opacity: 0.1; }
  50%       { transform: translate(-50%,-50%) scale(1.1); opacity: 0.2; }
}

.animated-logo {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.logo-svg {
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  filter: drop-shadow(0 4px 12px rgba(0,33,104,0.15));
}

.animated-logo:hover .logo-svg {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 20px rgba(0,33,104,0.25));
}

/* Logo text paths: staggered fade-in */
.logo-text path {
  animation: fadeInText 2s ease-out both;
}
.logo-text path:nth-child(2) { animation-delay: 0.2s; }
.logo-text path:nth-child(3) { animation-delay: 0.4s; }
.logo-text path:nth-child(4) { animation-delay: 0.6s; }

/* Globe */
.logo-globe > path {
  animation: fadeInGlobe 1.5s ease-out both;
}

/* Moving gold dot across globe */
.moving-dot {
  animation: dotMovePath 5s ease-in-out infinite;
}
.animated-logo:hover .moving-dot {
  animation: dotMovePathFast 2.5s ease-in-out infinite;
}

/* Golden star pulse */
.golden-star {
  animation: starPulse 2s ease-in-out infinite;
  transform-origin: center;
}

/* Tagline slide-in */
.tagline-text path {
  animation: fadeInTagline 2.5s ease-out both;
}

/* Professional glow on hover */
.professional-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(254,186,2,0.1) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.animated-logo:hover .professional-glow {
  opacity: 1;
  animation: professionalPulse 2s ease-in-out infinite;
}

.star-dot { animation: starPulse 2s ease-in-out infinite; }

/* ── Dream button pulse ─────────────────────────────────────── */
.dream-btn {
  animation: dreamPulse 3s ease-in-out infinite;
}
.dream-btn:hover {
  animation: none;
}

/* ── Typewriter cursor ──────────────────────────────────────── */
.typewriter-cursor {
  animation: blinkCursor 0.8s step-end infinite;
}

/* ── Hero particles ─────────────────────────────────────────── */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(254, 186, 2, 0.12);
  pointer-events: none;
  animation: dotFloat var(--dur, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.particle-1 { width: 320px; height: 320px; top: -80px;  left: -80px;  --dur: 7s;  --delay: 0s; }
.particle-2 { width: 200px; height: 200px; top: 20%;    right: -40px; --dur: 9s;  --delay: 1s; }
.particle-3 { width: 150px; height: 150px; bottom: 15%; left: 10%;   --dur: 6s;  --delay: 2s; }
.particle-4 { width: 80px;  height: 80px;  top: 40%;    left: 50%;   --dur: 8s;  --delay: 0.5s; }
.particle-5 { width: 60px;  height: 60px;  bottom: 20%; right: 20%;  --dur: 5s;  --delay: 3s; }

/* ── Discovery tab active state ─────────────────────────────── */
.discovery-tab.active-tab {
  background: var(--odt-blue);
  color: white;
}

/* ── Journey filter active ──────────────────────────────────── */
.journey-filter.is-active {
  background: var(--odt-blue);
  color: white;
  border-color: var(--odt-blue);
}

/* ── Social icons ───────────────────────────────────────────── */
.social-icon {
  color: white;
}
.social-icon:hover {
  transform: translateY(-2px) scale(1.1);
}

/* ── Line clamp utility ─────────────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Mood tag active state ──────────────────────────────────── */
.mood-tag.is-active {
  background: var(--odt-gold);
  color: var(--odt-blue);
  border-color: transparent;
}

/* ── Form radio accent ──────────────────────────────────────── */
input[type="radio"].accent-odt-gold {
  accent-color: var(--odt-gold);
}

/* ── Hero slideshow ─────────────────────────────────────────── */
.hero-slide {
  transition: opacity 1.5s ease-in-out;
}

/* ── Hero text shadows (legible over bright bg) ─────────────── */
.hero-section h1 {
  text-shadow: 0 2px 20px rgba(0,0,0,0.7), 0 1px 4px rgba(0,0,0,0.5);
}
.hero-section p {
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.hero-section .animate-fade-in {
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ── Responsive hero text scaling ───────────────────────────── */
@media (max-width: 640px) {
  .hero-section h1 {
    font-size: 2.25rem;
    line-height: 1.2;
  }
}

/* ── Page transitions (simple fade) ────────────────────────── */
.page-content {
  animation: fadeIn 0.4s ease-out;
}

/* ── WordPress core ─────────────────────────────────────────── */
.alignleft  { float: left;  margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left:  1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption { max-width: 100%; }
