/* =================================
   A Fab Home Construction - Main Stylesheet
   ================================= */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables for Color Scheme */
:root {
  --primary-color: #d97706;
  --primary-dark: #b45309;
  --secondary-color: #64748b;
  --accent-color: #d97706;
  --text-dark: #111827;
  --text-light: #6b7280;
  --text-medium: #374151;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --max-width: 1200px;
  --border-radius: 8px;
  --transition: 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
    'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-medium);
  background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

/* Container & Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--spacing-lg) 0;
}

.section-light {
  background-color: var(--bg-light);
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.nav-menu a {
  color: var(--text-medium);
  font-weight: 500;
  padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu .btn-primary {
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.nav-menu .btn-primary:hover {
  background-color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-light);
  border-color: var(--text-dark);
}

.btn-white {
  background-color: var(--bg-white);
  color: var(--text-dark);
}

.btn-white:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--bg-white);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0.7)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero h1 {
  color: var(--bg-white);
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Cards */
.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.card-text {
  color: var(--text-light);
  line-height: 1.6;
}

.card-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-color);
  color: var(--bg-white);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Service Cards */
.service-card {
  text-align: center;
  padding: 2rem;
}

.service-icon {
  display: block;
  font-size: 60px;
  margin: 0 auto 1rem;
  color: var(--primary-color);
  text-align: center;
}

/* Project Gallery */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    transparent
  );
  color: var(--bg-white);
  transform: translateY(100%);
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  transform: translateY(0);
}

.project-overlay h3 {
  color: var(--bg-white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-overlay p {
  color: rgba(255, 255, 255, 0.9);
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-light);
  color: var(--text-medium);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: var(--bg-white);
  border-color: var(--primary-dark);
}

/* Modal/Lightbox */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 1200px;
  max-height: 90vh;
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background-color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-dark);
  transition: var(--transition);
}

.modal-close:hover {
  background-color: var(--bg-light);
}

/* Contact Cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-card {
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  padding: 12px;
  background-color: var(--bg-light);
  border-radius: 50%;
  color: var(--primary-color);
}

.contact-card h3 {
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--primary-color);
  font-weight: 600;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--bg-white);
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.cta-section h2 {
  color: var(--bg-white);
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Footer */
.footer {
  background-color: #0d1554;
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--bg-white);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 50px;
  width: auto;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Testimonials */
.testimonial-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.testimonial-stars {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-medium);
}

.testimonial-author {
  font-weight: 600;
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .hero { min-height: 500px; }
  .hero h1 { font-size: 2.5rem; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .project-grid,
  .footer-content,
  .contact-cards {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: var(--spacing-md) 0; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  .card-content { padding: 1rem; }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none; }
