html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #343a40;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header and Navigation */
.navbar {
  background: white !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  min-height: 100px;
  border-bottom: 3px solid rgba(30, 58, 138, 0.2);
}

.navbar-brand-section {
  width: 100%;
  background-color: white;
  padding: 15px 20px;
  margin: 0 auto 15px auto;
  max-width: 300px;
  text-align: center;
}

.navbar-brand {
  font-weight: bold;
  color: #2c3e50 !important;
  text-decoration: none;
  font-size: 1.5rem;
  margin: 0;
  text-shadow: none;
}

.navbar-brand:hover {
  color: #1e3a8a !important;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.nav-logo {
  padding: 10px;
}

.navbar .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  margin: 0 10px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  border-radius: 25px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.navbar .nav-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;
}

.navbar .nav-link:hover::before {
  left: 100%;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff !important;
  background: linear-gradient(45deg, #fbbf24, #f59e0b);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

/* Centered container for entire site */
.site-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar specific centering */
.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Navigation collapse section */
.navbar-collapse {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
  padding: 15px 20px;
  margin-top: 0;
  width: 100%;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* Navigation menu centering */
.navbar-nav {
  align-items: center;
  justify-content: center;
  width: 100%;
}

.navbar-nav .nav-item {
  margin: 0 8px;
}

/* Dropdown menu styling */
.dropdown-menu {
  border: none;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(30, 58, 138, 0.3);
  padding: 15px 0;
  margin-top: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

.dropdown-item {
  padding: 12px 25px;
  border-radius: 10px;
  margin: 3px 15px;
  transition: all 0.3s ease;
  color: #333;
  font-weight: 500;
}

.dropdown-item:hover {
  background: linear-gradient(45deg, #1e3a8a, #1e40af);
  color: white;
  transform: translateX(8px);
  box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

/* Content Wrapper */
.content-wrapper {
  flex: 1 0 auto; /* This makes it take up all available space */
  width: 100%;
  max-width: 1400px; /* Maximum width for content */
  margin: 0 auto; /* Center the content */
  position: relative;
  padding-bottom: 3rem; /* Add some bottom padding for spacing before footer */
  overflow-x: hidden; /* Prevent horizontal overflow */
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    );
  animation: float 6s ease-in-out infinite;
}

.hero-container {
  background: linear-gradient(
      135deg,
      rgba(52, 152, 219, 0.7) 0%,
      rgba(41, 128, 185, 0.7) 50%,
      rgba(26, 188, 156, 0.7) 100%
    ),
    url("/uploads/hero.webp");
  background-size: 400% 400%, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  animation: gradientShift 8s ease infinite;
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/uploads/hero.webp");
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  z-index: 0;
}

.hero-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(52, 152, 219, 0.6) 0%,
    rgba(41, 128, 185, 0.6) 50%,
    rgba(26, 188, 156, 0.6) 100%
  );
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffffff, #f1c40f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

/* Gradient Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

p {
  text-align: justify;
}

/* Section Styling */
.section {
  padding: 20px 0;
}

.section-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding: 15px 25px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.text-center .section-title {
  margin: 0 auto 2rem auto;
}

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 30px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-title {
  font-weight: 600;
}

/* Team Members */
.team-member {
  text-align: center;
}

.team-member-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.team-member-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.team-member-title {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Testimonials */
.testimonial {
  background-color: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
  font-style: italic;
}

.testimonial-author {
  font-weight: 600;
  margin-top: 15px;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #f8f9fa;
  flex-shrink: 0; /* Prevents the footer from shrinking */
  width: 100%;
  position: relative; /* Changed from fixed to relative */
  margin-top: auto; /* Auto margin at the top pushes it to the bottom */
  overflow-x: hidden; /* Prevent horizontal overflow */
  box-sizing: border-box;
  text-align: center;
  padding: 40px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer h5 {
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.footer a {
  color: #f8f9fa;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer a:hover {
  color: #007bff;
  transform: translateY(-2px);
}

.footer hr {
  background-color: rgba(255, 255, 255, 0.2);
  margin: 30px auto;
  max-width: 800px;
}

.social-links {
  text-align: center;
  margin: 20px 0;
}

.social-links a {
  display: inline-block;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: #007bff;
  color: #fff;
}

/* Contact Form */
.contact-form .form-control {
  border-radius: 4px;
  padding: 10px 15px;
}

.contact-info {
  background-color: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Blog Posts */
.blog-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.blog-date {
  font-size: 0.85rem;
  color: #6c757d;
}

.blog-tags {
  margin-top: 10px;
}

.blog-tag {
  display: inline-block;
  background-color: #e9ecef;
  color: #495057;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0.75rem 0;
}

/* Buttons */
.btn {
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(45deg, #3498db, #2980b9);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Make container full height */
.container {
  width: 100%;
  max-width: 1200px; /* Set a maximum width for better readability */
  padding-right: 20px;
  padding-left: 20px;
  margin-right: auto;
  margin-left: auto;
  box-sizing: border-box;
}

/* Hero section centering */
.hero {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20vh;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Section centering */
.section {
  text-align: center;
  margin: 0 auto;
  max-width: 1200px;
}

.section-title {
  text-align: center;
  margin: 0 auto 2rem auto;
}

/* Card layouts - centered grid */
.row {
  justify-content: center;
}

.card {
  margin: 0 auto 30px auto;
}

/* Team members centering */
.team-member {
  text-align: center;
  margin: 0 auto;
}

/* Blog posts centering */
.blog-card {
  margin: 0 auto 30px auto;
}

/* Make sure all sections have proper padding/margin */
section {
  margin-bottom: 2rem;
}

/* Ensure all Bootstrap containers are properly sized on mobile */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .container,
  .container-fluid,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

@media (max-width: 576px) {
  .container,
  .container-fluid,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

/* Media Queries for Responsive Design */
@media (max-width: 991.98px) {
  .navbar {
    padding: 10px 0;
    min-height: 80px;
  }

  .content-wrapper {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
  }

  .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .navbar .nav-link {
    margin: 5px 0;
    text-align: center;
  }
}

@media (max-width: 767.98px) {
  .hero {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section {
    padding: 40px 0;
    text-align: center;
  }

  .team-member-img {
    width: 150px;
    height: 150px;
  }

  /* Mobile container adjustments */
  .container {
    max-width: 100%;
    padding-right: 10px;
    padding-left: 10px;
  }

  .content-wrapper {
    padding-left: 10px;
    padding-right: 10px;
  }

  .footer {
    padding: 30px 0;
    text-align: center;
  }

  .navbar-brand-section {
    margin-bottom: 15px;
    max-width: 280px;
    padding: 12px 15px;
  }

  .navbar {
    min-height: 70px;
  }
  .navbar .container {
    padding: 0 10px;
  }

  .navbar-collapse {
    margin-top: 0;
    padding: 12px 15px;
    border-radius: 8px;
  }

  .navbar .nav-link {
    margin: 5px 5px;
    padding: 10px 15px;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Ultra small mobile adjustments */
  .container {
    padding-right: 5px;
    padding-left: 5px;
  }

  .content-wrapper {
    margin: 0;
    padding-left: 5px;
    padding-right: 5px;
  }

  .footer {
    margin: 0;
    padding: 20px 5px;
  }

  .navbar {
    min-height: 60px;
    padding: 5px 0;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar .nav-link {
    padding: 8px 12px;
    margin: 2px 3px;
  }

  .navbar-brand-section {
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .navbar .container {
    padding: 0 5px;
  }

  .navbar-collapse {
    margin-top: 0;
    padding: 10px 12px;
    border-radius: 6px;
  }
}
