/* Mobile Optimizations & Special Effects - costagamingworld */

/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  :root {
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.25rem;
    --font-size-h4: 1.125rem;
    --card-padding: 16px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-xxl: 32px;
  }

  /* Hero Section Mobile */
  .elementor-element-2ff7011 {
    min-height: 70vh !important;
    padding: 20px !important;
  }

  .elementor-element-aefa581 .elementor-heading-title {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
  }

  /* Service Cards Mobile */
  .elementor-element-959740a,
  .elementor-element-9975676,
  .elementor-element-949c1b6,
  .elementor-element-bbc3a0f,
  .elementor-element-d789fda,
  .elementor-element-346ea55,
  .elementor-element-c19cf48 {
    padding: 16px !important;
    margin-bottom: 12px !important;
    border-radius: 6px !important;
  }

  /* Fleet Cards Mobile */
  .elementor-element-696ef6a,
  .elementor-element-13e50b6,
  .elementor-element-c66c087 {
    min-height: 200px !important;
    padding: 16px !important;
  }

  /* Button Mobile */
  .elementor-button {
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Tab Navigation Mobile */
  .e-n-tabs-heading {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .e-n-tabs-heading::-webkit-scrollbar {
    display: none !important;
  }

  .e-n-tab-title {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .elementor-button,
  .elementor-icon-list-item a,
  .close-popup,
  .e-n-tab-title {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* Remove hover effects on touch devices */
  .elementor-element-959740a:hover,
  .elementor-element-9975676:hover,
  .elementor-element-949c1b6:hover,
  .elementor-element-bbc3a0f:hover,
  .elementor-element-d789fda:hover,
  .elementor-element-346ea55:hover,
  .elementor-element-c19cf48:hover,
  .elementor-element-696ef6a:hover,
  .elementor-element-13e50b6:hover,
  .elementor-element-c66c087:hover {
    transform: none !important;
  }

  /* Active states for touch */
  .elementor-button:active {
    transform: scale(0.98) !important;
  }

  .elementor-element-959740a:active,
  .elementor-element-9975676:active,
  .elementor-element-949c1b6:active,
  .elementor-element-bbc3a0f:active,
  .elementor-element-d789fda:active,
  .elementor-element-346ea55:active,
  .elementor-element-c19cf48:active {
    transform: scale(0.98) !important;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.elementor-element {
  will-change: auto !important;
}

.elementor-element-959740a,
.elementor-element-9975676,
.elementor-element-949c1b6,
.elementor-element-bbc3a0f,
.elementor-element-d789fda,
.elementor-element-346ea55,
.elementor-element-c19cf48 {
  will-change: transform, box-shadow !important;
}

.elementor-button {
  will-change: transform, background-color !important;
}

/* ===== LOADING ANIMATIONS ===== */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.loading-shimmer {
  background: linear-gradient(
    90deg,
    #2d2d2d 25%,
    #404040 50%,
    #2d2d2d 75%
  ) !important;
  background-size: 200px 100% !important;
  animation: shimmer 1.5s infinite !important;
}

/* ===== SMOOTH SCROLLING ===== */
html {
  scroll-behavior: smooth !important;
}

@media (prefers-reduced-motion: no-preference) {
  .elementor-element {
    scroll-margin-top: 80px !important;
  }
}

/* ===== FOCUS MANAGEMENT ===== */
.elementor-button:focus-visible,
.elementor-icon-list-item a:focus-visible,
.e-n-tab-title:focus-visible {
  outline: 2px solid #00d4ff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.2) !important;
}

/* ===== DARK MODE DETECTION ===== */
@media (prefers-color-scheme: dark) {
  /* Already using dark theme, but ensure consistency */
  .elementor-element-2ff7011::before {
    opacity: 0.2 !important;
  }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .elementor-element-2ff7011 {
    min-height: 100vh !important;
  }

  .elementor-location-popup .elementor-element-19ba072 {
    max-height: 80vh !important;
  }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .elementor-widget-image img {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
  }
}

/* ===== REDUCED DATA MODE ===== */
@media (prefers-reduced-data: reduce) {
  .elementor-element-2ff7011::before {
    display: none !important;
  }

  .elementor-widget-image img {
    filter: none !important;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip to content link */
.skip-link {
  position: absolute !important;
  top: -40px !important;
  left: 6px !important;
  z-index: 999999 !important;
  color: #ffffff !important;
  background: #00d4ff !important;
  padding: 8px 16px !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  transition: top 0.3s ease !important;
}

.skip-link:focus {
  top: 6px !important;
}

/* ===== ERROR STATES ===== */
.error-state {
  border-color: #ff6b6b !important;
  background-color: rgba(255, 107, 107, 0.1) !important;
}

.error-message {
  color: #ff6b6b !important;
  font-size: 0.875rem !important;
  margin-top: 4px !important;
}

/* ===== SUCCESS STATES ===== */
.success-state {
  border-color: #68d391 !important;
  background-color: rgba(104, 211, 145, 0.1) !important;
}

.success-message {
  color: #68d391 !important;
  font-size: 0.875rem !important;
  margin-top: 4px !important;
}

/* ===== LOADING STATES ===== */
.loading-state {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

.loading-state::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 20px !important;
  height: 20px !important;
  margin: -10px 0 0 -10px !important;
  border: 2px solid transparent !important;
  border-top: 2px solid #00d4ff !important;
  border-radius: 50% !important;
  animation: spin 1s linear infinite !important;
}

/* ===== CUSTOM SCROLLBAR FOR WEBKIT ===== */
::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track {
  background: #2d2d2d !important;
  border-radius: 4px !important;
}

::-webkit-scrollbar-thumb {
  background: #00d4ff !important;
  border-radius: 4px !important;
  transition: background 0.3s ease !important;
}

::-webkit-scrollbar-thumb:hover {
  background: #00b8e6 !important;
}

::-webkit-scrollbar-corner {
  background: #2d2d2d !important;
}

/* ===== FIREFOX SCROLLBAR ===== */
* {
  scrollbar-width: thin !important;
  scrollbar-color: #00d4ff #2d2d2d !important;
}

/* ===== PRINT OPTIMIZATIONS ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .elementor-element-2ff7011::before {
    display: none !important;
  }

  .elementor-button {
    border: 1px solid black !important;
    background: white !important;
  }

  a[href]:after {
    content: " (" attr(href) ")" !important;
  }

  .elementor-location-popup,
  .elementor-location-header,
  .elementor-location-footer {
    display: none !important;
  }
}
