/* Custom styles beyond Tailwind CSS */

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

/* Custom focus styles for accessibility */
:focus {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

/* Enhanced hero text panel for accessibility */
.hero-text-panel {
  /* Ensures minimum contrast ratio of 7:1 (WCAG AAA) */
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Improved text shadow for better readability */
.hero-text-panel h1 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-text-panel p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Enhanced hero brand name styling */
.hero-brand-name {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* Enhanced button accessibility */
.btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: 3px solid #fb923c;
  outline-offset: 2px;
}

/* Premium hero button styles */
.hero-btn-primary {
  position: relative;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.025em;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 
    0 20px 25px -5px rgba(249, 115, 22, 0.25),
    0 10px 10px -5px rgba(249, 115, 22, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-btn-primary:hover {
  background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
  box-shadow: 
    0 25px 35px -5px rgba(249, 115, 22, 0.35),
    0 15px 15px -5px rgba(249, 115, 22, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hero-btn-primary:focus {
  outline: 3px solid #fb923c;
  outline-offset: 3px;
}

.hero-btn-secondary {
  position: relative;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.025em;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 
    0 20px 25px -5px rgba(255, 255, 255, 0.1),
    0 10px 10px -5px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hero-btn-secondary:hover {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 25px 35px -5px rgba(255, 255, 255, 0.15),
    0 15px 15px -5px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hero-btn-secondary:focus {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* Responsive text panel adjustments */
@media (max-width: 640px) {
  .hero-text-panel {
    padding: 1.5rem;
    margin: 0 1rem;
    background-color: rgba(0, 0, 0, 0.8);
  }
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.7;
}

/* Only load background image on screens larger than mobile */
@media (min-width: 768px) {
  .hero-background {
    background-image: url('../images/hero.jpg');
  }
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Organisation & Product Branding */
.org-logo {
  color: #c2410c; /* Primary orange for organisation */
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #ffedd5; /* Light orange background */
  color: #c2410c; /* Primary orange text */
}

.product-indicator {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(to right, #ffb3b3, #ffd9b3, #ffffb3, #b3ffb3, #b3b3ff, #d9b3ff, #ffb3ff);
  margin-right: 0.375rem;
}

.rainbow-text {
  background-image: linear-gradient(to right, #ffb3b3, #ffd9b3, #ffffb3, #b3ffb3, #b3b3ff, #d9b3ff, #ffb3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Organisation section styling */
.org-section {
  border-left: 3px solid #c2410c;
  padding-left: 1rem;
  margin: 1.5rem 0;
}

/* Custom styles for form elements */
input:focus, textarea:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

/* Floating page navigation */
.page-nav {
  display: none; /* Hidden by default */
  position: fixed;
  right: 30px;
  top: 65%; /* Moved down toward the bottom */
  transform: translateY(-50%);
  z-index: 100;
}

.page-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-nav li {
  margin: 12px 0;
}

.page-nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #334155; /* Darker color (Tailwind slate-700) for better contrast */
  font-size: 1.125rem;
  transition: all 0.2s ease;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.page-nav a:hover {
  color: #c2410c; /* Primary-700 */
  background-color: rgba(255, 255, 255, 0.9); /* Slightly more opaque on hover */
}

.page-nav a::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8; /* Tailwind slate-400 - darker for better visibility */
  margin-right: 10px;
  transition: all 0.2s ease;
}

.page-nav a:hover::before {
  background-color: #c2410c; /* Primary-700 */
  width: 10px;
  height: 10px;
}

.page-nav a.active {
  color: #c2410c; /* Primary-700 */
  font-weight: 600;
  background-color: rgba(255, 237, 213, 0.8); /* Light orange background (primary-100) */
}

.page-nav a.active::before {
  background-color: #c2410c; /* Primary-700 */
  width: 10px;
  height: 10px;
}

/* Mobile optimisations */
@media (max-width: 640px) {
  .hero-text {
    text-align: center;
  }
  
  /* Mobile header adjustments */
  .org-product-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .product-separator {
    display: none;
  }
  
  .product-byline {
    margin-left: 0;
  }
  
  /* Hide page navigation on mobile */
  .page-nav {
    display: none !important;
  }
}

/* Show page navigation on screens larger than phones */
@media (min-width: 641px) {
  .page-nav {
    display: block;
    background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent white background */
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Enhanced shadow for better depth */
    border: 1px solid rgba(255, 255, 255, 0.9); /* Subtle white border */
  }
}

/* Product family section */
.product-family {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.product-card.current {
  border-left: 3px solid;
  border-image: linear-gradient(to bottom, #ffb3b3, #ffd9b3, #ffffb3, #b3ffb3, #b3b3ff, #d9b3ff, #ffb3ff) 1;
}
