/* =========================================================
   NCMI - North Coast Mill Installations
   Main site styles
   ========================================================= */

:root {
  --primary: #2e3092;
  --primary-hover: #0e447c;
  --dark: #262262;
  --light: #f4f6f9;

  --text: #222;
  --text-body: #444;
  --text-muted: #555;
  --text-faint: #777;
  --border: #ddd;

  --radius: 16px;
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);

  --header-height: 181px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Keeps anchored sections from hiding under the sticky header */
  scroll-padding-top: calc(var(--header-height) + 10px);
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: #fff;
}

body.modal-open {
  overflow: hidden;
}

/* Visually hidden, still read by screen readers */
.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;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #eee;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  display: block;
  width: 200px;
  height: 150px;
  object-fit: contain;
}

.logo span {
  font-family: "Montserrat", sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
}

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

.site-nav a {
  position: relative;
  margin-left: 25px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  margin: 5px 0;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   HERO SLIDER
   ========================================================= */

.slider {
  position: relative;
  height: 60vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6));
}

.slide-installation {
  background-image: url("../images/industrial_installation.jpg");
}

.slide-industries {
  background-image: url("../images/industries_moving.jpg");
}

.slide-transport {
  background-image: url("../images/transport_maintenance.jpg");
}

.slide-local {
  background-image: url("../images/tanks1.jpg");
}

.slide-content {
  position: relative;
  max-width: 800px;
}

.slide h1,
.slide h2 {
  margin-bottom: 10px;
  font-size: 2.5em;
}

.slide p {
  font-size: 1.2em;
  opacity: 0.9;
}

.arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.6em;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.arrow:hover,
.arrow:focus-visible {
  background: rgba(0, 0, 0, 0.6);
}

.arrow-left {
  left: 15px;
}

.arrow-right {
  right: 15px;
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-hover);
}

.slide .btn {
  margin-top: 20px;
}

/* =========================================================
   SERVICES
   ========================================================= */

.services {
  padding: 70px 40px;
  background: var(--light);
}

.services h2,
.projects h2,
.contact h2 {
  text-align: center;
}

.services h2,
.projects h2 {
  margin-bottom: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

/* Service cards are <button>s so they work with the keyboard */
.service-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 260px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #333;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15));
  transition: background 0.3s;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.service-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.service-card:hover::before,
.service-card:focus-visible::before {
  background: linear-gradient(to top, rgba(46, 48, 146, 0.9), rgba(0, 0, 0, 0.15));
}

.service-card-content {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 25px;
  color: #fff;
}

.service-card-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.service-card-more {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  opacity: 0.85;
}

.service-installations {
  background-image: url("../images/installation1.jpg");
}

.service-customization {
  background-image: url("../images/customization2.jpg");
}

.service-demolition {
  background-image: url("../images/demo1.jpg");
}

.service-transport {
  background-image: url("../images/transportation1.jpg");
}

/* =========================================================
   SERVICE MODALS
   ========================================================= */

.service-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.service-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 45px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
  animation: modalOpen 0.25s ease;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-family: "Montserrat", sans-serif;
  color: var(--primary);
}

.modal-content p {
  line-height: 1.7;
  color: var(--text-body);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-body);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--primary);
}

/* =========================================================
   INDUSTRIES
   ========================================================= */

.industries {
  padding: 80px 0;
  background: #fff;
}

.industries-intro {
  max-width: 850px;
  margin: 0 auto 55px;
  padding: 0 25px;
  text-align: center;
}

.industries-intro h2 {
  margin-bottom: 15px;
  font-family: "Montserrat", sans-serif;
}

.industries-intro p {
  color: var(--text-muted);
  line-height: 1.7;
}

.industry-band {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 230px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.industry-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35));
}

/* Alternate bands: dark side and text both on the right */
.industry-band-right::before {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35));
}

.industry-band-right .industry-content {
  text-align: right;
}

.industry-band-right .industry-content p {
  margin-left: auto;
}

.industry-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 45px 40px;
}

.industry-content h3 {
  margin: 0 0 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.industry-content p {
  max-width: 650px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.industry-number {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  opacity: 0.8;
}

.industry-forestry {
  background-image: url("../images/forestry1.jpg");
}

.industry-mining {
  background-image: url("../images/mining1.jpg");
}

.industry-maritime {
  background-image: url("../images/maritime1.jpg");
}

.industry-rendering {
  background-image: url("../images/waste1.jpg");
}

.industry-water {
  background-image: url("../images/water1.jpg");
}

/* =========================================================
   PROJECTS
   ========================================================= */

.projects {
  padding: 70px 40px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
}

.project-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
}

/* Touch screens have no hover, so always show the label there */
@media (hover: none) {
  .project-overlay {
    top: auto;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    opacity: 1;
  }
}

/* =========================================================
   ABOUT
   ========================================================= */

.about {
  padding: 70px 20px;
}

.about-box {
  max-width: 900px;
  margin: auto;
  padding: 40px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.about-box h2 {
  margin-top: 0;
  color: var(--primary);
}

.about-box h3 {
  margin-top: 30px;
}

.about-box p {
  line-height: 1.7;
  color: var(--text-body);
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact {
  padding: 70px 20px;
  background: var(--light);
}

.contact-top {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  max-width: 1000px;
  margin: 30px auto;
}

.card {
  padding: 25px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-top: 0;
  color: var(--primary);
}

.contact-info p {
  margin: 10px 0;
  line-height: 1.6;
}

.contact-info a,
.form-note a {
  color: var(--primary);
  text-decoration: none;
}

.contact-info a:hover,
.form-note a:hover {
  text-decoration: underline;
}

.map-container {
  min-height: 320px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

.contact-form {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form input,
.contact-form textarea {
  margin-bottom: 15px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.contact-form button {
  padding: 14px;
  border-radius: 8px;
}

.form-note {
  margin: 12px 0 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: 30px 20px;
  background: var(--dark);
  color: #fff;
  text-align: center;
}

.site-footer a {
  margin: 0 10px;
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

/* =========================================================
   MEDIUM SCREENS - drop the company name so the menu fits
   ========================================================= */

@media (max-width: 1200px) {
  .logo span {
    display: none;
  }

  .site-nav a {
    margin-left: 18px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {
  :root {
    --header-height: 111px;
  }

  .site-header {
    padding: 10px 15px;
  }

  .logo img {
    width: 130px;
    height: 90px;
  }

  .logo span {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  /* Drop-down menu under the header */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    margin: 0;
    padding: 14px 20px;
  }

  .site-nav a::after {
    display: none;
  }

  .slider {
    height: 55vh;
  }

  .slide h1,
  .slide h2 {
    font-size: 1.8em;
  }

  .slide p {
    font-size: 1em;
  }

  .arrow {
    width: 42px;
    height: 42px;
    font-size: 1.2em;
  }

  .arrow-left {
    left: 8px;
  }

  .arrow-right {
    right: 8px;
  }

  .services,
  .projects {
    padding: 50px 20px;
  }

  .service-card {
    min-height: 230px;
  }

  .industries {
    padding: 60px 0;
  }

  .industry-band {
    min-height: 280px;
  }

  .industry-content {
    padding: 40px 25px;
  }

  .industry-content h3 {
    font-size: 1.7rem;
  }

  .modal-content {
    padding: 35px 25px;
  }

  .about-box {
    padding: 30px 25px;
  }

  .contact-top {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .map-container,
  .map-container iframe {
    height: 300px;
    min-height: 300px;
  }

  .contact-form {
    padding: 25px 20px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
