/* ===========================
   CSS VARIABLES
   Global design tokens
   =========================== */
:root {
  --primary-color: #8e4248;
  --secondary-color: #654321;
  --accent-color: #ff6b35;
  --success-color: #28a745;
  --error-color: #e53e3e;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --background-primary: #fef3f0;
  --background-secondary: #f5f5dc;
  --border-color: #ddd;
  --border-light: #e0e0e0;
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-full: 50px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ===========================
   RESET & BASE STYLES
   Core CSS reset and basic typography
   =========================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  height: 100%;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fef3f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  height: 100%;
}

/* ===========================
   STICKY FOOTER LAYOUT
   Flexbox layout for sticky footer
   =========================== */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===========================
   TYPOGRAPHY
   Font styles and text elements
   =========================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

.section-title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.hero-title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

/* ===========================
   UTILITY CLASSES
   Reusable helper classes
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-title {
  text-align: center;
  color: #1a1a1a;
}

/* Clean underline for section titles */
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #8e4248;
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Clean news cards */
.news-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #ffffff;
}

/* Clean animal cards */
.animal-card {
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

/* Clean buttons */
.btn {
  border-radius: 8px;
  border: 1px solid currentColor;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  opacity: 0.9;
}

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

/* ===========================
   ACCESSIBILITY
   Focus styles and accessibility features
   =========================== */
*:focus {
  outline: 2px solid #8e4248;
  outline-offset: 2px;
}

/* ===========================
   COOKIE BANNER
   GDPR compliance banner
   =========================== */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: #333;
  color: white;
  padding: 1rem;
  z-index: 1000;
  transition: bottom 0.3s ease;
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ===========================
   FLOATING NAVIGATION
   Mobile-first navigation overlay
   =========================== */
.floating-nav {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.nav-btn {
  width: 60px;
  height: 60px;
  background: #ffffff;
  border: 2px solid #8e4248;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1002;
}

.nav-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
  border-radius: 45%;
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-icon {
  position: relative;
  width: 20px;
  height: 2px;
  background: #8e4248;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #8e4248;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon::before {
  top: -6px;
}

.nav-icon::after {
  top: 6px;
}

/* Active state animations */
.floating-nav.active .nav-btn {
  background: rgba(139, 69, 19, 0.95);
  transform: rotate(180deg);
}

.floating-nav.active .nav-icon {
  background: transparent;
}

.floating-nav.active .nav-icon::before,
.floating-nav.active .nav-icon::after {
  background: white;
}

.floating-nav.active .nav-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.floating-nav.active .nav-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(254, 243, 240, 0.8);
  backdrop-filter: blur(50px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.floating-nav.active .nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* Menu */
.nav-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-nav.active .nav-menu {
  opacity: 1;
  visibility: visible;
}

.nav-item {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: calc(0.2s + var(--delay) * 0.08s);
}

.floating-nav.active .nav-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nav-item a {
  width: 200px;
  font-size: 1.125rem;
  padding: 0.75rem 1.5rem;
}

.nav-admin-username {
  text-align: center;
  color: #8e4248;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .floating-nav {
    top: 1rem;
    right: 1rem;
  }

  .nav-btn {
    width: 50px;
    height: 50px;
  }

  .nav-item a {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
    min-width: 180px;
  }
}

/* ===========================
   HERO SECTION
   Homepage hero with background image
   =========================== */
.hero {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-logo {
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 3;
}

.hero-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-social {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  gap: 1rem;
  z-index: 3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(139, 69, 19, 0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   BUTTONS
   All button styles and variations
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
  box-sizing: border-box;
}

.btn-primary {
  background: #8e4248;
  color: white;
  border: 2px solid #8e4248;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #654321;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #ffffff;
  color: #8e4248;
  border: 2px solid #8e4248;
}

.btn-primary svg,
.btn-secondary svg {
  height: 20px;
  width: 20px;
  margin-right: 8px;
}

/* Secondary buttons on hero/dark backgrounds */
.hero .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #8e4248;
  color: #ffffff;
  border-color: #8e4248;
  transform: translateY(-1px);
}

.btn-danger {
  background: #dc3545;
  color: #ffffff;
  border: 2px solid #dc3545;
}

.btn-danger:hover,
.btn-danger:focus {
  background: #c82333;
  border-color: #c82333;
  transform: translateY(-1px);
}

.btn-danger svg {
  height: 20px;
  width: 20px;
  margin-right: 8px;
}

/* Secondary buttons hover on hero/dark backgrounds */
.hero .btn-secondary:hover,
.hero .btn-secondary:focus {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: white;
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-disabled,
.btn:disabled {
  background-color: #cccccc;
  border-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  transform: none;
}

.btn-text {
  background: none;
  border: none;
  color: #8e4248;
  text-decoration: underline;
  padding: 0.5rem;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border-radius: 50%;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  transform: scale(1);
}

.btn-icon:hover {
  background: #8e4248;
  color: white;
  transform: scale(1.1);
}

.btn-icon svg {
  transition: all 0.3s ease;
}

.btn-icon:hover svg {
  fill: white;
}

/* Boutons d'icônes réutilisables */
.icon-buttons {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border-radius: 50%;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  transform: scale(1);
}

.icon-btn:hover {
  background: #8e4248;
  color: white;
  transform: scale(1.1);
}

.icon-btn svg {
  transition: all 0.3s ease;
}

.icon-btn:hover svg {
  fill: white;
}

/* Alias pour compatibilité */
.link-arrow {
  color: #8e4248;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
  margin-top: 1rem;
  display: inline-block;
}

.link-arrow:hover {
  color: #654321;
}

/* ===========================
   FOOTER
   Site footer with links and social media
   =========================== */
.footer {
  color: #333;
  padding: 4rem 0 2rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .logo {
  align-self: flex-start;
  height: 60px;
  width: 60px;
  border-radius: 5rem;
}

.footer-social div {
  display: flex;
  gap: 0.5rem;
}
.footer h4 {
  margin-bottom: 1rem;
  color: #8e4248;
  font-weight: 600;
  font-size: 1rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer .links a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}

.footer a:hover {
  color: #8e4248;
}

.footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
}

/* ===========================
   MODALS
   Modal dialogs and overlays
   =========================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  color: #8e4248;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #666;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h3 {
  margin-bottom: 0.5rem;
  color: #333;
}

.modal-body p {
  margin-bottom: 1rem;
  color: #666;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-bottom: 1.5rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #8e4248;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #eee;
  text-align: right;
}

/* ===========================
   ANIMATIONS
   CSS keyframes and transitions
   =========================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.slide-up {
  animation: slideUp 0.4s ease-out;
}

/* ===========================
   RESPONSIVE DESIGN
   Media queries for different screen sizes
   =========================== */
@media (max-width: 1024px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-grid.reverse {
    direction: ltr;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    justify-content: center;
  }

  .section {
    padding: 2rem 0;
  }

  .section#association {
    padding: 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .content-card {
    padding: 1rem;
  }

  .content-card h2 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .adoption-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero {
    padding: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .btn-large {
    padding: 1rem 1.5rem;
  }

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

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}

/* ===========================
   MODAL COMPONENT STYLES
   Reusable modal dialog styles
   =========================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-container {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
}

.modal-sm .modal-content {
  max-width: 400px;
}
.modal-md .modal-content {
  max-width: 600px;
}
.modal-lg .modal-content {
  max-width: 800px;
}
.modal-xl .modal-content {
  max-width: 1000px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8e4248;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 0.5rem;
  color: #6b7280;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 1rem 1rem;
}

.modal-footer .btn {
  margin: 0;
}

/* Modal animations */
.modal.show .modal-overlay {
  animation: fadeIn 0.2s ease-out;
}

.modal.show .modal-content {
  animation: slideUp 0.3s ease-out;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===========================
   CAROUSEL COMPONENT STYLES
   Image carousel with navigation and thumbnails
   =========================== */

.carousel {
  position: relative;
  width: 100%;
}

.carousel-main {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #f8f9fa;
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 400px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

.carousel-square {
  aspect-ratio: 1;
}

.carousel-wide {
  aspect-ratio: 16/9;
}

.carousel-tall {
  aspect-ratio: 3/4;
}

/* Navigation arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

/* Slide indicators */
.carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-indicator.active,
.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 1);
}

/* Thumbnails */
.carousel-thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding: 0.5rem;
}

.carousel-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background: none;
  padding: 0;
}

.carousel-thumbnail.active {
  border-color: #8e4248;
  box-shadow: 0 0 0 2px rgba(142, 66, 72, 0.2);
}

.carousel-thumbnail:hover {
  border-color: #8e4248;
  transform: scale(1.05);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive design */
@media (max-width: 768px) {
  .carousel-slides {
    height: 300px;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-prev {
    left: 0.5rem;
  }

  .carousel-next {
    right: 0.5rem;
  }

  .carousel-thumbnails {
    gap: 0.25rem;
  }

  .carousel-thumbnail {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .carousel-slides {
    height: 250px;
  }

  .carousel-thumbnails {
    display: none;
  }
}

/* ===========================
   PRINT STYLES
   Styles for printed pages
   =========================== */
@media print {
  .header,
  .cookie-banner,
  .modal,
  .footer {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: none;
    color: #333;
  }

  .hero-overlay {
    display: none;
  }

  .btn {
    border: 1px solid #333;
    background: none;
    color: #333;
  }

  .section {
    padding: 1rem 0;
    break-inside: avoid;
  }

  .animal-card,
  .news-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* ===========================
   HIGH CONTRAST MODE
   Accessibility enhancements for high contrast
   =========================== */
@media (prefers-contrast: high) {
  .btn-secondary {
    border-width: 3px;
  }

  .nav-menu a::after {
    height: 3px;
  }

  .modal-content {
    border: 2px solid #333;
  }
}

/* ===========================
   GRID UTILITIES
   Reusable grid layouts
   =========================== */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* ===========================
   NEWS SECTION
   News cards and articles
   =========================== */
.news-grid {
  margin-bottom: 2rem;
}

.news-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.news-card-link:hover .news-card {
  transform: translateY(-4px);
}

.news-card-link:hover .link-arrow {
  color: #654321;
}

.news-card-link:focus {
  outline: none;
}

.news-card-link:focus .news-card {
  outline: 2px solid #8e4248;
  outline-offset: 2px;
}

.news-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.news-badge.financial {
  background: #e3f2fd;
  color: #1976d2;
}

.news-badge.action {
  background: #fff3e0;
  color: #f57c00;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.news-date {
  font-size: 0.875rem;
  color: #666;
}

.news-separator {
  color: #999;
  font-size: 0.875rem;
}

.news-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #8e4248;
  line-height: 1.4;
}

.news-cta {
  text-align: center;
}

/* ===========================
   ADOPTION SECTION
   Animal cards for adoption
   =========================== */

.adoption-grid {
  margin-bottom: 2rem;
}

.animal-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  height: 100%;
}

.animal-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.animal-card-link:hover .animal-card {
  transform: translateY(-4px);
}

.animal-card-link:hover .link-arrow {
  color: #654321;
}

.animal-card-link:focus {
  outline: none;
}

.animal-card-link:focus .animal-card {
  outline: 2px solid #8e4248;
  outline-offset: 2px;
}

.animal-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.animal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.animal-card:hover .animal-image img {
  transform: scale(1.1);
}

.animal-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.animal-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #8e4248;
}

.animal-info p {
  color: #666;
  line-height: 1.5;
}

/* Unpublished article indicator */
.unpublished-indicator {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  backdrop-filter: blur(4px);
}

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

/* ===========================
   FORM COMPONENTS
   Global form elements and styling
   =========================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.875rem;
}

.required {
  color: #ff6b35;
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: #666;
  z-index: 1;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: white;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #8e4248;
  box-shadow: 0 0 0 3px rgba(142, 66, 72, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #e53e3e;
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-error {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-error::before {
  content: "⚠️";
  font-size: 0.75rem;
}

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

.form-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #8e4248;
}

/* ===========================
   ALERT COMPONENTS
   Success, error, warning and info alerts
   =========================== */
.alert {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-error {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.alert-success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-warning {
  background-color: #fffbeb;
  border-color: #fed7aa;
  color: #d97706;
}

.alert-info {
  background-color: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

/* ===========================
   REDUCED MOTION
   Accessibility for users who prefer reduced motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }

  html {
    scroll-behavior: auto;
  }
}
