/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
  /* Brand */
  --color-primary: #435335;
  --color-primary-hover: #FF851B;
  --color-accent: #9fe974;
  --color-accent-2: #f26b6b;

  /* Text */
  --text-dark: #0f1214;     /* new black */
  --text-white: #FFFFFF;
  --text-muted: #4B5563;

  /* Backgrounds */
  --bg-light: #faf2e7;
  --bg-dark: rgb(61, 61, 61);
  --bg-card: #FFFFFF;
  --bg-card-green: #435335;
  --bg-card-dark: #5a5a5a;

  /* Borders */
  --border-dark: #2C2C2C;
  
}


/* =========================================================
   BASE
========================================================= */

html {
  scroll-behavior: auto !important;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
}

body {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-dark);
  overflow-x: hidden;
}

h1 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p {
  font-size: 1rem;
  line-height: 1.5;
}

ul {
  font-size: 0.95rem;
  line-height: 1.6;
}

main { margin-bottom: 50px; }

main h1 { text-wrap: balance; }

section[id] { scroll-margin-top: 80px; }


/* =========================================================
   ANIMATIONS
========================================================= */

.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease-in forwards;
}

.fade-out {
  opacity: 1;
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}


/* =========================================================
   UTILITIES
========================================================= */

.blur-box {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: 1rem;
  border-radius: 10px;
}

.main-color-bg {
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(255,255,255,0.06) 0%,
      rgba(255,255,255,0.03) 30%,
      rgba(255,255,255,0.01) 55%,
      transparent 75%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(0,0,0,0.18) 0%,
      rgba(0,0,0,0.12) 40%,
      rgba(0,0,0,0.05) 65%,
      transparent 85%
    ),
    #435335;

  color: #E9E6DF;
}

.show { display: block; }
.hidden { display: none; }

.success { color: forestgreen; }
.error   { color: crimson; }

.card-link { text-decoration: none; }

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background-color: var(--color-accent);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, opacity 0.3s ease, background-color 0.2s ease-out;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 0.85;
  pointer-events: auto;
}

@media (hover: hover) {
  .back-to-top:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px);
    opacity: 1;
  }
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
  display: inline-block;
  background-color: var(--color-accent);
  border: transparent;
  color: var(--text-dark);
  transition: transform 0.2s ease-out,
              background-color 0.2s ease-out,
              color 0.2s ease-out,
              opacity 0.8s ease-out;
}

.btn:hover {
  background-color: var(--color-primary);
  transform: scale(1.05);
  color: var(--text-white);
}

.btn.btn-hero:hover {
  background-color: var(--color-primary);
  transform: scale(1.05);
}


.btn-hero {
  padding: 14px 28px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
  color: var(--text-dark);
}

.btn:focus,
.btn:active {
  outline: none;
  box-shadow: 0 0 0 3px rgba(242,175,41,0.35);
}

/* =========================================================
   ICONS
========================================================= */

.quote-icon {
  color: var(--color-accent);
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 3rem;
  pointer-events: none;
}


/* =========================================================
   CARD HOVER EFFECTS
========================================================= */

.service-card,
.process-card,
.why-card,
.pricing-card {
  transition: ease-in-out 0.3s;
}

.service-card:hover,
.process-card:hover,
.why-card:hover,
.pricing-card:hover {
  transform: scale(1.05);
}


/* =========================================================
   BACKGROUND SECTIONS + TEXT COLORS
========================================================= */

.hero-bg,
.contact-bg,
.process-bg,
.why-me-bg,
.projects-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* HERO – WHITE TEXT */
.hero-bg {
  color: var(--text-white);
  min-height: 95svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.75rem;
  cursor: pointer;
  text-decoration: none;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator:hover {
  color: rgba(255, 255, 255, 1);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* dark overlay */
  z-index: 1;
}

/* SERVICE – DARK TEXT */
#service {
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 50px;
}

#service li {
  font-size: 1rem;
}

/* PROCESS – DARK TEXT */
#process {
  color: var(--text-white);
}

#process h2 {
  color: var(--color-primary-hover)
}

.process-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-primary-hover);
}

.process-icon-inline {
  width: 60px;
  transform: translateY(-1px);
}

/* =========================================================
   WHY SECTION
========================================================= */

.why-me-bg {
  position: relative;
  overflow: hidden;

  background-image: url('/images/bg/why-us-desktop.webp');
  background-color: var(--color-accent);
  background-size: cover;
  background-position: center;

  color: var(--text-white);
}

/* Dark overlay */
.why-me-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

/* Subtle blur layer */
.why-me-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

/* Ensure content sits above overlays */
#why-me .container {
  position: relative;
  z-index: 2;
}


/* =========================================================
   WHY TYPOGRAPHY
========================================================= */

#why-me h2 {
  font-weight: 600;
  letter-spacing: 0.5px;
}

#why-me p {
  color: rgba(255,255,255,0.92);
}

#why-me h2,
#why-me p {
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}


/* =========================================================
   WHY ITEMS (ICON + TEXT)
========================================================= */

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
}

.why-item:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.why-icon {
  width: 70px;
  height: auto;
  flex-shrink: 0;
  margin-top: 4px;
}

.why-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.why-text {
  margin: 0;
  color: rgba(255,255,255,0.85);
}


/* PROJECTS – DARK TEXT */
.projects-bg {
  position: relative;
  overflow: hidden;
  color: var(--text-white);
  background: none; /* important */
}

/* .projects-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/images/bg30.jpg') center/cover no-repeat;
  filter: blur(2px);
  transform: scale(1.15);
  z-index: -1;
} */


/* =========================================================
   TESTIMONAL
========================================================= */

