/* =========================================================
   INORAiL — site styles
   Original CSS for the Kirby rebuild
   ========================================================= */

/* 1. Colours and global defaults */
:root {
  --inorail-blue: #0383bd;
  --inorail-red: #b80000;
  --text: #30343a;
  --muted: #626a70;
  --border: #d9dfe3;
  --surface: #f4f6f7;
  --white: #fff;
  --content-width: 1200px;
  --page-grey: #f3f3f3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page-grey);
}

body {
  max-width: 1360px;
  min-height: 100vh;
  margin: 0 auto;
  color: var(--text);
  background: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--inorail-blue);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--inorail-red);
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #f0a800;
  outline-offset: 3px;
}

/* 2. Header branding */
.site-header {
  width: 100%;
  background: var(--white);
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--content-width);
  min-height: 130px;
  margin: 0 auto;
  padding: 1rem 1.5rem 1.25rem;
  background: var(--white);
}

.header-branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.site-logo {
  display: inline-flex;
  flex-direction: column;
  color: var(--inorail-blue);
  line-height: 1;
  text-decoration: none;
}

.site-logo:hover,
.site-logo:focus-visible {
  color: var(--inorail-blue);
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}

.logo-name {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.07em;
}

.logo-name span {
  color: var(--inorail-red);
}

.logo-tagline {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

/* Stockist logos below the main logo */
.stockist-logos {
  margin-top: 0.1rem;
}

.stockist-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.65rem;
  line-height: 1;
}

.stockist-logo-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stockist-logo-row img {
  display: block;
  width: auto;
  max-width: 100px;
  height: 20px;
  object-fit: contain;
}

/* Quality and safety badges */
.header-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.header-badges img {
  display: block;
  width: auto;
  max-width: 105px;
  height: 85px;
  object-fit: contain;
}

/* 3. Main navigation */
.primary-navigation {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  min-height: 64px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  border-bottom: 6px solid var(--inorail-red);
}

.primary-navigation a {
  display: flex;
  align-items: center;
  padding: 16px 18px 13px;
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible {
  border-bottom-color: var(--inorail-blue);
  color: var(--inorail-blue);
  text-decoration: none;
}

.menu-toggle {
  display: none;
}

/* 4. Main content and common typography */
.main {
  width: 100%;
  min-height: 55vh;
  margin: 0 auto;
  padding: 0 0 64px;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  color: var(--inorail-blue);
  font-size: clamp(2rem, 4vw, 2.8rem);
}

h2 {
  color: var(--inorail-blue);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  color: var(--inorail-blue);
  font-size: 1.35rem;
}

p {
  margin: 0 0 1.25rem;
}

/* General buttons, used outside the company panels too */
button,
.button,
input[type="submit"] {
  display: inline-block;
  padding: 11px 20px;
  border: 0;
  border-radius: 2px;
  background: var(--inorail-blue);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
  background: var(--inorail-red);
  color: var(--white);
}

/* Footer */
.site-footer {
  padding: 32px 24px;
  border-top: 6px solid var(--inorail-red);
  background: #f1f3f4;
  color: var(--muted);
  text-align: center;
}

.site-footer a {
  margin: 0 8px;
}

/* 5. Optional hero and three-column content sections */
.home-hero {
  max-width: 1000px;
  padding: 44px 0 48px;
}

.home-hero .eyebrow {
  margin-bottom: 12px;
  color: var(--inorail-red);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.home-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 5vw, 4rem);
}

.home-hero h2 {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.home-hero > p:not(.eyebrow) {
  max-width: 780px;
  font-size: 1.08rem;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.home-actions .button {
  padding: 12px 20px;
  text-decoration: none;
}

.home-actions .button-secondary {
  border: 1px solid var(--inorail-blue);
  background: var(--white);
  color: var(--inorail-blue);
}

.home-actions .button-secondary:hover {
  background: var(--inorail-blue);
  color: var(--white);
}

.home-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 12px 0 40px;
}

.home-sections article {
  padding: 26px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--inorail-red);
  background: var(--white);
}

