/**
 * Vinomatos News Hub
 * Scoped to .vnh-news so it can coexist safely with Elementor and any theme.
 */

.vnh-news {
  --vnh-green: #175709;
  --vnh-green-dark: #0f3f05;
  --vnh-green-soft: #e9f0e5;
  --vnh-lime: #a8bd36;
  --vnh-ink: #151813;
  --vnh-muted: #687064;
  --vnh-paper: #fbfaf5;
  --vnh-card: #ffffff;
  --vnh-line: #dfe4db;
  --vnh-shadow: 0 16px 40px rgba(26, 47, 18, 0.10);
  --vnh-radius: 18px;
  --vnh-font: var(--e-global-typography-text-font-family, "Trebuchet MS", sans-serif);
  --vnh-display: var(--e-global-typography-primary-font-family, Georgia, serif);

  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  color: var(--vnh-ink);
  font-family: var(--vnh-font);
  isolation: isolate;
}

.vnh-news *,
.vnh-news *::before,
.vnh-news *::after {
  box-sizing: border-box;
}

.vnh-news [hidden] {
  display: none !important;
}

.vnh-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 30px;
  align-items: end;
  margin-bottom: 30px;
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid rgba(23, 87, 9, 0.13);
  border-radius: calc(var(--vnh-radius) + 4px);
  background:
    radial-gradient(circle at 92% 12%, rgba(168, 189, 54, 0.24) 0 7%, transparent 7.5%),
    repeating-linear-gradient(118deg, transparent 0 24px, rgba(23, 87, 9, 0.035) 24px 25px),
    var(--vnh-paper);
}

.vnh-header::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -76px;
  width: 220px;
  aspect-ratio: 1;
  border: 42px solid rgba(23, 87, 9, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.vnh-header-copy {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.vnh-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--vnh-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.vnh-kicker::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--vnh-lime);
}

.vnh-title {
  margin: 0;
  max-width: 820px;
  color: var(--vnh-ink);
  font-family: var(--vnh-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.vnh-intro {
  max-width: 800px;
  margin: 18px 0 0;
  color: #4f584b;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
}

.vnh-live-note {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(23, 87, 9, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--vnh-green-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.vnh-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vnh-lime);
  box-shadow: 0 0 0 5px rgba(168, 189, 54, 0.16);
}

.vnh-tabs-frame {
  position: relative;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--vnh-line);
}

.vnh-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 2px 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.vnh-tabs::-webkit-scrollbar {
  display: none;
}

.vnh-tab {
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #4f574c;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.vnh-tab:hover {
  border-color: rgba(23, 87, 9, 0.16);
  background: var(--vnh-green-soft);
  color: var(--vnh-green-dark);
}

.vnh-tab.is-active,
.vnh-tab[aria-selected="true"] {
  border-color: var(--vnh-green);
  background: var(--vnh-green);
  color: #fff;
  box-shadow: 0 7px 18px rgba(23, 87, 9, 0.20);
}

/* Elementor/theme button rules can style the focused tab after keyboard or
   pointer activation. Keep the selected country visibly selected immediately. */
.vnh-news .vnh-tab.is-active,
.vnh-news .vnh-tab[aria-selected="true"],
.vnh-news .vnh-tab.is-active:focus,
.vnh-news .vnh-tab[aria-selected="true"]:focus {
  border-color: var(--vnh-green) !important;
  background: var(--vnh-green) !important;
  color: #fff !important;
}

.vnh-tab:focus-visible,
.vnh-more:focus-visible,
.vnh-read-more:focus-visible,
.vnh-card a:focus-visible {
  outline: 3px solid rgba(168, 189, 54, 0.7);
  outline-offset: 3px;
}

.vnh-news .vnh-card a:focus-visible {
  outline-offset: -3px;
}

.vnh-tab-count:empty {
  display: none;
}

.vnh-tab-count:not(:empty) {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding-inline: 6px;
  border-radius: 99px;
  background: rgba(23, 87, 9, 0.09);
  color: currentColor;
  font-size: 10px;
  line-height: 1;
}

.vnh-header-tools {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.vnh-language-picker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--vnh-green-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.vnh-language-picker select {
  min-height: 36px;
  padding: 7px 30px 7px 11px;
  border: 1px solid rgba(23, 87, 9, 0.25);
  border-radius: 999px;
  background: #fff;
  color: var(--vnh-ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.vnh-language-picker select:focus-visible {
  outline: 3px solid rgba(168, 189, 54, 0.7);
  outline-offset: 2px;
}

.vnh-news.is-translating .vnh-language-picker select {
  opacity: 0.65;
}

.vnh-tab.is-active .vnh-tab-count,
.vnh-tab[aria-selected="true"] .vnh-tab-count {
  background: rgba(255, 255, 255, 0.18);
}

.vnh-panel {
  animation: vnh-panel-in 320ms ease both;
}

@keyframes vnh-panel-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Standalone feed container: no frontend classes from another RSS plugin. */
.vnh-news .vnh-feed-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: var(--vnh-ink);
  font-family: var(--vnh-font);
}

.vnh-news .vnh-grid {
  display: grid;
  grid-template-columns: repeat(var(--vnh-cols-desktop, 4), minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

.vnh-news .vnh-grid > * {
  min-width: 0;
  height: 100%;
}

.vnh-news .vnh-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--vnh-line);
  border-radius: var(--vnh-radius);
  background: var(--vnh-card);
  box-shadow: 0 4px 14px rgba(26, 47, 18, 0.045);
  transform: translateZ(0);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.vnh-news .vnh-card:hover,
.vnh-news .vnh-card:focus-within {
  border-color: rgba(23, 87, 9, 0.38);
  box-shadow: var(--vnh-shadow);
  transform: translateY(-5px);
}

.vnh-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(23, 87, 9, 0.10), rgba(168, 189, 54, 0.18)),
    #e9eee5;
  text-decoration: none !important;
}

.vnh-news .vnh-media img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
  filter: saturate(0.92) contrast(1.02);
  transition: filter 500ms ease, transform 650ms cubic-bezier(0.2, 0.65, 0.25, 1);
}

.vnh-card:hover .vnh-media img,
.vnh-card:focus-within .vnh-media img {
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.045);
}

