/* styles.css */

/* ---------------------------------------------
   0) Theme Variables (logo-inspired accents)
--------------------------------------------- */
:root {
  --bg-0: #f6f7f9;
  --bg-1: #ffffff;

  /* Logo accents */
  --accent-red: #c62828;
  --accent-red-600: #b71c1c;
  --accent-red-200: #ef9a9a;

  --accent-yellow: #f6b704;
  --accent-yellow-700: #d39a00;
  --accent-yellow-200: #ffe082;

  --ink-900: #1f1f1f;
  --ink-700: #333;
  --ink-500: #555;

  --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
  --ring-focus: 0 0 0 3px rgba(198, 40, 40, 0.35);

  /* Subtle site-wide background gradient */
  --page-gradient:
    radial-gradient(1200px 800px at 10% 0%, rgba(246, 183, 4, 0.08), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(198, 40, 40, 0.06), transparent 55%),
    linear-gradient(180deg, #fafafa, #f3f4f6 60%, #f7f7f9);

  /* Past Projects image sizing */
  --pp-img-max-h-desktop: 340px;
  --pp-img-max-h-tablet: 260px;
  --pp-img-max-h-phone: 220px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: var(--page-gradient);
  color: var(--ink-700);
  -webkit-tap-highlight-color: transparent;
}

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

/* ---------------------------------------------
   2) Typography
--------------------------------------------- */
h1,
h2,
h3 {
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--ink-900);
}

p {
  margin-bottom: 1em;
  color: var(--ink-700);
}

/* accent underline for section headings */
.section-title,
.services h2,
.core-values h2,
.mission-vision h2 {
  display: inline-block;
  background-image: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 3px;
  padding-bottom: 0.15em;
}

/* Top-level page titles with gradient underline */
.page-title {
  /* inherit base h1 styles (font, weight, color) */
  display: inline-block;
  line-height: 1.15;
  margin-bottom: 0.75em;

  /* size to feel like a page header; scales responsively */
  font-size: clamp(2rem, 2.2vw + 1.2rem, 2.75rem);
  font-weight: 700;

  /* gradient underline (same palette as section-title) */
  background-image: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 4px; /* slightly thicker than section titles */
  padding-bottom: 0.2em;
}

.page-title.center {
  text-align: center;
  display: block; /* allows centering */
  margin-left: auto;
  margin-right: auto;
}



/* ---------------------------------------------
   3) Header & Footer
--------------------------------------------- */
header,
footer {
  background-color: #1f1f1f;
  color: #ffffff;
  padding: 1em 2em;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1em;
  min-width: 0;
}

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

.logo a {
  color: white;
  text-decoration: none;
  font-size: 1.5em;
  font-weight: bold;
  display: inline-block;
  line-height: 1.1;
  word-break: break-word;
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 1.5em;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

nav a:hover::after,
nav a:focus-visible::after {
  transform: scaleX(1);
}

nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Footer text & links forced white on dark bg */
footer p,
footer a,
footer a:visited {
  color: #fff;
}

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

/* Footer badge positioning */
footer {
  position: relative;
}

footer>img {
  position: absolute;
  right: 2rem;
  bottom: 1rem;
  height: 120px;
  width: auto;
  display: block;
  opacity: 0.98;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  /* decorative */
}

/* On small screens, stack & right-align */
@media (max-width: 600px) {
  footer>img {
    position: static;
    margin: 0.75rem 0 0 auto;
    display: block;
    height: 40px;
  }
}

/* ---------------------------------------------
   4) Main Content Wrapper
--------------------------------------------- */
main {
  padding: 2em;
  max-width: 1200px;
  margin: 0 auto;
}

/* Section wrapper rhythm + subtle separators */
section {
  margin-bottom: 3rem;
  background: var(--bg-1);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-red));
  opacity: 0.12;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* ---------------------------------------------
   5) HERO image banner (HOME)
