/* ===== Custom Styles for Jasso Express ===== */

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

/* Selection color */
::selection {
  background-color: #c9a22d;
  color: #0f2b4c;
}

/* Card hover effect */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 43, 76, 0.12) !important;
}

/* Reveal animations (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is enabled, add hidden state and animate */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
}

.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid items */
.js .reveal:nth-child(1) { transition-delay: 0.05s; }
.js .reveal:nth-child(2) { transition-delay: 0.1s; }
.js .reveal:nth-child(3) { transition-delay: 0.15s; }
.js .reveal:nth-child(4) { transition-delay: 0.2s; }
.js .reveal:nth-child(5) { transition-delay: 0.25s; }
.js .reveal:nth-child(6) { transition-delay: 0.3s; }

/* Mobile menu transition */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobile-menu.open {
  max-height: 500px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Back to top button transition */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Header scroll state */
#site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #c9a22d;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card-hover {
    transition: none;
  }

  .card-hover:hover {
    transform: none;
  }

  img {
    transition: none;
  }

  #back-to-top {
    transition: none;
  }
}

/* Print styles */
@media print {
  #site-header,
  #back-to-top,
  #menu-toggle {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  section {
    page-break-inside: avoid;
  }
}

/* Large screen adjustments */
@media (min-width: 1280px) {
  .max-w-7xl {
    max-width: 80rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #eaf0f8;
}

::-webkit-scrollbar-thumb {
  background: #9fb8dc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #789cce;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
  -webkit-text-fill-color: #1e3a5f !important;
  transition: background-color 5000s ease-in-out 0s;
}
