/* One operator's page (operator.tpl). Tokens from front.css; the same
   recipes as the operators list (operators-list.css). operators.css keeps
   styling the country pages. */

body.page-operator {
  background: var(--soft);
}

/* TOP */
.opv-top {
  padding: 26px 0 4px;
  font-family: Figtree, "Segoe UI", system-ui, sans-serif;
}
.opv-back, .opv-back:hover {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 18px;
  font-size: 14px; font-weight: 700; color: var(--brand-ink);
  border: 0;
}
.opv-back:hover {
  text-decoration: underline;
}
.opv-head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}
.opv-logo {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 88px; height: 88px;
  padding: 10px;
  background: #FFF;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.opv-logo img {
  display: block;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.opv-title {
  min-width: 0;
}
.opv-top .eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-ink);
}
.opv-top h1 {
  margin: 0;
  font-family: Raleway, sans-serif; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink);
  overflow-wrap: anywhere;
}
.opv-top p {
  max-width: 640px;
  margin: 10px 0 0;
  font-size: 16px; line-height: 1.5; color: var(--muted);
}
.opv-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  margin-top: 20px;
}
.opv-cta, .opv-cta:hover {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px;
  padding: 0 22px;
  font-size: 15px; font-weight: 700; color: var(--ink);
  background: var(--action);
  border: 0;
  border-radius: 12px;
}
.opv-cta:hover {
  background: var(--action-hover);
}
.opv-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0;
  list-style: none;
}
.opv-chips li {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  background: #FFF;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.opv-chips i {
  color: var(--brand-ink);
}

/* LAYOUT */
.opv-wrap {
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px 0 56px;
}
.opv-main {
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}
.opv-card {
  padding: 20px 18px;
  font-family: Figtree, "Segoe UI", system-ui, sans-serif; color: var(--ink);
  background: #FFF;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.opv-card h2 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-family: Raleway, sans-serif; font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--ink);
}
.opv-sub {
  margin: -8px 0 14px;
  font-size: 14px; line-height: 1.5; color: var(--muted);
}
.opv-text {
  font-size: 15px; line-height: 1.65; color: #34403C;
}
.opv-text p {
  margin: 0 0 10px;
}

/* CONTACT */
.opv-contact ul {
  margin: 0; padding: 0;
  list-style: none;
}
.opv-contact li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.opv-contact li:first-child {
  padding-top: 0;
  border-top: 0;
}
.opv-contact li:last-child {
  padding-bottom: 0;
}
.opv-contact li > i {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px;
  font-size: 15px; color: var(--brand-ink);
  background: var(--brand-soft);
  border-radius: 10px;
}
.opv-contact li > span {
  min-width: 0;
  font-size: 15px; font-weight: 600; line-height: 1.4;
  overflow-wrap: anywhere;
}
.opv-contact small {
  display: block;
  margin-bottom: 1px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.opv-contact a, .opv-contact a:hover {
  font-weight: 700; color: var(--brand-ink);
  border: 0;
}
.opv-contact a:hover {
  text-decoration: underline;
}

/* SPECIAL OPERATORS (same as the list page's box) */
.opv-special h2 i {
  color: #D64545;
}
.opv-special a, .opv-special a:hover {
  display: flex; align-items: center; gap: 12px;
  padding: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink);
  border: 0;
  border-radius: 12px;
}
.opv-special a:hover {
  background: var(--soft);
}
.opv-special img {
  width: 44px; height: 44px;
  padding: 4px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* GALLERY: a mosaic of big tiles. Mobile: one wide photo, then two side by
   side. From 640px: three columns where every third photo is a 2x2 tile,
   alternating left and right; the spans below fill the last rows whatever
   the number of photos. */
.opv-mosaic {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 128px; grid-auto-flow: row dense; gap: 12px;
}
.opv-mosaic a, .opv-mosaic a:hover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--soft);
  border: 0;
  border-radius: 14px;
}
.opv-mosaic img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.opv-mosaic a:hover img {
  transform: scale(1.04);
}
.opv-mosaic a:focus-visible {
  outline: 3px solid var(--brand-ink); outline-offset: 2px;
}

@media screen and (max-width: 639px) {
  .opv-mosaic > a:nth-child(3n+1) {
    grid-column: span 2; grid-row: span 2;
  }
  .opv-mosaic > a:last-child:nth-child(3n+2) {
    grid-column: span 2;
  }
}
@media screen and (min-width: 640px) {
  .opv-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 170px; gap: 14px;
  }
  .opv-mosaic > a:nth-child(6n+1),
  .opv-mosaic > a:nth-child(6n+5) {
    grid-column: span 2; grid-row: span 2;
  }
  .opv-mosaic > a:nth-child(6n+2):last-child,
  .opv-mosaic > a:nth-child(6n+4):nth-last-child(2) {
    grid-row: span 2;
  }
  .opv-mosaic > a:last-child:nth-child(3n+1) {
    grid-column: 1 / -1; grid-row: span 2;
  }
}

/* ROUTES */
.opv-route {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.opv-route:last-child {
  padding-bottom: 0;
}
.opv-route-name > a, .opv-route-name > a:hover {
  font-family: Raleway, sans-serif; font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--ink);
  border: 0;
}
.opv-route-name > a:hover {
  color: var(--brand-ink);
}
.opv-route-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 6px;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.opv-route-meta i {
  margin-right: 3px;
  color: var(--brand-ink);
}
.opv-route-trip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 12px;
}
.opv-route-trip > i {
  font-size: 16px; color: var(--brand-ink);
}
.opv-route-trip div {
  min-width: 0;
}
.opv-route-trip small {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.opv-route-trip strong {
  display: block;
  font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink);
}
.opv-route-trip span {
  display: block;
  font-size: 14px; font-weight: 600; color: #34403C;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.opv-route-more, .opv-route-more:hover {
  justify-self: start;
  font-size: 14px; font-weight: 700; color: var(--brand-ink);
  border: 0;
}
.opv-route-more:hover {
  text-decoration: underline;
}
.opv-empty {
  margin: 0; padding: 22px;
  text-align: center; font-size: 15px; color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

@media screen and (min-width: 768px) {
  .opv-top {
    padding-top: 34px;
  }
  .opv-head {
    flex-direction: row; align-items: center; gap: 22px;
  }
  .opv-logo {
    width: 112px; height: 112px;
    padding: 14px;
    border-radius: 24px;
  }
  .opv-top h1 {
    font-size: 40px;
  }
  .opv-card {
    padding: 24px;
  }
  .opv-route {
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px) auto; align-items: center; gap: 20px;
  }
  .opv-route-more {
    justify-self: end;
  }
}
@media screen and (min-width: 1024px) {
  .opv-wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main side"; align-items: start; gap: 24px;
  }
  .opv-main {
    grid-area: main;
  }
  .opv-side {
    grid-area: side;
    position: sticky; top: calc(var(--header-h) + 20px);
    display: flex; flex-direction: column; gap: 16px;
  }
}
@media screen and (max-width: 1023px) {
  .opv-side {
    display: flex; flex-direction: column; gap: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .opv-mosaic img {
    transition: none;
  }
}

/* the lightbox has to open above the fixed header (z-index 10000) */
.fancybox-overlay {
  z-index: 10010;
}
.fancybox-wrap, .fancybox-opened {
  z-index: 10020;
}
