/* ================================
   ALNAL RAILWAY SYSTEMS — Master Stylesheet
   Industrial Luxe · Railway Engineering
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --alnal-red: #C8102E;
  --alnal-red-dark: #9C0C24;
  --coal: #1A1A1A;
  --coal-soft: #232425;
  --steel: #5A5F66;
  --steel-light: #8B9099;
  --paper: #FAF9F6;
  --off-white: #F5F5F0;
  --border: #E5E2DC;
  --muted: #6B6F73;

  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1320px;
  --header-h: 100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--coal);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--alnal-red); }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--coal);
}
h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; font-weight: 600; }
p  { font-size: 1.0625rem; color: #2c3033; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--alnal-red);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--alnal-red);
  vertical-align: middle;
  margin-right: 14px;
  transform: translateY(-3px);
}

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Top bar (mini contact strip) ===== */
.topbar {
  background: var(--coal);
  color: rgba(245,245,240,.7);
  font-size: 0.82rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245,245,240,.06);
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.topbar .left { display: flex; gap: 28px; }
.topbar .left a:hover { color: var(--alnal-red); }
.lang-switcher { display: inline-flex; align-items: center; gap: 8px; }
.lang-switcher .flag-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  overflow: hidden; padding: 0; background: transparent;
  opacity: 0.55;
  transition: opacity .18s ease, border-color .18s ease, transform .18s ease;
  text-decoration: none;
}
.lang-switcher .flag-chip svg { width: 100%; height: 100%; display: block; }
.lang-switcher .flag-chip:hover { opacity: 1; transform: scale(1.08); }
.lang-switcher .flag-chip.active {
  opacity: 1;
  border-color: var(--alnal-red);
  box-shadow: 0 0 0 1px var(--alnal-red);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 48px; width: auto; }

nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 34px;
  align-items: center;
}
nav.main-nav a {
  color: var(--coal);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0;
  font-weight: 600;
  position: relative;
  padding: 8px 0;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--alnal-red);
  transition: width .3s ease;
}
nav.main-nav a:hover::after,
nav.main-nav a.active::after { width: 100%; }
nav.main-nav a.active { color: var(--alnal-red); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--coal);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  height: calc(100vh - var(--header-h) - 40px);
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--coal);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(26,26,26,0.92) 0%, rgba(26,26,26,0.65) 45%, rgba(26,26,26,0.25) 100%);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  z-index: 1;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-content {
  max-width: 920px;
  animation: fadeUp 1s ease both;
}
.hero h1 {
  color: var(--off-white);
  font-size: clamp(2.8rem, 7.2vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero h1 .accent { color: var(--alnal-red); }
.hero p {
  color: rgba(245,245,240,0.85);
  font-size: 1.2rem;
  max-width: 600px;
  margin-top: 1.75rem;
  font-weight: 300;
  line-height: 1.55;
}
.hero .eyebrow { color: var(--alnal-red); }
.hero .eyebrow::before { background: var(--alnal-red); }

/* Hero side meta (vertical text right side) */
.hero-side {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(245,245,240,0.45);
  z-index: 2;
  display: flex;
  gap: 20px;
  align-items: center;
}
.hero-side::after {
  content: "";
  width: 1px;
  height: 80px;
  background: var(--alnal-red);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  background: var(--alnal-red);
  color: var(--off-white);
  border: none;
  cursor: pointer;
  transition: all .3s ease;
  margin-top: 2rem;
}
.btn:hover { background: var(--alnal-red-dark); color: var(--off-white); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--off-white);
  border: 1px solid var(--off-white);
}
.btn-outline:hover { background: var(--off-white); color: var(--coal); }
.btn-dark {
  background: var(--coal);
  color: var(--off-white);
}
.btn-dark:hover { background: var(--alnal-red); color: var(--off-white); }
.btn-ghost {
  background: transparent;
  color: var(--coal);
  border: 1px solid var(--coal);
}
.btn-ghost:hover { background: var(--coal); color: var(--off-white); }

/* ===== Page Banner ===== */
.page-banner {
  background: var(--coal);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: "";
  position: absolute;
  top: 0; right: -100px; bottom: 0;
  width: 50%;
  background: linear-gradient(135deg, transparent, rgba(200,16,46,0.18));
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}
.page-banner .container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}
.page-banner h1 {
  color: var(--off-white);
  font-size: clamp(2.4rem, 5vw, 4rem);
}
.breadcrumb {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(245,245,240,0.6);
}
.breadcrumb a:hover { color: var(--alnal-red); }
.breadcrumb .sep {
  display: inline-block;
  margin: 0 12px;
  color: var(--alnal-red);
}
.breadcrumb .current { color: var(--alnal-red); }

