/* =====================================================
   Washking Joure - Main Stylesheet
   Optimized for Core Web Vitals & Performance
   ===================================================== */

/* CSS Custom Properties (Design Tokens) */
:root {
  --wk-navy: #1e3a5f;
  --wk-blue: #00b4d8;
  --wk-blue-hover: #0096b7;
  --wk-red: #e31e24;
  --wk-gray: #f5f5f5;
  --wk-navy-dark: #152d4a;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   Base Styles
   ===================================================== */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--wk-blue);
  outline-offset: 2px;
}

/* =====================================================
   Brand Color Classes
   ===================================================== */

.bg-wk-navy { background-color: var(--wk-navy); }
.bg-wk-blue { background-color: var(--wk-blue); }
.bg-wk-red { background-color: var(--wk-red); }
.bg-wk-gray { background-color: var(--wk-gray); }
.text-wk-navy { color: var(--wk-navy); }
.text-wk-blue { color: var(--wk-blue); }
.text-wk-red { color: var(--wk-red); }
.border-wk-navy { border-color: var(--wk-navy); }
.border-wk-blue { border-color: var(--wk-blue); }

/* =====================================================
   Button Components
   ===================================================== */

.btn-primary {
  background-color: var(--wk-blue);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color var(--transition-normal),
              transform var(--transition-fast);
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--wk-blue-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--wk-navy);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color var(--transition-normal),
              transform var(--transition-fast);
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--wk-navy-dark);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* =====================================================
   Navigation - Mobile Menu
   ===================================================== */

.mobile-menu {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity var(--transition-normal),
              max-height var(--transition-slow);
}

.mobile-menu.active {
  display: block;
  opacity: 1;
  max-height: 500px;
}

/* =====================================================
   Navigation - Dropdown Menu
   ===================================================== */

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: var(--shadow-lg);
  border-radius: 0.5rem;
  min-width: 200px;
  z-index: 50;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--transition-normal),
              transform var(--transition-normal);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu a {
  transition: background-color var(--transition-fast);
}

/* =====================================================
   Hero Section
   ===================================================== */

.hero-overlay {
  background: linear-gradient(to right,
    rgba(30, 58, 95, 0.9),
    rgba(30, 58, 95, 0.5));
}

/* =====================================================
   Image Optimizations
   ===================================================== */

/* Lazy loading placeholder */
img[loading="lazy"] {
  background-color: var(--wk-gray);
}

/* Aspect ratio containers for CLS prevention */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

/* =====================================================
   Card Components
   ===================================================== */

.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

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

/* =====================================================
   Form Elements
   ===================================================== */

input, textarea, select {
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--wk-blue);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
  outline: none;
}

/* =====================================================
   Accessibility - Screen Reader Only
   ===================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus,
.sr-only.focus-visible {
  position: absolute;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =====================================================
   Loading States & Skeletons
   ===================================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--wk-gray) 25%,
    #e8e8e8 50%,
    var(--wk-gray) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================================================
   Print Styles
   ===================================================== */

@media print {
  header, footer, .cookie-banner, .btn-primary, .btn-secondary {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }
}

/* =====================================================
   Dark Mode Support (Future-ready)
   ===================================================== */

@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  :root {
    --wk-gray: #1a1a1a;
  }

  body {
    background-color: #121212;
    color: #e0e0e0;
  }
  */
}