.vnh-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(to top, rgba(8, 31, 3, 0.44), transparent);
  pointer-events: none;
}

.vnh-region-tag {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(15, 63, 5, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(7px);
}

.vnh-news .vnh-card-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 20px 20px 18px;
}

.vnh-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  margin-bottom: 11px;
  color: var(--vnh-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.vnh-source {
  min-width: 0;
  overflow: hidden;
  color: var(--vnh-green) !important;
  font-weight: 800;
  text-overflow: ellipsis;
  text-decoration: none !important;
  white-space: nowrap;
}

a.vnh-source:hover {
  text-decoration: underline !important;
}

.vnh-meta-dot {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--vnh-lime);
}

.vnh-news .vnh-card-title {
  display: -webkit-box;
  min-height: calc(1.32em * 3);
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--vnh-ink) !important;
  font-family: var(--vnh-display);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.vnh-news .vnh-card-title a {
  color: inherit !important;
  text-decoration: none !important;
}

.vnh-news .vnh-card-title a:hover {
  color: var(--vnh-green) !important;
}

.vnh-news .vnh-card-excerpt {
  display: -webkit-box;
  min-height: calc(1.55em * 3);
  margin: 0 0 18px;
  overflow: hidden;
  color: #50584d !important;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.vnh-read-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--vnh-lime);
  color: var(--vnh-green-dark) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: gap 180ms ease, color 180ms ease;
}

.vnh-read-more:hover {
  gap: 12px;
  color: var(--vnh-green) !important;
}

.vnh-more-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 32px;
}

