@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.hero-gradient {
  background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.4));
}

/* Carousel Transitions */
.carousel-item {
  transition:
    opacity 1s ease-in-out,
    transform 1.2s ease-out;
  opacity: 0;
  position: absolute;
  inset: 0;
}
.carousel-item.active {
  opacity: 1;
  transform: scale(1);
}
.carousel-item:not(.active) {
  transform: scale(1.1);
}

/* Header Dynamics */
#main-nav {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

#main-nav:not(.scrolled) {
  background-color: transparent;
  height: 8rem;
}

#main-nav:not(.scrolled) #nav-container {
  max-width: 80rem;
}

#main-nav:not(.scrolled) #site-name {
  color: white;
  font-size: 1.35rem;
}
@media (min-width: 768px) {
  #main-nav:not(.scrolled) #site-name {
    font-size: 2rem;
  }
}

#main-nav:not(.scrolled) #site-logo {
  width: 3.5rem;
  height: 3.5rem;
}
@media (min-width: 768px) {
  #main-nav:not(.scrolled) #site-logo {
    width: 5rem;
    height: 5rem;
  }
}

#main-nav.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  height: 6.5rem;
}

#main-nav.scrolled #nav-container {
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

#main-nav.scrolled #site-name {
  color: #1e3a8a;
  font-size: 1rem;
}

#main-nav.scrolled #site-logo {
  width: 4.75rem;
  height: 4.75rem;
}

#main-nav.scrolled .nav-link {
  color: #1e3a8a;
}

/* Logo container */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: white;
  padding: 0.25rem;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#site-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Mobile Menu Drawer */
#mobile-menu {
  transition:
    transform 0.4s ease-in-out,
    opacity 0.4s ease-in-out;
  transform: translateX(100%);
  opacity: 0;
}
#mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}

/* Contact Form Styles */
.contact-bg {
  background-image: url("static/images/info.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.value-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.value-card:hover {
  transform: translateY(-10px);
}

/* Fixed Feature Section Styles */
.feature-section-wrapper {
  position: relative;
  width: 100%;
}

#feature-section {
  width: 100%;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 30;
}

#feature-section.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 40;
  animation: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-section-spacer {
  width: 100%;
  transition: height 0.3s ease;
  display: none;
}

.feature-section-spacer.active {
  display: block;
}

/* Sections that scroll over */
.scroll-over-section {
  position: relative;
  z-index: 45;
  background: inherit;
  transition: transform 0.3s ease;
}

#about {
  background: white;
}

/* Core Values Section */
#core-values {
  position: relative;
  background-image: url("static/images/construction-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 6rem 0;
}

#core-values::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 31, 58, 0.85);
  backdrop-filter: blur(2px);
  z-index: 1;
}

#core-values .container {
  position: relative;
  z-index: 2;
}

.core-value-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.core-value-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.5);
}

.core-value-icon {
  width: 4rem;
  height: 4rem;
  background: #f9fafb5e;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.core-value-icon i {
  font-size: 2rem;
  color: #f9fafb;
}

.core-value-title {
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.core-value-number {
  color: #f9fafb;
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Services Section - Sticky with Stacking Blocks */
#services {
  position: relative;
  background: #f9fafb;
  overflow: visible;
  padding: 0 2rem 4rem 2rem; /* Cleaned up bottom padding */
}

.services-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  /* position: sticky; */
  /* top: 4.5rem;  */
  /* z-index: 20; */
  background: #f9fafb;
  padding: 2rem 1rem;
  /* border: 1px solid #f97316; */
}

.services-header h2 {
  color: #f97316;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.services-header h3 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0b1f3a;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .services-header h3 {
    font-size: 3rem;
  }
}

/* Main Services Container */
.services-main-container {
  max-width: 1500px;
  margin: 3% auto;
  position: relative;
}

/* All blocks share the same z-index; they still stack due to DOM order */
.service-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  min-height: 660px;
  height: auto;
  align-items: center;
  padding: 2.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 30vh; /* Reduced travel for a more compact scroll */
  position: sticky;
  top: 7.5rem; /* More space between header and cards */
  border: 1px solid rgba(0, 0, 0, 0.03);
  z-index: 20;
}

/* .service-block:nth-child(6) { */
.service-block:last-child {
  /* margin-bottom: 15rem; Travel for the last card to fully stick and stack */
  margin-bottom: 5rem;
}

/* When scrolled into view, bring block forward with orange hint */
.service-block.in-view {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 25px 60px -20px rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.1);
}

