/* CSS Reset & Variables */
:root {
  --primary-color: #f97316; /* Safety Orange */
  --primary-hover: #ea580c;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-dark: #0f172a;
  --border-color: #e2e8f0;

  --font-heading: "Oswald", sans-serif;
  --font-body: "Inter", sans-serif;

  --container-width: 1200px;
  --header-height: 80px;
  --border-radius: 4px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-light);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  margin-bottom: 0.5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 3rem;
  line-height: 1.2;
}
h2 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.5rem;
}
p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}
ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

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

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

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 10px auto 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo .highlight {
  color: var(--primary-color);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--text-dark);
}
.nav-link:hover {
  color: var(--primary-color);
}

.btn-contact {
  background-color: var(--text-dark);
  color: white;
  padding: 8px 20px;
  border-radius: var(--border-radius);
}
.btn-contact:hover {
  background-color: var(--primary-color);
  color: white;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  background-color: var(--bg-dark);
  /* In a real project, use a background image */
  background-image: linear-gradient(
      rgba(15, 23, 42, 0.8),
      rgba(15, 23, 42, 0.8)
    ),
    url("https://images.unsplash.com/photo-1542744173-8e7e53415bb0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: white;
}

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

.hero-title {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #cbd5e1;
  margin-bottom: 30px;
  max-width: 600px;
}

/* Services Section */
.services,
.about,
.contact {
  background-color: var(--bg-light);
}

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

.service-card {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

/* Portfolio Section */
.portfolio {
  background-color: var(--bg-white);
}

.portfolio-categories {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}
.category.active,
.category:hover {
  background-color: var(--text-dark);
  color: white;
  border-color: var(--text-dark);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  background-color: #f1f5f9;
}

.portfolio-img {
  height: 250px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img {
  transform: scale(1.05);
}

.portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: white;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-info {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-info h4 {
  color: white;
  margin: 0;
  font-size: 1.2rem;
}
.portfolio-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* About Section */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  height: 400px;
  background-color: #cbd5e1;
  border-radius: var(--border-radius);
  background-image: url("https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80");
  background-size: cover;
  background-position: center;
}

.about-features {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.about-features li {
  font-weight: 600;
  color: var(--text-dark);
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  background: var(--bg-white);
  padding: 50px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.info-item {
  margin-bottom: 30px;
}

.social-links {
  display: flex;
  gap: 15px;
}
.social-icon {
  width: 40px;
  height: 40px;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  color: var(--text-dark);
  transition: all 0.3s;
}
.social-icon:hover {
  background-color: var(--primary-color);
  color: white;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

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

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-light);
  font-family: var(--font-body);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
}

.btn-block {
  width: 100%;
}

.form-note {
  font-size: 0.8rem;
  margin-top: 10px;
  text-align: center;
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  color: white;
  padding: 40px 0;
  text-align: center;
  border-top: 4px solid var(--primary-color);
}

.footer p {
  color: #94a3b8;
  margin: 0;
}

/* Responsive Queries */
@media (max-width: 992px) {
  :root {
    --container-width: 90%;
  }

  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }

  .mobile-menu-btn {
    display: block;
    width: 30px;
    height: 20px;
    position: relative;
  }
  .mobile-menu-btn .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    margin-bottom: 5px;
    border-radius: 2px;
  }

  .nav {
    display: none; /* In a real implementation with JS, we'd toggle a class */
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
  }
  /* Simple CSS hover menu for demo/non-JS fallback */
  .header:hover .nav {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .hero {
    height: auto;
    padding: 100px 0;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-title {
    font-size: 2.2rem;
  }

  .about-container {
    grid-template-columns: 1fr;
  }
  .about-image {
    order: -1;
    height: 300px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 30px;
  }
}