.vnh-more {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  margin: 0;
  padding: 13px 22px;
  border: 1px solid var(--vnh-green);
  border-radius: 999px;
  background: #fff;
  color: var(--vnh-green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.vnh-more:hover {
  background: var(--vnh-green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 87, 9, 0.20);
  transform: translateY(-2px);
}

.vnh-more-arrow {
  font-size: 17px;
  line-height: 0.7;
}

.vnh-more-status {
  flex: 0 0 100%;
  margin: 0;
  color: var(--vnh-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.vnh-card.is-revealed {
  animation: vnh-card-reveal 380ms ease both;
}

@keyframes vnh-card-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.vnh-empty,
.vnh-dependency-error {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 24px;
  border: 1px dashed rgba(23, 87, 9, 0.28);
  border-radius: var(--vnh-radius);
  background: var(--vnh-paper);
  color: var(--vnh-ink);
}

.vnh-empty-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--vnh-green-soft);
  color: var(--vnh-green);
  font-size: 22px;
}

.vnh-empty strong {
  display: block;
  margin-bottom: 4px;
}

.vnh-empty p {
  margin: 0;
  color: var(--vnh-muted);
  font-size: 14px;
}

.vnh-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   Presentation presets selected in Tools → Vinomatos Notícias.
   The Vinomatos preset is the component's base design above.
   -------------------------------------------------------------------------- */

.vnh-theme--modern {
  --vnh-green: #177447;
  --vnh-green-dark: #0b4930;
  --vnh-green-soft: #e3f4eb;
  --vnh-lime: #74d99e;
  --vnh-ink: #10231a;
  --vnh-line: #d9e8df;
  --vnh-radius: 12px;
  --vnh-display: var(--vnh-font);
  --vnh-shadow: 0 20px 45px rgba(10, 64, 40, 0.14);
}

.vnh-theme--modern .vnh-header {
  border: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(116, 217, 158, 0.32) 0 8%, transparent 8.5%),
    linear-gradient(125deg, #092f21, #12613e 65%, #177447);
  box-shadow: 0 18px 48px rgba(9, 47, 33, 0.17);
}

.vnh-theme--modern .vnh-header::after {
  border-color: rgba(255, 255, 255, 0.08);
}

.vnh-theme--modern .vnh-title,
.vnh-theme--modern .vnh-intro,
.vnh-theme--modern .vnh-kicker {
  color: #fff;
}

.vnh-theme--modern .vnh-intro {
  opacity: 0.82;
}

.vnh-theme--modern .vnh-live-note {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.vnh-theme--modern .vnh-card {
  border: 0;
  box-shadow: 0 8px 28px rgba(10, 64, 40, 0.09);
}

.vnh-theme--modern .vnh-card-title {
  font-weight: 800;
}

.vnh-theme--classic {
  --vnh-green: #52613b;
  --vnh-green-dark: #303a25;
  --vnh-green-soft: #ecebdd;
  --vnh-lime: #a99556;
  --vnh-ink: #292b24;
  --vnh-muted: #737064;
  --vnh-paper: #f4f0e6;
  --vnh-line: #d8d0bc;
  --vnh-radius: 2px;
  --vnh-shadow: 0 12px 30px rgba(60, 54, 38, 0.10);
  --vnh-display: Georgia, "Times New Roman", serif;
}

.vnh-theme--classic .vnh-header {
  border-width: 1px 0;
  border-color: var(--vnh-line);
  border-radius: 0;
  background: var(--vnh-paper);
}

.vnh-theme--classic .vnh-header::after {
  display: none;
}

.vnh-theme--classic .vnh-kicker {
  letter-spacing: 0.2em;
}

.vnh-theme--classic .vnh-tab,
.vnh-theme--classic .vnh-more,
.vnh-theme--classic .vnh-region-tag {
  border-radius: 2px;
}

.vnh-theme--classic .vnh-card {
  box-shadow: none;
}

.vnh-theme--classic .vnh-card:hover,
.vnh-theme--classic .vnh-card:focus-within {
  box-shadow: var(--vnh-shadow);
}

.vnh-theme--classic .vnh-media img {
  filter: saturate(0.72) sepia(0.08) contrast(1.03);
}

.vnh-theme--standard {
  --vnh-green: #26733d;
  --vnh-green-dark: #1b522d;
  --vnh-green-soft: #edf5ef;
  --vnh-lime: #6da878;
  --vnh-ink: #202420;
  --vnh-muted: #697069;
  --vnh-paper: #fff;
  --vnh-line: #e1e5e1;
  --vnh-radius: 8px;
  --vnh-shadow: 0 10px 24px rgba(22, 35, 25, 0.09);
  --vnh-display: var(--vnh-font);
}

.vnh-theme--standard .vnh-header {
  padding: 24px 0;
  overflow: visible;
  border-width: 0 0 1px;
  border-radius: 0;
  background: #fff;
}

.vnh-theme--standard .vnh-header::after,
.vnh-theme--standard .vnh-kicker::before {
  display: none;
}

.vnh-theme--standard .vnh-title {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.vnh-theme--standard .vnh-card {
  box-shadow: none;
}

.vnh-theme--standard .vnh-card:hover,
.vnh-theme--standard .vnh-card:focus-within {
  box-shadow: var(--vnh-shadow);
  transform: translateY(-2px);
}

.vnh-theme--standard .vnh-region-tag {
  border: 0;
  background: rgba(32, 36, 32, 0.82);
}

@media (max-width: 1024px) {
  .vnh-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .vnh-live-note {
    justify-self: start;
  }

  .vnh-header-tools {
    align-items: flex-start;
  }

  .vnh-news .vnh-grid {
    grid-template-columns: repeat(var(--vnh-cols-tablet, 2), minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .vnh-header {
    gap: 20px;
    padding: 24px 20px;
  }

  .vnh-title {
    font-size: clamp(32px, 11vw, 46px);
  }

  .vnh-live-note {
    max-width: 100%;
    white-space: normal;
  }

  .vnh-tabs-frame {
    margin-inline: -4px;
  }

  .vnh-tabs {
    padding-inline: 4px;
  }

  .vnh-tab {
    min-height: 42px;
    padding: 9px 14px;
    font-size: 13px;
  }

  .vnh-news .vnh-grid {
    grid-template-columns: repeat(var(--vnh-cols-mobile, 1), minmax(0, 1fr));
    gap: 18px;
  }

  .vnh-news .vnh-card-title {
    min-height: auto;
    font-size: 21px;
  }

  .vnh-news .vnh-card-excerpt {
    min-height: auto;
  }

  .vnh-more {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vnh-news *,
  .vnh-news *::before,
  .vnh-news *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .vnh-tabs-frame,
  .vnh-more,
  .vnh-live-note {
    display: none !important;
  }

  .vnh-panel[hidden],
  .vnh-card[hidden] {
    display: block !important;
  }

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