/* ===== Sections ===== */
section { padding: 110px 0; }
section.tight { padding: 70px 0; }
.section-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 70px;
}
.section-head.left { text-align: left; margin-left: 0; }

/* ===== M.E.T.S. project showcase ===== */
.mets-section {
  background: #ECECE8;
  padding: 100px 0;
}
.mets-section .section-head .eyebrow { color: var(--alnal-red); }
.mets-section .section-head h2 { color: var(--coal); }
.mets-section .section-head p { color: var(--muted); }
.mets-section .product-card.mets-card {
  background: #fff;
  border: 1px solid var(--border);
  cursor: default;
}
.mets-section .product-card.mets-card .overlay {
  background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.85) 28%, rgba(255,255,255,0) 55%);
}
.mets-section .product-card.mets-card h3 { color: var(--coal); }
.mets-section .product-card.mets-card .arrow { display: none; }
.mets-section .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .mets-section .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .mets-section .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Intro Split ===== */
.intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.intro-split .image {
  position: relative;
}
.intro-split .image img {
  width: 100%;
  height: 580px;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
}
.intro-split .image::before {
  content: attr(data-year);
  position: absolute;
  top: -28px; left: -28px;
  background: var(--alnal-red);
  color: var(--off-white);
  padding: 18px 28px;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  z-index: 2;
}
.intro-split .image::after {
  content: "";
  position: absolute;
  bottom: -24px; right: -24px;
  width: 140px; height: 140px;
  background: var(--coal);
  z-index: -1;
}
.intro-split h2 { margin-bottom: 1.5rem; }
.intro-split p { margin-bottom: 1.25rem; color: #44494d; }

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  aspect-ratio: 4/5;
  cursor: pointer;
}
.product-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .4s;
  opacity: 0.85;
}
.product-card:hover img { transform: scale(1.06); opacity: 1; }
.product-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.85) 28%, rgba(255,255,255,0) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  z-index: 2;
  pointer-events: none;
}
.product-card .num {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--alnal-red);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}
.product-card h3 {
  color: var(--coal);
  font-size: 1.45rem;
  line-height: 1.15;
}
.product-card .arrow {
  position: absolute;
  top: 24px; right: 24px;
  width: 42px; height: 42px;
  border: 1px solid rgba(26,26,26,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coal);
  background: rgba(255,255,255,0.85);
  transition: all .3s;
  z-index: 3;
}
.product-card:hover .arrow {
  background: var(--alnal-red);
  border-color: var(--alnal-red);
  color: #fff;
}

/* Light placeholder — product photo fills the card */
.product-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.product-placeholder svg {
  width: 40%;
  height: 40%;
  color: rgba(26,26,26,0.18);
  z-index: 1;
}
.product-placeholder .product-photo {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.product-card:hover .product-placeholder .product-photo { transform: scale(1.04); }

/* ===== Capabilities / Dark feature grid ===== */
.capabilities { background: var(--coal); color: var(--off-white); }
.capabilities h2 { color: var(--off-white); }
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(245,245,240,0.1);
}
.cap-item {
  padding: 56px 40px;
  border-right: 1px solid rgba(245,245,240,0.1);
  border-bottom: 1px solid rgba(245,245,240,0.1);
  transition: background .3s;
}
.cap-item:nth-child(3n) { border-right: none; }
.cap-item:hover { background: rgba(200,16,46,0.08); }
.cap-item .icon {
  width: 56px; height: 56px;
  color: var(--alnal-red);
  margin-bottom: 28px;
}
.cap-item h3 {
  color: var(--off-white);
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.cap-item p {
  color: rgba(245,245,240,0.7);
  font-size: 0.95rem;
}

/* ===== References Grid (with real logos) ===== */
.refs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.ref-card {
  background: #fff;
  padding: 38px 24px 26px;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
}
.ref-card:hover {
  background: var(--off-white);
  transform: translateY(-2px);
  z-index: 2;
  box-shadow: 0 10px 30px rgba(26,26,26,0.08);
}
.ref-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--alnal-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.ref-card:hover::before { transform: scaleX(1); }
.ref-card .logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 90px;
  margin-bottom: 18px;
}
.ref-card .logo-wrap img {
  max-width: 80%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.65);
  transition: filter .35s ease;
}
.ref-card:hover .logo-wrap img {
  filter: grayscale(0%) opacity(1);
}
.ref-card h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  color: var(--coal);
}
.ref-card p {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* ===== Stats strip (red) ===== */
.stats-strip {
  background: var(--alnal-red);
  padding: 70px 0;
  color: var(--off-white);
  position: relative;
  overflow: hidden;
}
.stats-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 40px, rgba(245,245,240,0.04) 40px 80px);
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  display: block;
  line-height: 1;
  color: var(--off-white);
}
.stat .label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,245,240,0.85);
  margin-top: 10px;
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
}

