html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e8f5e9 0%, #d7ccc8 50%, #bcaaa4 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Smooth fade-in animation for page content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Modern Navigation */
.navbar-modern {
  background: linear-gradient(135deg, 
    rgba(27, 94, 32, 0.95) 0%, 
    rgba(46, 125, 50, 0.95) 25%,
    rgba(76, 175, 80, 0.95) 50%,
    rgba(139, 195, 74, 0.95) 75%,
    rgba(205, 220, 57, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
              0 2px 8px rgba(0, 0, 0, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 1rem 0;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  position: relative;
  gap: 2rem;
}

.navbar-container > .modern-brand {
  grid-column: 1;
  justify-self: start;
}

.navbar-container > .navbar-collapse {
  grid-column: 2;
  width: 100%;
}

@media (min-width: 992px) {
  .navbar-container > .navbar-collapse {
    display: flex;
    justify-content: center;
  }
}

.navbar-container > .navbar-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.navbar-modern.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
              0 1px 4px rgba(0, 0, 0, 0.1);
}

.navbar-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.4) 80%,
    transparent 100%);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Modern Brand */
.modern-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.modern-brand::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modern-brand:hover::before {
  width: 300px;
  height: 300px;
}

.modern-brand:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.brand-icon {
  font-size: 2rem;
  display: inline-block;
  animation: float-gentle 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-main {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3),
               0 0 20px rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #fff9c4 50%, #fff59d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.brand-tagline {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: -2px;
  position: relative;
  z-index: 1;
}

/* Modern Nav Links */
.modern-nav {
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.modern-link {
  display: inline-block;
  padding: 0.75rem 1.5rem !important;
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  margin: 0 0.25rem;
}

.modern-link::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;
}

.modern-link:hover::before {
  left: 100%;
}

.modern-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.modern-link:hover::after {
  width: 80%;
}

.modern-link:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nav-text {
  position: relative;
  z-index: 1;
}

/* Modern Toggler */
.modern-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.modern-toggler:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.modern-toggler span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modern-toggler:hover span {
  background: #fff9c4;
}

