/* New design, on top of main.css / favorites.css: the homepage ($page_next in _header.php). Same colours, pictures and texts.
   Headings: Montserrat (already in /fonts), closest to the lettering of the Cugate logo. Text: Inter. */

:root {
  --nx-head: 'Montserrat', 'Inter', sans-serif;
  --nx-pale: #EEF5F8;
  --nx-line: #D5E3EA;
  --nx-text: #33475B;
  --nx-bar: 64px;
  --nx-side: max(40px, calc((100% - 1400px) / 2));   /* the edge of UIkit's large container */
}

@media (max-width: 959px) { :root { --nx-side: 30px; } }
@media (max-width: 639px) { :root { --nx-side: 15px; } }

body.next { text-align: left; color: var(--nx-text); font-weight: 400; }
html { scroll-padding-top: calc(var(--nx-bar) + 16px); }

.next h1, .next h2, .next h3, .next h4,
.next .uk-heading-medium {
  font-family: var(--nx-head);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--color-blue-dark);
  text-wrap: balance;
}

.next .uk-heading-medium { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.1; }
.next a:hover img { opacity: 1; }
.next :focus-visible { outline: 3px solid var(--color-orange); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- buttons ---- */

.next .nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 30px;
  font: 600 1.05rem/1 var(--sans-serif);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.next .nx-btn-yellow { background: var(--color-orange); color: var(--color-blue-dark); }
.next .nx-btn-yellow:hover { background: #ffdb4d; }
.next .nx-btn-navy { background: var(--color-blue-dark); color: #fff; }
.next .nx-btn-navy:hover { background: var(--color-blue-medium); }
.next .nx-btn-line { border-color: var(--color-blue-dark); color: var(--color-blue-dark); }
.next .nx-btn-line:hover { background: var(--color-blue-dark); color: #fff; }

/* ---- header ---- */

.nx-header { position: sticky; top: 0; z-index: 980; background: var(--color-blue-dark); }

.nx-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nx-bar);
  padding: 0 var(--nx-side);
}

.nx-logo { display: flex; align-items: center; gap: 11px; flex: none; }
.nx-logo img, .nx-link img, .nx-mlink img { filter: brightness(0) invert(1) !important; }
.nx-nav { display: flex; flex: 1; align-self: stretch; }

.next .nx-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 0;
  background: none;
  color: #fff;
  font: 500 15px/1 var(--sans-serif);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s;
}

.next .nx-link:hover { color: #9FE9EE; }
.next .nx-link.is-active { box-shadow: inset 0 -4px 0 var(--color-orange); }

.next .nx-drop { min-width: 200px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(7, 41, 76, .22); }
.next .nx-drop a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--color-blue-dark); text-decoration: none; }
.next .nx-drop a:hover, .next .nx-drop a.is-active { background: var(--nx-pale); }

.nx-burger { display: none; margin-left: auto; padding: 8px; border: 0; background: none; color: #fff; cursor: pointer; }

@media (min-width: 1600px) { .next .nx-link { padding: 0 15px; font-size: 16px; } }
@media (max-width: 1419px) { .nx-nav .nx-link img { display: none; } }

@media (max-width: 1149px) {
  .nx-nav, .nx-more { display: none; }
  .nx-burger { display: block; }
}

.next #header_mobile_navbar .uk-offcanvas-bar { width: min(340px, 100%); padding: 28px; }
.next #header_mobile_navbar .nx-mlink { display: flex; align-items: center; gap: 14px; padding: 10px 0; color: #fff; font-size: 1.15rem; font-weight: 500; text-decoration: none; }
.nx-mmore { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .2); }
.next #header_mobile_navbar .nx-mmore a { display: block; padding: 7px 0; color: var(--color-gray); text-decoration: none; }

/* ---- homepage: hero ---- */

.nx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: clamp(430px, 62vh, 620px);
  background: #fff;
}

.nx-hero-text { display: flex; flex-direction: column; justify-content: center; padding: 40px max(40px, calc((208% - 1400px) / 2)) 40px clamp(40px, 4.5vw, 72px); }   /* 208% of this column = the page */
.next .nx-hero h1 { margin: 0; }
.nx-hero h1 img { display: block; width: min(100%, 540px); height: auto; }
.nx-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }

/* the two bands of today's hero; the figure stands in front of both */
.nx-hero-art {
  position: relative;
  overflow: hidden;
  background: var(--color-blue-medium);
  border-right: clamp(14px, 2vw, 30px) solid var(--color-orange);
}

