/* ============================================
   Digilivestock Solutions - Custom Styles
   ============================================ */

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered animation delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Hero gradient overlays */
.hero-gradient {
  background: linear-gradient(135deg, rgba(0, 164, 189, 0.9) 0%, rgba(105, 189, 69, 0.85) 50%, rgba(255, 127, 0, 0.8) 100%);
}

.hero-gradient-dark {
  background: linear-gradient(135deg, #00A4BD 0%, #007a8c 50%, #004d5c 100%);
}

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

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #00A4BD, #69BD45);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-accent {
  background: linear-gradient(135deg, #FF7F00, #00A4BD);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, #00A4BD, #007a8c);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 164, 189, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #69BD45, #4fa030);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(105, 189, 69, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, #FF7F00, #e06800);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 127, 0, 0.4);
}

.btn-outline {
  border: 2px solid white;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.btn-outline:hover {
  background: white;
  color: #00A4BD;
}

/* Blob / organic shapes */
.blob {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: blobMorph 8s ease-in-out infinite;
}

@keyframes blobMorph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* Floating animation */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Pulse ring */
.pulse-ring {
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Gradient border */
.gradient-border {
  position: relative;
  border-radius: 1rem;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #00A4BD, #69BD45, #FF7F00);
  z-index: -1;
}

/* Section divider wave */
.wave-divider {
  position: relative;
  overflow: hidden;
}

.wave-divider::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,40 C480,80 960,0 1440,40 L1440,80 L0,80 Z' fill='white'/%3E%3C/svg%3E");
  background-size: cover;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Marquee for partner logos */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Particles canvas */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00A4BD, #69BD45);
  border-radius: 4px;
}

/* Accordion transitions */
.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-content {
  transition: max-height 0.3s ease;
}

/* Service icon containers */
.icon-box {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* Timeline */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #00A4BD, #69BD45, #FF7F00);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .timeline-line {
    left: 20px;
  }
}

/* Smooth page load */
body {
  opacity: 0;
  animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ============================================
   Accessibility Widget v2 — Card-based
   ============================================ */

/* --- Trigger button --- */
#a11y-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #00A4BD;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 164, 189, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
#a11y-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 164, 189, 0.55);
}
#a11y-trigger:focus-visible {
  outline: 3px solid #FF7F00;
  outline-offset: 3px;
}

/* --- Overlay --- */
#a11y-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 9999;
  transition: opacity 0.3s;
}
#a11y-overlay.a11y-hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- Panel shell --- */
#a11y-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000;
  width: 480px;
  max-width: 96vw;
  height: 100vh;
  background: #f0f4f8;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}
#a11y-panel.a11y-hidden {
  transform: translateX(100%);
  pointer-events: none;
}

/* --- Header bar (teal) --- */
.a11y-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #00A4BD;
  color: #fff;
  flex-shrink: 0;
}
.a11y-header span {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
#a11y-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: opacity 0.2s;
}
#a11y-close:hover { opacity: 0.75; }

