/* --- Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  color: #2d2a27;
}

html {
  scroll-behavior: smooth;
  /* Prevent scroll-snap interference if added elsewhere */
  scroll-snap-type: none;
}

body {
  background-color: #f0eae4;
  transition: padding-top 0.3s ease; /* Smooth transition for body padding */
  overflow-x: hidden; /* Prevent horizontal scrollbars potentially caused by transforms */
}

/* --- Navigation Styling --- */
nav {
  padding: 15px 20px;
  display: flex;
  gap: 40px;
  font-size: 18px;
  font-weight: 300;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  background-color: #f0eae4; /* Initial background */
  transition: background-color 0.4s ease, box-shadow 0.4s ease,
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 100;
  border-bottom: 1px solid transparent;
}

/* --- Sticky Navigation State --- */
nav.nav-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(240, 234, 228, 0.97);
  box-shadow: 0 3px 12px rgba(45, 42, 39, 0.12);
  border-bottom: 1px solid rgba(45, 42, 39, 0.06);
  z-index: 1000;
  transform: translateY(0);
}

/* --- Shy Navigation State --- */
nav.nav-sticky.nav-shy {
  transform: translateY(-100%);
  box-shadow: none;
  border-bottom-color: transparent;
}

/* Navigation Links */
.nav-page:link,
.nav-page:visited {
  text-decoration: none;
  display: inline-block;
  padding-bottom: 5px;
  transition: color 0.3s ease;
  position: relative;
  color: #2d2a27;
}

.nav-page:hover {
  color: #906a44;
}

.nav-page.current-page {
  color: #906a44;
  font-weight: 500;
}

/* Home Link Specifics */
.nav--home {
  position: relative;
}

/* Underline for Home Link */
.line {
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #906a44;
  bottom: -2px;
  left: 0;
  display: none;
}

/* --- Header Section --- */
header {
  margin-left: 50px;
  margin-right: 50px;
  padding-top: 40px;
  padding-bottom: 60px;
  position: relative; /* Essential for pseudo-element positioning */
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Default state: No background image */
}

.logo {
  width: 130px;
  height: auto;
  margin-bottom: 15px;
  display: inline-block;
}
.logo.placeholder-img {
  height: 50px;
  background-color: #ddd;
}

h1 {
  font-size: 72px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.1;
}

header p {
  width: 55%;
  line-height: 1.7;
  font-weight: 300;
  font-size: 22px;
  max-width: 650px;
  margin-bottom: 40px;
}

.office-img {
  width: 350px;
  max-width: 40%;
  height: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 5%;
  z-index: -1; /* Behind content */
  opacity: 0.85;
  border-radius: 8px;
  display: block; /* Visible by default */
}
.office-img.placeholder-img {
  filter: grayscale(50%);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  border: none;
  font-size: 18px;
  color: #fff;
  font-weight: 400;
  background-color: #906a44;
  letter-spacing: 2px;
  padding: 15px 30px;
  margin-top: 20px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease,
    box-shadow 0.3s ease;
}

.btn:hover {
  background-color: #7a5a3a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header-btn {
  background-color: #cab199;
  color: #2d2a27;
  margin-left: 0;
  align-self: flex-start;
}
.header-btn:hover {
  background-color: #b8a088;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* --- Main Content Sections --- */
main {
  padding: 0 50px;
}

.content-section {
  padding: 80px 0;
  border-bottom: 1px solid #e0d8d0;
}
.content-section:last-child {
  border-bottom: none;
}

h2 {
  font-size: 44px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #906a44;
}

.section-intro {
  text-align: center;
  font-size: 18px;
  font-weight: 300;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  color: #555;
}

/* --- About Section --- */
.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.about-text {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
}
.about-text p {
  font-size: 17px;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 20px;
}
.about-img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  opacity: 0.9;
  display: block;
}