.nx-hero-halftone { position: absolute; inset: 0 0 34% 0; background: #66D0D0 url(/images/design2024/headphone_girl_bg.png) 0 30% / cover no-repeat; }

.nx-hero-art img {
  position: absolute;
  right: 5%;
  bottom: 0;
  height: 94%;
  width: auto;
  max-width: none;
}

@media (max-width: 959px) {
  .nx-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .nx-hero-text { padding: 36px var(--nx-side) 32px; }
  .nx-hero-actions { margin-top: 28px; gap: 10px; }
  .nx-hero-art { height: 300px; border-right: 0; border-bottom: 14px solid var(--color-orange); }
}

@media (max-width: 479px) {
  .next .nx-hero-actions .nx-btn { flex: 1 1 auto; min-height: 46px; padding: 0 16px; font-size: 1rem; }
}

.next .nx-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 18px var(--nx-side);
  background: var(--color-blue-dark);
  color: #D5E6F0;
  text-decoration: none;
}

.nx-strip b { color: #fff; font-family: var(--nx-head); font-weight: 700; }
.nx-strip-go { flex: none; color: var(--color-orange); font-weight: 600; border-bottom: 2px solid transparent; }
.nx-strip:hover .nx-strip-go { border-bottom-color: var(--color-orange); }


/* ---- news and favorites ---- */

.next .fav-section, .next .fav-page { background: var(--nx-pale); }
.next .fav-section { padding: 72px 0 64px; }
.next .fav-section-plain { padding-top: 40px; }
.next .fav-header { text-align: left; font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -0.025em; margin-bottom: 10px; }
.next .fav-section .fav-lead { text-align: left; margin: 0 0 44px; max-width: 60ch; color: var(--nx-text); }
.next .fav-row { margin-top: 56px; }
.next .fav-row:first-of-type { margin-top: 0; }
.next .fav-row-title { display: block; font-size: 1.4rem; letter-spacing: -0.01em; margin-bottom: 18px; }
.next .fav-row-title:after { content: none; }

.next .fav-card { border-radius: 14px; box-shadow: none; transition: box-shadow .25s; }
.next .fav-card:hover { box-shadow: 0 12px 32px rgba(7, 41, 76, .14); }
.next .fav-card:hover .fav-thumb img:first-child { transform: none; }
.next .fav-title { font-family: var(--sans-serif); font-weight: 700; letter-spacing: -0.005em; text-wrap: wrap; }
.next .fav-sub { color: #556779; }

/* galleries: five across on big screens, three on smaller ones, one on phones; never a sideways scroller.
   /news uses the same steps, "More from Cugate" (three cards) stays at three */
.next .fav-grid-5, .next-news .fav-section-plain .fav-grid {
  grid-auto-flow: row;
  grid-template-rows: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  overflow: visible;
  --fav-gap: 1.1rem;
}

.next .fav-grid-5 .fav-card, .next-news .fav-section-plain .fav-card { margin-bottom: var(--fav-gap); }
.next .fav-grid-5 .fav-card, .next .fav-grid-5 .fav-card:nth-child(4):nth-last-child(2) { grid-column: auto; }
.next-news .fav-section-plain .fav-btn-yt { white-space: nowrap; }
.next-news .fav-section-plain .fav-avatar { width: 60px; height: 60px; left: 10px; bottom: 10px; }

@media (min-width: 1200px) {
  .next-news .fav-section-plain .fav-title { font-size: 1rem; }
  .next-news .fav-section-plain .fav-text { padding: .85rem .9rem 0; }
  .next-news .fav-section-plain .fav-foot { padding: .8rem .9rem 1rem; }
  .next-news .fav-section-plain .fav-btn-yt { font-size: .88rem; padding: .55rem .5rem; }
  .next-news .fav-section-plain .fav-store { font-size: .78rem; padding: .28rem .5rem; }
}

@media (max-width: 1199px) {
  .next .fav-grid-5, .next-news .fav-section-plain .fav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .next .fav-grid-5, .next-news .fav-section-plain .fav-grid { grid-template-columns: minmax(0, 1fr); --fav-gap: 1.25rem; }
}

@supports not (grid-template-rows: subgrid) {
  .next .fav-grid-5 .fav-card, .next-news .fav-section-plain .fav-card { margin-bottom: 0; }
}

/* the play sign sits in the corner: the covers' own titles stay readable */
.next .fav-thumb .fav-play { left: 10px; top: auto; bottom: 10px; width: 38px; height: 38px; margin: 0; border: 0; background: rgba(7, 41, 76, .85); }
.next .fav-thumb .fav-play:after { left: 15px; top: 11px; border-width: 8px 0 8px 12px; }
.next .fav-card:hover .fav-thumb .fav-play { background: #e62117; }
.next .fav-duration { bottom: 10px; right: 10px; font-weight: 600; border-radius: 6px; padding: 2px 7px; }

/* the red is kept for the YouTube sign and for hovering */
.next .fav-btn-yt { background: #E3F1F6; color: var(--color-blue-dark) !important; font-weight: 600; }
.next .fav-btn-yt [uk-icon] { color: #e62117; }
.next .fav-btn-yt:hover, .next .fav-btn-yt:focus { background: #e62117; color: #fff !important; }
.next .fav-btn-yt:hover [uk-icon], .next .fav-btn-yt:focus [uk-icon] { color: #fff; }
.next .fav-store { border-width: 1px; border-color: var(--nx-line); font-weight: 600; }
.next .fav-all { justify-content: flex-start; margin-top: 44px; }
.next .fav-all a { font-weight: 600; }

/* news pages */
.next .fav-page-hero, .next .fav-entry, .next .yt-hero { background: var(--color-blue-dark); }
.next .fav-page-hero { padding: 56px 0 48px; }
.next .fav-page-hero h1, .next .fav-entry h1, .next .yt-hero h1 { color: #fff; }
.next .fav-page-hero h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.next .fav-page-hero .fav-lead { color: #BCD6E6; }
.next .fav-entry h1 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.15; }
.next .fav-entry .fav-btn-yt { background: #e62117; color: #fff !important; }
.next .fav-entry .fav-btn-yt [uk-icon] { color: #fff; }
.next .fav-entry .fav-btn-yt:hover { background: #c1150d; }

/* ---- services ---- */

.next #servicesSection { padding: 72px var(--nx-side) 80px; background: var(--color-blue-dark); }
.next #servicesHeader { margin: 0 0 32px; padding: 0; text-align: left; color: #fff; font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 700; letter-spacing: -0.025em; }
.next #servicesSection .slider-nav, .next #servicesSection .uk-slidenav { display: none; }

.next #servicesSection .uk-slider-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.next #servicesSection .uk-slider-items > * { width: auto; max-width: none; padding: 0; margin: 0; }

.next .service-card { position: relative; border-radius: 14px; overflow: hidden; padding: 0 0 24px; }
.next .service-card-title { order: 1; background: none; text-align: left; padding: 20px 22px 0; color: var(--color-blue-dark); font: 700 1.35rem/1.2 var(--nx-head); letter-spacing: -0.01em; text-transform: none; border-radius: 0; }
.next .service-card-img { order: 0; width: 100%; }
.next .service-card-text-wrapper { order: 2; margin: 8px 22px 20px; text-align: left; color: var(--nx-text); line-height: 1.55; }
.next .service-card > .uk-flex-1 { order: 3; }
.next .service-card > a { order: 4; align-self: flex-start; margin-left: 22px; text-decoration: none; }
.next .service-card-text-wrapper .text-switcher { color: var(--color-blue-medium); font-weight: 600; }
.next .service-card-button { border-color: transparent; border-radius: 22px; padding: 9px 18px 9px 12px; background: #E3F1F6; transition: background-color .2s; }
.next .service-card > a:hover .service-card-button { background: var(--color-orange); }

@media (min-width: 1200px) {
  /* Music is what the others build on: it gets two columns, so seven cards fill two rows */
  .next #servicesSection .uk-slider-items > :first-child { grid-column: span 2; }
  .next #servicesSection .uk-slider-items > :first-child .service-card-img { aspect-ratio: 358 / 128; object-position: 50% 12%; }
  .next #servicesSection .uk-slider-items > :first-child .text-remaining { display: inline; }
  .next #servicesSection .uk-slider-items > :first-child .text-switcher { display: none; }
}

@media (min-width: 720px) and (max-width: 1199px) {
  /* Music across the top, the other six in two rows of three */
  .next #servicesSection .uk-slider-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .next #servicesSection .uk-slider-items > :first-child { grid-column: 1 / -1; }
  .next #servicesSection .uk-slider-items > :first-child .service-card-img { aspect-ratio: 3 / 1; object-position: 50% 12%; }
}

@media (max-width: 719px) {
  .next #servicesSection .uk-slider-items { grid-template-columns: minmax(0, 1fr); }
  .next #servicesSection, .next .fav-section { padding-top: 52px; padding-bottom: 52px; }
}

/* ---- contact, newsletter, footer ---- */

.nx-contact { background: var(--color-blue-medium); color: #fff; padding: 64px 0; }
.nx-contact-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px 80px; }
.nx-contact-grid::before, .nx-contact-grid::after { display: none !important; }   /* UIkit's clearfix would be grid cells */
.next .nx-contact h2 { color: #fff; font-size: 1.75rem; margin: 0 0 14px; }
.nx-contact p { margin: 0 0 22px; }
.nx-contact-list { list-style: none; margin: 0; padding: 0; }
.nx-contact-list li { display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.nx-contact-list img { flex: none; filter: brightness(0) invert(1); }
.next .nx-contact a { color: #fff; text-decoration: none; font-size: 1.1rem; }
.next .nx-contact a:hover { text-decoration: underline; }

.nx-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.nx-form label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 500; }
.nx-form input { box-sizing: border-box; width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 10px; background: #fff; color: var(--color-blue-dark); font: 400 1rem var(--sans-serif); }
.nx-form .nx-btn { justify-self: start; margin-top: 8px; }

.nx-footer { background: var(--color-blue-dark); color: #D5E6F0; padding: 26px 0; }
.nx-footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; }
.nx-footer-row::before, .nx-footer-row::after { display: none !important; }
.nx-footer nav { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.next .nx-footer a { color: #D5E6F0; text-decoration: none; }
.next .nx-footer a:hover { color: #fff; }
.nx-social { display: flex; gap: 14px; }
.nx-social img { filter: brightness(0) invert(1); opacity: .85; }
.next .nx-social a:hover img { opacity: 1; }

@media (max-width: 799px) {
  .nx-contact-grid { grid-template-columns: minmax(0, 1fr); }
  .nx-contact { padding: 52px 0; }
}

@media (max-width: 479px) { .nx-form { grid-template-columns: minmax(0, 1fr); } }

/* ---- team ---- */

.next-our-team .uk-section { background-color: #fff !important; padding: 56px 0; }
.next-our-team .uk-section:nth-of-type(odd) { background-color: var(--nx-pale) !important; }
.next-our-team .uk-text-primary { color: var(--color-blue-dark) !important; }
.next-our-team h1 { margin-bottom: 48px !important; }
.next-our-team .uk-section h2 { font-size: 1.9rem; }
.next-our-team .uk-section h2 > .uk-text-bold:first-child { color: var(--color-blue-medium) !important; }
.next-our-team .uk-border-circle { border: 0 !important; }
.next-our-team h3, .next-our-team h4, .next-our-team h2 { text-transform: none !important; }
.next-our-team h3 { font-size: 1.25rem; }
.next-our-team h4 { font: 600 1rem/1.4 var(--sans-serif); letter-spacing: 0; }
.next-our-team h4 i { font-style: normal; color: var(--color-blue-medium); }
.next-our-team .uk-section p { margin-top: 12px; max-width: 60ch; }

/* ---- text pages ---- */

.next-adriatic .uk-text-primary, .next-impressum .uk-text-primary, .next-impressum .uk-text-secondary,
.next-privacy-policy .uk-text-primary, .next-privacy-policy .uk-text-secondary { color: var(--color-blue-dark) !important; }

.next-impressum .uk-section .uk-container > *,
.next-privacy-policy .uk-section .uk-container > * { max-width: 760px; }

.next-adriatic .uk-section .uk-container > .uk-text-left { max-width: 760px; margin-left: auto; margin-right: auto; }
.next-adriatic .uk-section img { max-width: 220px !important; }
.next-adriatic h2, .next-impressum h2, .next-privacy-policy h2 { font-size: 1.6rem; margin-top: 44px; }
.next-impressum h3, .next-privacy-policy h3 { font-size: 1.2rem; }
.next .uk-button-primary { border-radius: 25px; padding: 0 30px; line-height: 50px; background: var(--color-orange); color: var(--color-blue-dark); font-weight: 600; font-size: 1.05rem; text-transform: none; }
.next .uk-button-primary:hover { background: #ffdb4d; color: var(--color-blue-dark); }

/* long legal words and addresses on phones */
.next-impressum .uk-section, .next-privacy-policy .uk-section { overflow-wrap: anywhere; }
.next-privacy-policy .uk-section h1, .next-privacy-policy .uk-section h2 { hyphens: auto; }
.next-privacy-policy .uk-section h1 { font-size: clamp(1.5rem, 4vw, 2.6rem); }

/* ---- YouTube channels ---- */

.next #yt-page { background: var(--nx-pale); }
.next .yt-hero-stat-num { font-family: var(--nx-head); font-weight: 700; color: var(--color-orange); }
.next .yt-hero-stat-label, .next .yt-videos-label { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.next .yt-hero-note { color: #BCD6E6; }
.next .yt-card { border-radius: 14px; box-shadow: none; }
.next .yt-card.top-rank { border: 0; }
.next .yt-rank-badge { width: 46px; padding: 0; box-sizing: border-box; box-shadow: none; font-weight: 700; font-size: .95rem; }
.next .yt-visit-btn { background: var(--color-blue-dark); font-weight: 600; }
