/*
Theme Name: Noticias
Theme URI: https://cazandogangas.es
Description: Plantilla hija de Cazando Gangas para el agregador de Noticias.
Author: CazandoGangas
Author URI: https://cazandogangas.es
Template: esgalla
Version: 0.1.25
Text Domain: cg-noticias
*/

body.cg-noticias-theme {
  --cg-news-press-font: Georgia, "Times New Roman", Times, serif;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f7fb 46%, #eef1f6 100%);
  color: #16181d;
}

.cg-noticias-theme .header-2-contenedor {
  background: #fff;
  border-bottom: 1px solid rgba(18, 23, 32, .1);
  box-shadow: 0 8px 24px rgba(18, 23, 32, .06);
}

.cg-noticias-theme .header-menu,
.cg-noticias-theme .header-menu ul,
.cg-noticias-theme .header-menu-1,
.cg-noticias-theme .header-menu-2 {
  background: transparent;
}

.cg-noticias-theme .header-2 {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 132px;
  gap: 18px;
  overflow: visible;
}

.cg-noticias-theme .header-logo,
.cg-noticias-theme .header-menu,
.cg-noticias-theme .header-menu-logo {
  position: relative;
  z-index: 2;
}

.cg-noticias-theme .header-logo,
.cg-noticias-theme .header-menu-logo {
  width: auto;
  min-width: 0;
}

.cg-noticias-theme .header-logo a,
.cg-noticias-theme .header-menu-logo a {
  display: inline-flex;
  align-items: center;
}

.cg-noticias-theme .header-logo img,
.cg-noticias-theme .header-menu-logo img {
  display: inline-block;
  max-height: 86px;
  width: auto;
}

.cg-noticias-theme .header-2::after {
  content: "Noticias";
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  color: #d9271d;
  font-family: var(--cg-news-press-font);
  font-size: clamp(48px, 5.3vw, 84px);
  font-weight: 800;
  line-height: .92;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.cg-noticias-theme .header-menu {
  margin-left: auto;
  align-self: end;
}

.cg-noticias-theme .header-menu-2 {
  margin-top: 100px;
}

.cg-noticias-theme .header-menu-2 > li,
.cg-noticias-theme .header-menu-1 > li {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-top: 0;
  margin-left: .45em;
  padding: 0;
}

.cg-noticias-theme .header-menu-2 a,
.cg-noticias-theme .header-menu-1 a,
.cg-noticias-theme .header-menu-2 > li > a,
.cg-noticias-theme .header-menu-1 > li > a {
  display: inline-block;
  background: #fff;
  border: 1px solid rgba(217, 39, 29, .24);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: none;
  padding: 7px 12px;
}

.cg-noticias-theme .header-menu-2 li,
.cg-noticias-theme .header-menu-1 li {
  padding: 0 2px;
}

.cg-news-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 18px 64px;
}

.cg-news-label {
  margin: 0;
  color: #d9271d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cg-news-ticker {
  margin-bottom: 32px;
  overflow: hidden;
  border: 1px solid rgba(217, 39, 29, .18);
  border-radius: 6px;
  background: #d9271d;
  box-shadow: 0 10px 28px rgba(18, 23, 32, .08);
}

.cg-news-ticker__track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  min-width: 100%;
  padding: 12px 16px;
  white-space: nowrap;
  will-change: transform;
  animation: cg-news-ticker-scroll 150s linear infinite;
}

.cg-news-ticker__item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.cg-news-ticker__item + .cg-news-ticker__item::before {
  content: "📰";
  margin: 0 18px;
  color: rgba(255, 255, 255, .78);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 18px;
  line-height: 1;
}

.cg-news-ticker__item a {
  color: #fff;
  font-family: var(--cg-news-press-font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.22;
  text-decoration: none;
}

.cg-news-ticker__item a:hover,
.cg-news-ticker__item a:focus {
  text-decoration: underline;
}

.cg-news-ticker:hover .cg-news-ticker__track,
.cg-news-ticker:focus-within .cg-news-ticker__track {
  animation-play-state: paused;
}

@keyframes cg-news-ticker-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-33.3333%, 0, 0);
  }
}

.cg-news-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .62fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 30px;
}

.cg-news-hero__main,
.cg-news-hero__aside {
  min-width: 0;
}

.cg-news-hero__aside {
  display: flex;
}

.cg-news-lead {
  display: grid;
  grid-template-columns: minmax(280px, .76fr) minmax(0, 1.08fr);
  gap: 26px;
  align-items: start;
  padding: 22px;
  border: 1px solid rgba(18, 23, 32, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 23, 32, .07);
}

