/* Google Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Open+Sans:wght@300;400;500;600;700&display=swap");

/* Google Fonts - Typography */
:root {
  --font-header: "Playfair Display", serif;
  --font-body: "Open Sans", sans-serif;
  --primary-color: #2f53a4;
  --primary-gradient-start: #2f53a4;
  --primary-gradient-end: #bcd5f7;
}

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 400;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-family: var(--font-header);
}

.pointer {
  cursor: pointer;
}

.no-gutters {
  margin-right: -15px;
  margin-left: -15px;
}

img {
  max-width: 100%;
}

iframe {
  width: 100%;
}

a {
  text-decoration: none;
  transition: all 0.5s ease;
}

a:hover {
  text-decoration: none;
}

/* Navigation Menu Styling */
.navbar {
  transition: box-shadow 0.3s ease, padding-top 0.3s ease, padding-bottom 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.navbar-brand {
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  overflow: visible;
  font-family: var(--font-header);
  font-weight: 600;
}

.navbar-brand img {
  transition: transform 0.3s ease, height 0.3s ease, width 0.3s ease, max-width 0.3s ease;
  position: relative;
  z-index: 1;
  display: block;
}

/* Gradient overlay for logo */
.navbar-brand::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0.85;
  z-index: 2;
  border-radius: 0;
}

.navbar.scrolled .navbar-brand {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.navbar.scrolled .navbar-brand img {
  transform: scale(0.75);
  height: 60px !important;
}

.navbar-nav {
  transition: all 0.3s ease;
}

.navbar.scrolled .navbar-nav .nav-link {
  transform: scale(0.75);
}

.navbar-nav .btn {
  transition: transform 0.3s ease, padding 0.3s ease;
  margin-left: 1rem;
}

.navbar.scrolled .navbar-nav .btn {
  transform: scale(0.75);
  padding: 0.375rem 0.75rem;
}

.navbar.scrolled .dropdown-menu {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  margin-top: 12px !important;
}

.navbar.scrolled .dropdown-item {
  color: #212529 !important;
}

.navbar.scrolled .dropdown-item:hover {
  background-color: #f8f9fa;
  color: #000 !important;
}

.navbar-nav .nav-link {
  color: #212529 !important;
  font-size: 1.1rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: color 0.3s ease, transform 0.3s ease, padding 0.3s ease;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  position: relative;
  display: inline-block;
}

.navbar-nav .nav-item {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

/* Animated underline hover effect */
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-gradient-start), var(--primary-gradient-end));
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.dropdown-toggle:hover,
.navbar-nav .nav-link.dropdown-toggle[aria-expanded="true"] {
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
  left: 50%;
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
}

/* Dropdown toggle: use ::before for underline (Bootstrap uses ::after for caret) */
.navbar-nav .nav-link.dropdown-toggle::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-gradient-start), var(--primary-gradient-end));
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
  z-index: 1;
}

.navbar-nav .nav-link.dropdown-toggle:hover::before,
.navbar-nav .nav-link.dropdown-toggle[aria-expanded="true"]::before,
.navbar-nav .nav-link.dropdown-toggle.active::before {
  width: 80%;
  left: 50%;
}

.navbar-nav .nav-link.dropdown-toggle.active {
  color: var(--primary-color) !important;
}

/* Remove Bootstrap default caret and style Bootstrap icon */
.navbar-nav .nav-link.dropdown-toggle {
  position: relative;
}

.navbar-nav .nav-link.dropdown-toggle::after {
  display: none !important;
}

.navbar-nav .nav-link.dropdown-toggle .bi {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  display: inline-block;
  vertical-align: middle;
}

.navbar-nav .nav-link.dropdown-toggle[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}


/* Dropdown Menu Smooth Animation */
.navbar-nav .dropdown-menu {
  margin-top: 30px;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
  max-height: 0;
  overflow: hidden;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar-nav .dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu .dropdown-item {
  color: #212529 !important;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-body);
}

.dropdown-menu .dropdown-item:hover {
  color: #000 !important;
  background-color: #f8f9fa;
}

/* Stacked Images Section */
.image-stack {
  position: relative;
  min-height: 600px;
  padding-bottom: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.stacked-image {
  position: absolute;
  width: 80%;
  max-width: 400px;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.8s ease;
  cursor: pointer;
}

.stacked-image.active {
  opacity: 1;
  transform: translateX(0);
}

.stacked-image:hover {
  transform: translateX(0) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.stacked-image:nth-child(1) {
  top: 0;
  right: 0;
  z-index: 3;
  transition-delay: 0.6s;
}

.stacked-image:nth-child(2) {
  top: 50px;
  right: 30px;
  z-index: 2;
  transition-delay: 0.4s;
}

.stacked-image:nth-child(3) {
  top: 100px;
  right: 60px;
  z-index: 1;
  transition-delay: 0.2s;
}

/* FAQ Section */
.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}

.faq-answer {
  color: #6c757d;
  line-height: 1.6;
}

/* Primary Color Overrides (excluding cta-section) */
/* Override Bootstrap primary color globally */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #254a94 !important;
  border-color: #254a94 !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
}

.text-primary,
.bi.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

/* Call to Action */
.cta-section {
  background: var(--primary-color) !important;
  color: white;
  padding: 4rem 0;
}

.cta-button {
  background: white;
  color: #667eea;
  padding: 1rem 2.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: #764ba2;
}

.cta-section a.text-white {
  color: white !important;
  text-decoration: underline;
}

.cta-section a.text-white:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Footer Styling */
#footer {
  background-color: #5a6268 !important;
}

