/*
  Scuderia F1 — vzhled automaticky vložených novinek
  -------------------------------------------------
  Vložte celý soubor do WordPressu:
  Vzhled → Přizpůsobit → Další CSS.

  Nemění HTML. Platí pro karty s odkazem ven (import z F1sport)
  a pro krátké články se třídami .generic-cover / .generic-prose.
*/

/* --- Archiv: převzatá zpráva jako magazínový otvírák --- */

body.scuderia-site .archive-grid {
  align-items: stretch;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) {
  grid-column: span 2;
  grid-row: span 2;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .editorial-card {
  display: grid;
  grid-template-columns: 1.28fr 0.86fr;
  min-height: 100%;
  overflow: hidden;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-img {
  position: relative;
  aspect-ratio: auto;
  height: 100%;
  min-height: 420px;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-copy {
  padding: 32px 32px 28px;
  justify-content: flex-end;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-copy h3 {
  font-size: clamp(28px, 2.4vw, 36px);
  letter-spacing: -0.9px;
  line-height: 1.08;
}

body.scuderia-site a.editorial-card[target="_blank"] {
  background: #fff;
  border-top: 3px solid var(--red);
  box-shadow: 0 18px 40px rgba(22, 23, 25, 0.04);
  overflow: hidden;
}

body.scuderia-site a.editorial-card[target="_blank"]:hover {
  color: inherit;
}

body.scuderia-site a.editorial-card[target="_blank"]:hover h3 {
  color: var(--red);
}

body.scuderia-site a.editorial-card[target="_blank"] .card-img > span {
  background: #191a1c;
  color: #fff;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

body.scuderia-site a.editorial-card[target="_blank"]:hover .card-img > span {
  background: var(--red);
  color: #fff;
}

body.scuderia-site a.editorial-card[target="_blank"] .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.14em;
}

body.scuderia-site a.editorial-card[target="_blank"] .tag::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  flex: none;
}

body.scuderia-site a.editorial-card[target="_blank"] .card-copy h3 {
  letter-spacing: -0.45px;
}

body.scuderia-site a.editorial-card[target="_blank"] .card-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.7;
  color: #5f5d57;
}

body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-copy p {
  -webkit-line-clamp: 5;
}

body.scuderia-site a.editorial-card[target="_blank"] .card-read {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
  color: #161719;
}

body.scuderia-site a.editorial-card[target="_blank"]:hover .card-read {
  color: var(--red);
}

body.scuderia-site a.editorial-card[target="_blank"] .source-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid #eceae4;
  border-bottom: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 9px !important;
  line-height: 1.5 !important;
  color: #8a867e;
}

body.scuderia-site a.editorial-card[target="_blank"] .source-note::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--red);
  flex: none;
}

/* --- Homepage: velká zpráva + dvě vedlejší --- */

body.scuderia-site #novinky .editorial-grid {
  grid-template-columns: 1.42fr 0.92fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  counter-reset: wire;
}

body.scuderia-site #novinky .editorial-card:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  background: #111214;
  color: #fff;
  border-top: 0;
  box-shadow: none;
}

body.scuderia-site #novinky .editorial-card:first-child .card-img {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  height: auto;
}

body.scuderia-site #novinky .editorial-card:first-child .card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

body.scuderia-site #novinky .editorial-card:first-child .card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 9, 0.28) 0%, rgba(8, 8, 9, 0.05) 24%, rgba(8, 8, 9, 0.12) 52%, rgba(8, 8, 9, 0.82) 100%);
}

body.scuderia-site #novinky .editorial-card:first-child .card-img > span {
  top: 16px;
  right: 16px;
  bottom: auto;
  z-index: 2;
  background: var(--red);
  color: #fff;
}

body.scuderia-site #novinky .editorial-card:first-child .card-copy {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 72px 32px 28px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72) 36%, rgba(0, 0, 0, 0.88));
}

body.scuderia-site #novinky .editorial-card:first-child .tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  background: var(--red);
  color: #fff;
  letter-spacing: 0.14em;
}

body.scuderia-site #novinky .editorial-card:first-child .tag::before {
  display: none;
}

body.scuderia-site #novinky .editorial-card:first-child .card-copy h3 {
  max-width: 18em;
  margin: 14px 0 10px;
  color: #fff;
  font-size: clamp(28px, 2.5vw, 40px);
  line-height: 1.02;
  letter-spacing: -1.1px;
}

body.scuderia-site #novinky .editorial-card:first-child .card-copy p {
  display: block;
  -webkit-line-clamp: unset;
  max-width: 46ch;
  margin: 0;
  color: #e6e6e6;
  font-size: 14px;
  line-height: 1.65;
}

body.scuderia-site #novinky .editorial-card:first-child .card-read {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 20px;
  padding: 13px 16px;
  background: #fff;
  color: #161719;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.scuderia-site #novinky .editorial-card:first-child:hover {
  color: #fff;
}

body.scuderia-site #novinky .editorial-card:first-child:hover h3,
body.scuderia-site #novinky .editorial-card:first-child:hover p {
  color: #fff;
}

body.scuderia-site #novinky .editorial-card:first-child:hover .card-read {
  background: var(--red);
  color: #fff;
}

body.scuderia-site #novinky .editorial-card:first-child .source-note {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  border: 0;
  color: #d0d0d0;
  letter-spacing: 0.16em;
}

