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

:root {
  /* Updated color palette to use gold and black theme as requested */
  --primary: #d4af37; /* Gold gradient/highlight */
  --primary-hover: #b8941f; /* Darker gold for hover states */
  --secondary: #0a0a0a; /* Deep black/very dark navy for navbar + buttons */
  --accent: #f4e4bc; /* Light gold accent */
  --accent-hover: #e6d7a3; /* Darker light gold for hover */
  --neutral-dark: #0a0a0a; /* Deep black for text */
  --neutral-medium: #4a4a4a; /* Medium gray */
  --neutral-light: #8a8a8a; /* Light gray */
  --neutral-lighter: #e5e5e5; /* Very light gray */
  --neutral-lightest: #f8f8f8; /* Almost white */
  --white: #ffffff; /* Pure white */

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-normal: 300ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--neutral-dark);
  background-color: var(--white);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Updated header background to use deep black */
  background: var(--secondary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-lighter);
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  /* Updated logo color to gold */
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-menu a {
  /* Updated nav menu text to white for contrast against black header */
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a:focus {
  /* Updated nav hover color to gold */
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.hamburger {
  width: 25px;
  height: 3px;
  /* Updated hamburger color to white for visibility on black header */
  background: var(--white);
  margin: 3px 0;
  transition: var(--transition-fast);
}

/* Hero Section */
.hero {
  padding: 140px 0 var(--spacing-3xl);
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(253, 246, 227, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  position: relative;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Updated background pattern with gold accents */
  background-image: radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 1600px;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  color: var(--neutral-dark);
}

.hero-line-1,
.hero-line-2 {
  display: block;
}

.hero-line-2 {
  /* Updated hero accent text to gold */
  color: var(--primary);
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--neutral-medium);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: var(--font-size-base);
}

.btn-primary {
  /* Updated primary button to use deep black background */
  background: var(--secondary);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
  /* Updated primary button hover to gold */
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  /* Updated secondary button to use gold border and text */
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  /* Updated secondary button hover to gold background */
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Stats Bar */
.stats-bar {
  padding: var(--spacing-xl) 0;
  background: var(--white);
  border-bottom: 1px solid var(--neutral-lighter);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.stat-icon-img {
  width: 48px;
  height: 48px;
  margin-bottom: var(--spacing-xs);
  filter: brightness(0) saturate(100%) invert(62%) sepia(85%) saturate(407%) hue-rotate(8deg) brightness(93%)
    contrast(87%);
}

/* About Section */
.about {
  padding: var(--spacing-3xl) 0;
  background: var(--neutral-lightest);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 650px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--neutral-dark);
}

.about-text {
  font-size: var(--font-size-lg);
  color: var(--neutral-medium);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.about-highlights {
  list-style: none;
}

.about-highlights li {
  padding: var(--spacing-xs) 0;
  position: relative;
  padding-left: var(--spacing-lg);
  color: var(--neutral-medium);
}

.about-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  /* Updated checkmark color to gold */
  color: var(--primary);
  font-weight: bold;
}

/* Services Section */
.services {
  padding: var(--spacing-3xl) 0;
  background: var(--white);
}

.services .section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.service-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-lighter);
  transition: all var(--transition-normal);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon-img {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  filter: brightness(0) saturate(100%) invert(62%) sepia(85%) saturate(407%) hue-rotate(8deg) brightness(93%)
    contrast(87%);
  transition: all var(--transition-normal);
}

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

.service-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--neutral-dark);
}

.service-description {
  color: var(--neutral-medium);
  line-height: 1.6;
  margin-bottom: var(--spacing-md); /* Added margin bottom to separate from project links */
}

/* Added styles for service project links */
.service-projects {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--neutral-lighter);
}

.service-projects strong {
  color: var(--neutral-dark);
  font-size: var(--font-size-sm);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.project-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  border-bottom: 1px solid transparent;
}

.project-link:hover,
.project-link:focus {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
  transform: translateY(-1px);
}

.project-link + .project-link::before {
  content: " ";
  margin: 0 var(--spacing-xs);
}

/* Projects Section */
.projects {
  padding: var(--spacing-3xl) 0;
  background: var(--neutral-lightest);
}

.projects .section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.project-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--neutral-lighter);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.project-content {
  padding: var(--spacing-lg);
}

