html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Montserrat', sans-serif;
}

.top-bar {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 50;
}

.top-bar.hidden {
  transform: translateY(-100%);
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.main-header {
  transition: all 0.3s ease-in-out;
  position: sticky;
  top: 0;
}

.main-header.sticky {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  top: 0;
}

.mobile-menu {
  transition: transform 0.3s ease-in-out;
}

.mobile-menu-open {
  transform: translateX(0);
}

.mobile-menu-closed {
  transform: translateX(100%);
}

.hero-overlay {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
}

.service-card {
  transition: all 0.3s ease-in-out;
}

.service-card:hover {
  transform: translateY(-10px);
}

.gallery-item {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.gallery-item img {
  transition: transform 0.5s ease-in-out;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 1s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

.bg-hippo-primary {
  background-color: #7b5e82;
}

.bg-hippo-secondary {
  background-color: #6db5a3;
}

.text-hippo-primary {
  color: #7b5e82;
}

.text-hippo-secondary {
  color: #6db5a3;
}

.border-hippo-primary {
  border-color: #7b5e82;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 100;
  padding: 50px;
  overflow: auto;
  transition: opacity 0.3s ease;
}

.modal-content {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.modal-close {
  color: white;
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #84a59d;
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  left: 0;
}

.modal-nav button {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-center: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-nav button:hover {
  background-color: rgba(132, 165, 157, 0.6);
}

.horse-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.horse-card:hover {
  transform: translateY(-5px);
}

.horse-thumb {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.horse-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.horse-thumb::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: '\f00e';
  color: #5d4e60;
  font-size: 14px;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.horse-thumb:hover::before {
  background-color: #5d4e60;
  color: white;
  opacity: 1;
  transform: scale(1.1);
}

.horse-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.horse-thumb:hover img {
  transform: scale(1.1);
}

.horse-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.horse-thumb:hover::after {
  opacity: 1;
}

.horse-name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  color: white;
  font-weight: 600;
  z-index: 2;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.past-horse .horse-thumb img {
  filter: grayscale(100%);
}

.past-horse .horse-thumb:hover img {
  filter: grayscale(50%);
}

.horse-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 100;
  padding: 2rem;
  overflow: auto;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: white;
  position: relative;
}

.lightbox-img {
  max-width: 90%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.lightbox-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.lightbox-desc {
  max-width: 800px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.lightbox-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.lightbox-nav-btn {
  background-color: #5d4e60;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.lightbox-nav-btn:hover {
  background-color: #84a59d;
}

.lightbox-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.lightbox-thumb {
  width: 60px;
  height: 60px;
  border-radius: 0.25rem;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.lightbox-thumb.active {
  border-color: #f9dcc4;
}

.lightbox-thumb:hover {
  transform: scale(1.1);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}