/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500;600&display=swap');

/* Root Variables */
:root {
  --primary: #1e1e1e; /* Deep Text Gray */
  --secondary: #b68c24; /* Refined Gold */
  --background: #faf9f6; /* Ivory White */
  --card-bg: #ffffff; /* Clean White */
  --text: #333333; /* Elegant Gray Text */
  --muted: #777; /* Muted Description Text */
  --hover: #d4af37; /* Brighter Gold */
  --border: #eee;
  --shadow: rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text);
  transition: var(--transition);
}

/* NAVBAR */
nav {
 display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: none;
  overflow: hidden;
  height: 90px;  /* allow logo overflow */
}
nav .logo {
  display: flex;
  align-items: center;
  background: transparent; 
  border: none;
}

nav .logo img {
  height: 190px;    
  width: auto;
  display: block;
  margin-top: 22px;
  transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeSlideIn 0.8s ease forwards;
  box-shadow: none;
  background: transparent;
  border: none;
  outline: none;
  filter: brightness(1) saturate(1);
}
@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
nav .logo img:hover {
   transform: scale(1.03);
  filter: brightness(1.04) saturate(1.05);
}
nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}
nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #b58b0b; /* your gold tone */
  transition: width 0.3s ease;
}

nav ul li a {
  position: relative;
  text-decoration: none;
  color: #222;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #b58b0b;
}
nav ul li a:hover::after {
  width: 100%;
}

/* HERO SECTION */
.hero {
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 70px;
  background: linear-gradient(
      rgba(255, 255, 255, 0.3),
      rgba(255, 255, 255, 0.6)
    ),
    url('../images/hero.jpg') center/cover no-repeat;
  color: var(--primary);
}

.hero-content h1 {
  font-family: "Playfair Display", serif;
  font-size: 3.2rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 25px;
}

.btn {
  background: var(--secondary);
  color: var(--card-bg);
  padding: 12px 26px;
  border-radius: 4px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: var(--hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* SECTION TITLES */
.section-title {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 40px;
  position: relative;
}
/* FILTER BUTTONS */
.filter-buttons {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-btn {
  padding: 10px 20px;
  border: 1.5px solid var(--secondary);
  background: var(--card-bg);
  color: var(--secondary);
  font-weight: 500;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px var(--shadow);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary);
  color: var(--card-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}


.section-title::after {
  content: "";
  width: 60px;
  height: 3px;
  background: var(--secondary);
  display: block;
  margin: 10px auto 0;
  border-radius: 3px;
}

/* SERVICE CARDS */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.service-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.service-card i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 15px;
}

.service-card h3 {
  font-family: "Playfair Display", serif;
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.service-card .icon {
  color: var(--secondary);
  width: 36px;
  height: 36px;
  margin-bottom: 15px;
}
.icon {
  color: #b88900;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.icon:hover {
  transform: scale(1.1);
  color: #a07300;
}

/* PROJECT CARDS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  align-items: start;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 400px; /* uniform card height */
}

.project-card img {
  width: 100%;
  height: 220px; /* consistent image height */
  object-fit: cover; /* prevents flattening */
}

@media (max-width: 768px) {
  .project-card img {
    max-height: 200px;      /* smaller height on mobile */
  }
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.project-overlay {
  padding: 20px;
  color: var(--primary);
}

.project-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem; /* slightly larger for better proportion */
  font-weight: 600;
  color: #b58b0b;
  margin: 14px 20px 6px;
  letter-spacing: 0.3px;
}


.project-card p {
  font-size: 1rem; /* up from 0.95rem */
  color: #333; /* slightly darker for readability */
  line-height: 1.5;
  margin: 0 20px 18px;
}

/* CONTACT FORM */
form {
  max-width: 500px;
  margin: auto;
  padding: 40px;
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow);
  border: 1px solid var(--border);
}

form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

form input, form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  transition: var(--transition);
}

form input:focus, form textarea:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 25px;
  background: var(--card-bg);
  color: var(--primary);
  border-top: 1px solid var(--border);
  margin-top: 50px;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}
footer::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 245, 238, 1));
}

/* ===== LIGHTBOX (PROJECT IMAGE POPUP) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 85%;
  text-align: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}


.lightbox-text {
  margin-top: 15px;
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
}

.lightbox-close {
  position: absolute;
  top: -15px;
  right: -15px;
  background: var(--secondary);
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  line-height: 35px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
  background: var(--hover);
  transform: rotate(90deg);
}

/* Fade Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Tools Page Styling --- */

.tools-section {
  padding: 80px 20px;
  text-align: center;
}

.tools-section h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  margin-bottom: 30px;
  color: #222;
}

.tools-container {
  max-width: 600px;
  margin: 0 auto;
}

/* HERO SECTION */
.tools-hero {
  position: relative;
  text-align: center;
  padding: 80px 40px 80px; 
  background: linear-gradient(180deg, #f9f8f6 0%, #fcfbf8 70%, #ffffff 100%);
  overflow: visible;
}

.tools-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.6rem;
  color: #222;
  margin: 15px 0 8px;
}

.tools-hero p {
  color: #555;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
}

/* Golden icons row */
.bg-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 15px;
}

