/*
 * Author: Manoj Mathangadeera
 * Website: https://codemmhub.github.io/
 * Project: USRI Web Development V2027
 * File Name: content.css
 * File Description: Styles for the inside pages built from content files: page headings with photo or split layouts, article text, tables, card grids, gallery, contact, forms, FAQ hub and press list.
 */

/* ---------------------------------------------------------------------------
   PAGE HEADING VARIANTS
   The base .page-hero (dark, blueprint grid, yellow tab) is in components.css.
   --photo : a full width photo behind the heading (About, Resources, Contact and so on)
   --split : text on the left, a photo or drawing on the right (products, services, chassis
             brands, industries, models)
   --------------------------------------------------------------------------- */
.page-hero .btn-row { margin-top: var(--s-5); }

.page-hero--photo { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.page-hero-bg { position: absolute; inset: 0; z-index: -2; }
.page-hero-bg picture { display: block; height: 100%; }
.page-hero-bg img, .page-hero-bg .img-ph { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; border-radius: 0; }
/* Replaces the blueprint grid with a tint, so white text stays readable over the photo.
   The strength is measured on the four hero photos (see CLAUDE.md, rule on hero contrast). */
.page-hero--photo::before {
  background: linear-gradient(90deg, rgba(35, 31, 32, 0.92) 0%, rgba(35, 31, 32, 0.84) 55%, rgba(35, 31, 32, 0.6) 100%);
  background-size: auto; -webkit-mask-image: none; mask-image: none;
}

.hero-split { display: grid; gap: var(--s-6); align-items: center; }
.hero-figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid rgba(255, 255, 255, 0.14); }
.hero-figure picture, .hero-figure img, .hero-figure .img-ph { display: block; width: 100%; height: auto; border-radius: 0; }
.hero-diagram { padding: var(--s-5); border-radius: var(--radius); background: var(--ink-soft); border: 1px solid rgba(255, 255, 255, 0.16); color: var(--white); }
.hero-diagram .model-specs { margin-top: var(--s-4); }
.hero-diagram .hero-figure { margin-bottom: var(--s-4); }
@media (min-width: 900px) {
  .hero-split { grid-template-columns: 1.15fr 0.85fr; gap: var(--s-8); }
}

/* ---------------------------------------------------------------------------
   ARTICLE STYLE TEXT (paragraphs, lists, tables, links, cards from content files)
   --------------------------------------------------------------------------- */
.content-section .section-head h2 { margin-bottom: 0; }
.prose { max-width: 70ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose p { margin-top: var(--s-4); }
.prose h3 { margin-top: var(--s-6); font-size: var(--fs-h3); }
.prose ul, .prose ol { display: grid; gap: var(--s-2); }
/* Yellow square bullets echo the milestone markers and the page heading tab */
.prose ul li { position: relative; padding-left: 1.5rem; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.6rem; height: 0.6rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 2px; }
.prose ol { list-style: decimal; padding-left: 1.5rem; }
.prose ol li { padding-left: 0.4rem; }
.prose ol li::marker { font-weight: 700; color: var(--blue); }
.prose a, .faq-a a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--yellow); }
.prose a:hover, .faq-a a:hover { color: var(--blue-deep); text-decoration-color: var(--blue); }
.prose strong { font-weight: 600; }

.link-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin-top: var(--s-5); }
.link-row a { font-weight: 600; color: var(--blue); text-decoration: none; border-bottom: 2px solid var(--yellow); padding-bottom: 1px; }
.link-row a:hover { color: var(--blue-deep); border-bottom-color: var(--blue); }

/* Tables scroll sideways on narrow screens instead of squashing */
.table-wrap { overflow-x: auto; margin-top: var(--s-5); border: 1px solid var(--steel-line); border-radius: var(--radius); background: var(--white); -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: var(--fs-small); }
.table-wrap th { padding: var(--s-3) var(--s-4); text-align: left; background: var(--ink); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.table-wrap td { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--alice); vertical-align: top; }
.table-wrap tbody tr:nth-child(even) { background: var(--platinum); }
.table-wrap td:first-child { font-weight: 600; }
.table-wrap td a { color: var(--blue); }