#testimonials {
  background: var(--bg-light);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

#testimonials h2 {
  font-weight: 600;
  letter-spacing: 0.5px;
}

#testimonialCarousel .carousel-item {
  padding: 20px 0;
}

#testimonialCarousel {
  position: relative;
}

#testimonialCarousel::before,
#testimonialCarousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}

#testimonialCarousel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-light), transparent);
}

#testimonialCarousel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-light), transparent);
}

#testimonialCarousel .carousel-indicators {
  bottom: -10px; /* slightly lower */
}

#testimonialCarousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.3);
  border: none;
  margin: 0 6px;
  opacity: 1;
}

#testimonialCarousel .carousel-indicators .active {
  background-color: var(--color-primary-hover);
  width: 12px;
  height: 12px;
}

.testimonial-card > :first-child {
  margin-top: 0;
}

.testimonial-card .quote-icon {
  margin-bottom: 1rem;
}

.testimonial-card {
  background: var(--color-primary);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
  padding: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  transition: transform 0.3s ease;
  min-height: 280px;
}

.testimonial-card .card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem;
}

.testimonial-card p {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-white);
  margin-bottom: 0.75rem;
}

.testimonial-card .fw-bold {
  margin-top: 1rem;
  color: var(--color-primary-hover);
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

#testimonials .card-text {
  font-style: italic;
  font-size: 1.05rem;
}


/* =========================================================
   CONTACT
========================================================= */

#contact {
  position: relative;
  color: var(--text-white);
}

.contact-bg {
  background-image: url('/images/bg/contact-desktop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Contact page layout only */
.contact-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.contact-page #contact {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Overlay */

.hero-bg .overlay,
.contact-bg .overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 0;
}

.hero-bg .container,
.hero-bg .row,
.hero-bg .col-md-4,
.hero-bg .col-md-8 {
  position: relative;
  z-index: 1;
}


/* =========================================================
   CARDS
========================================================= */

.service-card {
  background: var(--bg-card);
  border-left: 6px solid var(--color-accent);
  padding-left: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.process-card {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,1);
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}

/* .process-card::before {
  content: "";
  position: absolute;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background: #f06a6a;
  clip-path: polygon(
    75% 0%,
    100% 50%,
    75% 100%,
    0% 100%,
    25% 50%,
    0% 0%
  );
  z-index: 0;
}

.process-card > * {
  position: relative;
  z-index: 1;
} */

.project-box {
  padding: 30px 0 15px;
  margin: 50px auto 20px;
  width: 18rem;
}

.project-box .card {
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  background: var(--bg-light);
}

.project-box .card:hover {
  transform: scale(1.05);
}

.card-text { font-size: 0.9rem; }


/* =========================================================
   CONTACT
========================================================= */

.contact-box {
  padding: 20px;
  margin: 30px auto 20px;
  max-width: 700px;
  width: 100%;
}

.contact-box input,
.contact-box textarea {
  border: 2px solid var(--border-dark);
}

#notificationText {
  font-weight: bold;
  position: relative;
  z-index: 10;
}

/* =========================================================
   MODAL
========================================================= */

.modal-content {
  background: var(--bg-light);
}

/* =========================================================
   FOOTER
========================================================= */

.footer-section {
  background-color: var(--bg-dark); /* deep slate */
  color: var(--text-white);
}

.footer-brand {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-tagline {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-link {
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  transition: transform 0.2s ease-out,
              color 0.2s ease-out;
}

.social-link:hover {
  color: var(--color-primary-hover);
  transform: translateY(-3px);
}

.footer-bottom {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991px) {
  [data-aos^="fade-"],
  [data-aos^="slide-"],
  [data-aos^="zoom-"] {
    transform: none !important;
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  [data-aos^="fade-"].aos-animate,
  [data-aos^="slide-"].aos-animate,
  [data-aos^="zoom-"].aos-animate {
    opacity: 1 !important;
    transform: none !important;
  }
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {

  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
  }

  /* Improve readable font sizing (0.8rem is too small on modern phones) */
  body p,
  ul {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  body h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* Better vertical rhythm */
  section {
    padding: 3rem 1.25rem !important;
  }

  /* Remove fixed background on mobile (performance improvement) */
  body {
    background-attachment: scroll;
  }

  .why-me-bg {
    background-image: url('/images/bg/why-us-mobile.webp');
  }

  .project-bg {
    background-image: url('/images/bg/projects-mobile.webp');
  }

  .contact-bg {
    background-image: url('/images/bg/contact-mobile.webp');
  }

  /* Cards: reduce padding for tighter layout */
  .service-card {
    padding: 1.5rem;
  }

  .process-card {
    padding: 1.75rem;
  }

  /* Remove hover scaling on touch devices */
  .service-card:hover,
  .process-card:hover,
  .why-card:hover,
  .pricing-card:hover,
  .project-box .card:hover {
    transform: none;
  }

  /* Project cards full width */
  .project-box {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  /* WHY section improvements */
  .why-item {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .why-icon {
    width: 48px;
  }

  .testimonial-card {
    padding: 1.5rem 1.25rem;
    margin: 0 auto;
    width: calc(100% - 20px); /* 10px left + 10px right */
  }

  .testimonial-card p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  #testimonialCarousel::before,
  #testimonialCarousel::after {
    display: none;
  }

  /* Process icon sizing */
  .process-icon-inline {
    width: 40px;
  }

  /* Contact form spacing */
  .contact-box {
    padding: 1.5rem;
  }

  .contact-box input,
  .contact-box textarea {
    font-size: 1rem;
  }

  /* Buttons: prevent scaling jump on tap */
  .btn:hover {
    transform: none;
  }

}
