/* Road Test Routes Canada - Shared Styles */

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #f2ebe3;
  color: #2d2519;
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(242, 235, 227, 0.9);
  border-bottom: 1px solid #d4c9bc;
}

/* Dropdown menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #faf7f4;
  border: 1px solid #d4c9bc;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  padding: 0.5rem 0;
  z-index: 60;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #2d2519;
  text-decoration: none;
  transition: background-color 0.15s;
}

.dropdown-menu a:hover {
  background-color: #e8e0d5;
  color: #1a8a7a;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(242, 235, 227, 0.98);
  z-index: 100;
  overflow-y: auto;
  padding: 1rem;
}

.mobile-menu.open,
.mobile-menu:target {
  display: flex;
  flex-direction: column;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #2d2519;
  text-decoration: none;
  border-bottom: 1px solid #d4c9bc;
  transition: color 0.15s;
}

.mobile-menu a:hover {
  color: #1a8a7a;
}

.mobile-menu .submenu-label {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b5d4d;
}

/* Search input */
.search-input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem 0 2.75rem;
  background: #faf7f4;
  border: 1px solid #d4c9bc;
  border-radius: 0.5rem;
  color: #2d2519;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: #1a8a7a;
  box-shadow: 0 0 0 3px rgba(26, 138, 122, 0.15);
}

.search-wrapper {
  position: relative;
}

.search-wrapper svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b5d4d;
  pointer-events: none;
}

/* Centre cards */
.centre-card {
  background: #faf7f4;
  border: 1px solid #d4c9bc;
  border-radius: 0.5rem;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.centre-card:hover {
  border-color: rgba(26, 138, 122, 0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Letter navigation */
.letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
}

.letter-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b5d4d;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.15s;
}

.letter-nav a:hover,
.letter-nav a.active {
  background: #1a8a7a;
  color: #faf7f4;
}

.letter-nav a.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Pass rate bar colors */
.rate-high { color: #16a34a; }
.rate-mid { color: #ca8a04; }
.rate-low { color: #dc2626; }

/* Global search on homepage */
.global-search-input {
  width: 100%;
  height: 3.5rem;
  padding: 0 1rem 0 3rem;
  background: #faf7f4;
  border: 2px solid #d4c9bc;
  border-radius: 0.75rem;
  color: #2d2519;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.global-search-input:focus {
  border-color: #1a8a7a;
  box-shadow: 0 0 0 4px rgba(26, 138, 122, 0.15);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #faf7f4;
  border: 1px solid #d4c9bc;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.search-results-dropdown.open {
  display: block;
}

.search-results-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid #e8e0d5;
  transition: background-color 0.15s;
}

.search-results-dropdown a:last-child {
  border-bottom: none;
}

.search-results-dropdown a:hover {
  background-color: #e8e0d5;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b5d4d;
}

.breadcrumb a {
  color: #1a8a7a;
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: #2d2519;
}

.breadcrumb .separator {
  color: #d4c9bc;
}

/* Contact form */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #faf7f4;
  border: 1px solid #d4c9bc;
  border-radius: 0.5rem;
  color: #2d2519;
  font-size: 0.875rem;
  font-family: 'Inter', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: #1a8a7a;
  box-shadow: 0 0 0 3px rgba(26, 138, 122, 0.15);
}

textarea.form-input {
  min-height: 150px;
  resize: vertical;
}

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

/* Print-friendly */
@media print {
  .site-header, .mobile-menu, .search-wrapper, .letter-nav {
    display: none !important;
  }
}