/* ===== CTA Strip ===== */
.cta-strip {
  background: var(--coal);
  padding: 90px 0;
  color: var(--off-white);
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 35%;
  background: linear-gradient(135deg, transparent, rgba(200,16,46,0.25));
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}
.cta-strip .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.cta-strip h2 {
  color: var(--off-white);
  font-size: 2.5rem;
  max-width: 700px;
}
.cta-strip .btn { margin-top: 0; }

/* ===== Footer ===== */
.site-footer {
  background: var(--coal);
  color: var(--off-white);
  padding: 100px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr;
  gap: 70px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(245,245,240,0.1);
}
.footer-brand .brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 220px;
  margin-bottom: 24px;
  object-fit: contain;
}
.footer-grid .brand-text { color: rgba(245,245,240,0.7); font-size: 0.95rem; max-width: 360px; margin-bottom: 28px; }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.social-links a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(245,245,240,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245,245,240,0.7);
  transition: all .25s ease;
}
.social-links a:hover {
  background: var(--alnal-red);
  border-color: var(--alnal-red);
  color: var(--off-white);
  transform: translateY(-2px);
}
.social-links svg { width: 17px; height: 17px; }

.footer-grid h4 {
  color: var(--off-white);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-family: var(--font-display);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 12px; }
.footer-grid a {
  color: rgba(245,245,240,0.65);
  font-size: 0.95rem;
}
.footer-grid a:hover { color: var(--alnal-red); }

