/* -------------------
   Root Variables
   ------------------- */
:root {
    --hero-height: 420px; /* keep in sync with .page-hero height */
    --footer-height: 60px; /* adjust if your footer height differs */
    --page-side-margin: 30px; /* PAGE SIDE MARGINS — user requested 30px left/right */
    --photo-side-margin: 30px; /* override photo grid side margin so breakout respects the new page margin */
}
/* Responsive override so the calc matches the media-query hero height */
@media (max-width: 700px) {
    :root {
        --hero-height: 320px;
    }
}
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100%;
    overflow-x: hidden; /* prevent horizontal scrollbar */
}
/* -------------------
   Header with Gradient Background
   ------------------- */
.gradient-header {
    background: linear-gradient(to bottom, #0D1233, transparent);
    padding: 20px;
    /* allow the header to scroll with the page (was position: sticky) */
    position: relative;
    top: auto;
    z-index: 1000;
}
.gradient-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}
    .gradient-header .header-inner nav {
        position: relative;
        transform: translateY(-30px);
        /* keep transform from affecting layout flow while preserving smoothness */
        box-sizing: border-box;
    }
.site-logo img {
    height: 90px;
    width: auto;
    display: block;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    padding: 0;
    margin: 0;
    /* ensure nav row doesn't cause horizontal overflow on wide items */
    max-width: 100%;
}
nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    position: relative; /* needed for the underline pseudo-element */
    padding-bottom: 4px; /* space for the underline so layout doesn't shift */
    transition: color .15s ease;
}
    nav a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -6px;
        width: 100%;
        height: 3px;
        background: #FF4D00; /* orange underline color */
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .25s ease-in-out;
        border-radius: 2px;
        will-change: transform;
    }
    nav a:hover::after,
    nav a:focus::after,
    nav a:focus-visible::after {
        transform: scaleX(1);
    }
    nav a.active::after,
    nav a[aria-current="page"]::after {
        transform: scaleX(1);
    }
    nav a:focus,
    nav a:focus-visible {
        outline: none;
        color: #fff;
        box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.12);
    }

/* -------------------
   Side panels (right)
   ------------------- */
/* base: hidden off-canvas to the right */
.side-panel {
    position: fixed;
    right: 0;
    /* top is set dynamically in JS so the panel starts under the header */
    bottom: 0;
    width: 490px;               /* increased by 100px (was 340px) */
    max-width: 40vw;
    background: rgba(181, 182, 187, 0.9); /* gray with 90% opacity */
    color: #000000;
    box-shadow: -8px 0 20px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.2,.9,.2,1);
    z-index: 1500;
    overflow: auto;
    /* keep panels out of flow; they'll be placed by JS */
}
/* visible state */
.side-panel.open {
    transform: translateX(0);
}
/* internal spacing */
.side-panel-inner {
    padding: 18px;
    padding-bottom: 40px;
}
/* close button */
.side-panel .panel-close {
    background: transparent;
    border: none;
    color: #000000;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    float: right;
}
/* title */
.side-panel h2 {
    margin: 6px 0 12px;
    font-size: 18px;
    color: #000000;
}
/* content links */
.side-panel-content a {
    color: #000000;
    text-decoration: underline;
}
/* prevent background scroll when panel open (optional) */
body.side-panel-open {
    overflow: hidden;
}
/* responsive: narrower panel on small screens */
@media (max-width: 640px) {
    .side-panel {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
    }
    /* increase side-panel button height by 20px on narrow screens */
    .side-panel .service-button {
        height: 108px; /* was 88px -> +20px */
    }
    /* slightly larger label inside side-panel on small screens */
    .side-panel .service-overlay .service-label {
        font-size: 1.25rem;
    }
    /* slightly larger label inside side-panel on small screens */
    .side-panel .service-overlay .service-label {
        font-size: 1.25rem;
    }
}

/* -------------------
   Services image buttons
   ------------------- */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}
    .service-list li {
        margin: 0;
    }