/* --- Services Section --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: #fff;
  padding: 35px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(45, 42, 39, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(45, 42, 39, 0.08);
}

.service-icon {
  color: #cab199;
  margin-bottom: 20px;
  font-size: 2.5em;
}

.service-card h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #2d2a27;
}

.service-card p {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  color: #555;
}

/* --- Contact Section --- */
.contact-form {
  max-width: 600px;
  margin: 40px auto 0 auto;
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(45, 42, 39, 0.05);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 300;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #cab199;
  box-shadow: 0 0 5px rgba(202, 177, 153, 0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background-color: #906a44;
  color: #fff;
}
.contact-btn:hover {
  background-color: #7a5a3a;
}

/* --- Footer --- */
footer {
  background-color: #e0d8d0;
  padding: 30px 50px;
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: #555;
  border-top: 1px solid rgba(45, 42, 39, 0.08);
}

footer p {
  margin-bottom: 15px;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #906a44;
}

/* Optional Social Icons in Footer */
.social-icons {
  margin-top: 15px;
}
.social-icons a {
  color: #555;
  font-size: 18px;
  margin: 0 12px;
  transition: color 0.3s ease;
}
.social-icons a:hover {
  color: #906a44;
}

/* --- Responsiveness --- */

/* Medium Screens */
@media (max-width: 992px) {
  h1 {
    font-size: 60px;
  }
  header p {
    font-size: 20px;
    width: 70%;
  }
  .office-img {
    width: 300px;
    opacity: 0.6;
    right: 3%;
  }
  main {
    padding: 0 30px;
  }
  footer {
    padding: 25px 30px;
  }
}

/* Small Screens */
@media (max-width: 768px) {
  nav {
    gap: 20px;
    font-size: 16px;
    padding: 10px 15px;
  }

  /* --- HEADER MODIFICATION FOR SMALL SCREENS (Floating Background) --- */
  header {
    margin-left: 0; /* Reset margin */
    margin-right: 0;
    padding: 40px 25px 60px 25px; /* Adjust padding for content spacing */
    text-align: center;
    min-height: auto;
    position: relative; /* Crucial: Parent for absolute pseudo-element */
    /* Remove direct background styles from header */
    background-image: none;
    background-color: transparent; /* Header itself is transparent */
    border-radius: 0; /* Remove radius from header block */
    margin-bottom: 40px;
    overflow: hidden; /* Optional: Ensure pseudo-element corners are clipped if needed */
  }

  /* The ::before pseudo-element will hold the floating background */
  header::before {
    content: ""; /* Required for pseudo-elements */
    position: absolute;
    /* Inset positioning: creates space on left/right */
    top: 0;
    bottom: 0;
    left: 35px; /* Space from left edge */
    right: 35px; /* Space from right edge */
    z-index: 0; /* Behind the header content */

    /* Apply the background image and overlay */
    background-image: linear-gradient(
        rgba(240, 234, 228, 0.85),
        rgba(240, 234, 228, 0.85)
      ),
      url("img/office-cropped.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #d1c8c0; /* Fallback color for the pseudo-element */

    border-radius: 12px; /* Apply rounded corners to the background image layer */
    /* Optional: Add a subtle shadow for more "float" */
    /* box-shadow: 0 5px 20px rgba(45, 42, 39, 0.1); */
  }

  /* Ensure header content is positioned above the ::before pseudo-element */
  .logo,
  .placeholder-img.logo,
  header h1,
  header p,
  .header-btn {
    position: relative; /* Must be relative/absolute/fixed */
    z-index: 1; /* Higher z-index than ::before */
    /* Ensure text colors provide enough contrast */
    color: #2d2a27;
  }

  .logo,
  .placeholder-img.logo {
    margin-left: auto;
    margin-right: auto;
    /* Adjust margin-bottom if needed with new padding */
    margin-bottom: 20px;
  }

  h1 {
    font-size: 48px;
    margin-bottom: 20px; /* Adjust spacing */
  }
  header p {
    width: 90%;
    max-width: 500px; /* Prevent excessive width */
    margin-left: auto;
    margin-right: auto;
    font-size: 18px;
    margin-bottom: 30px; /* Adjust spacing */
  }
  .header-btn {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    /* Specific styles to ensure visibility */
    background-color: #cab199;
    color: #2d2a27;
  }
  .header-btn:hover {
    background-color: #b8a088;
  }

  /* Hide the original large-screen IMG tag */
  .office-img,
  .placeholder-img.office-img {
    display: none;
  }
  /* --- END OF HEADER MODIFICATION --- */

  main {
    padding: 0 25px; /* Keep main padding */
  }
  .content-section {
    padding: 60px 0;
  }
  h2 {
    font-size: 36px;
  }
  .section-intro {
    font-size: 16px;
    margin-bottom: 40px;
  }
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  .about-img {
    max-width: 300px;
    margin-top: 20px;
  }
  .contact-form {
    padding: 30px;
  }
  footer {
    padding: 20px;
    font-size: 13px;
  }
  .footer-links {
    margin-top: 10px;
  }
  .footer-links a {
    margin: 0 8px;
  }
}

/* Extra Small Screens */
@media (max-width: 480px) {
  nav {
    gap: 15px;
    font-size: 15px;
    justify-content: space-around;
    padding: 10px;
  }

  /* --- HEADER MODIFICATION FOR EXTRA SMALL SCREENS (Floating Background) --- */
  header {
    /* Inherits most structure from 768px */
    padding: 30px 15px 50px 15px; /* Fine-tune padding */
    margin-bottom: 40px;
  }

  /* Adjust pseudo-element inset and rounding if desired */
  header::before {
    left: 25px; /* Slightly less inset */
    right: 25px;
    border-radius: 15px; /* Slightly smaller radius */
    /* Adjust gradient opacity if needed */
    background-image: linear-gradient(
        rgba(240, 234, 228, 0.88),
        rgba(240, 234, 228, 0.88)
      ),
      url("img/office-cropped.jpg");
  }

  /* Ensure header content z-index is inherited or set */
  .logo,
  .placeholder-img.logo,
  header h1,
  header p,
  .header-btn {
    position: relative;
    z-index: 1;
  }

  h1 {
    font-size: 40px; /* Keep size adjustment */
  }
  header p {
    font-size: 16px; /* Keep size adjustment */
    width: 95%;
    line-height: 1.6;
    max-width: none; /* Remove max-width if needed */
  }

  /* Hide the original IMG tag (inherited, but good practice) */
  .office-img,
  .placeholder-img.office-img {
    display: none;
  }
  /* --- END OF HEADER MODIFICATION --- */

  .btn,
  .header-btn,
  .contact-btn {
    font-size: 16px;
    padding: 12px 25px;
  }
  /* Ensure header button styles */
  .header-btn {
    background-color: #cab199;
    color: #2d2a27;
  }
  .header-btn:hover {
    background-color: #b8a088;
  }

  h2 {
    font-size: 30px;
  }
  .service-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .service-card {
    padding: 30px 25px;
  }
  .contact-form {
    padding: 25px;
  }
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group textarea {
    padding: 10px 12px;
    font-size: 14px;
  }

  /* --- Pricing Section --- */
  .pricing-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto; /* Center the container */
  }

  .billing-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    background-color: #e0d8d0;
    padding: 5px;
    border-radius: 999px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .toggle-btn {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.4rem;
    border: none;
    background-color: transparent;
    color: #555;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.3s ease;
  }

  .toggle-btn.active {
    background-color: #ffffff;
    color: #906a44;
    box-shadow: 0 2px 8px rgba(45, 42, 39, 0.1);
  }

  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 40px;
  }

  .pricing-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(45, 42, 39, 0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(45, 42, 39, 0.08);
  }

  .card-header,
  .card-features {
    padding: 1.5rem 2rem;
  }

  .card-header {
    border-bottom: 1px solid #f0eae4;
    overflow: hidden;
  }

  .plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d2a27;
  }

  .plan-price {
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: baseline;
    margin-bottom: 1.5rem;
  }

  .plan-price-value,
  .price-period {
    display: inline-block;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  }

  .pricing-card.is-updating .plan-price-value,
  .pricing-card.is-updating .price-period {
    opacity: 0;
    transform: translateY(20px);
  }

  .price-period {
    font-size: 1rem;
    font-weight: 400;
    color: #555;
    margin-left: 0.5rem;
  }

  .btn.btn-secondary {
    background-color: #cab199;
    color: #2d2a27;
    font-size: 16px;
    padding: 14px 28px;
    letter-spacing: 1px;
  }

  .btn.btn-primary {
    background-color: #906a44;
    color: #fff;
    font-size: 16px;
    padding: 14px 28px;
    letter-spacing: 1px;
  }

  .features-intro {
    font-size: 0.9rem;
    font-weight: 300;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  .features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .feature-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 300;
  }

  .feature-item::before {
    content: "";
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    border-radius: 50%;
    background-size: 55%;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
  }

  .feature-item.included::before {
    background-color: #906a44;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3e%3cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd' /%3e%3c/svg%3e");
  }

  .feature-item.excluded::before {
    background-color: #e0d8d0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23555'%3e%3cpath fill-rule='evenodd' d='M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z' clip-rule='evenodd' /%3e%3c/svg%3e");
  }

  .pricing-card.popular {
    border: 2px solid #906a44;
    transform: scale(1.02);
  }
  .pricing-card.popular:hover {
    transform: scale(1.02) translateY(-5px);
  }

  .popular-badge {
    position: absolute;
    top: 0;
    right: 1.5rem;
    transform: translateY(-50%);
    background-color: #906a44;
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
}