/* --- Scrollable body --- */
.a11y-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 20px;
}
.a11y-body::-webkit-scrollbar { width: 6px; }
.a11y-body::-webkit-scrollbar-thumb { background: #00A4BD; border-radius: 3px; }

/* --- Section --- */
.a11y-section {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.a11y-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 14px;
}

/* ===== PROFILE ROWS ===== */
.a11y-profiles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.a11y-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.a11y-profile-row:last-child { border-bottom: none; }

.a11y-profile-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Profile toggle track */
.a11y-profile-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.a11y-profile-track {
  display: block;
  width: 44px;
  height: 24px;
  background: #ddd;
  border-radius: 12px;
  position: relative;
  transition: background 0.25s;
  cursor: pointer;
  flex-shrink: 0;
}
.a11y-profile-toggle:checked + .a11y-profile-track {
  background: #69BD45;
}
.a11y-profile-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.25s;
}
.a11y-profile-toggle:checked + .a11y-profile-track .a11y-profile-thumb {
  transform: translateX(20px);
}
.a11y-profile-status {
  font-size: 0.7rem;
  font-weight: 700;
  color: #999;
  width: 24px;
  text-align: center;
}
.a11y-profile-toggle:checked ~ .a11y-profile-status { color: #69BD45; }

.a11y-profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.a11y-profile-info strong {
  font-size: 0.85rem;
  color: #222;
}
.a11y-profile-info small {
  font-size: 0.72rem;
  color: #888;
  margin-top: 1px;
}
.a11y-profile-icon {
  color: #333;
  font-size: 1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* ===== CARD GRID ===== */
.a11y-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.a11y-card-grid.a11y-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* --- Individual card --- */
.a11y-card {
  background: #f4f8fb;
  border: 2px solid #e8edf2;
  border-radius: 10px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  user-select: none;
}
.a11y-card:hover {
  border-color: #c0d8e8;
  background: #eaf2f8;
}
.a11y-card:focus-visible {
  outline: 3px solid #FF7F00;
  outline-offset: 2px;
}
.a11y-card-active {
  border-color: #00A4BD !important;
  background: #e0f5f9 !important;
  box-shadow: 0 0 0 1px #00A4BD;
}
.a11y-card-icon {
  font-size: 1.4rem;
  color: #333;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.a11y-card-active .a11y-card-icon { color: #00A4BD; }

.a11y-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #444;
  line-height: 1.3;
}

/* --- Stepper card extras --- */
.a11y-card-stepper {
  padding-bottom: 10px;
}
.a11y-step-controls {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  margin-top: 4px;
}
.a11y-step-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #00A4BD;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: background 0.2s;
  flex-shrink: 0;
}
.a11y-step-btn:hover { background: #008da3; }
.a11y-step-value {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  background: #dce8ef;
  padding: 5px 4px;
  border-radius: 0;
}

/* --- Footer --- */
.a11y-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-top: 1px solid #e8edf2;
  flex-shrink: 0;
}
.a11y-btn-reset {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.a11y-btn-reset:hover { background: #c0392b; }

/* ===== Reading Guide Bar ===== */
#a11y-reading-guide {
  position: fixed;
  left: 0;
  width: 100%;
  height: 40px;
  background: rgba(0, 164, 189, 0.12);
  border-top: 2px solid #00A4BD;
  border-bottom: 2px solid #00A4BD;
  z-index: 9990;
  pointer-events: none;
  transition: top 0.05s linear;
}

/* ============================================
   Accessibility Feature Styles
   ============================================ */

/* --- Profiles --- */
.a11y-epilepsy {
  animation: none !important;
  opacity: 1 !important;
}
.a11y-epilepsy * {
  animation: none !important;
  transition: none !important;
}
.a11y-epilepsy img, .a11y-epilepsy video {
  filter: brightness(0.9) saturate(0.5) !important;
}

.a11y-visually-impaired {
  font-size: 120% !important;
}
.a11y-visually-impaired * {
  font-weight: 600 !important;
}
.a11y-visually-impaired a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

.a11y-cognitive {
  line-height: 1.8 !important;
  word-spacing: 3px !important;
}
.a11y-cognitive * {
  font-family: 'Arial', 'Helvetica', sans-serif !important;
}
.a11y-cognitive a {
  text-decoration: underline !important;
  font-weight: 700 !important;
}

.a11y-adhd * {
  animation: none !important;
}
.a11y-adhd .float,
.a11y-adhd .blob,
.a11y-adhd .marquee-content {
  animation: none !important;
}

/* --- Readable Font --- */
.a11y-readable-font,
.a11y-readable-font * {
  font-family: 'Arial', 'Helvetica Neue', sans-serif !important;
  letter-spacing: 0.02em !important;
}

/* --- Highlight Titles --- */
.a11y-highlight-titles h1,
.a11y-highlight-titles h2,
.a11y-highlight-titles h3,
.a11y-highlight-titles h4,
.a11y-highlight-titles h5,
.a11y-highlight-titles h6 {
  outline: 3px solid #FF7F00 !important;
  outline-offset: 4px !important;
  border-radius: 4px !important;
}

/* --- Highlight Links --- */
.a11y-highlight-links a {
  outline: 2px solid #00A4BD !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
  background: rgba(0, 164, 189, 0.08) !important;
}

/* --- Text Magnifier --- */
.a11y-text-magnifier p,
.a11y-text-magnifier li,
.a11y-text-magnifier span,
.a11y-text-magnifier td,
.a11y-text-magnifier label {
  font-size: 1.25em !important;
}

/* --- Alignment --- */
.a11y-align-center * { text-align: center !important; }
.a11y-align-left * { text-align: left !important; }

/* --- Dark Contrast --- */
.a11y-dark-contrast {
  background: #1a1a2e !important;
  color: #e0e0e0 !important;
}
.a11y-dark-contrast * {
  background-color: transparent !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}
.a11y-dark-contrast .a11y-section,
.a11y-dark-contrast nav,
.a11y-dark-contrast footer {
  background: #222244 !important;
}
.a11y-dark-contrast a { color: #4dd9f0 !important; }

/* --- Light Contrast --- */
.a11y-light-contrast {
  background: #fff !important;
  color: #000 !important;
}
.a11y-light-contrast * {
  color: #000 !important;
  border-color: #ccc !important;
}
.a11y-light-contrast a { color: #00A4BD !important; }

/* --- High Contrast --- */
.a11y-high-contrast {
  background: #000 !important;
  color: #ff0 !important;
}
.a11y-high-contrast * {
  background-color: transparent !important;
  color: #ff0 !important;
  border-color: #ff0 !important;
}
.a11y-high-contrast a { color: #0ff !important; }
.a11y-high-contrast img { filter: contrast(1.5) brightness(1.2) !important; }

/* --- High Saturation --- */
.a11y-high-saturation { filter: saturate(2) !important; }

/* --- Monochrome --- */
.a11y-monochrome { filter: grayscale(1) !important; }

/* --- Low Saturation --- */
.a11y-low-saturation { filter: saturate(0.3) !important; }

/* --- Hide Images --- */
.a11y-hide-images img,
.a11y-hide-images svg,
.a11y-hide-images video,
.a11y-hide-images canvas,
.a11y-hide-images [role="img"] {
  opacity: 0.05 !important;
}

/* --- Stop Animations --- */
.a11y-stop-animations,
.a11y-stop-animations * {
  animation: none !important;
  transition: none !important;
}

/* --- Highlight Hover --- */
.a11y-highlight-hover *:hover {
  outline: 3px solid #FF7F00 !important;
  outline-offset: 2px !important;
}

/* --- Highlight Focus --- */
.a11y-highlight-focus *:focus,
.a11y-highlight-focus *:focus-visible {
  outline: 4px solid #FF7F00 !important;
  outline-offset: 3px !important;
}

/* --- Big Black Cursor --- */
.a11y-cursor-black,
.a11y-cursor-black * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M4 4 L4 28 L12 20 L20 28 L24 24 L16 16 L26 16 Z' fill='%23000' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* --- Big White Cursor --- */
.a11y-cursor-white,
.a11y-cursor-white * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M4 4 L4 28 L12 20 L20 28 L24 24 L16 16 L26 16 Z' fill='%23fff' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") 4 4, auto !important;
}

/* --- Mute Sounds (handled in JS) --- */

/* ===== Widget immune to its own filters ===== */
#a11y-panel,
#a11y-panel *,
#a11y-trigger,
#a11y-overlay,
#a11y-reading-guide {
  filter: none !important;
}
/* Prevent dark/light/high contrast from altering the panel */
.a11y-dark-contrast #a11y-panel,
.a11y-dark-contrast #a11y-panel *,
.a11y-light-contrast #a11y-panel,
.a11y-light-contrast #a11y-panel *,
.a11y-high-contrast #a11y-panel,
.a11y-high-contrast #a11y-panel * {
  background-color: revert !important;
  color: revert !important;
  border-color: revert !important;
}

/* ===== Responsive ===== */
@media (max-width: 580px) {
  #a11y-panel {
    width: 100vw;
    max-width: 100vw;
  }
  .a11y-card-grid.a11y-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  #a11y-trigger {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

/* ============================================
   Blog Styles
   ============================================ */

/* Blog filter buttons */
.blog-filter-btn {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.blog-filter-btn:hover {
  background: rgba(0, 164, 189, 0.05);
  color: #00A4BD;
  border-color: rgba(0, 164, 189, 0.3);
}

.blog-filter-btn.active {
  background: #00A4BD;
  color: white;
  border-color: #00A4BD;
}

/* Blog content typography */
.blog-content h2 {
  position: relative;
}

.blog-content h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #00A4BD, #69BD45);
  border-radius: 2px;
  margin-top: 12px;
}

.blog-content a {
  color: #00A4BD;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-content a:hover {
  color: #008fa3;
  text-decoration: underline;
}

/* Blog card animation for filter */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
