/* Critical fixes for the website */

/* Fixed Sticky Header */
.site-header {
  background: #4C3333 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000 !important;
  width: 100%;
}

.header-inner {
  background: #4C3333 !important;
  width: 100%;
}

/* Logo styling to match header */
.logo-group .logo-symbol,
.logo-group .logo-full {
  background: #4C3333 !important;
}

/* Navbar fixes */
.nav-links {
  background: transparent !important;
}

.nav-links a {
  color: #fff !important;
  font-weight: 500;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #f6d6e1 !important;
}

/* Body padding to account for fixed header */
body {
  padding-top: 90px !important;
}

/* Services section overflow fix */
.services-content {
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 100%;
  overflow-x: hidden;
}

.services-content .row {
  margin-left: 0;
  margin-right: 0;
}

/* Hero banner single background */
.hero-bg-layer:nth-child(2),
.hero-bg-layer:nth-child(3) {
  display: none !important;
}

.hero-content {
  background: rgba(76,51,51,0.9) !important;
  backdrop-filter: blur(10px);
}

/* Dynamic image animations */
.about-img, 
.testimonial-img,
img[src*="jenny_images"] {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform;
}

.about-img:hover, 
.testimonial-img:hover,
img[src*="jenny_images"]:hover {
  transform: scale(1.1) rotate(2deg) !important;
}

/* Fixed Contact Button */
.fixed-contact-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}

.fixed-contact-btn .btn {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4C3333 !important;
  border: none;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Footer fixes - remove any nested content */
.footer {
  position: relative;
  z-index: 1;
}

/* Testimonials visibility fix */
#testimonials {
  display: block !important;
  visibility: visible !important;
}

/* Prevent content overflow */
.container-fluid,
.container {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Smooth scrolling */
html, body {
  overflow-x: hidden !important;
  scroll-behavior: smooth;
}

/* Section spacing adjustments */
section {
  margin-bottom: 0;
  padding: 4rem 0;
}

/* Color harmony fixes */
.banner h2,
.banner h3 {
  color: #4C3333 !important;
}

.banner p {
  color: #2c2e3a !important;
}

/* Button styling consistency */
.btn-primary {
  background-color: #4C3333 !important;
  border-color: #4C3333 !important;
  color: #fff !important;
}

.btn-primary:hover {
  background-color: #6a8caf !important;
  border-color: #6a8caf !important;
}

.bright-text {
  color: #fff !important;
}
.btn-primary {
  background-color: #0d6efd !important;
  color: #fff !important;
  border: none !important;
  transition: all 0.3s ease;
  transform: translateY(0);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #0b5ed7 !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}
.carousel-inner {
  min-height: 340px;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
}
.carousel-item {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
}
.testimonial-card {
  max-width: 600px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.testimonial-card .blockquote-footer {
  background: #0d6efd !important;
  color: #fff !important;
}

/* Background image animations */
.hero-bg-layer {
  animation: subtleZoom 20s ease-in-out infinite;
  transform-origin: center center;
  /* Optimize for better loading */
  background-attachment: scroll;
  will-change: transform;
  backface-visibility: hidden;
}

/* Hero section loading optimization */
.hero-bg {
  background-color: #4C3333; /* Fallback color while image loads */
  overflow: hidden;
}

.hero-bg-layer {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-bg-layer.loaded {
  opacity: 1;
}

/* Ensure hero content is visible even during image load */
.hero-content {
  background: rgba(76,51,51,0.85) !important;
  backdrop-filter: blur(2px);
}

@keyframes subtleZoom {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.05); 
  }
}

/* Parallax effect on scroll */
.hero-bg {
  overflow: hidden;
}

.hero-bg-layer {
  will-change: transform;
  backface-visibility: hidden;
}

/* Navigation animations */
.navbar-brand {
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  filter: brightness(1.15) contrast(1.05);
}

.navbar-brand img {
  transition: all 0.3s ease;
}

.navbar-brand:hover img {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
  padding-bottom: 0.5rem !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transition: all 0.4s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #fff !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  transition: transform 0.3s ease;
  border: none !important;
}

.navbar-toggler:hover {
  transform: scale(1.1);
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

/* Smooth navbar collapse animation */
.navbar-collapse {
  transition: all 0.3s ease-in-out;
}

/* Mobile navigation optimizations */
@media (max-width: 767.98px) {
  .navbar-brand img {
    height: 55px !important;
    width: auto;
  }
  
  .navbar-brand {
    flex: 1;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
}

/* Ensure navbar doesn't wrap on smaller screens */
@media (max-width: 575.98px) {
  .navbar-brand img {
    height: 45px !important;
  }
}

/* Very small screens - aggressive sizing */
@media (max-width: 480px) {
  .navbar-brand img {
    height: 40px !important;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .navbar-brand img {
    height: 35px !important;
  }
}

/* About section image enhancements */
.about-img {
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.about-img:hover {
  border: 3px solid #6a8caf;
  box-shadow: 0 8px 25px rgba(106, 140, 175, 0.3);
  transform: scale(1.05);
}

/* FAQ section enhancements */
.faq-container .card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.faq-container .card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.faq-container .card h3 {
  transition: color 0.3s ease;
}

.faq-container .card:hover h3 {
  color: #6a8caf !important;
}