/* clickable image button */
.service-button {
    display: block;
    position: relative;
    width: 100%;
    height: 72px; /* button height - adjust as needed */
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: rgba(181, 182, 187, 0.9); /* fallback background while image loads */
}
/* service image covers the button */
.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}
/* orange overlay that grows from the left on hover/focus */
.service-overlay {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, rgba(255,77,0,0.95) 0%, rgba(255,77,0,0.75) 40%, rgba(255,77,0,0.45) 70%);
    transition: width 260ms cubic-bezier(.22,.9,.2,1);
    display: flex;
    align-items: center;
    padding-left: 15px;
    box-sizing: border-box;
}
/* label inside overlay */
.service-label {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
    padding-left: 10px;
}
/* hover/focus: expand overlay so it covers a portion of the image (adjust to taste) */
.service-button:hover .service-overlay,
.service-button:focus .service-overlay,
.service-button:focus-visible .service-overlay {
    width: 60%;
}
/* accessible focus ring */
.service-button:focus-visible {
    outline: 3px solid rgba(255,77,0,0.16);
    outline-offset: 2px;
}
/* small screens: slightly taller buttons */
@media (max-width: 640px) {
    .service-button {
        height: 88px;
    }
    .service-label {
        font-size: 1.05rem;
    }
}

/* Ensure side-panel buttons look consistent */
.side-panel .service-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.side-panel .service-button {
    height: 92px; /* consistent height inside side panel (+20px) */
    border-radius: 6px;
    overflow: hidden;
}
/* Collapsed state: always keep label on one line and truncate */
.side-panel .service-overlay .service-label {
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: calc(100% - 28px); /* account for left padding */
    line-height: 1;
}
/* Expanded state (hover/focus): allow the label to wrap and show full text */
.side-panel .service-button:hover .service-overlay .service-label,
.side-panel .service-button:focus .service-overlay .service-label,
.side-panel .service-button:focus-visible .service-overlay .service-label {
    white-space: normal;
    max-width: none;
}
/* Slightly reduce label size on very narrow panels to avoid early truncation */
@media (max-width: 420px) {
    .service-overlay .service-label {
        font-size: 0.92rem;
    }
}
/* Make the orange overlay cover the whole button when used inside the side-panel */
.side-panel .service-button:hover .service-overlay,
.side-panel .service-button:focus .service-overlay,
.side-panel .service-button:focus-visible .service-overlay {
    width: 100% !important; /* force full coverage inside the narrow panel */
}
/* When overlay is full-width (hover/focus inside side-panel) allow the label to display normally */
.side-panel .service-button:hover .service-overlay .service-label,
.side-panel .service-button:focus .service-overlay .service-label,
.side-panel .service-button:focus-visible .service-overlay .service-label {
    white-space: normal;
    max-width: none;
}

/* -------------------
   Hero Image Slider
   ------------------- */
.hero-slider {
    margin: -130px 0 0 0;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
    .hero-slider img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.5s ease-in-out;
        position: absolute;
        top: 0;
        left: 0;
    }
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 1001;
}
.left {
    left: 10px;
}
.right {
    right: 10px;
}

/* -------------------
   Narrow-screen layout: keep logo left, stacked menu to the right
   - nav becomes a vertical list but remains to the right of the logo
   - menu width is constrained so it doesn't overlap the logo
   ------------------- */
@media (max-width: 700px) {
    .hero-slider {
        margin: -260px 0 0 0;
    }
    .gradient-header .header-inner {
        /* keep horizontal layout so logo stays left and menu is to the right */
        flex-direction: row;
        align-items: flex-start; /* align menu top with logo top */
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
    }
    .site-logo img {
        height: 64px;
        width: 130px;
        display: block;
    }
    /* remove the negative translate so nav sits naturally next to logo */
    .gradient-header .header-inner nav {
        transform: none;
        /* push nav to the far right of header by using auto margin */
        margin-left: auto;
        margin-right: 0;
        /* constrain nav so it doesn't overlap the logo */
        max-width: 45%;
        box-sizing: border-box;
    }
    /* stacked (vertical) menu items aligned to the right edge of the nav */
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 6px 8px;
        margin: 0;
        background: transparent;
        max-height: 60vh;
        overflow-y: auto;   /* allow vertical scrolling */
        overflow-x: hidden; /* prevent horizontal scrollbar */
        align-items: flex-end; /* align items to the right inside the nav area */
    }
    nav li {
        width: auto;
        flex: 0 0 auto;
    }
    nav a {
        display: block;
        width: 100%;
        padding: 5px 5px;
        font-size: 15px;
        white-space: normal;
        border-radius: 6px;
        box-sizing: border-box;
        text-align: right; /* keep labels flush to the right edge */
    }
    /* keep the underline visible and positioned for stacked layout */
    nav a::after {
        left: 0px;
        right: 5px;
        bottom: 2px;
        height: 3px;
    }
}
/* -------------------
   Page Hero Image
   ------------------- */
