:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
}

.main-container {
  position: relative;
}

/* Header Styles */
.top-bar {
  background: var(--primary-color);
  color: white;
  padding: 12px 0;
  font-size: 14px;
  position: relative;
  z-index: 1025;
}

.navbar {
  background: white !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  transition: all 0.3s ease-in-out;
  position: relative;
  z-index: 1030;
}

/* Navbar states */
.navbar.navbar-scrolled {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(0);
}

.navbar.navbar-hidden {
  transform: translateY(-100%);
}

.navbar-brand {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 10px;
  transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
}

/* Fix navbar collapse menu visibility */
.navbar-collapse {
  z-index: 9999;
  position: relative;
}

/* Ensure dropdown menu is properly positioned and visible */
.navbar-collapse.show {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  position: relative;
  z-index: 9999;
}

/* Fix for mobile dropdown visibility */
@media (max-width: 991.98px) {
  .navbar-collapse.show {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    padding: 20px;
    z-index: 9999;
  }
  
  .navbar-nav {
    margin-top: 10px;
  }
  
  .navbar-nav .nav-item {
    margin: 5px 0;
  }
  
  .navbar-nav .nav-link {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

.contact-icon {
  display: block;
  margin: 10px 0;
  font-size: 24px;
  color: #fff;
  background: #25d366;
  padding: 10px;
  border-radius: 50%;
  text-align: center;
  cursor: pointer;
}

.contact-icon.phone {
  background: #0a66c2;
}

.fixed-contact-icons {
  position: fixed;
  right: 20px;
  top: 45%;
  transform: translateY(-50%);
  z-index: 9999;
}

.popover-body a {
  display: block;
  margin-bottom: 5px;
  color: #0a66c2;
  text-decoration: none;
}

.popover-body a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero-carousel {
  margin-top: 0; /* Remove margin since navbar positioning is dynamic */
  height: 80vh;
  min-height: 600px;
}

/* Add padding to body when navbar is fixed */
body.navbar-fixed {
  padding-top: 75px; /* Approximate navbar height */
}

.carousel-item {
  height: 80vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  background-color: transparent;
}

.carousel-indicators button.active {
  background-color: white;
}

.btn-primary {
  background: var(--accent-color);
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* Services Section */
.services {
  padding: 80px 0;
  background: #f8f9fa;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  margin-bottom: 30px;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

/* Gallery Section */
.gallery {
  padding: 80px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 30px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(52, 152, 219, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Contact Section */
.contact {
  padding: 80px 0;
  background: var(--primary-color);
  color: white;
}

.contact-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.contact-form {
  background: white;
  padding: 40px;
  border-radius: 15px;
  color: var(--text-dark);
}

.form-control {
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
}

/* Footer */
.footer {
  background: #1a252f;
  color: white;
  padding: 50px 0 20px;
}

.footer h5 {
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.footer a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: white;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #c0392b;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

/* Testimonials Section */
.testimonial-carousel .carousel-item {
  height: auto !important;
  min-height: auto !important;
  background: none !important;
  padding: 20px 0;
}

.testimonials {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.testimonial-carousel .testimonial-carousel-item {
  min-height: auto !important;
  height: auto !important;
  padding: 20px 0;
}

.testimonial-card {
  background: white;
  padding: 30px 25px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  text-align: center;
  margin: 15px;
  position: relative;
  overflow: hidden;
  height: 100%;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
}

.testimonial-quote {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 25px;
  font-style: italic;
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.testimonial-quote::before {
  content: '"';
  font-size: 3rem;
  color: var(--secondary-color);
  position: absolute;
  top: -15px;
  left: -8px;
  font-family: serif;
  opacity: 0.3;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: auto;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.testimonial-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.testimonial-location {
  color: var(--text-light);
  font-size: 13px;
}

.testimonial-rating {
  margin-bottom: 15px;
}

.testimonial-rating i {
  color: #ffd700;
  font-size: 16px;
  margin: 0 1px;
}

.testimonial-carousel .carousel-control-prev,
.testimonial-carousel .carousel-control-next {
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  transition: all 0.3s;
}

.testimonial-carousel .carousel-control-prev {
  left: -22px;
}

.testimonial-carousel .carousel-control-next {
  right: -22px;
}

.testimonial-carousel .carousel-control-prev:hover,
.testimonial-carousel .carousel-control-next:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.testimonial-carousel .carousel-indicators {
  bottom: -40px;
}

.testimonial-carousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-light);
  border: none;
  margin: 0 4px;
}

.testimonial-carousel .carousel-indicators .active {
  background-color: var(--secondary-color);
}

/* Mobile responsiveness for testimonials */
@media (max-width: 991px) {
  .testimonial-card {
    margin: 10px 5px;
    padding: 25px 20px;
    max-height: 350px;
  }
  
  .testimonial-quote {
    font-size: 15px;
    margin-bottom: 20px;
  }
  
  .testimonial-avatar {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .top-bar {
    height: 70px;
  }

  .testimonial-carousel .testimonial-carousel-item .row .col-lg-4 {
    margin-bottom: 20px;
  }
  
  .testimonial-card {
    margin: 10px auto;
    max-width: 100%;
    height: auto;
    min-height: 280px;
  }
  
  .testimonial-quote {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .testimonial-carousel .carousel-control-prev,
  .testimonial-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
  }
  
  .testimonial-carousel .carousel-control-prev {
    left: -15px;
  }
  
  .testimonial-carousel .carousel-control-next {
    right: -15px;
  }
}

@media (max-width: 576px) {
  .testimonials {
    padding: 60px 0;
  }
  
  .testimonial-card {
    margin: 10px 0;
    padding: 20px 15px;
    min-height: 250px;
  }
  
  .testimonial-quote {
    font-size: 13px;
    margin-bottom: 15px;
  }
  
  .testimonial-avatar {
    width: 45px;
    height: 45px;
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .testimonial-name {
    font-size: 15px;
  }
  
  .testimonial-location {
    font-size: 12px;
  }
}

.current-page {
  background: var(--primary-color);
  color: white;
  padding: 30px 0;
  text-align: center;
}

/* Modal Styles */
.modal-content {
  border-radius: 15px;
}

.modal-header {
  background: var(--primary-color);
  color: white;
  border-radius: 15px 15px 0 0;
}