#footer a.text-white-50 {
  transition: color 0.3s ease;
}

#footer a.text-white-50:hover {
  color: #ffffff !important;
}

#footer .bi {
  transition: transform 0.3s ease, color 0.3s ease;
}

#footer .bi:hover {
  transform: scale(1.2);
  color: #ffffff !important;
}

#footer h5 {
  font-family: var(--font-header);
  font-weight: 600;
}

#footer ul li a {
  transition: padding-left 0.3s ease;
}

#footer ul li a:hover {
  padding-left: 5px;
}

@media (max-width: 768px) {
  .image-stack {
    min-height: 500px;
    padding-bottom: 80px;
    margin-top: 2rem;
    overflow-x: hidden;
  }
  
  .stacked-image {
    width: 90%;
    max-height: 400px;
    transform: translateX(0) !important;
  }
  
  .stacked-image.active {
    transform: translateX(0) !important;
  }
  
  /* Hero title responsive */
  section[style*="margin-top: 80px"] h1 {
    font-size: 2.5rem !important;
  }
  
  /* Footer responsive */
  #footer {
    padding: 3rem 0 !important;
  }
  
  #footer .col-lg-3,
  #footer .col-lg-2,
  #footer .col-lg-4 {
    margin-bottom: 2rem;
  }
  
  #footer h5 {
    font-size: 1.1rem;
  }
}

/* Hero Slideshow */
.hero-slideshow {
  position: relative;
  min-height: 90vh;
}

.hero-slideshow .carousel {
  min-height: 90vh;
}

.hero-slideshow .carousel-inner {
  min-height: 90vh;
}

.hero-slideshow .carousel-item {
  min-height: 90vh;
  padding: 0;
}

.hero-slide {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.hero-slideshow .container {
  position: relative;
  z-index: 2;
  padding: 2rem 0;
}

.hero-content {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 1rem 0;
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 300px;
}

.hero-foreground-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 1s ease, transform 1s ease;
}

.carousel-item.active .hero-foreground-image {
  opacity: 1;
  transform: translateX(0);
}

.hero-slideshow .carousel-control-prev,
.hero-slideshow .carousel-control-next {
  width: 5%;
  opacity: 0.8;
}

.hero-slideshow .carousel-control-prev:hover,
.hero-slideshow .carousel-control-next:hover {
  opacity: 1;
}

.hero-slideshow .carousel-indicators {
  bottom: 30px;
}

.hero-slideshow .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.hero-slideshow .carousel-indicators button.active {
  background-color: rgba(255, 255, 255, 1);
}

@media (max-width: 1200px) {
  /* Reduce nav spacing on lg screens */
  .navbar-nav .nav-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .navbar-nav .nav-item {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
  }
  
  .hero-foreground-image {
    max-width: 400px;
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  /* Prevent nav shrinking on mobile */
  .navbar.scrolled .navbar-brand img {
    transform: none !important;
    height: 80px !important;
  }
  
  .navbar.scrolled .navbar-nav .nav-link {
    transform: none !important;
  }
  
  .navbar.scrolled .navbar-nav .btn {
    transform: none !important;
  }
  
  .hero-slideshow,
  .hero-slideshow .carousel,
  .hero-slideshow .carousel-inner,
  .hero-slideshow .carousel-item,
  .hero-slide {
    min-height: auto;
  }
  
  .hero-slideshow .carousel-item {
    padding: 0;
  }
  
  .hero-content {
    text-align: center;
    padding: 1.5rem 0;
  }
  
  .hero-content h1 {
    font-size: 2.5rem !important;
  }
  
  .hero-image-wrapper {
    padding: 1rem;
    min-height: auto;
    margin-bottom: 1rem;
  }
  
  .hero-foreground-image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
  }
  
  .hero-slideshow .carousel-control-prev,
  .hero-slideshow .carousel-control-next {
    width: 10%;
  }
}