.page-hero {
    position: relative;
    width: 100vw; /* span full viewport width */
    left: 50%;
    transform: translateX(-50%); /* center when inside constrained container */
    margin: -130px 0 0 0;
    overflow: hidden;
    height: 420px; /* fixed visual height (change value as needed) */
    max-height: 60vh; /* cap for very small viewports */
}
    .page-hero img {
        display: block;
        width: 100%;
        height: 100%; /* fill the fixed-height container */
        object-fit: cover; /* preserve cover behavior while keeping height constant */
        max-width: none; /* avoid container constraints */
    }
    .page-hero .hero-bar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 20px;
        background: #FF4D00;
        z-index: 2;
    }
    /* Place the page title at the left-bottom with 40px padding */
    .page-hero h1 {
        position: absolute;
        left: calc(var(--page-side-margin) + 10px);
        bottom: 40px;
        margin: 0;
        padding: 0;
        color: #ffffff;
        z-index: 3;
        line-height: 1;
        font-size: 3rem; /* tuned for the fixed hero height */
        text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    }
/* Responsive tweaks for smaller screens */
@media (max-width: 700px) {
    .page-hero {
        height: 320px;
        margin: -260px 0 0 0;
    }
        .page-hero h1 {
            left: 20px;
            bottom: 40px;
            font-size: 1.75rem;
        }
}
/* -------------------
   Contact section: full-bleed map with left-side info card
   ------------------- */
.contact-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    /* height fills the viewport area between hero and footer */
    height: calc(100vh - var(--hero-height) - var(--footer-height));
    min-height: 280px;
    background: #000; /* fallback while image loads */
    margin-bottom: 0; /* ensure no stray margin */
    padding-bottom: 0;
}
/* map column: flexible, takes remaining width */
.contact-map {
    flex: 1 1 auto;
    position: relative;
    min-width: 0; /* allow proper shrinking in flexbox */
}
    .contact-map img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
/* right-side contact card -> now positioned on the left using order */
.contact-card {
    flex: 0 0 var(--contact-card-width);
    width: 500px;
    background: rgba(181, 182, 187, 0.95); /* same gray as side-panel */
    color: #000;
    /* shadow moved to the right since the card is on the left */
    box-shadow: 8px 0 24px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    padding: 50px;
    box-sizing: border-box;
    /* make the card appear on the left in the row layout */
    order: -1;
}
.contact-card-inner {
    width: 100%;
}
.contact-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: #0D1233;
}
.contact-card address {
    font-style: normal;
    line-height: 1.45;
    color: #111;
    margin-bottom: 12px;
}
.contact-card .phone a {
    color: #0D1233;
    font-weight: 700;
    text-decoration: none;
}
/* Responsive: stack on narrow screens */
@media (max-width: 700px) {
    .contact-section {
        flex-direction: column;
        height: auto;
    }
    .contact-map {
        height: 320px;
        order: 0; /* ensure map stays above card when stacked */
    }
    .contact-card {
        width: 100%;
        flex: 0 0 auto;
        box-shadow: none;
        padding: 18px;
        order: 0; /* reset order so card appears below the map */
    }
}
/* -------------------
   Projects grid (restored previous layout behavior, only slightly larger thumbnails)
   ------------------- */