/* Image Container */
.service-image-container {
  position: relative;
  height: 550px;
  border-radius: 0.4rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.service-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-block:hover .service-image-container img {
  transform: scale(1.05);
}

.image-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(249, 115, 22, 0.9);
  backdrop-filter: blur(5px);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  z-index: 10;
}

.image-overlay-new {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 2rem;
  color: white;
}

.image-overlay-new .service-count {
  font-size: 0.875rem;
  font-weight: 800;
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.image-overlay-new .service-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.image-overlay-new .service-price {
  font-size: 1rem;
  opacity: 0.9;
}

/* Description Card */
.description-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.description-card:hover {
  box-shadow: 0 20px 40px -12px rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.2);
}

.description-card .icon-wrapper {
  width: 5rem;
  height: 5rem;
  background: #0b1f3a;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.description-card .icon-wrapper i {
  font-size: 2.5rem;
  color: white;
}

.description-card h4 {
  font-size: 2rem;
  font-weight: 800;
  color: #0b1f3a;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.description-card .price-badge {
  display: inline-block;
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.description-card p {
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.description-card .feature-list {
  list-style: none;
  padding: 0;
  margin-top: auto;
}

.description-card .feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #334155;
  font-weight: 500;
}

.description-card .feature-list li i {
  color: #f97316;
  font-size: 1rem;
}

/* Hide scrollbar for cleaner look when sticky */
#services::-webkit-scrollbar {
  width: 8px;
}

#services::-webkit-scrollbar-track {
  background: #f1f5f9;
}

#services::-webkit-scrollbar-thumb {
  background: #f97316;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 968px) {
  .service-block {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 25vh;
  }

  .service-image-container {
    height: 350px;
  }

  #services {
    padding: 2rem 1rem;
  }
}

/* Additional sections */
#contact-section {
  position: relative;
  z-index: 45;
}

footer {
  position: relative;
  z-index: 45;
  background: #0b1f3a;
}

/* Fixed copyright */
#fixed-copyright {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(11, 31, 58, 0.95);
  color: white;
  padding: 1rem 0;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 50;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

/* Feature section background */
#feature-section {
  background-image: url("static/images/info2.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

.feature-overlay {
  background: rgba(30, 58, 138, 0.85);
  backdrop-filter: blur(2px);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: min-height 0.3s ease;
}

#feature-section.fixed .feature-overlay {
  min-height: 50vh;
}

img {
  object-fit: cover;
}

.rounded-full img {
  border-radius: 9999px;
}
/* --- Custom Modal Notification Styles --- */
#status-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.4s ease;
}

.modal-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-hidden .modal-card {
  transform: scale(0.8) translateY(20px);
}

.modal-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-visible .modal-card {
  transform: scale(1) translateY(0);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75); /* Dark blue from your theme */
  backdrop-filter: blur(8px);
}

.modal-card {
  background: white;
  width: 90%;
  max-width: 400px;
  border-radius: 32px;
  padding: 40px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close-btn:hover {
  color: #0b1f3a;
}

.modal-icon-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981; /* Default success green */
}

#modal-icon {
  font-size: 3.5rem;
}

#status-modal.error .modal-icon-container {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

#status-modal.error #modal-icon::before {
  content: "\f057"; /* FontAwesome circle-xmark (fas fa-times-circle) */
}

#modal-title {
  color: #0b1f3a;
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

#modal-message {
  color: #64748b;
  font-size: 1.1rem;
  margin-bottom: 32px;
  line-height: 1.5;
}

.modal-btn {
  background: #f97316; /* Orange from your theme */
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 100px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

.modal-btn:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.4);
}

/* --- Gallery View Styles --- */
.view-hidden {
  display: none !important;
}

#gallery-view {
  background: #f8fafc;
}

/* Custom Scrollbar for Sidebar */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* Thumbnail Styling */
.thumbnail-item {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .thumbnail-item {
    width: 150px; /* Small cards on horizontal mobile scroll */
  }

  #gallery-sidebar h2 {
    display: none; /* Hide 'Our Portfolio' header on mobile */
  }

  #gallery-view {
    padding-top: 6rem;
  }

  #gallery-view .flex-col {
    height: calc(100vh - 120px);
  }

  #gallery-main {
    min-height: 400px;
  }
}

.thumbnail-item:hover {
  transform: scale(1.02);
  border-color: rgba(249, 115, 22, 0.3);
}

.thumbnail-item.active {
  border-color: #f97316;
  box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.2);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main Display Animation */
#main-gallery-img.fade-out {
  opacity: 0;
  transform: scale(1.05);
}

#main-gallery-img.fade-in {
  opacity: 1;
  transform: scale(1);
}