.cg-news-lead__content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.cg-news-lead__title,
.cg-news-grid-card h2,
.cg-news-taxonomy-head h1 {
  margin: 0;
  font-family: var(--cg-news-press-font);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.cg-news-title--xl {
  font-size: clamp(34px, 4vw, 60px);
}

.cg-news-title--lg {
  font-size: clamp(28px, 3vw, 42px);
}

.cg-news-title--md {
  font-size: clamp(22px, 2.15vw, 32px);
  line-height: 1.05;
}

.cg-news-grid-card .cg-news-title--xl {
  font-size: clamp(24px, 2vw, 30px);
}

.cg-news-grid-card .cg-news-title--lg {
  font-size: clamp(22px, 1.8vw, 28px);
}

.cg-news-grid-card .cg-news-title--md {
  font-size: clamp(20px, 1.55vw, 24px);
  line-height: 1.1;
}

.cg-news-lead__title a,
.cg-news-grid-card h2 a {
  color: #16181d;
  text-decoration: none;
}

.cg-news-lead__title a:hover,
.cg-news-grid-card h2 a:hover,
.cg-news-lead__title a:focus,
.cg-news-grid-card h2 a:focus {
  color: #d9271d;
}

.cg-news-lead__summary,
.cg-news-grid-card p,
.cg-news-taxonomy-head p {
  margin: 0;
  color: #4b5565;
  font-size: 16px;
  line-height: 1.62;
}

.cg-news-item-tools {
  margin: 2px 0 0;
}

.cg-news-item-tools a {
  color: #d9271d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.cg-news-lead__media,
.cg-news-grid-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(18, 23, 32, .1);
  border-radius: 8px;
  background: #e9edf4;
}

.cg-news-lead__media {
  aspect-ratio: 16 / 10;
}

.cg-news-grid-card__media {
  aspect-ratio: 16 / 10;
}

.cg-news-lead__media::after,
.cg-news-grid-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .1));
  pointer-events: none;
}

.cg-news-lead__media img,
.cg-news-grid-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02);
  transition: transform .28s ease;
}

.cg-news-lead__media:hover img,
.cg-news-grid-card__media:hover img {
  transform: scale(1.02);
}

.cg-news-sidebar-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(18, 23, 32, .1);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(18, 23, 32, .06);
  min-height: 0;
  padding: 22px 20px 24px;
}

.cg-news-sidebar-card h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(18, 23, 32, .1);
  color: #d9271d;
  font-family: var(--cg-news-press-font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.cg-news-topics {
  display: grid;
  gap: 0;
}

.cg-news-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid rgba(18, 23, 32, .1);
  border-radius: 0;
  background: transparent;
  color: #293241;
  font-family: var(--cg-news-press-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.cg-news-topics a::after {
  content: ">";
  margin-left: 16px;
  color: rgba(217, 39, 29, .72);
  font-family: Arial, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.cg-news-topics a:hover,
.cg-news-topics a:focus {
  color: #d9271d;
}

.cg-news-topics a.is-active {
  border-color: rgba(217, 39, 29, .34);
  color: #d9271d;
  font-weight: 800;
}

.cg-news-taxonomy-head a {
  color: #d9271d;
  text-decoration: none;
  font-weight: 700;
}

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

.cg-news-grid-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 23, 32, .1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 23, 32, .06);
}

.cg-news-grid-card__media {
  border: 0;
  border-radius: 0;
}

.cg-news-grid-card__body {
  display: grid;
  gap: 10px;
  padding: 16px 16px 18px;
}

.cg-news-empty {
  color: #6b7280;
}

.cg-news-taxonomy-head {
  display: grid;
  gap: 10px;
  padding: 0 0 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(18, 23, 32, .12);
}

.cg-news-taxonomy-head h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  text-transform: uppercase;
}

.cg-news-hero--taxonomy {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cg-news-ticker__track {
    animation: none;
  }

  .cg-news-lead__media img,
  .cg-news-grid-card__media img {
    transition: none;
  }
}

@media (max-width: 1180px) {
  .cg-news-hero {
    grid-template-columns: 1fr;
  }

  .cg-news-sidebar-card {
    min-height: auto;
  }

  .cg-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cg-noticias-theme .header-2 {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 118px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .cg-noticias-theme .header-logo img,
  .cg-noticias-theme .header-menu-logo img {
    max-height: 62px;
  }

  .cg-noticias-theme .header-2::after {
    top: 42%;
    left: 50%;
    font-size: clamp(38px, 8vw, 58px);
  }

  .cg-news-shell {
    padding: 24px 14px 50px;
  }

  .cg-news-lead,
  .cg-news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cg-noticias-theme .header-2 {
    min-height: 102px;
  }

  .cg-noticias-theme .header-2::after {
    top: auto;
    bottom: 16px;
    transform: translateX(-50%);
    font-size: clamp(30px, 10vw, 48px);
  }

  .cg-noticias-theme .header-menu-2 a,
  .cg-noticias-theme .header-menu-1 a {
    background: #fff;
  }

  .cg-news-grid {
    gap: 22px 0;
  }

  .cg-news-ticker__track {
    padding: 10px 14px;
  }

  .cg-news-ticker__item + .cg-news-ticker__item::before {
    margin: 0 14px;
  }

  .cg-news-ticker__item a {
    font-size: 17px;
  }
}