.bg-icons i {
  color: #b88900;
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.bg-icons i:hover {
  transform: scale(1.15);
  color: #a07500;
}

/* Old floating icon background removed for clarity */
.bg-icons i:nth-child(1),
.bg-icons i:nth-child(2),
.bg-icons i:nth-child(3) {
  position: static;
  font-size: inherit;
  animation: none;
}

/* CONNECTOR AREA */
.divider-fade {
  width: 100%;
  height: 120px;
  margin-top: -40px;
  background: linear-gradient(
    180deg,
    rgba(248, 245, 238, 1) 0%,
    rgba(255, 252, 244, 0.9) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease, background-position 0.4s ease;
}

.divider-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ESTIMATOR CONTAINER */
.estimator-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 3;
  margin-top:-180px;
}


/* BOX STYLE */
.estimator-box {
 background: #fff;
  border-radius: 16px;
  padding: 40px 50px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.estimator-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

.step {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.step.active {
  display: block;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 10px;
}

/* Input and Select Fields */
input,
select {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 1rem;
  margin-top: 10px;
  transition: 0.3s;
}

input:focus,
select:focus {
  border-color: #b88900;
  box-shadow: 0 0 5px rgba(184, 137, 0, 0.3);
  outline: none;
}

/* Buttons */
.btn {
  background-color: #b88900;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #a07500;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 20px;
}

/* Progress Dots */
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  margin-top: 0;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s ease;
}

.dot.active {
  background: #b88900;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* WHY ESTIMATOR SECTION */
.why-estimator {
  background: #fff;
  padding: 80px 100px 60px;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: -60px; 
}

.why-estimator h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: #222;
  margin-bottom: 30px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Add this to your existing CSS */
.why-item {
  background: #faf9f7;
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  transition: all 0.35s ease;
}

.why-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(181, 139, 11, 0.15);
  background-color: #fffefc;
}
.why-item:hover h3 {
  color: #b58b0b;
  transition: color 0.3s ease;
  letter-spacing: 0.3px;
}

.why-item p {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}

.why-item strong {
  color: #222;
}

.why-item p strong::before {
  content: "";
  display: inline-block;
  margin-right: 8px;
}

.why-item p {
  text-align: center;
}

.contractor-list {
  margin-top: 20px;
  display: grid;
  gap: 15px;
}

.contractor-card {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 15px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.contractor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.contractor-card h5 {
  color: #b58b0b;
  font-size: 1.1rem;
  margin-bottom: 5px;
}
/* CONTRACTORS PAGE STYLES */
.contractors-section {
  padding: 60px 70px;
}

.contractors-section h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  margin-bottom: 25px;
  text-align: left;
}

.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-bar input {
  flex: 2;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.filter-bar input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

.filter-bar select {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  font-size: 1rem;
  width: 220px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.filter-bar select:hover {
  border-color: var(--secondary);
}

/* Grid layout for contractor cards */
.contractor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* Scoped card style to avoid conflict with Tools page */
.contractor-page-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contractor-page-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.contractor-page-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.contractor-page-card .contractor-info {
  padding: 15px 20px;
}

.contractor-page-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  margin-bottom: 5px;
  color: #333;
}

.contractor-page-card p {
  margin: 4px 0;
  color: #555;
  font-size: 0.95rem;
}
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-down, .slide-in-left, .slide-in-right, .zoom-in {
  opacity: 0;
  transition: all 0.9s ease;
}

.fade-down {
  transform: translateY(-40px);
}

.slide-in-left {
  transform: translateX(-50px);
}

.slide-in-right {
  transform: translateX(50px);
}

.zoom-in {
  transform: scale(0.9);
}

.visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Floating chat */
#ai-chat-root { position: fixed; right: 22px; bottom: 22px; z-index: 9999; font-family: Poppins, sans-serif; }
#ai-toggle {
  width:56px; height:56px; border-radius:50%; border:none; background:var(--secondary);
  color:#fff; font-weight:700; cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,0.18);
}
#ai-chat {
  width:340px; max-height:520px; background:#fff; border-radius:12px; box-shadow:0 18px 48px rgba(0,0,0,0.35);
  display:none; flex-direction:column; overflow:hidden;
  margin-bottom:12px;
}
#ai-chat[aria-hidden="false"] { display:flex; }
.ai-header { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:linear-gradient(90deg, #111, #222); color:#fff; }
.ai-messages { padding:12px; overflow:auto; flex:1; background:linear-gradient(#fafafa,#fff); }
.ai-msg { margin:8px 0; max-width:80%; padding:10px 12px; border-radius:10px; font-size:0.95rem; line-height:1.3; }
.ai-msg.user { margin-left:auto; background:#dfeeff; color:#000; }
.ai-msg.bot { margin-right:auto; background:#f3f3f3; color:#111; box-shadow:0 1px 0 rgba(0,0,0,0.03); }
.ai-form { display:flex; gap:8px; padding:10px; border-top:1px solid #eee; }
.ai-form input { flex:1; padding:8px 10px; border-radius:8px; border:1px solid #ddd; }
.ai-form button { padding:8px 12px; background:var(--secondary); color:#fff; border-radius:8px; border:none; cursor:pointer; }


