/* Custom Styles for Havenbound Poultry Breeders */

/* Import Modern Google Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors sampled from uploaded logo */
  --primary-color: #2D7E06;
  /* sampled green (45,126,6) */
  --primary-dark: #1f5804;
  /* darker green for hover states */
  --primary-light: #3a9908;
  /* lighter green for accents */
  --accent-brown: #895E2A;
  /* sampled brown (137,94,42) */
  --accent-brown-dark: #6e4420;
  /* darker brown */
  --dark-color: #212529;
  --light-bg: #F0F3E5;
  /* sampled light background (240,243,229) */

  /* New gradient colors */
  --gradient-primary: linear-gradient(135deg, #2D7E06 0%, #3a9908 100%);
  --gradient-accent: linear-gradient(135deg, #895E2A 0%, #6e4420 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(45, 126, 6, 0.9) 0%, rgba(137, 94, 42, 0.85) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Global Typography */
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-weight: 800;
}

h2 {
  font-weight: 700;
}

h3 {
  font-weight: 600;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--accent-brown);
  border-radius: 6px;
  transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}


/* Hero Section */
.hero-section {
  position: relative;
  background: url("img/hero-pic.jpg") center / cover no-repeat;
  min-height: 100vh;
  padding-top: 80px;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-overlay);
  opacity: 0.85;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section h1 {
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-section p {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-section .btn {
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Page Headers */
.page-header {
  /* Brown-only tint for page headers to preserve text contrast */
  background: linear-gradient(rgba(137, 94, 42, 0.45), rgba(137, 94, 42, 0.45)), url("/placeholder.svg?height=400&width=1600") center / cover no-repeat;
  min-height: 350px;
  padding-top: 80px;
}

/* Contact page header override */
.page-header.contact-header {
  background: linear-gradient(rgba(137, 94, 42, 0.55), rgba(137, 94, 42, 0.55)), url("img/contact.jpg") center / cover no-repeat;
}

/* Breeds page header override */
.page-header.breeds-header {
  background: linear-gradient(rgba(137, 94, 42, 0.55), rgba(137, 94, 42, 0.55)), url("img/breeds.jpg") center / cover no-repeat;
}

/* About page header override */
.page-header.about-header {
  background: linear-gradient(rgba(137, 94, 42, 0.55), rgba(137, 94, 42, 0.55)), url("img/about banner.jpg") center / cover no-repeat;
}

/* Navbar */
.navbar {
  transition: background-color 0.3s ease;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar-brand {
  font-size: 1.4rem;
}

.navbar .nav-link {
  color: var(--accent-brown);
  font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary-color);
}

.navbar-toggler {
  border-color: rgba(0, 0, 0, 0.12);
}

/* Ensure toggler icon is dark to match logo brown */
.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='30' height='30'><path stroke='%23895E2A' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/></svg>");
}

/* Brand logo: a small circular mark with "th" (fallback) */
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-brown);
  color: var(--primary-color);
  font-weight: 700;
  font-family: inherit;
  text-transform: lowercase;
  font-size: 1rem;
}

/* Image-based brand logo */
.brand-image {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: inline-block;
}

.brand-text {
  color: var(--accent-brown);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2px;
}

@media (max-width: 576px) {
  .brand-image {
    height: 32px;
  }

  .brand-text {
    font-size: 0.95rem;
  }
}