.projects-section {
    /* make the section span the full viewport width (full-bleed) */
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    padding: 36px 0 80px; /* keep vertical padding, remove side padding so grid can reach edges */
    box-sizing: border-box;
    background: transparent;
}
.projects-container {
    /* reduced side gutter so images can be wider */
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 10px; /* was 0 18px */
    box-sizing: border-box;
}
.section-heading {
    margin: 0 0 18px 0;
    font-size: 1.5rem;
    color: #0D1233;
    padding-left: 10px; /* align heading with smaller gutter */
}
/* Adjust base grid width to account for smaller container padding */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* slightly larger than original but less aggressive than 320px */
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.project-item {
  display: block;
}
.projects-grid .project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  /* preserve original flow-based sizing: use padding-bottom ratio so existing styles/layout remain */
  padding-bottom: 75%; /* ~4:3 feel but preserves previous stacking behavior */
  height: 0;             /* classic aspect-ratio fallback */
  box-sizing: border-box;
  transition: transform .16s ease, box-shadow .16s ease;
  box-shadow: 0 8px 24px rgba(11,14,20,0.06);
  cursor: pointer;
}
/* Add lift effect on hover/focus - matching people page behavior */
.projects-grid .project-card:hover,
.projects-grid .project-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11,14,20,0.12);
  outline: none;
}
.projects-grid .project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: transform 200ms ease, filter 200ms ease;
}
/* Hover gradient overlay for project cards (shows title + location at bottom) */
.projects-grid .project-overlay {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* push text to bottom */
  gap: 4px;
  padding: 12px;
  box-sizing: border-box;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.62) 60%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none; /* allow clicks on the parent link */
  border-radius: inherit; /* match card rounding */
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
/* reveal overlay on hover or keyboard focus */
.projects-grid .project-card:hover .project-overlay,
.projects-grid .project-card:focus-within .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Title + location styling */
.projects-grid .project-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.1;
    margin: 0;
}
.projects-grid .project-location {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.95;
}
/* Small screens: stack projects in a single column to fit content better */
@media (max-width: 700px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px; /* reduce gap between cards */
    }
    .project-card {
        height: auto; /* allow cards to size naturally */
        padding-bottom: 75%; /* keep visual ratio for stacked cards */
    }
}
/* Very narrow screens */
@media (max-width: 420px) {
    .project-card { padding-bottom: 86%; }
    .project-title { font-size: 1rem; }
    .project-location { font-size: 0.9rem; }
}
/* Larger images on wide viewports: increase min card width, reduce columns and adjust aspect ratio */
@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); /* larger minimum card width */
        gap: 36px;
        width: calc(100% - 80px); /* reduced from calc(100% - 160px) */
        margin: 0 40px; /* reduced side gutters */
    }
    .project-card {
        padding-bottom: 56%; /* slightly wider aspect for larger visuals */
        border-radius: 0px;
        height: 0;
    }
    .project-title {
        font-size: 1.25rem;
    }
    .project-location {
        font-size: 1.05rem;
    }
}
/* Ultra-wide: use smaller outer gutters than before so 4 columns are larger */
@media (min-width: 1600px) {
    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 36px;
        width: calc(100% - 160px); /* reduced from calc(100% - 320px) */
        margin: 0 80px; /* reduced from 0 160px */
    }
    .project-card {
        padding-bottom: 52%;
        height: 0;
    }
}

/* -------------------
   Footer
   ------------------- */
footer {
    background-color: #0D1233;
    text-align: center;
    padding: 0;
    margin: 0;
    font-size: 14px;
    position: fixed;
    bottom: 0;
    width: 100%;
    color: #FFFFFF;
    height: var(--footer-height); /* <- added to remove layout mismatch */
    line-height: var(--footer-height); /* keeps inline content vertically centered if any */
}
    footer p {
        margin: 0;
    }

/* -------------------
   Photo gallery
   ------------------- */
