/* DR. HOWO - original Base44-inspired styling for the static HTML site. */
:root {
  --ink: #111827;
  --green: #22c55e;
  --green-hover: #16a34a;
  --green-dark: #15803d;
  --green-light: #4ade80;
  --green-pale: #f0fdf4;
  --muted: #4b5563;
  --bg: #f9fafb;
  --line: #e5e7eb;
  --header-height: 96px;
  --shadow: 0 10px 15px -3px #11182719, 0 4px 6px -4px #11182719;
  --shadow-lg: 0 25px 50px -12px #11182740;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: white; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 4px; }
.wrap { width: calc(100% - 32px); max-width: 1280px; margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 10px; padding: 10px; color: var(--ink); background: white; z-index: 100; }
.skip:focus { top: 10px; }

/* Navigation - safe white header by default, transparent on the home hero. */
header { position: sticky; top: 0; z-index: 40; color: var(--ink); background: #fffffff2; box-shadow: var(--shadow); backdrop-filter: blur(12px); transition: background-color 300ms, color 300ms, box-shadow 300ms, backdrop-filter 300ms; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 20px; }
.home-page header { position: fixed; inset: 0 0 auto; }
.home-page header:not(.is-scrolled) { background: transparent; color: white; box-shadow: none; backdrop-filter: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand strong { display: block; font-size: 20px; line-height: 1.25; font-weight: 700; }
.brand small { display: block; font-size: 12px; line-height: 1.4; font-weight: 400; }
.logo { width: 56px; height: 56px; padding: 8px; background: white; border-radius: 8px; object-fit: contain; box-shadow: 0 4px 6px #0002; }
.nav nav { display: flex; align-items: center; gap: 32px; font-weight: 500; }
.nav nav > a:not(.button) { transition: color 300ms; }
.nav nav > a:not(.button):hover { color: var(--green); text-decoration: none; }
.menu { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 12px; color: white; background: var(--green); font-weight: 600; text-align: center; transition: background 300ms, color 300ms, transform 300ms, box-shadow 300ms; }
.button:hover, .button:focus-visible { background: var(--green-hover); text-decoration: none; }
.small { min-height: 40px; padding: 8px 16px; border-radius: 8px; }
.outline { color: var(--ink); background: white; }
.outline:hover, .outline:focus-visible { color: var(--ink); background: #f3f4f6; }
.dark { background: #1f2937; }
.dark:hover, .dark:focus-visible { background: #374151; }

/* Hero - source gradient, 1-second entrance and green statistics. */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; min-height: 100vh; min-height: 100svh; color: white; background: var(--ink); }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, #111827f2, #111827cc, #111827b3); pointer-events: none; }
.hero-content { position: relative; z-index: 1; padding-block: 118px 88px; animation: hero-enter 1000ms ease both; }
@keyframes hero-enter { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { display: inline-block; margin: 0 0 16px; padding: 8px 16px; border-radius: 999px; background: var(--green-pale); color: var(--green-dark); font-size: 14px; font-weight: 500; }
.hero .eyebrow { display: block; padding: 0; margin-bottom: 24px; border-radius: 0; background: none; color: white; font-size: 18px; }
.hero h1 { max-width: 896px; margin: 0 0 24px; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.15; }
.hero h1 em { color: var(--green-light); font-style: normal; }
.hero-content > p:not(.eyebrow) { max-width: 672px; font-size: clamp(1.125rem, 2.2vw, 1.5rem); color: #d1d5db; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-block: 24px; }
.hero .button { min-height: 56px; padding: 16px 32px; font-size: 18px; box-shadow: var(--shadow-lg); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 896px; margin-top: 48px; padding-top: 40px; border-top: 1px solid #374151; }
.stats strong { display: block; margin-bottom: 8px; color: var(--green-light); font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.1; }
.stats span { display: block; color: #d1d5db; font-size: 15px; }
.hero::before { content: ""; position: absolute; z-index: 2; bottom: 26px; left: calc(50% - 9px); width: 18px; height: 18px; border: solid #ffffff99; border-width: 0 3px 3px 0; transform: rotate(45deg); animation: bounce 1s infinite; pointer-events: none; }
@keyframes bounce { 0%, 100% { transform: translateY(-10px) rotate(45deg); animation-timing-function: cubic-bezier(.8,0,1,1); } 50% { transform: translateY(0) rotate(45deg); animation-timing-function: cubic-bezier(0,0,.2,1); } }

/* Sections and cards */
.section { padding-block: 80px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.split > * { min-width: 0; }
.photo { display: block; width: 100%; height: 500px; object-fit: cover; border-radius: 24px; background: #e5e7eb; box-shadow: var(--shadow-lg); }
#about > div:first-child { position: relative; }
.tag { position: absolute; right: -12px; bottom: -16px; display: inline-block; padding: 20px 24px; color: white; background: var(--green); border-radius: 16px; font-weight: 700; box-shadow: var(--shadow-lg); }
h2 { margin: 0 0 20px; font-size: clamp(1.875rem, 4vw, 3rem); line-height: 1.15; font-weight: 700; }
h3 { margin: 0 0 12px; font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 16px; }
.heading { max-width: 800px; margin: 0 auto 64px; text-align: center; }
.heading > p:not(.eyebrow), #about > div > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.tint { background: var(--bg); }
#services { background: linear-gradient(to bottom, var(--bg), white); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.split .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; display: block; padding: 32px; background: white; border: 1px solid #f3f4f6; border-radius: 16px; box-shadow: var(--shadow); transition: transform 300ms, box-shadow 300ms, border-color 300ms; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.split .card { padding: 24px; }
#about .grid .card { padding: 16px; background: var(--green-pale); border: 0; box-shadow: none; }
#about .grid .card h3 { font-size: 16px; }
#about .grid .card p { font-size: 14px; }
.service { --service-color: var(--green); display: flex; flex-direction: column; }
.service[href="trucksales.html"] { --service-color: #3b82f6; }
.service[href="truckmaintenance.html"] { --service-color: #22c55e; }
.service[href="spareparts.html"] { --service-color: #f97316; }
.service[href="refurbishing.html"] { --service-color: #a855f7; }
.service[href="trailerservices.html"] { --service-color: #ef4444; }
.service[href="trucktyres.html"] { --service-color: #ca8a04; }
.service[href="consultationsupport.html"] { --service-color: #14b8a6; }
.number { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; border-radius: 16px; background: var(--service-color); color: white; font-size: 1.25rem; font-weight: 700; transition: transform 300ms; }
.service:hover, .service:focus-visible { text-decoration: none; box-shadow: var(--shadow-lg); }
.service strong { margin-top: auto; padding-top: 8px; color: var(--green-dark); font-weight: 500; }
.sustain { margin-top: 64px; padding: 48px; border-radius: 24px; background: linear-gradient(90deg, var(--green), var(--green-hover)); color: white; text-align: center; box-shadow: var(--shadow-lg); }
.sustain h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.sustain p { max-width: 896px; margin: 0 auto; color: white; font-size: 18px; }

/* Original bento gallery proportions; preserve existing lightbox buttons. */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 16px; }
.gallery-item { position: relative; display: block; min-width: 0; overflow: hidden; padding: 0; border: 0; border-radius: 16px; background: #374151; color: white; text-align: left; }
.gallery-item:nth-child(1) { grid-row: span 2; }
.gallery-item:nth-child(3) { grid-column: span 2; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms; }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #111827c9, transparent 70%); opacity: 0; transition: opacity 300ms; pointer-events: none; }
.gallery span { position: absolute; z-index: 1; inset: auto 16px 16px; font-weight: 600; font-size: 14px; opacity: 0; transition: opacity 300ms; }
.gallery-item:hover::after, .gallery-item:focus-visible::after, .gallery-item:hover span, .gallery-item:focus-visible span, .gallery-item:has(.image-missing) span, .gallery-item:has(.image-missing)::after { opacity: 1; }
.center { margin-top: 32px; text-align: center; }
#gallery .center .button { padding: 16px 32px; background: linear-gradient(90deg, #ec4899, #9333ea); box-shadow: var(--shadow); }
#gallery .center .button:hover { background: linear-gradient(90deg, #db2777, #7e22ce); }

/* Contact form, service pages, and footer */
#contact .split { align-items: start; }
#contact-form { background: var(--bg); }
#contact-form .button { width: 100%; }
label { display: block; margin-bottom: 18px; color: #374151; font-size: 14px; font-weight: 500; }
input, textarea { display: block; width: 100%; min-width: 0; margin-top: 6px; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; color: var(--ink); background: white; font-size: 16px; transition: border-color 300ms, box-shadow 300ms; }
input:focus, textarea:focus { border-color: var(--green-hover); }
textarea { resize: vertical; }
.muted { margin-top: 12px; color: var(--muted); font-size: 13px; }
#contact a { color: var(--green-dark); overflow-wrap: anywhere; }
.subhero { --page-from: #374151; --page-to: #111827; width: calc(100% - 32px); max-width: 1280px; margin: 40px auto 0; padding: 48px; border-radius: 24px; color: white; background: linear-gradient(90deg, var(--page-from), var(--page-to)); }
.subhero .wrap { width: 100%; }
.subhero h1 { max-width: 768px; margin: 12px 0 16px; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; }
.subhero p { max-width: 768px; margin-bottom: 0; font-size: 20px; }
.page-trucksales .subhero { --page-from: #2563eb; --page-to: #1d4ed8; }
.page-truckmaintenance .subhero { --page-from: #16a34a; --page-to: #15803d; }
.page-spareparts .subhero { --page-from: #ea580c; --page-to: #c2410c; }
.page-refurbishing .subhero { --page-from: #9333ea; --page-to: #7e22ce; }
.page-trailerservices .subhero { --page-from: #dc2626; --page-to: #b91c1c; }
.page-trucktyres .subhero { --page-from: #ca8a04; --page-to: #a16207; }
.page-consultationsupport .subhero { --page-from: #0d9488; --page-to: #0f766e; }
.cta { margin-block: 40px 64px; padding: 48px 24px; border-radius: 24px; color: white; background: linear-gradient(90deg, #111827, #1f2937); text-align: center; }
.page-trucksales .cta { background: linear-gradient(90deg, var(--green), var(--green-hover)); }
.cta .actions { justify-content: center; margin-bottom: 0; }
footer { padding: 48px 0 0; background: #111827; color: white; }
.foot { display: grid; grid-template-columns: 1.15fr 1.1fr 1.4fr .65fr; gap: 24px; }
.foot .brand { align-self: start; }
.foot p, .foot a:not(.brand) { color: #d1d5db; }
.foot a:not(.brand) { display: block; font-size: 14px; overflow-wrap: anywhere; transition: color 300ms; }
.foot a:hover { color: var(--green-light); }
.copyright { padding: 24px 16px 80px; margin-top: 32px; border-top: 1px solid #1f2937; color: #9ca3af; text-align: center; font-size: 14px; }

/* Floating tools - retain text labels and existing functionality. */
.floating, .ask { position: fixed; bottom: 24px; z-index: 45; }
.floating { right: 24px; padding: 12px 20px; border-radius: 999px; color: white; background: var(--green); font-weight: 600; box-shadow: var(--shadow-lg); transition: background 300ms, transform 300ms; }
.floating:hover { background: var(--green-hover); text-decoration: none; }
.ask { left: 24px; }
.ask > .button { border-radius: 999px; box-shadow: var(--shadow-lg); }
.ask .card { position: absolute; bottom: 60px; width: min(360px, calc(100vw - 48px)); max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.ask .card:not([hidden]) { animation: panel-enter 200ms ease-out both; }
@keyframes panel-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
dialog { max-width: min(90vw, 1000px); padding: 16px; border: 0; border-radius: 16px; background: white; color: var(--ink); box-shadow: var(--shadow-lg); }
dialog[open] { animation: panel-enter 200ms ease-out both; }
dialog::backdrop { background: #111827d9; }
dialog img { display: block; max-width: 80vw; max-height: 70vh; object-fit: contain; }
dialog .close { display: block; margin-left: auto; padding: 0 10px; background: white; border: 0; font-size: 30px; }
dialog p { margin: 8px 0 0; }
.image-missing { visibility: hidden; }
.logo.image-missing { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hero .button:hover { transform: scale(1.05); }
  .service:hover { transform: translateY(-8px); }
  .service:hover .number { transform: scale(1.1); }
  .gallery-item:hover img { transform: scale(1.1); }
  .floating:hover { transform: scale(1.1); }
}
@media (hover: none) { .gallery-item::after, .gallery span { opacity: 1; } }

/* Responsive breakpoints, matching the original Tailwind grid behavior. */
@media (min-width: 1536px) { .wrap, .subhero { max-width: 1504px; } }
@media (max-width: 1023px) {
  .nav { min-height: 78px; }
  .menu { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; }
  .nav nav { display: none; position: absolute; top: 100%; left: 16px; right: 16px; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 16px; gap: 8px; border-radius: 12px; color: #374151; background: white; box-shadow: var(--shadow-lg); }
  .nav nav.open { display: flex; flex-direction: column; align-items: stretch; animation: panel-enter 200ms ease-out both; }
  .nav nav > a:not(.button) { display: block; padding: 10px 12px; border-radius: 8px; }
  .nav nav > a:not(.button):hover { background: var(--green-pale); color: var(--green-dark); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo { height: 400px; }
  .tag { right: 0; }
}
@media (max-width: 767px) {
  :root { --header-height: 82px; }
  .section { padding-block: 56px; }
  .hero-content { padding-block: 108px 76px; }
  .hero h1 { font-size: clamp(2.25rem, 8vw, 3.125rem); }
  .stats { margin-top: 32px; padding-top: 24px; gap: 12px; }
  .stats span { font-size: 13px; }
  .heading { margin-bottom: 36px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .card { padding: 24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .gallery-item:nth-child(1) { grid-row: span 2; }
  .gallery-item:nth-child(3) { grid-column: auto; }
  .gallery-item:last-child { grid-column: span 2; }
  .sustain { margin-top: 40px; padding: 32px 24px; }
  .subhero { margin-top: 24px; padding: 32px 24px; }
  .subhero p { font-size: 18px; }
  .cta { padding: 32px 20px; }
  .photo { height: 320px; }
}
@media (max-width: 639px) {
  .hero .actions, .cta .actions { flex-direction: column; }
  .hero .actions .button, .cta .actions .button { width: 100%; }
  .foot { grid-template-columns: 1fr; }
  .split .grid { grid-template-columns: 1fr; }
  .brand { gap: 8px; }
  .brand strong { font-size: 18px; }
  .brand small { font-size: 10px; }
  .logo { width: 46px; height: 46px; padding: 6px; }
  .floating, .ask { bottom: 12px; }
  .floating { right: 12px; padding: 12px 16px; }
  .ask { left: 12px; }
  .ask > .button { padding: 12px 16px; }
  .ask .card { width: min(360px, calc(100vw - 24px)); }
}
@media (max-width: 359px) {
  .nav { gap: 8px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 9px; }
  .menu { padding-inline: 8px; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .gallery-item:nth-child(n) { grid-column: auto; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero .button:hover, .service:hover, .service:hover .number, .gallery-item:hover img, .floating:hover { transform: none; }
}
