html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
     font-family: Arial, sans-serif; 
     margin: 0; 
     background-color: #262626;
     color: #eee;
}

/* --- Navbar color unify --- */
:root {
  --left-image-width: clamp(220px, 35vw, 420px);
  --page-bg: #262626;
}

header,
header nav,
header nav ul {
  background: var(--page-bg);
}

/* left image area width (adjust as needed) */
:root { --left-image-width: 35vw; }

/* Ensure header and page color match site tone */
:root { --page-bg: #262626; }
header { background: var(--page-bg); }

header {
  background: var(--page-bg);
  color: #fff;
  /* keep header visually consistent and above the fixed image */
  position: relative;
  z-index: 10;
}

header {
    margin: 0;
    padding: 0.8rem 1.4rem; /* consistent vertical size */
    z-index: 5; /* above image */
    background: transparent; /* set a color here if you want a solid header */
    position: relative;
    overflow: visible; /* allow submenu to extend outside header */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;        /* fixed baseline height */
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* position parent for absolute submenu */
header nav li {
    position: relative;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

nav li {
    margin: 0;
}

nav a,
nav a:visited {
    color: white;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
}

nav a:hover {
    background-color: #555;
}

nav a:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.content {
    display: flex;
    gap: 0;
    align-items: stretch;
    padding: 0;
    min-height: calc(100vh - 72px);
    margin: 0;
}

/* fixed left image */
.main-image {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--left-image-width);
    height: 100vh;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    z-index: 0;
}

.main-imageNEW {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--left-image-width);
    height: 120vh;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    z-index: 0;
}
/* content pushed to the right of the fixed image */
.page {
    /* remove margin-left that pushes the entire page to the right */
    /* margin-left: var(--left-image-width); */ /* <-- remove this line if present */
    padding-left: var(--left-image-width); /* reserve space for the fixed image, keeps content centered */
    min-height: 100vh;
    box-sizing: border-box;
    background: #262626;
    color: #fff;
}

/* make gallery page background match the other pages */
.page-with-panel {
    background: #262626; /* same as .page on index/about */
    color: #fff;
    min-height: 100vh;
}

/* Centered panel for Services page */
.centered-panel {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100% - var(--left-image-width) - 48px));
  max-width: 980px;
  margin: 3.25rem auto;
  padding: 1.5rem;
  background: rgba(0,0,0,0.12);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.32);
  text-align: center;
}

/* heading inside the panel */
.centered-panel h1 {
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
    letter-spacing: -0.3px;
}

/* Services panel centered */


.services-page {
    background: #262626;
    color: #fff;
}
.services-panel {
  max-width: 980px;
  margin: 2.5rem auto 3.5rem;
  padding: 1.6rem 1.4rem 2rem;
  background: rgba(0,0,0,0.12);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.32);
}

.services-panel h1 {
  margin: 0 0 1.2rem;
  font-size: 1.85rem;
  letter-spacing: -0.3px;
}

/* service cards layout */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.6rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.service-cards {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 1.3rem;
}

/* individual card */
.service-card {
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 1.05rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    transition: transform .18s ease, box-shadow .18s ease;
    text-align: left;
}

.service-card {
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 1.1rem 1rem 1rem;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  transition: transform .18s ease, box-shadow .18s ease;
}

.service-card h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.05rem;
}

.service-card h3 {
  margin: 0 0 .45rem;
  font-size: 1.08rem;
}

.service-card p {
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.95rem;
    line-height: 1.4;
}

.service-card p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.4;
  color: rgba(255,255,255,.78);
}

/* hover lift */
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.30);
}

/* Service card image placeholder */
.service-card .service-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    margin: 0 0 .6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.40);
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
}

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

.service-card:hover .service-img {
    border-color: rgba(255,255,255,0.22);
}

/* CTA button centered */
.service-cta { margin-top: 0.75rem; display: flex; justify-content: center; }

/* ensure content aligns well with left fixed image (uses page padding) */
.page { padding-left: var(--left-image-width); }

/* main content spacing */
main {
    max-width: 900px;
    margin: 2.25rem auto 3rem;
    padding: 1.5rem 1.4rem;
    background: rgba(0,0,0,0.14);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    line-height: 1.55;
    font-size: 1.02rem;
    color: #f5f5f5;
}