/* Small adjustment for very small screens */
@media (max-width: 576px) {
  .brand-logo {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
}

/* Theme meta color for mobile browsers (set to brown) */
.theme-color {
  background-color: var(--accent-brown);
}

/* When the navbar sits on light background, ensure the brand image has breathing room */
.brand-image {
  padding: 2px 4px;
  background: transparent;
  border-radius: 4px;
}

/* Breed Cards */
.breed-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.breed-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.breed-card .card-img-top {
  height: 250px;
  object-fit: cover;
}

/* Service Icons */
.service-icon i {
  transition: transform 0.3s ease;
}

.service-icon:hover i {
  transform: scale(1.1);
}

/* Value Icons */
.value-icon i {
  transition: transform 0.3s ease;
}

.value-icon:hover i {
  transform: rotate(10deg) scale(1.1);
}

/* Buttons */
.btn-warning {
  background: var(--gradient-accent);
  color: #ffffff;
  font-weight: 600;
  border: none;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-warning::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-warning:hover::before {
  left: 100%;
}

.btn-warning:hover {
  background: var(--accent-brown-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-warning:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-outline-dark {
  border: 2px solid var(--dark-color);
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-outline-dark:hover {
  background-color: #212529;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-light {
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(45, 126, 6, 0.25);
}

/* Footer */
footer.bg-dark {
  background-color: var(--accent-brown) !important;
}

footer a {
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 0.8;
}

/* Table Styles */
.table-dark thead {
  background-color: #6e4420;
  /* darker brown */
}

/* Card hover shadow tint */
.card:hover {
  box-shadow: 0 10px 25px rgba(137, 94, 42, 0.12);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .page-header {
    min-height: 250px;
  }

  .page-header h1 {
    font-size: 2rem;
  }
}

/* Breeds page: tighter spacing and compact layout for professional fit */
.breeds-page section {
  padding-top: 2.5rem;
  /* slightly reduced vertical rhythm */
  padding-bottom: 2.5rem;
}

.breeds-page .page-header {
  min-height: 300px;
  /* slightly smaller header */
}

.breeds-page .row.g-4 {
  gap: 0.75rem;
  /* further reduce gap for denser layout */
}

/* Breed images — smaller and centered to better align with text */
.breeds-page img.img-fluid,
.breeds-page img.breed-img {
  max-height: 260px;
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* Specific spacing helpers for side-by-side layout */
.breed-media {
  padding-right: 0.75rem;
}

.breed-text {
  padding-left: 0.75rem;
}

.breeds-page .breed-text h2 {
  margin-bottom: 0.4rem;
}

.breeds-page .breed-text p {
  margin-bottom: 0.75rem;
  line-height: 1.45;
  color: #6c6c6c;
}

.breeds-page .price-table td,
.breeds-page .price-table th {
  padding: 0.5rem 0.75rem;
}

.breeds-page .price-table thead th {
  letter-spacing: 0.3px;
  font-weight: 600;
}

.breeds-page .badge {
  font-size: 0.85rem;
  padding: 0.35em 0.65em;
}

.breeds-page .btn {
  padding: 0.55rem 1rem;
}

/* Responsive adjustments for small screens */
@media (max-width: 576px) {
  .breeds-page section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .breeds-page img.img-fluid,
  .breeds-page img.breed-img {
    max-height: 160px;
  }

  .breeds-page .breed-media,
  .breeds-page .breed-text {
    padding: 0;
  }

  .breeds-page .price-table th,
  .breeds-page .price-table td {
    font-size: 0.95rem;
    padding: 0.4rem 0.5rem;
  }
}

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

/* Table Styles */
.table-dark {
  --bs-table-bg: #2c2c2c;
}

.table-dark thead {
  background-color: #1a1a1a;
}

/* Price Table */
.price-table thead th {
  background: var(--accent-brown);
  color: #ffffff;
}

.price-table td,
.price-table th {
  vertical-align: middle;
}

.price-unit {
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent-brown);
  color: #ffffff;
  border: none;
}

.btn-accent:hover {
  background: #6e4420;
  /* slightly darker */
}

/* Card Hover Effects */
.card {
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Badge Styles */
.badge {
  font-weight: 500;
  padding: 0.5em 1em;
  background: var(--primary-color);
  color: #fff;
}

/* List Styles */
.list-unstyled li {
  padding: 0.25rem 0;
}

/* Icon circle uses primary color (overrides inline bg-warning) */
.icon-circle {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #ffffff;
  /* icons should be white on green */
}

.icon-circle i {
  font-size: 1.25rem;
}

/* Brand color utilities for consistent theming */
.text-accent {
  color: var(--accent-brown) !important;
}

.text-primary-brand {
  color: var(--primary-color) !important;
}

.bg-accent {
  background: var(--accent-brown) !important;
  color: #ffffff !important;
}

.bg-primary-brand {
  background: var(--primary-color) !important;
  color: #ffffff !important;
}

/* Service / Value icon colors */
.service-icon i {
  color: var(--primary-color);
}

.value-icon i {
  color: var(--accent-brown);
}

/* Alert Styles */
.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* Small alert icon to match icon-circle styling */
.alert-success .alert-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.alert-success .alert-icon i {
  color: #ffffff !important;
  font-size: 1rem;
}

/* Utility: icon circle size used in contact and info lists */
.icon-circle {
  width: 50px;
  height: 50px;
}

/* Icon inside the circle — tweak size for visual balance */
.icon-circle i {
  font-size: 1.25rem;
}

/* Responsive: slightly smaller circles on small screens */
@media (max-width: 576px) {
  .icon-circle {
    width: 40px;
    height: 40px;
    background: var(--primary-color) !important;
    color: #ffffff !important;
  }

  .icon-circle i {
    font-size: 1rem;
    color: #ffffff !important;
  }
}

/* ========================================
   NEW SECTIONS - FAQ, STATS, GALLERY
   ======================================== */

/* FAQ Section */
.faq-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.faq-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--dark-color);
  transition: all var(--transition-base);
  user-select: none;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-question i {
  font-size: 1.25rem;
  color: var(--accent-brown);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
  color: #6c757d;
  line-height: 1.7;
  margin: 0;
}

/* Stats Section */
.stats-section {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.stats-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.stat-icon i {
  font-size: 2.5rem;
  color: #ffffff;
}

/* Gallery Section */
.gallery-section {
  background: #f8f9fa;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: all var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h6 {
  color: #ffffff;
  margin: 0;
  font-weight: 600;
}

/* Enhanced Card Styles */
.card {
  border: none;
  border-radius: 16px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-img-top {
  transition: transform var(--transition-slow);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* Section Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  animation: fadeIn 0.8s ease-out;
}

/* Enhanced Testimonial Cards */
.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
}

/* Floating Label Forms */
.form-floating label {
  color: #6c757d;
}

.form-floating input:focus~label,
.form-floating textarea:focus~label,
.form-floating select:focus~label {
  color: var(--primary-color);
}

/* Loading State for Buttons */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Adjustments for New Sections */
@media (max-width: 768px) {
  .stat-number {
    font-size: 2.5rem;
  }

  .stat-icon {
    width: 60px;
    height: 60px;
  }

  .stat-icon i {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1rem;
  }

  .faq-item.active .faq-answer {
    padding: 0 1rem 1rem;
  }
}

/* ========================================
   BREED DETAIL CARDS
   ======================================== */

.breed-detail-card {
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--transition-base);
  margin-bottom: 3rem;
}

.breed-detail-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl) !important;
}

.breed-image-container {
  position: relative;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
}

.breed-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
}

.breed-detail-card:hover .breed-detail-img {
  transform: scale(1.05);
}

.breed-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
}

.breed-price-tag {
  background: var(--gradient-accent);
  color: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.price-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.price-unit {
  font-size: 0.9rem;
  opacity: 0.9;
}

.breed-profile,
.breed-characteristics {
  position: relative;
}

.breed-profile h5,
.breed-characteristics h5 {
  display: flex;
  align-items: center;
  color: var(--primary-color);
}

.breed-profile h5 i,
.breed-characteristics h5 i {
  font-size: 1.25rem;
}

/* Responsive adjustments for breed cards */
@media (max-width: 991px) {
  .breed-image-container {
    min-height: 350px;
  }

  .breed-detail-card .col-lg-7 {
    order: 2;
  }

  .breed-detail-card .col-lg-5 {
    order: 1;
  }

  .price-amount {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .breed-image-container {
    min-height: 250px;
  }

  .breed-price-tag {
    padding: 1rem 1.5rem;
  }

  .price-amount {
    font-size: 1.75rem;
  }

  .breed-detail-card .p-5 {
    padding: 2rem !important;
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Skip to Content Link - for keyboard navigation */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 8px 0;
  transition: top var(--transition-base);
}

.skip-to-content:focus {
  top: 0;
  color: #ffffff;
  outline: 3px solid var(--accent-brown);
  outline-offset: 2px;
}

/* Enhanced Focus Indicators for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible,
.faq-question:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove default outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* Improved Focus for Interactive Elements */
.card:focus-within {
  box-shadow: 0 0 0 3px var(--primary-color);
  outline: none;
}

.breed-card:focus-within,
.testimonial-card:focus-within,
.faq-item:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Ensure Touch Targets Meet Minimum Size (44x44px) */
.btn,
.nav-link,
.navbar-toggler,
.faq-question {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link {
  padding: 0.75rem 1rem;
}

/* Reduced Motion Support - Respect user preferences */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-section .container,
  .hero-section h1,
  .hero-section p,
  .hero-section .btn {
    animation: none !important;
  }

  .breed-card:hover,
  .card:hover,
  .gallery-item:hover {
    transform: none !important;
  }

  .btn-warning::before {
    transition: none !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn-warning {
    border: 2px solid #ffffff;
  }

  .nav-link {
    border-bottom: 2px solid transparent;
  }

  .nav-link:hover,
  .nav-link.active {
    border-bottom-color: var(--primary-color);
  }

  .faq-item {
    border: 2px solid var(--dark-color);
  }
}

/* Screen Reader Only Content */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Ensure Sufficient Color Contrast */
.text-muted {
  color: #6c757d !important;
  /* WCAG AA compliant */
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.85) !important;
  /* Improved contrast on dark backgrounds */
}

/* Keyboard Navigation Indicators for Cards */
.breed-card:focus,
.testimonial-card:focus,
.gallery-item:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 4px;
}

/* Form Error States for Better Accessibility */
.form-control:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control:valid:not(:placeholder-shown) {
  border-color: #198754;
}

/* Improved Link Visibility */
a {
  text-decoration-skip-ink: auto;
}

a:hover {
  text-decoration: underline;
}

/* Ensure Images Don't Break Layout */
img {
  max-width: 100%;
  height: auto;
}

/* Better Focus for FAQ Items */
.faq-question:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
  background-color: rgba(45, 126, 6, 0.05);
}

/* Accessible Loading States */
.btn-loading[aria-busy="true"] {
  cursor: wait;
}

/* Print Styles for Better Accessibility */
@media print {

  .navbar,
  .btn,
  footer,
  .skip-to-content {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
  }
}