.photo-gallery {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin: -130px 0 0 0; /* aligns with your existing hero behavior */
    overflow: hidden;
    box-sizing: border-box;
    padding-bottom: 0; /* removed extra padding that caused vertical scroll */
}
.gallery-slider {
    position: relative;
    width: 100%;
    height: 100vh; /* full viewport visual height */
    overflow: hidden;
    display: block;
    margin: 0;
    padding: 0;
}
.gallery-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateZ(0);
    transition: opacity 420ms ease, transform 420ms ease;
    pointer-events: none;
}
.gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}
/* image now positioned absolutely to guarantee it reaches top/left corners */
.gallery-image {
    position: absolute;
    top: -12px;
    left: -40px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* -------------------
   Gallery Thumbnails - Wrapping Grid Layout
   ------------------- */
.photo-gallery .gallery-thumbs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--footer-height) + 0px); /* places thumbs above the fixed footer */
    display: flex;
    flex-wrap: wrap; /* Allow thumbnails to wrap to multiple rows */
    gap: 10px;
    justify-content: center;
    padding: 16px 20px;
    box-sizing: border-box;
    background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 80%, transparent 100%);
    z-index: 1200; /* ensure above footer and nav buttons */
    pointer-events: auto;
    max-height: 30vh; /* Limit height so it doesn't cover too much of the gallery */
    overflow-y: auto; /* Allow vertical scrolling if needed */
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.photo-gallery .gallery-thumbs::-webkit-scrollbar {
    width: 6px;
}
.photo-gallery .gallery-thumbs::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
.photo-gallery .gallery-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}
.photo-gallery .gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* individual thumbnail buttons */
.photo-gallery .gallery-thumb {
    background: transparent;
    border: 2px solid transparent;
    padding: 0;
    height: 64px;
    min-width: 100px;
    flex-shrink: 0; /* Prevent thumbnails from shrinking */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.photo-gallery .gallery-thumb:hover {
    transform: scale(1.05);
}

.photo-gallery .gallery-thumb img {
    display: block;
    width: auto;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 1;
    visibility: visible;
}

.photo-gallery .gallery-thumb.active,
.photo-gallery .gallery-thumb:focus {
    border-color: #FF4D00;
    outline: none;
    transform: scale(1.08);
}

/* Responsive: adjust for smaller screens */
@media (max-width: 700px) {
    .gallery-slider {
        height: 60vh; /* reduce from full-viewport so thumbnails are visible below */
    }
    .photo-gallery {
        margin: -260px 0 0 0;
    }
    /* ensure the image fills and aligns top/left when slider height is reduced */
    .gallery-image {
        position: absolute;
        top: 0;
        left: -40px;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    /* place thumbnails below the slider in static layout */
    .photo-gallery .gallery-thumbs {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 12px 8px 8px;
        margin: 0 0 18px 0;
        background: rgba(0,0,0,0.5);
        box-sizing: border-box;
        max-height: none; /* Remove height restriction on mobile */
        overflow-y: visible;
        z-index: 1;
    }
    /* slightly smaller thumb visuals to fit narrow width */
    .photo-gallery .gallery-thumb {
        height: 48px;
        min-width: 80px;
        padding: 0;
    }
    .photo-gallery .gallery-thumb img {
        height: 40px;
        width: auto;
        object-fit: cover;
    }
}

/* -------------------
   Back Button under Logo
   ------------------- */
.page-back {
    position: fixed;
    left: 16px;
    top: 145px; /* default for desktop where logo ~90px + header padding */
    z-index: 1100; /* above gallery but below header (header z-index:1000) */
    display: inline-block;
}
    .page-back button {
        appearance: none;
        -webkit-appearance: none;
        background: rgba(0,0,0,0.5);
        color: #FFFFFF;
        border: 0;
        padding: 8px 10px;
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border-radius: 6px;
        cursor: pointer;
    }
    .page-back button:focus,
    .page-back button:focus-visible {
        outline: 3px solid rgba(255,77,0,0.12);
    }
/* adjust position on narrower headers / small screens */
@media (max-width: 700px) {
    .page-back {
        top: 145px;
        left: 12px;
    }
        .page-back button {
            padding: 6px 8px;
            font-size: 16px;
        }
}
/* very small / portrait: tighten spacing */
@media (max-width: 420px) {
    .page-back {
        top: 145px;
        left: 10px;
    }
        .page-back button {
            padding: 6px 8px;
            font-size: 16px;
        }
}

/* -------------------
   Legacy Images Support - For older projects with smaller photos
   ------------------- */
.photo-gallery.legacy-images .gallery-slider {
    height: 100vh; /* Full viewport height like modern galleries */
    background: #1a1a1a;
}

.photo-gallery.legacy-images .gallery-image {
    object-fit: cover; /* Fill the frame - crop if needed instead of contain */
    background: #1a1a1a;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    max-width: none;
    max-height: none;
    top: -12px; /* Match standard gallery positioning */
    left: -40px; /* Match standard gallery positioning */
}

/* Mobile adjustments for legacy images */
@media (max-width: 700px) {
    .photo-gallery.legacy-images .gallery-slider {
        height: 60vh; /* Match the standard mobile height */
    }

    .photo-gallery.legacy-images .gallery-image {
        top: 0;
        left: -40px; /* Keep mobile offset for consistency */
        width: 100%;
        height: 100%;
    }
}

/* -------------------
   About Us Page
   ------------------- */
.about-page {
    background: #f9f9f9;
    padding: 36px 0 120px;
}
.about_container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: var(--page-side-margin);
    padding-right: var(--page-side-margin);
    box-sizing: border-box;
}
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}
@media(min-width:880px) {
    .grid {
        grid-template-columns: 2fr 1fr;
    }
}
.lead {
    font-size: 1.05rem;
    color: #000000;
}
.figure {
    margin: 0 0 12px 0;
    border-radius: 6px;
    overflow: hidden;
}
    .figure img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    padding: 18px;
}
.stats {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}
.stat {
    text-align: center;
    flex: 1;
}
    .stat .n {
        font-weight: 700;
        font-size: 1.4rem;
        color: #1a1a1a;
    }