--------------------------------------------- */
section.hero {
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.hero {
  position: relative;
  overflow: hidden;
  height: clamp(380px, 56vh, 640px);
  border-radius: 14px;

  /* Stronger gradient border that fully wraps */
  border: 4px solid transparent;
  background:
    linear-gradient(#0000, #0000) padding-box,
    linear-gradient(90deg, var(--accent-red), var(--accent-yellow)) border-box;

  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

/* Full-cover image, no vertical bars */
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.8);
  transition: opacity 350ms ease;
}

/* Subtle overlay to improve legibility */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.45),
      rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

/* Text: white, slightly above center */
.hero-content {
  position: absolute;
  left: 50%;
  top: 24%;
  transform: translateX(-50%);
  width: min(92%, 1100px);
  text-align: center;
  color: #fff;
  z-index: 2;
}

.hero-content h1 {
  margin: 0 0 0.25rem 0;
  font-size: clamp(2rem, 3.5vw + 1rem, 3.4rem);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  margin: 0;
  font-size: clamp(1.02rem, 1.25vw + 0.8rem, 1.35rem);
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
}

.hero-content p b {
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.hero-rotation-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.72);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.hero-rotation-toggle:hover {
  background: rgba(31, 31, 31, 0.9);
}

.hero-rotation-toggle:focus-visible {
  outline: 3px solid var(--accent-yellow);
  outline-offset: 3px;
}

/* ---------------------------------------------
   6) Services (HOME)
--------------------------------------------- */
.services {
  padding: 2em 1.5em;
  background: linear-gradient(180deg, rgba(246, 183, 4, 0.06), transparent 55%), var(--bg-1);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.services h2 {
  font-size: 2.2em;
  margin-bottom: 0.75em;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.service-card:focus-within {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14), var(--ring-focus);
  border-color: transparent;
}

.service-card-media {
  margin: 0;
  min-height: 220px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d9d9d9;
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.service-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.2rem 1.2rem 1.3rem;
}

.service-card-body h3 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--ink-900);
}

.service-card-summary {
  margin-bottom: 1rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-700);
}

.service-card .more-info {
  margin-top: auto;
}

.service-details {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.service-details p {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ---- Carousel: BASE (shared minimal rules) ---- */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  list-style: none;
  display: flex;
  align-items: stretch;
}

/* Carousel buttons (shared) */
.carousel .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(31, 31, 31, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 2em;
  padding: 0.2em 0.6em;
  cursor: pointer;
  z-index: 10;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  transition: background 160ms ease, transform 160ms ease;
}

.carousel .carousel-btn.prev {
  left: 0.35em;
}

.carousel .carousel-btn.next {
  right: 0.35em;
}

.carousel .carousel-btn:hover {
  background: rgba(31, 31, 31, 0.85);
  transform: translateY(-50%) scale(1.04);
}

/* ---------------------------------------------
   8) Projects Gallery (Past Projects)
   Scoped carousel — natural sizing + letterbox + gradient buttons
--------------------------------------------- */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 100%;
  background:
    linear-gradient(180deg, rgba(246, 183, 4, 0.04), rgba(198, 40, 40, 0.03)),
    #ffffff;
}

.project-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.project-item:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

/* Carousel container: auto height + letterbox bg */
.project-item .carousel-track-container {
  position: relative;
  height: auto;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  /* letterbox for landscape images */
  border: 1px solid rgba(0, 0, 0, 0.6);
}

/* Track & slides (scoped) */
.project-item .carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  align-items: center;
  /* vertical center images */
}

.project-item .carousel-slide {
  min-width: 100%;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* horizontal center */
}

/* Images: natural proportions, never cropped; letterboxed by black bg */
.project-item .carousel-slide img {
  display: block;
  width: auto;
  /* no stretch */
  height: auto;
  /* keep intrinsic ratio */
  max-width: 100%;
  /* fit narrow cards */
  max-height: var(--pp-img-max-h-desktop);
  object-fit: contain;
  /* safeguard */
  object-position: center;
  border-radius: 0;
}