.modern-toggler[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.modern-toggler[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.modern-toggler[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Restart Button */
.btn-restart {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-restart::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-restart:hover::before {
  width: 300px;
  height: 300px;
}

.btn-restart:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-restart:active {
  transform: translateY(0);
}

.btn-restart:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.restart-icon {
  font-size: 1.1rem;
  display: inline-block;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.btn-restart:hover .restart-icon {
  transform: rotate(180deg);
}

.restart-text {
  position: relative;
  z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .navbar-container {
    grid-template-columns: auto auto;
  }

  .navbar-container > .modern-brand {
    grid-row: 1;
    position: relative;
    z-index: 2;
  }

  .navbar-container > .navbar-collapse {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 1rem;
  }

  .navbar-container > .navbar-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    position: relative;
    z-index: 2;
  }

  .modern-toggler {
    min-width: 44px;
    min-height: 44px;
  }
  
  .btn-restart .restart-text {
    display: none;
  }
  
  .btn-restart {
    padding: 0.6rem;
    min-width: 40px;
  }
  
  .modern-nav {
    margin-top: 1rem;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
  }
  
  .modern-link {
    margin: 0.25rem 0;
    display: block;
    text-align: center;
  }
  
  .brand-main {
    font-size: 1.5rem;
  }
  
  .brand-tagline {
    font-size: 0.65rem;
  }
}

/* Hero Section */
.birds-hero {
  background: linear-gradient(135deg, rgba(46,125,50,0.85) 0%, rgba(139,195,74,0.8) 40%, rgba(255,235,59,0.8) 75%, rgba(253,216,53,0.9) 100%),
              url("/images/danube-delta.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 0;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
}

/* Search and Filter Section */
.search-filter-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-box-container {
  margin-bottom: 1.5rem;
}

.search-form {
  width: 100%;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: #4a7c2a;
  box-shadow: 0 0 0 4px rgba(74, 124, 42, 0.15),
              0 5px 15px rgba(74, 124, 42, 0.2);
  transform: scale(1.02);
}

.btn-search {
  background: linear-gradient(135deg, #3e2723 0%, #4a7c2a 30%, #6b9e3d 60%, #8d6e63 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(62, 39, 35, 0.4);
  background: linear-gradient(135deg, #2d1b17 0%, #3e2723 30%, #4a7c2a 60%, #6b9e3d 100%);
}

.btn-clear {
  background: #f0f0f0;
  color: #666;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-clear:hover {
  background: #e0e0e0;
  color: #333;
}

.results-count {
  padding: 1rem;
  background: linear-gradient(135deg, #e8f5e9 0%, #d7ccc8 50%, #bcaaa4 100%);
  border-radius: 10px;
  color: #3e2723;
}

.results-count strong {
  color: #2d1b17;
}

/* Filter Section */
.filter-section {
  margin-top: 1.5rem;
}

.filter-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #3e2723;
}

.filter-subtitle {
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  animation: fadeIn 0.6s ease-out;
}

.btn-filter {
  background: #f0f0f0;
  border: 2px solid transparent;
  color: #333;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-filter:hover {
  background: linear-gradient(135deg, #5d4037 0%, #4a7c2a 50%, #6b9e3d 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(93, 64, 55, 0.4);
}

.btn-filter.active {
  background: linear-gradient(135deg, #3e2723 0%, #4a7c2a 30%, #6b9e3d 60%, #8d6e63 100%);
  color: white;
  border-color: #5d4037;
}

/* Birds Grid */
.birds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.bird-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  animation: fadeInUp 0.6s ease-out backwards;
}

.bird-card:nth-child(1) { animation-delay: 0.1s; }
.bird-card:nth-child(2) { animation-delay: 0.2s; }
.bird-card:nth-child(3) { animation-delay: 0.3s; }
.bird-card:nth-child(4) { animation-delay: 0.4s; }
.bird-card:nth-child(5) { animation-delay: 0.5s; }
.bird-card:nth-child(6) { animation-delay: 0.6s; }
.bird-card:nth-child(n+7) { animation-delay: 0.7s; }

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

.bird-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
  z-index: 1;
}

.bird-card:hover::before {
  left: 100%;
}

.bird-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border: 2px solid rgba(74, 124, 42, 0.3);
}

.bird-card-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.bird-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(1);
}

.bird-card:hover .bird-card-image img {
  transform: scale(1.15) rotate(2deg);
  filter: brightness(1.1);
}

.bird-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(62,39,35,0.8) 0%, rgba(74,124,42,0.8) 50%, rgba(107,158,61,0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(5px);
}

.bird-card:hover .bird-card-overlay {
  opacity: 1;
  transform: scale(1.05);
}

.btn-view {
  background: white;
  color: #667eea;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-view:hover {
  background: #667eea;
  color: white;
  transform: scale(1.05);
}

.bird-card-content {
  padding: 1.5rem;
}

.bird-card-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

.bird-card-scientific {
  font-style: italic;
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.bird-card-info {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-region {
  background: linear-gradient(135deg, #4a7c2a 0%, #6b9e3d 50%, #8d6e63 100%);
  color: white;
}

.badge-habitat {
  background: linear-gradient(135deg, #5d4037 0%, #8d6e63 50%, #a1887f 100%);
  color: white;
}

.bird-card-description {
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bird Detail Page */
.bird-detail-hero {
  background-size: cover;
  background-position: center;
  color: white;
  padding: 100px 0;
  margin: 1.5rem 1.5rem 0;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-back {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(255,255,255,0.3);
  color: white;
  transform: translateX(-5px);
}

.bird-detail-title {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.bird-detail-scientific {
  font-size: 1.5rem;
  font-style: italic;
  opacity: 0.9;
}

.bird-detail-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.bird-detail-section h2 {
  color: #3e2723;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.bird-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
}

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

.characteristic-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #e8f5e9 0%, #d7ccc8 50%, #bcaaa4 100%);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.characteristic-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.characteristic-icon {
  font-size: 2.5rem;
}

.characteristic-content h4 {
  color: #3e2723;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.characteristic-content p {
  color: #666;
  margin: 0;
}

/* Info grid pentru sectiunile de date stiintifice */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.info-item {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8f5e9 100%);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 600;
}

.info-value {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.bird-image-card {
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.bird-image-card img {
  border-radius: 10px;
  width: 100%;
  display: block;
}

/* Bird Navigation */
.bird-navigation {
  margin-top: 2rem;
}

.btn-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-nav:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  color: #3e2723;
}

.btn-nav-prev {
  text-align: left;
}

.btn-nav-next {
  text-align: right;
  flex-direction: row-reverse;
}

.nav-arrow {
  font-size: 1.5rem;
  color: #5d4037;
  font-weight: bold;
}

.nav-content {
  flex: 1;
  margin: 0 1rem;
}

.nav-label {
  font-size: 0.85rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.nav-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.no-results p {
  font-size: 1.2rem;
  color: #666;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #3e2723 0%, #4a7c2a 30%, #6b9e3d 60%, #8d6e63 100%);
  color: white !important;
  margin-top: 4rem;
  padding: 1.5rem 0;
}

.footer .container {
  color: white !important;
}

.footer a {
  color: rgba(255,255,255,0.9);
}

.footer a:hover {
  color: white;
}

/* Home Page */
.home-hero {
  background: 
    linear-gradient(135deg, rgba(27,94,32,0.75) 0%, rgba(76,175,80,0.7) 35%, rgba(255,235,59,0.65) 70%, rgba(255,241,118,0.7) 100%),
    url("/images/danube-delta.jpg"),
    url("https://images.unsplash.com/photo-1505247964246-1f0a90443c36?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
  padding: 140px 0;
  text-align: center;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/images/danube-delta.jpg") center center / cover no-repeat,
              url("https://images.unsplash.com/photo-1505247964246-1f0a90443c36?auto=format&fit=crop&w=1600&q=80") center center / cover no-repeat;
  z-index: 0;
  opacity: 0.4;
}

.home-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(27,94,32,0.6) 0%, rgba(76,175,80,0.55) 35%, rgba(255,235,59,0.5) 70%, rgba(255,241,118,0.55) 100%);
  z-index: 1;
}

.hero-decorative-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-bird {
  position: absolute;
  font-size: 3rem;
  opacity: 0.3;
  animation: float 15s infinite ease-in-out;
}

.bird-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bird-2 {
  top: 20%;
  right: 15%;
  animation-delay: 3s;
  font-size: 2.5rem;
}

.bird-3 {
  bottom: 25%;
  left: 20%;
  animation-delay: 6s;
  font-size: 2.8rem;
}

.bird-4 {
  bottom: 15%;
  right: 10%;
  animation-delay: 9s;
  font-size: 2.2rem;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-30px) translateX(20px) rotate(5deg);
  }
  50% {
    transform: translateY(-60px) translateX(-15px) rotate(-5deg);
  }
  75% {
    transform: translateY(-30px) translateX(10px) rotate(3deg);
  }
}

.hero-content-box {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 30px;
  padding: 4rem 3rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: fadeInUp 1s ease-out;
  max-width: 900px;
  margin: 0 auto;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(5px);
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: fadeIn 1.2s ease-out;
}

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

.home-hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.3),
               0 0 20px rgba(255, 255, 255, 0.2);
  line-height: 1.2;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.title-line-1 {
  display: block;
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0.95;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.title-line-2 {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #fff9c4 50%, #fff59d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1em;
  letter-spacing: 2px;
}

.home-hero-subtitle {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  font-weight: 300;
  letter-spacing: 0.5px;
  animation: fadeInUp 1s ease-out 0.4s both;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2.5rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff9c4;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(255, 255, 255, 0.3);
}

.btn-explore, .btn-cta {
  background: white;
  color: #3e2723;
  padding: 1.2rem 3.5rem;
  border-radius: 35px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3),
              0 0 0 0 rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.8s both;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-explore::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
  z-index: 0;
}

.btn-explore:hover::before {
  width: 300px;
  height: 300px;
}

.btn-explore:hover, .btn-cta:hover {
  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 50%, #fff176 100%);
  color: #2d5016;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4),
              0 0 0 4px rgba(255, 255, 255, 0.2);
}

.btn-arrow {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.btn-explore:hover .btn-arrow {
  transform: translateX(5px);
}

.btn-explore span {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.btn-explore {
  position: relative;
  z-index: 2;
}

.features-section {
  margin: 4rem 0;
}

.feature-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.2s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(74,124,42,0.1) 0%, transparent 70%);
  transition: transform 0.6s;
  transform: scale(0);
}

.feature-card:hover::before {
  transform: scale(1);
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  border: 2px solid rgba(74, 124, 42, 0.2);
}

.feature-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(10deg);
  animation: none;
}

.feature-card h3 {
  color: #667eea;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
}

.cta-section {
  background: white;
  padding: 4rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin: 4rem 0;
}

.cta-section h2 {
  color: #3e2723;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.cta-section .lead {
  font-size: 1.3rem;
  color: #666;
  margin-bottom: 2rem;
}

/* Ripple effect for buttons */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced bird card name animation */
.bird-card-name {
  transition: all 0.3s ease;
}

.bird-card:hover .bird-card-name {
  color: #4a7c2a;
  transform: translateX(5px);
}

/* Pulse animation for badges */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.badge-region:hover,
.badge-habitat:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Loading animation for images */
.bird-card-image img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.bird-card-image img[src] {
  animation: none;
}

/* Enhanced search box animation */
.search-filter-section {
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title, .home-hero-title {
    font-size: 2.5rem;
  }
  
  .birds-grid {
    grid-template-columns: 1fr;
  }
  
  .bird-detail-title {
    font-size: 2.5rem;
  }
  
  .characteristics-grid {
    grid-template-columns: 1fr;
  }
  
  .home-hero-subtitle {
    font-size: 1.2rem;
  }
  
  .home-hero {
    padding: 100px 0;
  }
  
  .hero-content-box {
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
  }
  
  .home-hero-title {
    font-size: 2.8rem;
  }
  
  .title-line-1 {
    font-size: 0.5em;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .stat-divider {
    width: 50px;
    height: 1px;
  }
  
  .floating-bird {
    font-size: 2rem;
    opacity: 0.2;
  }
  
  .btn-explore {
    padding: 1rem 2.5rem;
    font-size: 1rem;
  }
}

/* Reports Page */
.reports-hero {
  background: linear-gradient(135deg, rgba(27,94,32,0.9) 0%, rgba(76,175,80,0.85) 35%, rgba(255,235,59,0.8) 70%, rgba(255,241,118,0.9) 100%),
              url("/images/danube-delta.jpg"),
              url("https://images.unsplash.com/photo-1505247964246-1f0a90443c36?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: white;
  padding: 100px 0;
  text-align: center;
  margin-bottom: 0;
}

.stats-summary {
  margin: 3rem 0;
}

.stat-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-size: 3rem;
  font-weight: 900;
  color: #4a7c2a;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
}

.chart-card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  height: 100%;
  min-height: 400px;
}

.chart-title {
  color: #3e2723;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-weight: bold;
}

.chart-container {
  position: relative;
  height: 400px;
  margin: 1rem 0;
}

.birds-table-section {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-top: 2rem;
  overflow: visible !important;
}

.birds-table-section .table-responsive.no-scroll {
  overflow-x: visible !important;
  overflow-y: visible !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

.section-title {
  color: #3e2723;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: linear-gradient(135deg, #4a7c2a 0%, #6b9e3d 100%);
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(74, 124, 42, 0.1);
  transform: scale(1.01);
}

.badge-count {
  background: linear-gradient(135deg, #4a7c2a 0%, #6b9e3d 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: bold;
}

.progress {
  background: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}