/* heading */
main h1 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* make the first paragraph slightly larger/softer as a lead */
main p:first-of-type {
    font-size: 1.08rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

/* responsive: remove panel and reduce margins on narrow screens */
@media (max-width: 800px) {
    main {
        max-width: none;
        margin: 1.2rem 1rem 2rem;
        padding: 1.1rem 1rem;
        background: rgba(0,0,0,0.10);
        box-shadow: 0 4px 14px rgba(0,0,0,0.28);
    }

    main h1 { font-size: 1.6rem; }
}

/* simple horizontal nav */
header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

/* dropdown (submenu) */
header nav li { position: relative; }
header nav li .sub {
    position: absolute;
    top: 100%;           /* exactly below the parent — avoid +px gap */
    left: 0;
    display: none;
    margin: 0;
    padding: 6px 0;
    min-width: 180px;
    background: rgba(0,0,0,0.65);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    z-index: 1000;
}
header nav li .sub li { display: block; margin: 0; }
header nav li .sub a { display: block; padding: 0.5rem 0.9rem; white-space: nowrap; }

/* show submenu when hovering parent or when a child has focus (keyboard) */
header nav li:hover > .sub,
header nav li:focus-within > .sub {
    display: block;
}

/* keep submenu fit on small screens */
@media (max-width: 900px) {
    header nav li .sub {
        position: static;
        display: none;
        margin-top: 6px;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    header nav li.has-sub.open > .sub { display: block; }
}

/* Gallery grid on the right side */
.gallery {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* gallery images fill their cells */
.gallery img {
    width: 100%;
    height: 140px;           /* fixed row height for consistent grid; change as needed */
    object-fit: cover;
    display: block;
    border-radius: 6px;
    background: #222;
}

/* make gallery images taller on larger screens */
@media (min-width: 1200px) {
    .gallery img { height: 180px; }
}

/* Lightbox overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    line-height: 32px;
}

/* Navigation arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 22px;
    font-size: 24px;
    line-height: 44px;
}
.lightbox-prev { left: -54px; }
.lightbox-next { right: -54px; }
.lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lightbox-overlay:focus-visible,
.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* small screens: increase image height and reduce left image width so gallery remains usable */
@media (max-width: 800px) {
    :root { --left-image-width: 40vw; }
    .gallery img { height: 160px; }
}

/* very small screens: stack and let left image shrink */
@media (max-width: 480px) {
    :root { --left-image-width: 45vw; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .gallery img { height: 140px; }
}

/* Unified header (applies to all pages, including services) */
header {
    background: var(--page-bg);
    color: #fff;
    margin: 0;
    padding: 0.8rem 1.4rem; /* consistent vertical size */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;        /* fixed baseline height */
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* Remove earlier transparent override if still present */
header[style],
body.services-page header {
    background: var(--page-bg) !important;
}

/* Nav inside header */
header nav ul {
    gap: 1.1rem;
}

/* Services page: no special header override needed now; ensure no padding shrink */
.services-page header {
    padding: 0.8rem 1.4rem;
    min-height: 70px;
}

/* Small screens */
@media (max-width: 700px) {
    header {
        padding: 0.65rem 1rem;
        min-height: 64px;
    }
    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* page-specific override: put the fixed image on the right */
.image-right .main-image {
    left: auto;
    right: 0;
}

/* push content to the left instead of the right when image is on the right */
.image-right .page {
    padding-left: 0;
    padding-right: var(--left-image-width);
}

/* keep behaviour consistent on small screens (optional: image can shrink or stack) */
@media (max-width: 600px) {
    .image-right .page {
        margin-left: 0;
        margin-right: 0; /* let content use full width on small screens */
    }
    .image-right .main-image {
        position: fixed;
        width: 40vw; /* adjust if needed */
    }
}

/* signature sizing */
.signature {
    display: block;
    margin: 1.25rem auto 0;            /* center and add spacing */
    width: clamp(120px, 12vw, 220px);  /* responsive: min 120px, scales, max 220px */
    height: auto;
    object-fit: contain;
}

/* Gallery sizing and layout only for gallery.html (body.page-with-panel) */
/* Replace the previous .page-with-panel rules with these to center the gallery
   and force ~3 upsized images per row on larger screens, with aesthetic gutters. */
.page-with-panel main {
    min-height: calc(100vh - 64px);
    display: block;
    /* allow the panel to stretch further toward the edges while keeping comfortable gutters */
    max-width: min(1400px, calc(100% - 56px)); /* ~28px gutter each side on large viewports */
    margin: 2.25rem auto;
    padding: 1.25rem 1.5rem;
    box-sizing: border-box;
    background: transparent;
}

/* Centered gallery grid sized for ~3 upsized items per row */
.page-with-panel .gallery {
    display: grid;
    gap: 20px;
    /* three columns, each at least 300px wide but flexible to fill the area */
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    grid-auto-rows: minmax(230px, 1fr);
    align-content: start;
    width: 100%;
    margin: 0 auto;
}

/* images fill cells */
.page-with-panel .gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* larger visuals on very wide screens */
@media (min-width: 1600px) {
    .page-with-panel main { max-width: min(1700px, calc(100% - 48px)); }
    .page-with-panel .gallery {
        gap: 24px;
        grid-auto-rows: minmax(260px, 1fr);
        grid-template-columns: repeat(3, minmax(340px, 1fr));
    }
}

/* fallback to 2 columns on medium screens */
@media (max-width: 1100px) {
    .page-with-panel .gallery {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        grid-auto-rows: minmax(200px, 1fr);
    }
    .page-with-panel main { padding: 1rem; margin: 1.5rem auto; }
}

/* single column on small/mobile screens */
@media (max-width: 600px) {
    .page-with-panel .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(180px, auto);
        gap: 12px;
    }
    .page-with-panel main { padding: 0.75rem; margin: 1rem auto; }
}

/* Contact form panel — match the minimalist look used elsewhere */
.contact-panel {
    max-width: 820px;
    margin: 1.5rem auto 3rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    color: #f5f5f5;
    backdrop-filter: blur(4px);
    box-sizing: border-box;
}

/* layout of form rows */
.contact-panel .form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9rem;
}

/* labels */
.contact-panel label {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

/* inputs & textarea */
.contact-panel input[type="text"],
.contact-panel input[type="email"],
.contact-panel textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: box-shadow .12s ease, border-color .12s ease;
    box-sizing: border-box;
}

.contact-panel input::placeholder,
.contact-panel textarea::placeholder {
    color: rgba(255,255,255,0.45);
}

/* focus state */
.contact-panel input:focus,
.contact-panel textarea:focus {
    border-color: rgba(255,255,255,0.17);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* actions */
.contact-panel .form-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.6rem;
}

/* buttons */
.btn {
    border: 0;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(180deg, #2f9cff, #2b7fe6);
    color: #fff;
    box-shadow: 0 8px 20px rgba(43,127,230,0.12);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
}

/* small notice text */
.contact-panel .notice {
    margin-top: 0.9rem;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.72);
}

/* Contact Info Panel */
.info-panel {
    max-width: 820px;
    margin: 0 auto 3rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    color: #f5f5f5;
    box-sizing: border-box;
}

.info-panel h2 {
    margin: 0 0 1.2rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.2px;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.info-item p {
    margin: 0;
    font-size: 1rem;
    color: #f5f5f5;
    line-height: 1.5;
}

.info-item a {
    color: #2f9cff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-item a:hover {
    color: #5bb3ff;
    text-decoration: underline;
}

/* responsive */
@media (max-width: 800px) {
    .info-panel {
        margin: 0 1rem 2rem;
        padding: 1rem;
    }
    
    .info-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Contact form children initial state & revealed state (CSS side of fade-in) */
.contact-panel .form-row,
.contact-panel .form-actions,
.contact-panel .notice {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .42s ease, transform .42s ease;
}

/* when panel is revealed, children transition in.
   JS also applies inline timeouts as a reliable fallback & stagger. */
.contact-panel.is-revealed .form-row,
.contact-panel.is-revealed .form-actions,
.contact-panel.is-revealed .notice {
    opacity: 1;
    transform: translateY(0);
}

/* small stagger using nth-child for modest effect (progressive enhancement) */
.contact-panel.is-revealed .form-row:nth-of-type(1) { transition-delay: .08s; }
.contact-panel.is-revealed .form-row:nth-of-type(2) { transition-delay: .16s; }
.contact-panel.is-revealed .form-row:nth-of-type(3) { transition-delay: .24s; }
.contact-panel.is-revealed .form-row:nth-of-type(4) { transition-delay: .32s; }
.contact-panel.is-revealed .form-actions { transition-delay: .44s; }
.contact-panel.is-revealed .notice { transition-delay: .52s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .contact-panel .form-row,
  .contact-panel .form-actions,
  .contact-panel .notice,
  .contact-panel,
  .info-panel {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Write-in (typewriter-like) tiny animation for about page text */
/* Shortened duration for a much quicker "type" effect */
.write-char {
  display:inline-block;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .07s ease, transform .07s ease;
  will-change:opacity,transform;
}
.write-char.is-visible { opacity:1; transform:translateY(0); }

/* Prevent mid-word breaks in about page write-in */
.write-word { display:inline-block; white-space:nowrap; }

.about-page p,
.image-right main p {
  hyphens:none;
  word-break:normal;
  overflow-wrap:normal;
}

/* Reduced motion fallback */
@media (prefers-reduced-motion: reduce) {
  .write-char { transition:none !important; opacity:1 !important; transform:none !important; }
  .write-word { white-space:normal; }
}

/* --- Services page (no left image) --- */
.services-page .page {
  padding-left: 0;
}

.services-page .services-panel {
  max-width: 980px;
  margin: 2.5rem auto 3.5rem;
}

.services-page header,
.services-page header nav,
.services-page header nav ul {
  background: var(--page-bg) !important;
}

/* Ensure no accidental transparent header override */
.services-page header {
  padding: 0.8rem 1.4rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}


/* Services page: adjust main for single block (optional tighter top margin) */
.services-page main {
    margin-top: 2.5rem;
}

/* Services heading inside main */
.services-page main h1 {
    margin: 0 0 1.4rem;
    font-size: 1.85rem;
    letter-spacing: -0.3px;
}

/* Keep existing card styles (already present) */

/* If duplicate .service-cards / .service-card blocks exist, keep only one.
   No extra panel box so page not “sandwiched”. */