body.scuderia-site #novinky .editorial-card:first-child .source-note::before {
  background: #fff;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) {
  counter-increment: wire;
  flex-direction: row;
  min-height: 0;
  align-items: stretch;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) .card-img {
  position: relative;
  width: 38%;
  flex: none;
  aspect-ratio: auto;
  align-self: stretch;
  min-height: 168px;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) .card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) .card-copy {
  padding: 18px 18px 16px;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) .tag::before {
  content: counter(wire, decimal-leading-zero);
  width: auto;
  height: auto;
  background: none;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.08em;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) .card-copy h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 10px 0 8px;
}

body.scuderia-site #novinky .editorial-card:not(:first-child) .card-copy p {
  -webkit-line-clamp: 2;
  margin-bottom: 12px;
  font-size: 12px;
}

body.scuderia-site #novinky > .source-note {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 22px 0 0 !important;
  padding: 16px 0 0 !important;
  border-top: 1px solid #d6d3cb;
  border-bottom: 0;
  color: #8a867e;
  font-size: 12px !important;
  letter-spacing: 0.01em;
  line-height: 1.6 !important;
  text-transform: none;
}

body.scuderia-site #novinky > .source-note::before {
  content: "Import";
  flex: none;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Stránka krátkého importovaného článku --- */

body.scuderia-site .page-heading:has(+ .generic-cover) {
  padding-bottom: 22px;
}

body.scuderia-site .page-heading:has(+ .generic-cover) h1 {
  max-width: 16em;
  letter-spacing: -2.2px;
}

body.scuderia-site .page-heading:has(+ .generic-cover) .meta {
  margin: 0;
  color: #8a867e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.scuderia-site .generic-cover {
  display: block;
  width: min(100%, 980px);
  height: min(52vw, 480px);
  margin: 0 auto;
  object-fit: cover;
  object-position: center 40%;
  background: #191a1c;
}

body.scuderia-site .generic-prose {
  max-width: 740px;
  padding-top: 34px;
}

body.scuderia-site .generic-prose > p:first-of-type:not(.source-note) {
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 3px solid var(--red);
  color: #2c2d2b;
  font-size: 22px;
  line-height: 1.6;
}

body.scuderia-site .generic-prose > p > a[target="_blank"] {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 17px 22px;
  background: var(--red);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none !important;
  text-transform: uppercase;
}

body.scuderia-site .generic-prose > p > a[target="_blank"]:hover {
  background: #be1716;
  color: #fff !important;
}

body.scuderia-site .generic-prose .saic-wrapper {
  margin-top: 56px !important;
  padding-top: 8px;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid #d8d4cb !important;
  font-family: Arial, Helvetica, sans-serif;
}

body.scuderia-site .generic-prose .saic-wrapper .saic-wrap-form,
body.scuderia-site .generic-prose .saic-wrapper ul.saic-container-comments,
body.scuderia-site .generic-prose .saic-wrapper .saic-comment-status {
  border-color: #d8d4cb !important;
}

body.scuderia-site .generic-prose .saic-wrapper .saic-textarea,
body.scuderia-site .generic-prose .saic-wrapper input.saic-input {
  background: #fff !important;
  border: 1px solid #d3d0c9 !important;
  color: #161719 !important;
}

body.scuderia-site .generic-prose .saic-wrapper input[type="submit"],
body.scuderia-site .generic-prose .saic-wrapper input.saic-form-btn {
  background: #191a1c !important;
  color: #fff !important;
}

body.scuderia-site .generic-prose .saic-wrapper .saic-link {
  color: #161719 !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 1000px) {
  body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) {
    grid-column: auto;
    grid-row: auto;
  }

  body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .editorial-card {
    display: flex;
    flex-direction: column;
  }

  body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-img {
    min-height: 0;
    aspect-ratio: 1.7;
    height: auto;
  }

  body.scuderia-site .archive-grid > .archive-item:first-child:has(a[target="_blank"]) .card-copy h3 {
    font-size: 28px;
  }

  body.scuderia-site #novinky .editorial-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }

  body.scuderia-site #novinky .editorial-card:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 480px;
  }
}

@media (max-width: 700px) {
  body.scuderia-site #novinky .editorial-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 14px;
  }

  body.scuderia-site #novinky .section-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  body.scuderia-site #novinky .editorial-card:first-child {
    min-height: 500px;
  }

  body.scuderia-site #novinky .editorial-card:first-child .card-copy {
    padding: 48px 20px 22px;
  }

  body.scuderia-site #novinky .editorial-card:first-child .card-copy h3 {
    font-size: 28px;
    max-width: none;
  }

  body.scuderia-site #novinky .editorial-card:first-child .card-copy p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.scuderia-site #novinky .editorial-card:not(:first-child) .card-img {
    width: 116px;
    min-height: 124px;
  }

  body.scuderia-site #novinky .editorial-card:not(:first-child) .card-copy {
    padding: 14px 14px 12px;
  }

  body.scuderia-site #novinky .editorial-card:not(:first-child) .card-copy h3 {
    font-size: 16px;
  }

  body.scuderia-site #novinky .editorial-card:not(:first-child) .card-copy p,
  body.scuderia-site #novinky .editorial-card:not(:first-child) .card-img > span {
    display: none;
  }

  body.scuderia-site #novinky > .source-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  body.scuderia-site .generic-cover {
    height: 220px;
  }

  body.scuderia-site .generic-prose > p:first-of-type:not(.source-note) {
    font-size: 18px;
  }

  body.scuderia-site .generic-prose > p > a[target="_blank"] {
    gap: 16px;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  body.scuderia-site .page-heading:has(+ .generic-cover) h1 {
    letter-spacing: -1.4px;
  }
}
