/* A.B. Engineering & Fabrication — professional theme */
:root {
  --primary: #0a192f;
  --primary-light: #112240;
  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.15);
  --bg: #f8f9fa;
  --white: #ffffff;
  --text: #333333;
  --text-muted: #5c6b7a;
  --shadow: 0 10px 40px rgba(10, 25, 47, 0.12);
  --shadow-sm: 0 4px 20px rgba(10, 25, 47, 0.08);
  --radius: 12px;
  --radius-lg: 16px;
  --header-h: 72px;
  --font-heading: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

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

a:hover {
  color: #0d3d5c;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--primary);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section--alt {
  background: var(--white);
}

.section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.section__title {
  margin-bottom: 0.75rem;
}

.section__lead {
  color: var(--text-muted);
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(248, 249, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 25, 47, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header--scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  line-height: 1.2;
}

.logo span {
  color: #0d47a1;
}

.logo__accent {
  color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

#site-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  align-items: center;
}

#site-nav .nav-list a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  padding: 0.35rem 0;
  position: relative;
}

#site-nav .nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

#site-nav .nav-list a:hover::after,
#site-nav .nav-list a[aria-current="page"]::after {
  width: 100%;
}

#site-nav .nav-list a[aria-current="page"] {
  color: var(--primary);
}

@media (max-width: 992px) {
  .nav-toggle {
    display: flex;
  }

  #site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid rgba(10, 25, 47, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  #site-nav.is-open {
    max-height: 420px;
  }

  #site-nav .nav-list {
    flex-direction: column;
    padding: 1rem 1.25rem 1.5rem;
    align-items: flex-start;
    gap: 0;
  }

  #site-nav .nav-list a {
    display: block;
    padding: 0.65rem 0;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, #64ffda 0%, #2dd4bf 100%);
  color: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(100, 255, 218, 0.45);
  color: var(--primary) !important;
}

.btn--outline {
  background: transparent;
  color: var(--white) !important;
  border: 2px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent-dim);
  color: var(--accent) !important;
}

.btn--dark {
  background: var(--primary);
  color: var(--white) !important;
}

.btn--dark:hover {
  background: var(--primary-light);
  color: var(--white) !important;
}

/* Hero slider */
.hero-slider {
  position: relative;
  min-height: min(88vh, 720px);
  overflow: hidden;
  background: var(--primary);
}

.hero-slider__slides {
  position: absolute;
  inset: 0;
}

.hero-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s;
}

.hero-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slider__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-slider__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(10, 25, 47, 0.92) 0%,
    rgba(10, 25, 47, 0.75) 45%,
    rgba(10, 25, 47, 0.55) 100%
  );
}

.hero-slider__content {
  position: relative;
  z-index: 2;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 2rem) 1.25rem 4rem;
}

.hero-slider__inner {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

.hero-slider__inner h1 {
  color: var(--white);
  max-width: 16ch;
  margin-bottom: 1rem;
}

.hero-slider__inner p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.hero-slider__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.hero-badge {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(100, 255, 218, 0.35);
}

.hero-slider__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-slider__controls {
  position: absolute;
  z-index: 3;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-slider__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}

.hero-slider__arrow:hover {
  background: rgba(100, 255, 218, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-slider__dots {
  display: flex;
  gap: 0.5rem;
}

.hero-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.hero-slider__dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem) 0;
  background: var(--primary);
  color: var(--white);
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.97), rgba(10, 25, 47, 0.85));
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 36rem;
  margin: 0;
}

/* Service cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 25, 47, 0.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(100, 255, 218, 0.4);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.service-card__icon svg {
  width: 26px;
  height: 26px;
}

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

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* About preview */
.about-preview {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .about-preview {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.about-preview__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-preview__img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.about-preview__text .section__eyebrow {
  text-align: left;
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 25, 47, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.portfolio-card img {
  aspect-ratio: 16/11;
  object-fit: cover;
  width: 100%;
}

.portfolio-card__body {
  padding: 1.25rem;
}

.portfolio-card__body h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.portfolio-card__body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Testimonials */
.testimonial-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--white);
  padding: 2.5rem 1.5rem 3.5rem;
  box-shadow: var(--shadow);
}

.testimonial-carousel__viewport {
  position: relative;
  min-height: 160px;
}

.testimonial-carousel__track {
  position: relative;
}

.testimonial-carousel__slide {
  padding: 0 0.5rem;
  text-align: center;
  box-sizing: border-box;
  display: none;
  animation: fadeIn 0.45s ease;
}

.testimonial-carousel__slide.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.testimonial-carousel__quote {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.95);
}

.testimonial-carousel__cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.testimonial-carousel__nav {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-carousel__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-carousel__arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.testimonial-carousel__dots {
  display: flex;
  gap: 0.4rem;
}

.testimonial-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
}

.testimonial-carousel__dot.is-active {
  background: var(--accent);
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #152a4a 100%);
  color: var(--white);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

/* Lists & content blocks */
.content-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(10, 25, 47, 0.08);
  padding-left: 1.5rem;
  position: relative;
}

.content-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  padding: 0.4rem 0.85rem;
  background: var(--white);
  border: 1px solid rgba(10, 25, 47, 0.1);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 25, 47, 0.06);
  margin-bottom: 1rem;
}

.info-card:last-child {
  margin-bottom: 0;
}

.info-card strong {
  display: block;
  font-family: var(--font-heading);
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.two-col {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Contact */
.contact-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1.1fr;
  }
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(10, 25, 47, 0.15);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.input-invalid {
  border-color: #c62828 !important;
}

.form-error {
  color: #c62828;
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 25, 47, 0.08);
  min-height: 320px;
}

/* Map as link (no iframe) — works with file:// and avoids nested-frame security errors */
.map-wrap--link {
  min-height: 280px;
  padding: 0;
  background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary) 100%);
  border: 1px solid rgba(100, 255, 218, 0.2);
}

.map-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 280px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--white) !important;
  text-decoration: none !important;
  transition: background var(--transition), transform var(--transition);
}

.map-open:hover {
  background: rgba(100, 255, 218, 0.08);
  color: var(--accent) !important;
  transform: translateY(-2px);
}

.map-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.map-open__icon {
  color: var(--accent);
  line-height: 0;
}

.map-open__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.map-open__addr {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 22rem;
  line-height: 1.45;
}

.map-open:hover .map-open__addr {
  color: rgba(100, 255, 218, 0.9);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 1.5rem;
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  color: #9effeb;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.site-footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-footer p,
.site-footer li {
  font-size: 0.9rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* Floating buttons */
.whatsapp-float,
.call-float {
  position: fixed;
  right: 20px;
  z-index: 1000;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-float:hover,
.call-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}

.whatsapp-float {
  bottom: 20px;
  background: #25d366;
  padding: 0;
}

.whatsapp-float img {
  width: 28px;
  height: 28px;
}

.call-float {
  bottom: 88px;
  background: #007bff;
  color: var(--white);
  font-size: 1.35rem;
  text-decoration: none;
}

.call-float svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

@media (max-width: 480px) {
  .whatsapp-float,
  .call-float {
    right: 14px;
    width: 52px;
    height: 52px;
  }

  .call-float {
    bottom: 80px;
  }
}

/* Utilities */
.text-muted {
  color: var(--text-muted);
}

.mb-0 {
  margin-bottom: 0;
}

.mt-1 {
  margin-top: 1rem;
}

.divider {
  border: 0;
  height: 1px;
  background: rgba(10, 25, 47, 0.08);
  margin: 2.5rem 0;
}