.cta {
    display: inline-block;
    margin-top: 12px;
    background: #FF4D00;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
}
.team {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}
@media(min-width:640px) {
    .team {
        grid-template-columns: repeat(2,1fr);
    }
}
.member {
    display: flex;
    gap: 12px;
    align-items: center;
}
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
.timeline {
    margin-top: 18px;
    padding-left: 14px;
    border-left: 3px solid rgba(0,0,0,0.5);
}
.timeline-item {
    margin: 12px 0;
    padding-left: 12px;
}
    .timeline-item time {
        display: block;
        font-weight: 700;
        color: #FF4D00;
    }
/* Accessibility helpers */
.visually-hidden {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
/* -------------------
Careers Page
------------------- */
.employment-page {
    background: #f3f4f6;
    padding: 36px 0 120px;
}
.people-page {
    background: transparent !important;
    padding: 36px 20px 120px;
}
/* Utility container to match site width */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: var(--page-side-margin);
    padding-right: var(--page-side-margin);
    box-sizing: border-box;
}
/* Intro grid */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 880px) {
    .intro-grid {
        grid-template-columns: 1fr;
    }
}
.intro-text h2 {
    margin-top: 0;
}
.intro-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.intro-highlights li {
    background: #fff;
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 6px 18px rgba(18,22,26,0.04);
}
/* Benefits grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px;
    margin-top: 12px;
}
@media (max-width: 760px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
.benefit {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(18,22,26,0.04);
}
    .benefit h4 {
        margin: 0 0 6px;
    }
/* Open positions */
.positions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 12px;
}
@media (max-width: 1100px) {
    .positions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 760px) {
    .positions-grid {
        grid-template-columns: 1fr;
    }
}
.position {
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(18,22,26,0.04);
}
    .position h4 {
        margin: 0 0 6px;
    }
    .position p {
        margin-bottom: 12px;
    }
/* How to apply */
.apply-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.btn-primary {
    background: #FF4D00;
    color: #fff;
}
.btn-secondary {
    background: #FF4D00;
    color: #fff;
    border: 1px solid #FF4D00;
}
.btn-link {
    background: transparent;
    color: #0D1233;
    padding: 8px 10px;
}
/* Contact section */
.employment-contact p {
    margin: 8px 0 0;
}
/* Fine-tune spacing */
.employment-page h3 {
    margin-top: 20px;
    margin-bottom: 8px;
}
.field.invalid label {
    color: #b00020;
}

