:root {
  --primary-navy: #1A3E5C;
  --teal: #009688;
  --accent-gold: #FFC107;
}

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

h1, h2, h5, .navbar-brand span {
  font-family: 'Montserrat', sans-serif;
}

/* —— Navbar Styles —— */
.custom-nav {
  background-color: rgba(26, 62, 92, 0.85) !important;
  backdrop-filter: saturate(180%) blur(10px) !important;
  height: 80px !important;
  min-height: 80px !important;
}

.custom-nav .navbar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.15rem !important;
}

.custom-nav .navbar-brand .logo {
  height: 100px !important;
  width: auto !important;
  margin: 0 !important;
}

.custom-nav .navbar-brand span {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.custom-nav .nav-link {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.custom-nav .nav-link:hover,
.custom-nav .nav-link.active {
  color: var(--teal) !important;
}

/* —— Hero Styles —— */
.custom-hero {
  display: flex;
  align-items: center;
  height: 80vh;
  padding-left: 2rem;
  background:
    linear-gradient(
      to right,
      rgba(26, 62, 92, 0.6) 0%,
      rgba(26, 62, 92, 0.6) 40%,
      rgba(26, 62, 92, 0)   70%
    ),
    url('images/hero.png') no-repeat center/cover;
  color: #fff;
}

.custom-hero .hero-text {
  max-width: 480px;
}

.custom-hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  font-weight: 700;
}

.custom-hero .text-teal {
  white-space: nowrap; /* Prevent wrapping of "Assured Tomorrow" */
}

.custom-hero p.lead {
  font-size: 1.125rem;
  margin-top: 0.5rem;
  opacity: 0.9;
}

/* Circle teal button */
.btn-circle {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-teal {
  background-color: var(--teal);
  border: none;
  color: #fff;
  font-size: 1.25rem;
}

.btn-link {
  font-size: 1.125rem;
  font-weight: 500;
}

/* —— Other Sections —— */
.bg-primary-navy {
  background-color: var(--primary-navy) !important;
}

.text-teal {
  color: var(--teal) !important;
}

.btn-accent {
  background-color: var(--accent-gold);
  color: #fff;
  border: none;
}

/* —— About Section Styles —— */
.about-section {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(350px, 1fr);
  align-items: center;
  gap: 3rem;
  padding: 5rem 3rem;
  min-height: 500px;
}

/* —— About Images Container —— */
.about-images {
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 450px;
  margin-right: auto;
  min-height: 400px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-images.visible {
  opacity: 1;
  transform: translateY(0);
}

/* back card */
.about-images img:first-child {
  width: 85%;
  display: block;
  margin-right: auto;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* front card */
.about-images img:nth-child(2) {
  position: absolute;
  top: 35%;
  left: 45%;
  transform: translateX(-20%);
  width: 75%;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* —— About Text —— */
.about-text {
  position: relative;
  z-index: 2;
  padding: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1.125rem;
  margin-bottom: 5rem;
}

/* Logos Container */
.about-logos {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 0;
}

.logo-img {
  width: 180px;
  height: 90px;
  object-fit: contain;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive design for About section */
@media (max-width: 768px) {
  .about-section {
    grid-template-columns: 1fr;
    padding: 3rem 1rem;
    min-height: auto;
  }
  .about-images {
    width: 100%;
    max-width: 350px;
    min-height: 300px;
    margin: 0 auto;
  }
  .about-images img:first-child {
    width: 100%;
    margin: 0 auto;
  }
  .about-images img:nth-child(2) {
    top: 40%;
    left: 50%;
    transform: translateX(-20%);
    width: 65%;
  }
  .about-text {
    padding: 0;
    padding-top: 2rem;
    text-align: center;
  }
  .about-text h2 {
    font-size: 2rem;
  }
  .about-text p {
    font-size: 1rem;
    margin-bottom: 4rem;
  }
  .logo-img {
    width: 140px;
    height: 70px;
  }
  .about-logos {
    gap: 2rem;
    justify-content: space-between;
  }
}

/* —— Services Section Styles —— */
.service-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  opacity: 0;
  transform: translateY(30px) rotate(2deg);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 150, 136, 0.3);
  background-color: #f8f9fa;
}

.service-icon {
  transition: transform 0.3s ease;
  animation: pulse 1.5s infinite ease-in-out;
}

.service-card:hover .service-icon {
  transform: scale(1.2) rotate(5deg);
}

.service-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  word-wrap: break-word;
  max-width: 100%;
}

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

/* Responsive adjustments for Services section */
@media (max-width: 768px) {
  .service-card {
    padding: 1.5rem;
    min-height: 180px;
  }
  .service-title {
    font-size: 1rem;
  }
  .service-card i {
    font-size: 2.5rem !important;
  }
}

/* —— Testimonials Section Styles —— */
#testimonials {
  padding: 120px 0;
}

.testimonial-content {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.carousel-item {
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

.carousel-item.active,
.carousel-item-next.carousel-item-start,
.carousel-item-prev.carousel-item-end {
  transform: translateX(0);
  opacity: 1;
}

.carousel-item-next,
.carousel-item-prev,
.carousel-item.active.carousel-item-start,
.carousel-item.active.carousel-item-end {
  transform: translateX(20px);
  opacity: 0;
}

.testimonial-text {
  font-size: 1.5rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Initials Frame */
.initials-frame {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.initials-frame:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.bg-pink {
  background-color: #FFB3BA;
}

.bg-light-blue {
  background-color: #BAE1FF;
}

.bg-peach {
  background-color: #FFDFBA;
}

.bg-light-green {
  background-color: #BAFFC9;
}

/* Carousel Controls (Arrows) */
.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: var(--teal);
  transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-size: 20px 20px;
}

/* Carousel Indicators (Dots) */
#testimonials .carousel-indicators {
  bottom: -60px;
}

#testimonials .carousel-indicators [data-bs-target] {
  background-color: #fff;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
  opacity: 0.5;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

#testimonials .carousel-indicators .active {
  background-color: var(--teal);
  opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #testimonials {
    padding: 80px 0;
  }
  .testimonial-text {
    font-size: 1.25rem;
  }
  .initials-frame {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
  }
}

/* —— Why Us Section Styles —— */
#value {
  padding: 120px 0;
}

.why-us-image {
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.why-us-image.visible {
  opacity: 1;
  transform: translateY(0);
}

.why-us-image img {
  max-width: 400px;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-us-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.why-us-content {
  padding: 1rem;
}

.why-us-heading {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.why-us-text {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.1s;
}

.why-us-list {
  list-style: none;
  padding: 0;
}

.why-us-item {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.why-us-item:nth-child(1) {
  transition-delay: 0.2s;
}

.why-us-item:nth-child(2) {
  transition-delay: 0.3s;
}

.why-us-item:nth-child(3) {
  transition-delay: 0.4s;
}

.why-us-item::before {
  content: '\2713';
  color: var(--teal);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.why-us-item.visible::before {
  transform: scale(1);
}

.why-us-heading.visible,
.why-us-text.visible,
.why-us-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #value {
    padding: 80px 0;
  }
  .why-us-image img {
    max-width: 300px;
  }
  .why-us-text {
    font-size: 1rem;
  }
  .why-us-item {
    font-size: 1rem;
    padding-left: 1.5rem;
  }
  .why-us-item::before {
    font-size: 1rem;
  }
  /* Adjust navbar brand text size on mobile */
  .custom-nav .navbar-brand span {
    font-size: 1rem;
  }
  /* Adjust hero header text size on mobile */
  .custom-hero h1 {
    font-size: 2.5rem;
  }
  /* Slightly reduce font size of Assured Tomorrow on mobile to prevent overflow */
  .custom-hero .text-teal {
    font-size: 2.3rem;
  }
}

/* —— Footer Styles —— */
footer {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #2a5175 100%);
  color: #fff;
  padding: 60px 0 40px;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-left {
  flex: 1;
}

.footer-about h5 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-right {
  flex: 1;
  text-align: right;
}

.footer-contact p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

.footer-contact a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-contact a:hover {
  color: var(--teal);
  transform: translateX(5px);
}

.footer-contact i {
  font-size: 1.25rem;
  color: var(--teal);
}

.footer-social {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.footer-social a {
  color: var(--primary-navy);
  font-size: 1.25rem;
  margin-left: 1rem;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
  background-color: var(--teal);
  color: #fff;
  transform: scale(1.1);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.footer-bottom small {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--teal);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #00796b;
  transform: translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    text-align: center;
  }

  .footer-contact p {
    font-size: 1rem;
    justify-content: center;
  }

  .footer-social {
    margin-top: 1rem;
    justify-content: center;
  }

  .footer-social a {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    margin: 0 0.5rem;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    bottom: 20px;
    right: 20px;
  }
}