/* =====================================================================
   Fosan Automation Solutions – main stylesheet
   Loaded after Bootstrap 5.3 (grid + utilities). Brand colours below.
   ===================================================================== */

@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/albert-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/albert-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fosan-red: #D2373B;
  --fosan-red-dark: #B02A2E;
  --fosan-ink: #111111;
  --fosan-text: #2b2b2b;
  --fosan-muted: #5c5c5c;
  --fosan-gray: #F5F5F5;
  --radius-lg: 40px;
  --shadow-card: 0 0 24px 0 rgba(0, 0, 0, .25);
  --header-h: 76px;
  --bs-body-font-family: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--fosan-text);
  --bs-link-color-rgb: 210, 55, 59;
  --bs-link-hover-color-rgb: 17, 17, 17;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: var(--bs-body-font-family); color: var(--fosan-text); overflow-x: clip; }
img, svg { max-width: 100%; }
img { height: auto; }
p { line-height: 1.65; }

.icon { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.icon--sm { width: 18px; height: 18px; }

:focus-visible { outline: 3px solid var(--fosan-red); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 2000;
  background: var(--fosan-ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.section-title { font-weight: 700; color: var(--fosan-ink); margin-bottom: 1rem; }
.lead-text { font-weight: 700; color: var(--fosan-ink); }
.narrow-text { max-width: 860px; margin: 10px auto; }

/* Buttons ------------------------------------------------------------ */
.read-btn {
  --bs-btn-padding-x: 40px; --bs-btn-padding-y: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  background-color: var(--fosan-red); color: #fff; font-weight: 600;
  border: 0; border-radius: 50px; transition: background-color .2s ease;
}
.read-btn:hover, .read-btn:focus-visible { background-color: #000; color: #fff; }
.read-btn.btn-sm { --bs-btn-padding-x: 18px; --bs-btn-padding-y: 6px; }
.link-button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }

/* Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.navbar { padding-block: 10px; min-height: var(--header-h); }
.navbar > .container { flex-wrap: wrap; }
.navbar-brand { padding: 0; }
.navbar-brand img { width: 200px; height: auto; display: block; }
.navbar-nav { margin-left: auto; gap: 20px; }
.nav-link { font-weight: 500; color: #000; font-size: 18px; }
.nav-link:hover, .nav-link:focus-visible, .nav-link[aria-current="page"] { color: var(--fosan-red); }
.header-tools { display: flex; align-items: center; gap: 6px; order: 3; }
.navbar-toggler { border: 0; box-shadow: none !important; color: var(--fosan-red); padding: 6px; }
.navbar-toggler .icon { width: 28px; height: 28px; }

@media (min-width: 992px) {
  .navbar > .container { flex-wrap: nowrap; }
  .navbar-collapse { order: 2; }
  .header-tools { order: 3; margin-left: 24px; }
  .navbar-toggler { display: none; }
}

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch__toggle {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid #ddd; border-radius: 50px;
  padding: 6px 12px; font-weight: 600; color: #000; cursor: pointer; font-size: 15px;
}
.lang-switch__toggle:hover { border-color: var(--fosan-red); }
.lang-switch__toggle .icon { width: 18px; height: 18px; }
.lang-switch__toggle[aria-expanded="true"] .icon--sm { transform: rotate(180deg); }
.lang-switch__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); z-index: 1050;
}
.lang-switch__menu a {
  display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 8px; color: #000;
  text-decoration: none; font-weight: 500;
}
.lang-switch__menu a:hover, .lang-switch__menu a:focus-visible { background: var(--fosan-gray); }
.lang-switch__menu a[aria-current="true"] { color: var(--fosan-red); font-weight: 700; }
.flag { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.lang-code { display: inline-block; min-width: 26px; font-weight: 700; font-size: 13px; color: var(--fosan-muted); }

/* Background media (hero + page banners) ----------------------------- */
.bg-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.bg-media picture, .bg-media__img { display: block; width: 100%; height: 100%; }
.bg-media__img { object-fit: cover; object-position: center; max-width: none; }

/* Hero ---------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; color: #fff; }
.hero__layer { position: relative; z-index: 1; background-color: rgba(0, 0, 0, .8); padding-top: 100px; }
.hero__title { font-size: clamp(36px, 4.4vw, 60px); font-weight: 600; padding-top: 25px; line-height: 1.1; }
.hero__desc { max-width: 90%; padding-block: 10px; }
.hero__img { width: 90%; display: block; margin-left: auto; }
.hero .read-btn { margin-bottom: 40px; }

/* Brands marquee ------------------------------------------------------ */
.brands { background-color: var(--fosan-red); padding-block: 30px 34px; text-align: center; overflow: hidden; }
.brands__title { color: #fff; font-weight: 700; font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 26px; }
.marquee { display: flex; width: max-content; }
.marquee__track {
  display: flex; align-items: center; gap: 64px; list-style: none; margin: 0; padding: 0 32px;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li { flex: none; color: #fff; }
.brand-img { display: block; width: 150px; height: auto; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { width: auto; justify-content: center; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 24px; }
  .marquee__track[aria-hidden="true"] { display: none; }
}

/* About / Technologies ----------------------------------------------- */
.about { padding-top: 70px; }
.technology { padding-top: 70px; }
.technology .col-md-6:first-child { padding-right: 32px; }

/* Services ------------------------------------------------------------ */
.services { padding-top: 70px; }
.solution { background-color: var(--fosan-gray); padding: 60px; border-radius: var(--radius-lg); }
.service-box { height: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.service-box picture { display: block; width: 100%; }
.service-box img { width: 100%; }
.service-box__title { font-size: 1.35rem; font-weight: 700; margin-top: 1rem; color: var(--fosan-ink); }
.service-box p { flex: 1; }

/* Contact ------------------------------------------------------------- */
.contact { padding-top: 80px; }
.contact-card { background: #fff; box-shadow: var(--shadow-card); border-radius: var(--radius-lg); padding: 40px; }
.contact-card__title { font-weight: 700; color: var(--fosan-ink); font-size: 1.75rem; }
.contact-card__intro { color: var(--fosan-muted); }
.contact-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.contact-list a { color: #000; text-decoration: none; }
.contact-list a:hover, .contact-list a:focus-visible { color: var(--fosan-red); text-decoration: underline; }
.contact-list__icon {
  width: 41px; height: 41px; border-radius: 50%; background: var(--fosan-red); color: #fff;
  display: inline-grid; place-items: center; flex: none;
}
.contact-list__icon .icon { width: 20px; height: 20px; }
.contact-map { width: 100%; height: 320px; border: 0; border-radius: 20px; background: var(--fosan-gray); display: block; }

/* Footer -------------------------------------------------------------- */
.site-footer { padding: 80px 0 30px; text-align: center; }
.site-footer__logo img { width: 150px; height: auto; }
.footer-links, .footer-social, .footer-langs {
  display: flex; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 24px 0 0;
}
.footer-links { gap: 12px 25px; margin-top: 30px; }
.footer-links a, .footer-langs a { color: #000; text-decoration: none; font-weight: 600; }
.footer-links a:hover, .footer-langs a:hover { color: var(--fosan-red); }
.footer-social { gap: 18px; margin-top: 20px; }
.footer-social a { color: #000; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.footer-social a:hover, .footer-social a:focus-visible { color: #fff; background: var(--fosan-red); }
.footer-social .icon { width: 20px; height: 20px; }
.footer-langs { gap: 6px 18px; font-size: 14px; }
.footer-langs a { font-weight: 500; color: var(--fosan-muted); }
.footer-langs a[aria-current="true"] { color: var(--fosan-red); font-weight: 700; }
.footer-legal { margin: 22px 0 0; font-size: 14px; color: var(--fosan-muted); }

/* Inner page banner + breadcrumbs ------------------------------------ */
.page-banner { position: relative; isolation: isolate; color: #fff; padding-block: 120px; }
.page-banner::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 0; }
.page-banner .container { position: relative; z-index: 1; }
.page-banner__title { font-size: clamp(32px, 3.4vw, 45px); font-weight: 600; margin: 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; font-size: 15px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .7; }
.breadcrumbs a { color: #fff; text-decoration: none; opacity: .85; }
.breadcrumbs a:hover { opacity: 1; text-decoration: underline; }

.section-1 { padding-top: 60px; }
.detail-row { padding-top: 40px; }

/* Business strategy */
.strategy-list { margin: 0; }
.strategy-list dt { color: var(--fosan-red); font-weight: 600; font-size: 1.15rem; margin-top: 14px; }
.strategy-list dt:first-child { margin-top: 0; }
.strategy-list dd { margin: 4px 0 0; line-height: 1.6; }
.bs-text { max-width: 860px; margin: 50px auto 0; text-align: center; }
.bs-text p { font-size: 20px; font-weight: 500; }
.bs-text span { color: var(--fosan-red); }

/* PLC */
.plc-brands { text-align: center; margin: 40px 0 30px; }
.plc-brands__title { color: var(--fosan-red); font-weight: 600; font-size: 1.25rem; }
.plc-brands ul {
  list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 28px 44px; color: #222;
}
.plc-brands img { display: block; height: auto; max-width: 100%; }

.features { padding-top: 70px; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 28px;
  margin-top: 50px; text-align: center;
}
.feature-box__icon {
  display: inline-grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid #000; padding: 5px; transition: border-color .2s ease;
}
.feature-box__icon .icon {
  width: 78px; height: 78px; padding: 20px; border-radius: 50%; background: var(--fosan-red); color: #fff;
  stroke-width: 1.75; transition: background-color .2s ease;
}
.feature-box:hover .feature-box__icon { border-color: var(--fosan-red); }
.feature-box:hover .feature-box__icon .icon { background: #000; }
.feature-box__title { font-size: 1.25rem; font-weight: 700; margin-top: 1rem; color: var(--fosan-ink); }
.feature-box p { padding-inline: 8px; }

/* AGV */
.differ { padding-top: 70px; }

/* Industries */
.capabilities { background-color: var(--fosan-red); padding: 50px 0 220px; margin-top: 70px; text-align: center; }
.capabilities__title { color: #fff; font-weight: 700; font-size: clamp(22px, 2.6vw, 32px); }
.capabilities__list {
  list-style: none; padding: 0; margin: 34px auto 0; max-width: 1000px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.capabilities__list li {
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 50px; padding: 10px 20px; font-weight: 600;
}
.screen-image { margin-top: -190px; text-align: center; position: relative; }
.screen-image picture { display: inline-block; width: 75%; max-width: 1100px; }
.screen-image img { width: 100%; }
.industry-4 { padding-top: 60px; }

/* Language suggestion + cookie consent ------------------------------- */
.consent {
  position: fixed; z-index: 1100; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 720px;
  background: #fff; color: var(--fosan-ink); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.consent[hidden], .lang-suggest[hidden] { display: none; }
/* language suggestion: slim strip under the navbar (part of the sticky header, never covers the menu) */
.lang-suggest { background: var(--fosan-gray); border-top: 1px solid #e6e6e6; font-size: 15px; }
.lang-suggest__inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 8px; }
.lang-suggest__text, .consent__text { margin: 0; flex: 1 1 260px; line-height: 1.5; }
.lang-suggest__close { background: none; border: 0; padding: 4px; color: var(--fosan-muted); cursor: pointer; }
.consent__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent__btn { border-radius: 50px; font-weight: 600; padding: 8px 22px; background: var(--fosan-red); color: #fff; border: 2px solid var(--fosan-red); }
.consent__btn:hover, .consent__btn:focus-visible { background: #000; border-color: #000; color: #fff; }
.consent__btn--ghost { background: #fff; color: var(--fosan-ink); border-color: #ccc; }
.consent__btn--ghost:hover, .consent__btn--ghost:focus-visible { background: var(--fosan-gray); color: #000; border-color: #999; }

/* Responsiveness ------------------------------------------------------ */
@media (max-width: 991.98px) {
  :root { --header-h: 66px; }
  .navbar-brand img { width: 160px; }
  .header-tools { margin-left: auto; }
  .navbar-collapse { order: 4; flex-basis: 100%; }
  .navbar-nav { gap: 0; padding: 8px 0 12px; }
  .nav-link { padding-block: 10px; }
  .hero__layer { padding-top: 40px; }
  .hero__img { width: 100%; }
  .technology .col-md-6:first-child { padding-right: calc(var(--bs-gutter-x) * .5); }
  .solution { padding: 40px 20px; }
}
@media (max-width: 767.98px) {
  .hero__layer { padding-top: 24px; }
  .hero__desc { max-width: 100%; }
  .hero .read-btn { margin-bottom: 24px; }
  .about, .technology, .services, .features, .differ { padding-top: 50px; }
  .contact { padding-top: 50px; }
  .contact-card { padding: 32px 20px; border-radius: 28px; }
  .contact-map { height: 260px; }
  .site-footer { padding-top: 50px; }
  .site-footer__logo img { width: 110px; }
  .page-banner { padding-block: 56px; }
  .section-1 { padding-top: 36px; }
  .marquee__track { gap: 44px; padding: 0 22px; }
  .brand-img { width: 120px; }
  .capabilities { padding: 36px 0 110px; margin-top: 50px; }
  .capabilities__list li { padding: 8px 14px; font-size: 15px; }
  .screen-image { margin-top: -90px; }
  .screen-image picture { width: 100%; }
  .bs-text p { font-size: 18px; }
}

/* The About/Technologies artwork has generous transparent padding built in:
   pull the sections together on larger screens (as in the original design). */
@media (min-width: 992px) {
  .technology { padding-top: 0; margin-top: -110px; }
  .services { padding-top: 0; margin-top: -50px; }
}
/* Phones: language suggestion in a single line (button + close only) */
@media (max-width: 575.98px) {
  .lang-suggest__text { display: none; }
  .lang-suggest__inner { padding-block: 6px; justify-content: space-between; }
}