.project-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--neutral-dark);
}

.project-tags {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-sm);
}

.project-tag {
  background: var(--neutral-lighter);
  color: var(--neutral-medium);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

/* Contact Section */
.contact {
  padding: var(--spacing-3xl) 0;
  background: var(--white);
}

.contact .section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.contact-item h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--neutral-dark);
}

.contact-item p {
  color: var(--neutral-medium);
}

.contact-item a {
  /* Updated contact links to gold */
  color: var(--primary);
  text-decoration: none;
}

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

.contact-map img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-lighter);
}

.contact-form {
  background: var(--neutral-lightest);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--neutral-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--neutral-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-message {
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  display: none;
}

.form-message.success {
  background: #f0fff4;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.form-message.error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #feb2b2;
}

/* Footer */
.footer {
  /* Updated footer background to deep black */
  background: var(--secondary);
  color: var(--neutral-light);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-xl);
}

.footer-logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.footer-tagline {
  color: var(--neutral-light);
  line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

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

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: var(--neutral-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  /* Updated footer link hover to gold */
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.social-links a {
  display: inline-block;
  font-size: var(--font-size-lg);
  transition: transform var(--transition-fast);
}

.social-links a:hover {
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-medium);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--neutral-light);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: var(--spacing-sm);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  cursor: pointer;
  color: var(--neutral-medium);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--neutral-lighter);
  color: var(--neutral-dark);
}

.modal-header {
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-md);
  border-bottom: 1px solid var(--neutral-lighter);
}

.modal-header h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  color: var(--neutral-dark);
  padding-right: 60px;
}

.modal-meta {
  color: var(--neutral-medium);
  font-size: var(--font-size-sm);
}

.modal-body {
  padding: var(--spacing-xl);
}

.modal-summary {
  font-size: var(--font-size-lg);
  color: var(--neutral-medium);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
}

.slideshow-container {
  position: relative;
  background: var(--neutral-lightest);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.slides-wrapper {
  display: flex;
  transition: transform var(--transition-normal);
}

.slide {
  min-width: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  color: var(--white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: var(--font-size-2xl);
  cursor: pointer;
  color: var(--neutral-medium);
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-btn:hover {
  background: #ffb400;
  transform: translateY(-50%) scale(1.1);
}

.slide-prev {
  left: var(--spacing-md);
}

.slide-next {
  right: var(--spacing-md);
}

.slide-counter {
  text-align: center;
  padding: var(--spacing-md);
  color: var(--neutral-medium);
  font-size: var(--font-size-sm);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    /* Updated mobile menu background to deep black */
    background: var(--secondary);
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero {
    padding: 120px 0 var(--spacing-2xl);
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .about-image {
    order: -1;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

  .modal-content {
    margin: var(--spacing-sm);
    max-height: calc(100vh - 2rem);
  }

  .slide img {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 120px 0 var(--spacing-2xl);
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .slide-btn {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-lg);
  }
}

/* Focus Styles */
*:focus {
  /* Updated focus outline to gold */
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  /* Updated focus box shadow to gold */
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prevent scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

.stat-icon {
  font-size: 48px;
  color: #ffb400; /* change to match your theme */
  margin-bottom: 10px;
  display: block;
}

#toTopBtn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  font-size: 28px;
  border: none;
   width: 50px;          /* Equal width */
  height: 50px;         /* Equal height */
  font-size: 22px;      /* Center nicely */
  outline: none;
  background-color: orange;
  color: white;
  cursor: pointer;

  border-radius: 50%;
  transition: background-color 0.3s;
}

#toTopBtn:hover {
  background-color: #0056b3;
}


.nav-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 50px;          /* adjust as needed */
  margin-right: 10px;    /* space between logo and text */
}


.logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: #d4a21b;      /* your gold color */
  line-height: 1.2;
  display: block;
}

/* Make it smaller and cleaner on phones */
@media (max-width: 520px) {
  .logo-text {
    font-size: 1.1rem;
    line-height: 1.1;
  }
}

/* Optional: if you want "Imperial" and "Contracting" on one line on mobile */
@media (max-width: 420px) {
  .logo-text {
    white-space: nowrap;
    font-size: 1rem;
  }
}


