/* ========================================
   einemall Custom Styles
   Modern Design System Implementation (TASK-011.6)
   Additional styling for Cookie banner, enhancements, and utilities
   ======================================== */

/* ===========================
   DESIGN SYSTEM - CSS Variables
   (LLD Section 5.5.1準拠)
   =========================== */
:root {
  /* カラーパレット */
  --color-primary: #2c5f7d;
  --color-primary-light: #3a7a9e;
  --color-primary-dark: #1f4456;
  --color-secondary: #141414;
  --color-secondary-light: #2a2a2a;
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f7f7f7;
  --color-bg-tertiary: #e9ecef;
  --color-accent: #e67e22;
  --color-accent-hover: #d35400;
  --color-text-primary: #141414;
  --color-text-secondary: #6c757d;
  --color-text-muted: #999999;
  --color-border: #dee2e6;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  --color-info: #17a2b8;

  /* タイポグラフィ */
  --font-base: 'Noto Sans JP', -apple-system, BlinkMacSystemFont,
               'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Work Sans', var(--font-base);
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --line-height-base: 1.8;
  --line-height-heading: 1.4;
  --letter-spacing-base: 0.05em;
  --letter-spacing-heading: 0.02em;

  /* スペーシング（8pxベース） */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-10: 5rem;    /* 80px */

  /* シャドウ（elevation） */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px rgba(0, 0, 0, 0.1),
                 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07),
               0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1),
               0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1),
               0 10px 10px rgba(0, 0, 0, 0.04);

  /* トランジション */
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ブレークポイント（参照用） */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;

  /* Border Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-base: 0.5rem; /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 9999px;
}

/* ===========================
   MODERN TYPOGRAPHY SYSTEM
   =========================== */
body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-base);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-heading);
  margin-bottom: var(--space-3);
}

h1, .h1 { font-size: var(--font-size-4xl); }
h2, .h2 { font-size: var(--font-size-3xl); }
h3, .h3 { font-size: var(--font-size-2xl); }
h4, .h4 { font-size: var(--font-size-xl); }
h5, .h5 { font-size: var(--font-size-lg); }
h6, .h6 { font-size: var(--font-size-base); }

/* ===========================
   STICKY HEADER WITH BACKDROP BLUR
   (PRD Section 8要求)
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--duration-base) var(--ease-out);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.95);
}

/* ===========================
   MODERN PRODUCT CARD WITH HOVER EFFECT
   (PRD Section 8要求)
   =========================== */
.woocommerce ul.products li.product,
.product-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-primary);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

.woocommerce ul.products li.product:hover,
.product-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.woocommerce ul.products li.product img,
.product-card img {
  transition: transform var(--duration-slow) var(--ease-out);
}

.woocommerce ul.products li.product:hover img,
.product-card:hover img {
  transform: scale(1.05);
}

/* カートボタン - hover時に表示 */
.woocommerce ul.products li.product .button,
.product-card .add-to-cart {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.woocommerce ul.products li.product:hover .button,
.product-card:hover .add-to-cart {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   IMAGE GALLERY COMPONENT
   (PRD Section 8要求 - 4 Thumbnails + Main Image)
   =========================== */
.product-gallery {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-2);
}

.product-gallery-thumbnails {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-gallery-thumbnail {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out);
  overflow: hidden;
}

.product-gallery-thumbnail:hover,
.product-gallery-thumbnail.active {
  border-color: var(--color-primary);
}

.product-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-base);
}

@media (max-width: 768px) {
  .product-gallery {
    grid-template-columns: 1fr;
  }
  .product-gallery-thumbnails {
    flex-direction: row;
    overflow-x: auto;
  }
}

/* ===========================
   MODERN FILTERS (Desktop: Accordion, Mobile: Offcanvas)
   =========================== */