/* Card text */
.project-item h2 {
  font-size: 1.5rem;
  margin-top: 0.9rem;
  color: var(--ink-900);
}

.project-item p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-700);
}

/* View More / Show Less (gradient) */
.more-info {
  display: block;
  width: 100%;
  padding: 0.75em 1em;
  margin-top: 1em;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  color: #fff;
  border: none;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  font-weight: 600;
  transition: filter 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.more-info:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.more-info[aria-expanded="true"] {
  filter: brightness(0.97);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

.more-info:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(246, 183, 4, 0.25);
}

/* ---------------------------------------------
   9) Forms
--------------------------------------------- */
.contact-form {
  max-width: 860px;
  margin: auto;
  background: white;
  padding: 2em;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.contact-form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 700;
  color: var(--ink-900);
  text-align: left;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus-visible {
  outline: none;
  border-color: rgba(198, 40, 40, 0.5);
  box-shadow: var(--ring-focus);
}

.contact-form textarea {
  resize: none;
  overflow-y: auto;
}

.contact-form button {
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  color: white;
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: filter 140ms ease, transform 140ms ease;
}

.contact-form button:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* ---------------------------------------------
   10) Contact: file list
--------------------------------------------- */
.file-upload input[type="file"] {
  display: block;
  margin-top: 0.5em;
  color: transparent;
}

.file-upload input[type="file"]::file-selector-button {
  color: initial;
}

.file-upload .file-list {
  margin-top: 0.5em;
}

.file-upload .file-item {
  display: inline-flex;
  align-items: center;
  background: #f0f0f0;
  color: #333;
  border-radius: 999px;
  padding: 0.35em 0.7em;
  margin-right: 0.5em;
  font-size: 0.9em;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.file-upload .file-item .remove-file {
  background: transparent;
  border: none;
  color: #666;
  font-size: 1em;
  margin-left: 0.5em;
  cursor: pointer;
  line-height: 1;
}

.file-upload .file-item .remove-file:hover {
  color: #000;
}

/* ---------------------------------------------
   11) Fade-In (shared)
--------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------
   12) Mission & Vision
--------------------------------------------- */
.mission-vision {
  background:
    linear-gradient(180deg, rgba(198, 40, 40, 0.05), rgba(246, 183, 4, 0.03)),
    #ffffff;
  padding: 3em 2em;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 3em;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.mission-vision h2 {
  font-size: 2.1em;
  margin-bottom: 0.75em;
  color: var(--ink-900);
}

.mission-vision p {
  font-size: 1.1em;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  color: var(--ink-700);
}

.about-single {
  position: relative;
  overflow: hidden;
  background:
    url("../images/logos-and-misc/overlapping1.png") center / min(88%, 900px) auto no-repeat,
    linear-gradient(180deg, rgba(198, 40, 40, 0.05), rgba(246, 183, 4, 0.03)),
    #ffffff;
}

.about-single::before {
  content: none;
}

.about-single-text {
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
}

.about-single-text p + p {
  margin-top: 1.15rem;
}

/* ---------------------------------------------
   12b) Company Logo Banner
--------------------------------------------- */
.company-banner {
  overflow: hidden;
  padding: 2.5rem 2rem;
  background:
    linear-gradient(115deg, rgba(198, 40, 40, 0.045), transparent 42%),
    linear-gradient(295deg, rgba(246, 183, 4, 0.08), transparent 42%),
    #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.company-banner-heading {
  margin: 0 auto 1.75rem;
  text-align: center;
}

.company-banner-eyebrow {
  margin-bottom: 0.25rem;
  color: var(--accent-red-600);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.company-banner h2 {
  display: inline-block;
  margin-bottom: 0;
  padding-bottom: 0.15em;
  background-image: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 3px;
  font-size: clamp(1.65rem, 2.5vw, 2.1rem);
}

.company-logo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.company-logo-slot {
  display: grid;
  min-width: 0;
  min-height: 130px;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(31, 31, 31, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.company-logo-slot img {
  width: 100%;
  height: 100%;
  max-height: 90px;
  object-fit: contain;
  object-position: center;
}

/* Compensate for extra whitespace baked into these square image files. */
.company-logo-slot img.company-logo--compact {
  transform: scale(1.7);
}

/* ---------------------------------------------
   13) Core Values
--------------------------------------------- */
.core-values {
  background:
    linear-gradient(180deg, rgba(246, 183, 4, 0.04), rgba(198, 40, 40, 0.03)),
    #ffffff;
  padding: 3em 1.5em;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 3em;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.core-values h2 {
  font-size: 2.1em;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--ink-900);
}

.values-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1000px;
  margin: 0 auto;
  justify-items: center;
}

.value-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.25rem 1.4rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  width: 100%;
  max-width: 320px;
  text-align: center;
  cursor: pointer;
}

.value-card:hover,
.value-card.active {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
  border-color: transparent;
  outline: 2px solid transparent;
  outline-offset: 0px;
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
}

.value-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.value-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f3f3f3;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.value-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--ink-900);
  opacity: 0.9;
}

.value-title {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Reveal-on-hover/click body */
.value-body {
  color: var(--ink-700);
  line-height: 1.6;
  font-size: 0.95rem;
  max-height: 0;
  opacity: 0;
  transform: translateY(6px);
  overflow: hidden;
  transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease;
  padding: 0 0.5rem;
}

.value-card:hover .value-body,
.value-card.active .value-body,
.value-card:focus-visible .value-body {
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
}

.value-card:focus-visible {
  box-shadow: var(--ring-focus);
}

/* ---------------------------------------------
   14) Responsive Enhancements
--------------------------------------------- */

/* Large tablets */
@media (max-width: 1200px) {
  main {
    padding: 1.5em;
  }
}

/* Tablets */
@media (max-width: 992px) {
  .logo a {
    font-size: 1.35em;
  }

  nav ul {
    gap: 1em;
  }

  .hero {
    height: clamp(360px, 50vh, 560px);
  }

  .hero-content {
    top: 22%;
  }

  .services h2 {
    font-size: 2rem;
  }

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

  .company-logo-slot img.company-logo--compact {
    transform: scale(1.45);
  }

  .company-logo-slot:last-child {
    grid-column: 2;
  }

}

/* Mobile landscape & small tablets */
@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden;
  }

  header,
  footer {
    padding: 0.85em 1.2em;
  }

  .header-left {
    gap: 0.75em;
  }

  .logo-img img {
    height: 64px;
  }

  .logo a {
    font-size: 1.25em;
  }

  nav ul {
    gap: 0.75em;
    font-size: 0.95em;
  }

  main {
    padding: 1.25em;
  }

  .hero {
    height: clamp(340px, 46vh, 520px);
  }

  .hero-content {
    top: 20%;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .service-card-body {
    padding: 1rem;
  }

  .service-card-body h3 {
    font-size: 1.1rem;
  }

  .carousel .carousel-btn {
    font-size: 1.6em;
    padding: 0.15em 0.5em;
    min-width: 44px;
    min-height: 44px;
    /* touch target */
  }

  .carousel .carousel-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
  }

  .mission-vision {
    padding: 2em 1.25em;
  }

  .mission-vision h2 {
    font-size: 1.7em;
  }

  .mission-vision p {
    font-size: 1em;
    line-height: 1.7;
  }

  .company-banner {
    padding: 2rem 1.25rem;
  }

  /* Past Projects images */
  .project-item .carousel-slide img {
    max-height: var(--pp-img-max-h-tablet);
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .logo-img img {
    height: 56px;
  }

  nav ul {
    gap: 0.6em;
    font-size: 0.9em;
  }


  .hero {
    height: clamp(320px, 42vh, 480px);
  }

  .hero-content {
    top: 18%;
  }

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

  .company-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .company-logo-slot:last-child {
    grid-column: auto;
  }

  .company-logo-slot {
    min-height: 120px;
    padding: 0.75rem;
  }

  .service-card-media {
    min-height: 210px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-item {
    padding: 1rem;
    border-radius: 10px;
  }

  .project-item h2 {
    font-size: 1.25rem;
  }

  .project-item p {
    font-size: 0.98rem;
  }

  /* Let the container auto-size; images already constrained by var */
  .project-item .carousel-slide img {
    max-height: var(--pp-img-max-h-phone);
  }

  .mission-vision h2,
  .core-values h2,
  .services h2 {
    font-size: 1.5em;
  }

  .values-grid {
    gap: 1rem;
  }

  .value-card {
    padding: 1rem 1rem 1.1rem;
    max-width: 100%;
  }

  .value-title {
    font-size: 1rem;
  }

  .value-body {
    font-size: 0.93rem;
  }
}

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

  .carousel-track,
  .fade-in,
  .project-item,
  .value-card {
    transition: none !important;
  }
}

/* --- About page --- */
.about-section {
  background:
    linear-gradient(180deg, rgba(246,183,4,0.04), rgba(198,40,40,0.03)),
    #fff;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2rem 1.5rem;
}

.about-section > .section-title {
  margin-bottom: 1.25rem;
}

.about-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr; /* text a touch wider */
  gap: 1.5rem;
  align-items: stretch;
  padding: 1rem 0;
}

.about-row + .about-row {
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 1rem;
  padding-top: 2rem;
}

/* Reverse order for alternating rows */
.about-row--rev {
  grid-template-columns: 1fr 1.15fr;
}

.about-section .about-text {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.about-section .about-text::before {
  content: "";
  position: absolute;
  inset: clamp(1rem, 5%, 1.75rem);
  background: url("../images/logos-and-misc/overlapping1.png") center / contain no-repeat;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.about-section .about-text p {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-700);
  margin: 0; /* tidy blocks */
}

.about-section .about-text p + p {
  margin-top: 1rem;
}

/* Image container */
.about-media {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;                    /* letterbox if needed */
  border: 1px solid rgba(0,0,0,0.08);
}

/* Keep images crisp, fill nicely without distortion */
.about-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;                 /* consistent rectangle */
  object-fit: cover;                    /* looks premium; minimal crop */
  display: block;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .about-row,
  .about-row--rev {
    grid-template-columns: 1fr 1fr;    /* even split on tablets */
  }
}

@media (max-width: 768px) {
  .about-row,
  .about-row--rev {
    grid-template-columns: 1fr;        /* stack on mobile */
    gap: 1rem;
  }
  /* Preserve visual alternating feel on mobile by reordering */
  .about-row--rev .about-media { order: -1; }  /* image first */
  .about-media img { aspect-ratio: 16 / 9; }   /* wider feel on phones */
}

.apply-button {
  display: inline-block;
  margin-top: 1.5em;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  color: white;
  padding: 0.75em 1.5em;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: filter 150ms ease, transform 150ms ease;
}

.apply-button:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.contact-intro {
  margin-bottom: 1.25rem;
  text-align: left;
}

.contact-intro p:last-child {
  margin-bottom: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.full-width {
  width: 100%;
}

.half-width {
  width: 100%;
}
@media (min-width: 600px) {
  .half-width {
    width: calc(50% - 0.5rem);
  }
}

.file-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.4em;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 4px solid #28a745;
  border-radius: 6px;
  font-weight: 600;
  text-align: left;
}

.form-feedback.is-success {
  background: #f0fdf4;
  color: #155724;
}

.form-feedback.is-error {
  background: #fff4f4;
  color: #8a1c1c;
  border-left-color: var(--accent-red);
}