/* ---------------------------------------------------------------------------
   CARD GRID (hubs: services, products, resources)
   --------------------------------------------------------------------------- */
.card-grid { display: grid; gap: var(--s-5); margin-top: var(--s-5); }
.card a { display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; background: var(--white); border: 1px solid var(--steel-line); border-radius: var(--radius); transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.card a:hover, .card a:focus-visible { border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow-1); }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; }
.card-media picture, .card-media img, .card-media .img-ph { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.card-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.card-body h3 { font-size: 1.5rem; transition: color 0.2s; }
.card-body p { margin-top: var(--s-2); color: var(--slate); font-size: var(--fs-small); line-height: 1.5; }
.card a:hover h3 { color: var(--blue); }
/* Cards with no photo (the buyer guides) get a strong top edge instead */
.card--plain a { border-top: 4px solid var(--blue); }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.content-section .model-grid { margin-top: var(--s-5); } /* gap under the sentence above the grid on the Models hub */

/* ---------------------------------------------------------------------------
   MODEL NAVIGATION (previous and next size)
   --------------------------------------------------------------------------- */
.model-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); }
.model-nav a { display: block; padding: var(--s-4) var(--s-5); min-width: 14rem; text-decoration: none; border: 1px solid var(--steel-line); border-radius: var(--radius); background: var(--white); transition: border-color 0.2s; }
.model-nav a:hover { border-color: var(--blue); }
.model-nav small { display: block; color: var(--slate); font-size: 0.875rem; }
.model-nav strong { font-family: var(--font-head); font-size: 1.5rem; text-transform: uppercase; }
.model-nav a:last-child { text-align: right; margin-left: auto; }

/* ---------------------------------------------------------------------------
   GALLERY
   --------------------------------------------------------------------------- */
.gallery-grid { display: grid; gap: var(--s-5); }
.gallery-item { margin: 0; background: var(--white); border: 1px solid var(--steel-line); border-radius: var(--radius); overflow: hidden; }
.gallery-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink); }
.gallery-media picture, .gallery-media img, .gallery-media .img-ph { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform 0.6s var(--ease); }
.gallery-item:hover .gallery-media img { transform: scale(1.04); }
.gallery-item figcaption { padding: var(--s-4); }
.gallery-item h2 { font-size: 1.375rem; } /* a heading per project, h2 so the page order is h1 then h2 */
.gallery-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-2); font-size: var(--fs-small); }
.gallery-links a { color: var(--blue); text-underline-offset: 3px; text-decoration-color: var(--yellow); }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------------------
   CONTACT DETAILS AND MAP
   --------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: var(--s-7); align-items: start; }
.contact-card { padding: var(--s-6); background: var(--white); border: 1px solid var(--steel-line); border-top: 4px solid var(--blue); border-radius: var(--radius); }
.contact-card h2 { font-size: var(--fs-h3); margin-bottom: var(--s-4); }
.contact-list { display: grid; gap: var(--s-4); }
.contact-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.contact-list .icon { width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; color: var(--blue); }
.contact-list .k { display: block; font-size: 0.875rem; font-weight: 600; color: var(--slate); }
.contact-list a { color: inherit; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.hours { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--alice); }
.hours h3 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.hours dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-5); }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: var(--s-8); } }

/* A plain height, not an aspect ratio: with a minimum height, an aspect ratio makes the box demand a
   matching minimum width, which pushed the page wider than a phone screen. */
.map-frame { position: relative; width: 100%; height: clamp(20rem, 42vw, 30rem); background: var(--alice); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--steel-line); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-actions { margin-top: var(--s-4); }

/* ---------------------------------------------------------------------------
   FORMS (contact and quote)
   The forms are wired to send email in the forms phase. Fields, labels and layout live here.
   --------------------------------------------------------------------------- */
.form { display: grid; gap: var(--s-4); }
.form-row { display: grid; gap: var(--s-4); }
.field label, .field legend { display: block; margin-bottom: var(--s-1); font-weight: 600; font-size: var(--fs-small); }
.field .opt { font-weight: 400; color: var(--slate); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.9rem; min-height: 3rem;
  border: 1.5px solid var(--steel-line); border-radius: var(--radius); background: var(--white); color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 78, 161, 0.25); }