.home-sections h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

.home-sections article > a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
}

/* 6. Homepage introductory strapline */
.home-intro {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  background: var(--white);
  text-align: center;
}

.home-intro p {
  margin: 0;
  color: #777;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 7. Homepage image carousel */
.home-carousel {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  background: #f2f2f2;
}

.home-carousel__slides {
  position: relative;
  width: 100%;
  aspect-ratio: 1300 / 380;
}

.home-carousel__slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.home-carousel__slide.is-active {
  visibility: visible;
  opacity: 1;
}

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

.home-carousel__control {
  position: absolute;
  top: 50%;
  padding: 0.65rem 0.9rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.home-carousel__control:hover {
  background: var(--inorail-red);
}

.home-carousel__previous {
  left: 0.75rem;
}

.home-carousel__next {
  right: 0.75rem;
}

.home-carousel__indicators {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  display: flex;
  gap: 0.55rem;
  transform: translateX(-50%);
}

.home-carousel__indicators button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.home-carousel__indicators button.is-active {
  background: var(--inorail-red);
}

/* 8. Homepage company panels
   Grey section provides the gutters between white panels.
   No horizontal padding: the first and last panels align
   with the outside edges of the page content. */
.company-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 0;
  column-gap: 1.5rem;
  row-gap: 1rem;
  background: var(--page-grey);
}

.company-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 240px;
  padding: 1.25rem;
  background: var(--white);
  text-align: center;
}

.company-panel img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 65px;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.company-panel p {
  width: 100%;
  margin: 1rem 0 1.25rem;
  color: #666;
  line-height: 1.6;
}

.company-panel__link {
  display: inline-block;
  flex-shrink: 0;
  min-width: 110px;
  margin-top: auto;
  padding: 0.55rem 1.25rem;
  border: 1px solid #ccc;
  border-radius: 24px;
  background: #f7f7f7;
  color: #777;
  font-size: 0.85rem;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
}

.company-panel__link:hover {
  border-color: #aaa;
  background: #eee;
  color: #555;
  text-decoration: none;
}

/* 9. Responsive layouts */
@media (max-width: 900px) {
  .header-top {
    min-height: 105px;
    padding: 18px 24px;
  }

  .header-badges {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .primary-navigation a {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 760px) {
  .home-hero {
    padding-top: 24px;
  }

  .home-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .company-panels {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  .company-panel {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .header-top {
    min-height: 90px;
    padding: 16px 20px;
  }

  .logo-name {
    font-size: 2.5rem;
  }

  .logo-tagline {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }

  .header-badges {
    display: none;
  }

  .menu-toggle {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 6px solid var(--inorail-red);
    background: var(--white);
    color: var(--text);
    text-align: left;
  }

  .primary-navigation {
    display: none;
    padding: 0;
    border-top: 0;
    border-bottom: 6px solid var(--inorail-red);
  }

  .primary-navigation.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-navigation a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .site-logo img {
    width: 240px;
  }

  .header-badges img {
    height: 65px;
  }

  .stockist-logo-row img {
    max-width: 85px;
    height: 18px;
  }

  .home-carousel__control {
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
  }

  .main {
    width: 100%;
    padding-top: 0;
  }
}
/* News listing */
.news-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.news-heading {
  margin-bottom: 28px;
}

.news-heading h1 {
  margin: 0 0 16px;
}

.news-intro {
  max-width: 850px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.news-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f3f3f3;
}

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

.news-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
}

.news-date {
  margin: 0 0 10px;
  color: #666;
  font-size: 0.9rem;
}

.news-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.35;
}

.news-card h2 a {
  color: #0383bd;
  text-decoration: none;
}

.news-card h2 a:hover {
  text-decoration: underline;
}

.news-card-content > p:not(.news-date) {
  margin: 0 0 18px;
}

.news-read-more {
  display: inline-block;
  margin-top: auto;
  color: #0383bd;
  font-weight: 600;
  text-decoration: none;
}

.news-read-more:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 600px) {
  .news-page {
    padding: 22px 16px 36px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
