/* Enhanced Responsive CSS with Mobile-First Approach */

:root {
  --primary-green: #198754;
  --light-green: #d1e7dd;
  --dark-green: #146c43;
  --text-dark: #333;
  --text-light: #666;
  --border-light: #e9ecef;
  --shadow-light: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --overlay-dark: rgba(0, 0, 0, 0.5);
  --overlay-light: rgba(0, 0, 0, 0.3);
}

/* Base Styles - Mobile First */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f9f4;
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 300;
}


/* Navigation Enhancements */
.navbar-brand {
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
}

/* Enhanced Hero Section with Responsive Background */
.hero-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section.has-bg-image {
  background: linear-gradient(var(--overlay-dark), var(--overlay-dark)), 
              url('') center/cover no-repeat;
}

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

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section h1,
.hero-section p,
.hero-section .btn {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: white !important;
}

/* Enhanced About Section with Background */
.about-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.about-section.has-bg-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-light);
  z-index: 1;
}

.about-section .container {
  position: relative;
  z-index: 2;
}

.about-section.has-bg-image h2,
.about-section.has-bg-image p {
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.about-section.has-bg-image {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
}

/* Card Enhancements */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 0.75rem;
  border: none;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

/* Enhanced Image Gallery Styles */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

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

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--overlay-dark), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

/* Button Improvements */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

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

.btn-success {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(25, 135, 84, 0.4);
}

.btn-outline-success {
  border: 2px solid white;
  color: white;
  background: transparent;
}

.btn-outline-success:hover {
  background: white;
  color: var(--primary-green);
  border-color: white;
}

/* Parallax Effect */
.parallax-section {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Enhanced Responsive Images */
.responsive-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Social Links */
.social-links a {
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-green) !important;
  transform: translateY(-2px);
}

/* Footer Enhancements */
footer {
  margin-top: 3rem;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Loading Animation */
.fade-in {
  animation: fadeIn 1s ease-in;
}

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

/* List Improvements */
.list-group-item {
  border: none;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-light);
  transition: box-shadow 0.3s ease;
}

.list-group-item:hover {
  box-shadow: var(--shadow-medium);
}

/* Mobile-specific improvements */
@media (max-width: 576px) {
  .hero-section {
    min-height: 50vh;
    background-attachment: scroll; /* Fixed backgrounds don't work well on mobile */
  }
  
  .about-section {
    background-attachment: scroll;
  }
  
  .parallax-section {
    background-attachment: scroll;
  }
  
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .navbar-brand span {
    font-size: 0.9rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .gallery-item {
    aspect-ratio: 16/9;
  }
}

/* Tablet Styles */
@media (min-width: 768px) {
  body {
    font-size: 17px;
  }
  
  .hero-section {
    min-height: 70vh;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
  }
  
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop Styles */
@media (min-width: 992px) {
  body {
    font-size: 18px;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .image-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .image-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Print Styles */
@media print {
  .navbar, .btn, .social-links {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
  
  .text-success {
    color: black !important;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .parallax-section {
    background-attachment: scroll;
  }
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.navbar-toggler:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-green: #000;
    --text-dark: #000;
    --border-light: #000;
  }
}

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

/* Custom Animations */
.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