.field input[type="file"] { padding: 0.6rem; }
.field .help { margin-top: var(--s-1); font-size: 0.875rem; color: var(--slate); }
/* The hidden trap field for bots. Real visitors never see or reach it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: var(--fs-small); color: var(--slate); }
@media (min-width: 700px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-panel { padding: var(--s-6); background: var(--white); border: 1px solid var(--steel-line); border-radius: var(--radius); }

/* Result of sending a form (thank you or a problem), and per field errors.
   Errors use red plus a text message, never colour alone, so they work for everyone. */
.form-status:empty { display: none; }
.form-status { scroll-margin-top: calc(var(--header-h) + 1rem); }
.form-status:focus { outline: none; }
.form-status-msg { padding: var(--s-4) var(--s-5); border-radius: var(--radius); border-left: 5px solid var(--blue); background: var(--platinum); font-weight: 500; }
.form-status-msg--ok { border-left-color: var(--blue); }
.form-status-msg--error { border-left-color: var(--error); background: rgba(179, 38, 30, 0.08); color: var(--ink); } /* a faint tint of Error Red */
.field-error { margin-top: var(--s-1); font-size: 0.875rem; font-weight: 600; color: var(--error); }
.field [aria-invalid="true"] { border-color: var(--error); }
.form-alt { font-size: var(--fs-small); }
.form-alt a { color: var(--blue); text-underline-offset: 3px; text-decoration-color: var(--yellow); font-weight: 600; }

/* ---------------------------------------------------------------------------
   FAQ HUB
   --------------------------------------------------------------------------- */
.faq-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-7); }
.faq-nav a { padding: 0.5rem 1rem; text-decoration: none; font-weight: 600; font-size: var(--fs-small); border: 1.5px solid var(--steel-line); border-radius: 999px; background: var(--white); transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.faq-nav a:hover { border-color: var(--blue); color: var(--blue); }
.faq-group + .faq-group { margin-top: var(--s-8); }
.faq-group > h2 { margin-bottom: var(--s-4); }
.faq-group .faq { max-width: 60rem; }
.faq-more { margin-top: var(--s-4); }

/* ---------------------------------------------------------------------------
   PRESS LIST AND EMPTY STATE
   --------------------------------------------------------------------------- */
.press-list { display: grid; gap: var(--s-4); }
.press-item { padding: var(--s-5); background: var(--white); border: 1px solid var(--steel-line); border-left: 4px solid var(--blue); border-radius: var(--radius); }
.press-meta { font-size: var(--fs-small); color: var(--slate); }
.press-item h3 { margin-top: var(--s-1); font-size: 1.5rem; }
.press-item p { margin-top: var(--s-2); max-width: 65ch; }
.press-item .press-thumb { margin-top: var(--s-3); max-width: 24rem; }
.empty-state { max-width: 42rem; padding: var(--s-6); background: var(--white); border: 1px dashed var(--steel-line); border-radius: var(--radius); }
.empty-state h2 { font-size: var(--fs-h3); }
.empty-state p { margin-top: var(--s-3); }

/* ---------------------------------------------------------------------------
   CLOSING BAND FOR INSIDE PAGES (a lighter version of the Home closing band)
   --------------------------------------------------------------------------- */
.cta-simple { background: var(--ink); color: var(--white); padding-block: var(--s-8); border-top: 4px solid var(--blue); }
.cta-simple .container { display: grid; gap: var(--s-5); align-items: center; }
.cta-simple h2 { font-size: var(--fs-h2); max-width: 22ch; }
.cta-simple .lead { margin-top: var(--s-3); max-width: 38rem; color: rgba(255, 255, 255, 0.9); }
.cta-simple .btn-row { margin-top: 0; }
@media (min-width: 900px) { .cta-simple .container { grid-template-columns: 1.4fr 1fr; } .cta-simple .btn-row { justify-content: flex-end; } }