.shop-filters {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.filter-group {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.filter-group:last-child {
  border-bottom: none;
}

.filter-title {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-title::after {
  content: '▼';
  transition: transform var(--duration-base) var(--ease-out);
}

.filter-title.collapsed::after {
  transform: rotate(-90deg);
}

/* ===========================
   GLOBAL TRANSITIONS & ANIMATIONS
   =========================== */
a, button, .btn {
  transition: all var(--duration-base) var(--ease-out);
}

/* ホバーエフェクト統一 */
.btn:hover,
.woocommerce a.button:hover,
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* フェードインアニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

/* スムーズスクロール */
html {
  scroll-behavior: smooth;
}

/* ===========================
   MODERN BUTTON SYSTEM
   =========================== */
.btn,
.woocommerce a.button,
.woocommerce button.button {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-base);
  padding: 0.75rem 1.5rem;
  transition: all var(--duration-base) var(--ease-out);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

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

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: white;
}

/* ===========================
   MODERN CARD SYSTEM
   =========================== */
.card-modern {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--ease-out);
}

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

.card-modern-header {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
}

/* ===========================
   MODERN FORM SYSTEM
   =========================== */
.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: all var(--duration-base) var(--ease-out);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(44, 95, 125, 0.1);
  outline: none;
}

/* ===========================
   Bootstrap 5 Color Overrides
   =========================== */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.bg-primary {
  background-color: var(--color-primary) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.border-primary {
  border-color: var(--color-primary) !important;
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(44, 95, 125, 0.98) 0%, rgba(31, 68, 86, 0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  z-index: 9999;
  padding: 1.25rem 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  animation: slideUpBanner 0.4s ease-out;
}

@keyframes slideUpBanner {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-consent-banner.hidden {
  display: none;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 400px;
  font-size: 0.95rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.cookie-banner-text p {
  margin: 0 0 0.5rem 0;
}

.cookie-banner-text p:last-child {
  margin-bottom: 0;
}

.cookie-banner-text a {
  color: #ffd700;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

.cookie-banner-text a:hover {
  color: #ffed4e;
  text-decoration: none;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-banner-actions .btn {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.cookie-banner-actions .btn-accept {
  background-color: #28a745;
  border-color: #28a745;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.cookie-banner-actions .btn-accept:hover {
  background-color: #218838;
  border-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.cookie-banner-actions .btn-decline {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.cookie-banner-actions .btn-decline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateY(-1px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  #cookie-consent-banner {
    padding: 1rem 0;
  }

  .cookie-banner-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cookie-banner-text {
    flex: 1 1 100%;
    font-size: 0.875rem;
  }

  .cookie-banner-actions {
    justify-content: center;
    width: 100%;
  }

  .cookie-banner-actions .btn {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 576px) {
  .cookie-banner-text {
    font-size: 0.813rem;
  }

  .cookie-banner-actions .btn {
    font-size: 0.813rem;
    padding: 0.5rem 0.875rem;
  }
}

/* ========================================
   Mobile Touch Optimization (TASK-011.5)
   ======================================== */
@media (max-width: 768px) {
  /* Touch Target Size Optimization - Minimum 44x44px */
  .btn,
  .woocommerce a.button,
  .woocommerce button.button,
  .add-to-cart-btn,
  .ajax_add_to_cart {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
    font-size: 16px;
  }

  /* Navigation Links - Larger touch targets */
  .navbar-nav .nav-link {
    padding: 16px 20px;
    font-size: 18px;
  }

  /* Form Input Fields - Prevent iOS auto-zoom */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  textarea,
  select {
    min-height: 44px;
    font-size: 16px; /* 16px prevents iOS auto-zoom */
    padding: 10px 14px;
  }

  /* Product Cards - Better spacing */
  .woocommerce ul.products li.product .card,
  .product-card {
    margin-bottom: 1.5rem;
  }

  /* Mobile-specific padding adjustments */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Larger clickable areas for product images */
  .product-image-wrapper,
  .woocommerce ul.products li.product a img {
    min-height: 200px;
  }

  /* Quick view and action buttons */
  .quick-view-btn,
  .wishlist-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }

  /* WooCommerce checkout and cart buttons */
  .woocommerce-cart .actions .button,
  .woocommerce-checkout .button,
  .checkout-button {
    width: 100%;
    min-height: 50px;
    font-size: 18px;
    font-weight: 600;
  }

  /* Search form mobile optimization */
  .search-form .search-field {
    min-height: 44px;
    font-size: 16px;
    padding: 10px 50px 10px 16px;
  }

  .search-form .search-submit {
    min-width: 44px;
    min-height: 44px;
    font-size: 20px;
  }

  /* Popular keywords widget - larger touch targets */
  .keyword-link .keyword-pill,
  .keyword-link .keyword-badge,
  .keyword-link .keyword-button {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 15px;
  }

  /* Facility recommendation cards */
  .view-details-btn {
    min-height: 48px;
    font-size: 16px;
    padding: 12px 20px;
  }

  /* Better spacing for touch-friendly lists */
  .woocommerce-MyAccount-navigation ul li a {
    padding: 14px 18px;
    font-size: 16px;
  }
}

/* Mobile-specific performance optimizations */
@media (max-width: 768px) {
  /* Reduce motion for better performance */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Lazy loading placeholder styling */
  img[loading="lazy"] {
    background-color: #f5f5f5;
  }

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

  /* Optimize font rendering for mobile */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
}

/* Tablet-specific optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Increase touch targets slightly on tablets */
  .btn,
  .woocommerce a.button,
  .woocommerce button.button {
    min-height: 40px;
    padding: 10px 20px;
  }

  /* Optimize product grid for tablets */
  .woocommerce ul.products li.product {
    flex: 0 0 calc(50% - 1rem);
  }
}

/* ========================================
   Japanese Typography Enhancements
   ======================================== */
.japanese-text {
  font-feature-settings: "palt" 1;
  text-spacing: trim-start allow-end trim-adjacent ideograph-alpha ideograph-numeric;
}

.japanese-heading {
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.text-vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
}

/* Emphasis markers for Japanese */
em.japanese,
.japanese em {
  font-style: normal;
  text-emphasis: filled sesame;
  text-emphasis-position: over right;
}

/* ========================================
   Enhanced Buttons
   ======================================== */
.btn-gradient-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border: none;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gradient-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  transition: left 0.4s ease;
}

.btn-gradient-primary:hover::before {
  left: 100%;
}

.btn-gradient-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 95, 125, 0.3);
}

.btn-outline-custom {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background-color: transparent;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 95, 125, 0.2);
}

/* ========================================
   WooCommerce Product Enhancements
   ======================================== */
.woocommerce ul.products li.product {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  background-color: #ffffff;
}

.woocommerce ul.products li.product:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.woocommerce ul.products li.product img {
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover img {
  transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.75rem;
  color: var(--color-text);
  line-height: 1.5;
}

.woocommerce span.onsale {
  background-color: var(--color-accent);
  color: #ffffff;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.woocommerce .star-rating {
  color: #ffc107;
}

/* Product single page */
.woocommerce div.product {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.woocommerce div.product .product_title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

/* ========================================
   Back to Top Button Enhancement
   ======================================== */
#back-to-top {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(44, 95, 125, 0.3);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border: none;
  z-index: 1000;
}

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(44, 95, 125, 0.4);
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

#back-to-top i {
  transition: transform 0.3s ease;
}

#back-to-top:hover i {
  transform: translateY(-2px);
}

/* ========================================
   Footer Enhancements
   ======================================== */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, var(--color-primary) 100%);
}