.sitemap-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-contact p {
  color: rgba(245,245,240,0.65);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.copyright {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-size: 0.85rem;
  color: rgba(245,245,240,0.5);
  flex-wrap: wrap;
  gap: 20px;
}

/* ===== Forms ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
}
.contact-info h2 { margin-bottom: 1.5rem; }
.info-block { margin-bottom: 36px; }
.info-block h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--alnal-red);
  margin-bottom: 12px;
}
.info-block p {
  font-size: 1.05rem;
  color: var(--coal);
  line-height: 1.5;
}
form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
form label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}
form input, form textarea, form select {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--coal);
  outline: none;
  margin-bottom: 28px;
  transition: border-color .25s;
}
form input:focus, form textarea:focus, form select:focus {
  border-color: var(--alnal-red);
}
form textarea { resize: vertical; min-height: 140px; }

/* ===== About values grid ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.value-item {
  padding-top: 32px;
  border-top: 2px solid var(--coal);
}
.value-item .n {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--alnal-red);
  line-height: 1;
  margin-bottom: 20px;
}
.value-item h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.value-item p { color: var(--muted); }

/* ===== News grid ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.news-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  transition: all .3s;
}
.news-card:hover { border-color: var(--alnal-red); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(26,26,26,0.06); }
.news-card .ph {
  height: 220px;
  background: var(--coal);
  position: relative;
  overflow: hidden;
}
.news-card .body { padding: 28px 32px 32px; }
.news-card .date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--alnal-red);
  font-weight: 600;
  margin-bottom: 10px;
}
.news-card h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 14px;
  line-height: 1.2;
}
.news-card p { font-size: 0.95rem; color: var(--muted); }

/* ===== Certificates grid ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cert-card {
  border: 1px solid var(--border);
  padding: 40px 32px;
  background: var(--off-white);
  text-align: center;
  transition: all .3s;
}
.cert-card:hover {
  border-color: var(--alnal-red);
  transform: translateY(-3px);
}
.cert-card .seal {
  width: 64px; height: 64px;
  margin: 0 auto 22px;
  color: var(--alnal-red);
}
.cert-card h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.cert-card p {
  font-size: 0.95rem;
  color: var(--muted);
}
/* New image-based cert card (overrides text-only version when used as <a>) */
a.cert-card {
  display: flex; flex-direction: column;
  padding: 0; text-align: left;
  text-decoration: none; color: inherit;
  overflow: hidden;
}
a.cert-card .cert-thumb {
  position: relative;
  aspect-ratio: 3/4;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
a.cert-card .cert-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
a.cert-card:hover .cert-thumb img { transform: scale(1.03); }
.cert-pages {
  position: absolute; top: 12px; right: 12px;
  background: rgba(26,26,26,0.82); color: #fff;
  font-size: 0.7rem; padding: 4px 10px;
  border-radius: 12px; letter-spacing: 0.04em;
}
a.cert-card .cert-meta { padding: 22px 22px 26px; }
.cert-issuer {
  display: block;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--alnal-red);
  margin-bottom: 8px;
}
a.cert-card .cert-link {
  display: inline-block; margin-top: 16px;
  color: var(--alnal-red); font-weight: 600; font-size: 0.92rem;
}
.cert-detail {
  display: grid; grid-template-columns: 280px 1fr; gap: 60px;
  align-items: start;
}
.cert-detail .cert-info { position: sticky; top: 100px; }
.cert-detail .cert-info h2 { margin-bottom: 14px; }
.cert-detail .cert-info p { color: var(--muted); margin-bottom: 28px; }
.cert-pages-list { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.cert-pages-list .cert-page {
  border: 1px solid var(--border); background: #fff;
  padding: 0; margin: 0;
  max-width: 50%;
}
.cert-pages-list .cert-page img { width: 100%; height: auto; display: block; }
@media (max-width: 800px) {
  .cert-pages-list .cert-page { max-width: 100%; }
}
@media (max-width: 800px) {
  .cert-detail { grid-template-columns: 1fr; }
  .cert-detail .cert-info { position: static; }
}
.news-link {
  display: inline-block; margin-top: 14px;
  color: var(--alnal-red); font-weight: 600; font-size: 0.92rem;
}
a.news-card { text-decoration: none; color: inherit; }
a.news-card:hover .news-link { text-decoration: underline; }

/* ===== Product detail ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.product-detail .visual {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.product-detail .visual .ph {
  aspect-ratio: 4/3;
  background: var(--coal);
  position: relative;
  overflow: hidden;
}
.product-detail .visual .ph img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-detail .info .num {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--alnal-red);
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
}
.product-detail .info h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
.product-detail .info p { font-size: 1.1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.product-detail .info .actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 2rem;
}
.product-detail .info .actions .btn { margin-top: 0; }

/* ===== Related products row at bottom of detail page ===== */
.related-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 50px;
}
.related-row .product-card { aspect-ratio: 1; }
.related-row h3 { font-size: 1.1rem; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.9s ease both; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  nav.main-nav ul { gap: 22px; }
  nav.main-nav a { font-size: 0.82rem; letter-spacing: 0.14em; }
}
@media (max-width: 968px) {
  :root { --header-h: 80px; }
  .menu-toggle { display: block; }
  nav.main-nav { display: none; }
  nav.main-nav.open {
    display: block;
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 24px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  }
  nav.main-nav.open ul {
    flex-direction: column;
    gap: 0;
    padding: 0 32px;
    align-items: flex-start;
  }
  nav.main-nav.open li { padding: 14px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .logo img { height: 44px; }
  .topbar .left { flex-wrap: wrap; gap: 12px; font-size: 0.75rem; }

  .intro-split, .contact-grid, .product-detail { grid-template-columns: 1fr; gap: 50px; }
  .intro-split .image img { height: 380px; }
  .product-detail .visual { position: static; }
  .product-grid, .cap-grid, .news-grid, .cert-grid, .values-grid { grid-template-columns: 1fr; }
  .refs-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-item { border-right: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .related-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .sitemap-cols { grid-template-columns: 1fr 1fr; }
  section { padding: 70px 0; }
  .hero-side { display: none; }
  .hero { height: auto; padding: 80px 0; min-height: 500px; }
}
@media (min-width: 969px) and (max-width: 1200px) {
  .refs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .container { padding: 0 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 50px; }
  .sitemap-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
}