/* -------------------
Employment Application Form
------------------- */
.form-wrapper {
    background: #f3f4f6; /* light gray page background for the form area */
    display: flex;
    justify-content: center; /* center horizontally */
    align-items: flex-start; /* by default align to top of wrapper */
    padding: 40px 20px 120px; /* large bottom padding to keep footer from covering form */
    margin-top: -10px;
    box-sizing: border-box;
    width: 100%;
}
/* Inner white card that contains the form */
.form-inner {
    width: 100%;
    max-width: 980px;
    background: #ffffff;
    padding: 28px;
    border-radius: 6px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.06);
    box-sizing: border-box;
}
/* If viewport is tall, center vertically (keeps hero visible on shorter viewports) */
@media (min-height: 840px) {
    .form-wrapper {
        min-height: calc(100vh - 160px); /* leave room for header/footer */
        align-items: center;
    }
}
/* keep submit button centered inside card */
.form-inner .submit {
    text-align: center;
}
/* small tweak to ensure inputs inside the card behave */
.form-inner input[type="text"],
.form-inner input[type="email"],
.form-inner input[type="tel"],
.form-inner select,
.form-inner textarea {
    max-width: 100%;
}
/* Added grid support for the employment application form */
.form-inner .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
/* Single column for narrow viewports */
@media (max-width: 900px) {
    .form-inner .form-grid {
        grid-template-columns: 1fr;
    }
}
/* Utility: span full width of the grid */
.full-width {
    grid-column: 1 / -1;
    width: 100%;
}
/* Minor spacing for section titles inside the form card */
.form-inner .section-title {
    margin-top: 18px;
    margin-bottom: 8px;
}

/* -------------------
People Page
------------------- */
.people-page {
    padding: 36px 20px 120px;
    background: #f7f8fa;
}
.people-intro {
    max-width: 980px;
    margin: 0 auto 18px;
    text-align: center;
}
.people-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: none;
    width: calc(100vw - (var(--photo-side-margin) * 2));
    margin-left: calc(50% - 50vw + var(--photo-side-margin));
    margin-right: calc(50% - 50vw + var(--photo-side-margin));
    box-sizing: border-box;
}
@media (max-width: 1100px) {
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 760px) {
    .people-grid {
        grid-template-columns: 1fr;
        width: calc(100vw - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
}
/* Card */
.person-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(11,14,20,0.06);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform .16s ease, box-shadow .16s ease;
    position: relative;
}
    .person-card:focus,
    .person-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 40px rgba(11,14,20,0.12);
        outline: none;
    }
/* Photo area */
.person-photo-wrap {
    width: 100%;
    padding-top: 75%; /* larger photo */
    position: relative;
    background: #e9ecef;
}
.person-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Hover overlay with name/title */
.person-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.person-card:hover .person-overlay,
.person-card:focus .person-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.overlay-text {
    color: #fff;
    text-align: center;
}
.overlay-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.overlay-title {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    margin-top: 4px;
}
/* Keep textual info visible on small screens and hidden on desktop (overlay used instead) */
.person-info {
    padding: 14px 16px;
    display: none;
}
@media (max-width: 760px) {
    .person-info {
        display: block;
    }
    .person-overlay {
        display: none;
    }
    .person-photo-wrap {
        padding-top: 75%;
    }
}
/* Modal */
.person-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.6);
    z-index: 9999;
    padding: 20px;
}
.person-modal-content {
    background: #fff;
    width: 100%;
    max-width: 920px;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(2,6,23,0.4);
    position: relative;
}
.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
}
.modal-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}
    .modal-grid img {
        width: 100%;
        height: auto;
        border-radius: 6px;
        object-fit: cover;
    }
.modal-info h3 {
    margin-top: 0;
}
.modal-actions {
    margin-top: 12px;
}
    .modal-actions .btn {
        padding: 8px 12px;
        border-radius: 6px;
        text-decoration: none;
        display: inline-block;
    }