.footer-menu a,
.site-footer ul.list-unstyled a {
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-menu a:hover,
.site-footer ul.list-unstyled a:hover {
  transform: translateX(4px);
  color: var(--color-accent);
}

/* ========================================
   Search Form Enhancement
   ======================================== */
.search-form {
  position: relative;
}

.search-form .search-field {
  border-radius: 25px;
  padding: 0.625rem 2.5rem 0.625rem 1.25rem;
  border: 2px solid var(--color-border);
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.search-form .search-field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.2rem rgba(44, 95, 125, 0.15);
  outline: none;
}

.search-form .search-submit {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  color: var(--color-primary);
  font-size: 1.1rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-form .search-submit:hover {
  color: var(--color-primary-light);
}

/* ========================================
   Loading Spinner
   ======================================== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(44, 95, 125, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Accessibility Enhancements
   ======================================== */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.box-shadow-md {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.border-radius-sm {
  border-radius: 4px;
}

.border-radius-md {
  border-radius: 8px;
}

.border-radius-lg {
  border-radius: 12px;
}

.transition-all {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Responsive Utilities
   ======================================== */
@media (max-width: 992px) {
  .lg-hide {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .md-hide {
    display: none !important;
  }

  .md-full-width {
    width: 100% !important;
  }
}

@media (max-width: 576px) {
  .sm-hide {
    display: none !important;
  }

  .sm-full-width {
    width: 100% !important;
  }

  .sm-text-center {
    text-align: center !important;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  #cookie-consent-banner,
  #back-to-top,
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000000;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }
}
