/* Global Styles */
:root {
  --primary-color: #dc3545;
  --secondary-color: #6c757d;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

/* General Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

/* Navbar */
.navbar {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  max-height: 40px;
  width: auto;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  transform: translateY(-2px);
}

.social-icons a {
  display: inline-block;
  transition: transform 0.25s ease, color 0.25s ease;
  transform-origin: center;
}

.social-icons a:hover {
  transform: scale(1.7);
}
/* Topo (navbar vermelha): mantêm-se brancos. Rodapé (fundo claro): ficam vermelhos. */
.social-icons a.text-white:hover { color: #fff !important; }
.social-icons a.text-dark:hover { color: var(--primary-color) !important; }

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
}

.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
  font-weight: 600;
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  color: white;
  padding: 6rem 0;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
}

.play-button {
  transition: all 0.3s ease;
}

.play-button:hover {
  transform: scale(1.1);
  color: var(--primary-color) !important;
}

/* Breaking News */
.breaking-news {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.breaking-news-label {
  border-radius: 4px;
  white-space: nowrap;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
}

.ticker {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  padding: 0 2rem;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Section Headers */
.section-header {
  position: relative;
  margin-bottom: 2rem;
}

.section-divider {
  height: 4px;
  width: 60px;
  background-color: var(--primary-color);
  margin-top: 0.5rem;
}

/* Featured News */
.main-news-item {
  overflow: hidden;
  border-radius: 0.5rem;
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.news-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.news-title-sm {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}

.secondary-news-item {
  transition: all 0.3s ease;
}

.secondary-news-item:hover {
  transform: translateY(-5px);
}

/* Cards */
.card {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
  height: 180px;
  object-fit: cover;
}

/* Schedule Table */
.schedule-table th,
.schedule-table td {
  padding: 1rem;
}

.time-column {
  width: 100px;
}

.schedule-table th {
  background-color: #f8f9fa;
}

.schedule-table tr:hover {
  background-color: #f1f1f1;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Footer */
footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

footer h5 {
  font-weight: 600;
  margin-bottom: 1.25rem;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Live TV Page */
.channel-card {
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.channel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 2rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* About Page */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-member img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
}

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background-color: #e9ecef;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
}

.timeline-badge {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-left: -25px;
  border-radius: 50%;
  text-align: center;
  font-size: 1.4em;
  line-height: 50px;
  background-color: var(--primary-color);
  color: white;
  z-index: 100;
}

.timeline-panel {
  position: relative;
  float: left;
  width: 46%;
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(even) .timeline-panel {
  float: right;
}

.timeline-item:nth-child(odd) .timeline-panel::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -10px;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  background-color: #fff;
  box-shadow: 1px -1px 1px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(even) .timeline-panel::after {
  content: "";
  position: absolute;
  top: 20px;
  left: -10px;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  background-color: #fff;
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* Contact Page */
.map-container {
  height: 400px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info-item {
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
}

/* Contact Form */
.contact-form label {
  font-weight: 500;
}

/* Programs Page */
.program-filter-btn {
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  margin: 0 0.25rem 0.5rem;
  transition: all 0.3s ease;
}

.program-filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.program-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.program-card img {
  height: 200px;
  object-fit: cover;
}

.program-meta {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.program-meta i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* News Page */
.news-filter {
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.news-card {
  transition: transform 0.3s ease;
  height: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  height: 180px;
  object-fit: cover;
}

.news-categories {
  margin-bottom: 2rem;
}

.category-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem 0.5rem 0;
  border-radius: 50px;
  background-color: #f8f9fa;
  color: #333;
  transition: all 0.3s ease;
}

.category-badge:hover,
.category-badge.active {
  background-color: var(--primary-color);
  color: white;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .timeline:before {
    left: 60px;
  }

  .timeline-badge {
    left: 60px;
  }

  .timeline-panel {
    width: calc(100% - 90px);
    float: right;
  }

  .timeline-item:nth-child(odd) .timeline-panel::after {
    left: -10px;
    right: auto;
    box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  .program-card img,
  .news-card img {
    height: 160px;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 3rem 0;
  }

  .section-header {
    text-align: center;
  }

  .section-divider {
    margin-left: auto;
    margin-right: auto;
  }

  .news-overlay {
    padding: 1rem;
  }

  .news-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .breaking-news-label {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  .ticker-item {
    padding: 0 1rem;
  }

  .card-img-top {
    height: 160px;
  }
}

/* Mobile Optimization */
@media (max-width: 767.98px) {
  /* Adjust navbar for mobile */
  .navbar-collapse {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
  }

  /* Ensure menu items are properly spaced on mobile */
  .navbar-nav .nav-item {
    margin-bottom: 0.5rem;
  }

  /* Adjust social icons spacing on mobile */
  .social-icons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
  }

  /* Make language switcher centered on mobile */
  .navbar-collapse .me-3 {
    margin: 1rem 0;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  /* Improve table responsiveness */
  .schedule-table th,
  .schedule-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  /* Adjust section padding for mobile */
  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Improve card spacing on mobile */
  .card {
    margin-bottom: 1.5rem;
  }

  /* Adjust footer spacing on mobile */
  footer .col-lg-2,
  footer .col-lg-3,
  footer .col-lg-4 {
    margin-bottom: 1.5rem;
  }
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Improve form elements on mobile */
@media (max-width: 575.98px) {
  .form-control,
  .btn {
    font-size: 0.9rem;
  }

  .input-group {
    width: 100%;
  }
}

/* Live TV Page */
.program-info {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.next-programs {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.next-program-item {
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 0;
}

.next-program-item:last-child {
  border-bottom: none;
}

.program-time {
  font-weight: bold;
  color: #0d6efd;
}

/* ===== Full-width Hero Banner (home) ===== */
.hero-banner {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--dark-color);
  color: #fff;
  overflow: hidden;
}
.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.78) 0%, rgba(220, 53, 69, 0.55) 100%);
  z-index: 1;
}
.hero-banner-content {
  position: relative;
  z-index: 2;
  padding: 4rem 1rem;
  width: 100%;
}
.hero-banner h1 {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.hero-banner .lead {
  max-width: 760px;
}
@media (max-width: 768px) {
  .hero-banner { min-height: 58vh; }
  .hero-banner h1 { font-size: 2.4rem; }
}

/* ===== Partners marquee ===== */
.partners-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.partners-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: partners-scroll 35s linear infinite;
}
.partners-marquee:hover .partners-track {
  animation-play-state: paused;
}
.partners-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.partners-logo {
  height: 70px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: all 0.3s ease;
}
.partners-item a:hover .partners-logo,
.partners-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Partners page grid */
.partner-grid-item {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.partner-grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.partner-grid-item img {
  max-height: 90px;
  width: auto;
  object-fit: contain;
}

/* ===== Programas: flip cards ===== */
.program-card .flip-card {
  perspective: 1400px;
  height: 420px;
  outline: none;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  background: #fff;
}
.flip-card-front {
  display: flex;
  flex-direction: column;
}
.flip-card-img {
  width: 100%;
  height: 68%;
  object-fit: cover;
  display: block;
}
.flip-card-front-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
}
.flip-card-hint {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.flip-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #2b2f33 0%, #1a1d20 100%);
  color: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.flip-card-back h4 {
  color: #fff;
  font-weight: 700;
}
.flip-card-back .flip-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
  overflow: auto;
}
.flip-card-back .program-meta {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.35rem;
}
.flip-card-back .program-meta i {
  color: var(--primary-color);
}
.flip-card-back .btn {
  align-self: flex-start;
}
/* Touch / no-hover devices: tap-to-flip via .is-flipped (focus-within already covers tap) */
@media (hover: none) {
  .flip-card-hint { background: rgba(220, 53, 69, 0.95); }
}

/* ===== Wordmark logo (wide) ===== */
.navbar-brand { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.navbar-brand .navbar-logo {
  height: 38px;
  width: auto;
  max-height: 38px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
}
.footer-logo {
  height: 48px;
  width: auto;
}
@media (max-width: 575.98px) {
  .navbar-brand .navbar-logo { height: 32px; max-height: 32px; }
}

/* ===== Page hero header (background image + overlay) ===== */
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--dark-color);
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  padding: 5.5rem 0;
}
.page-hero h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.page-hero .lead {
  color: rgba(255, 255, 255, 0.92);
}
@media (max-width: 768px) {
  .page-hero { padding: 3.5rem 0; }
}

/* ===== Schedule: programme logo next to name ===== */
.schedule-prog-logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.schedule-prog-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b2f33, #1a1d20);
  color: #fff;
  font-size: 0.95rem;
}
.schedule-table .nav-link { white-space: nowrap; }

/* ===== Home promo popup (Destaque) ===== */
.mbc-promo-modal .modal-content {
  border-radius: 0.75rem;
}
.mbc-promo-media {
  min-height: 320px;
  background-size: cover;
  background-position: center;
}
.mbc-promo-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mbc-promo-text {
  color: #555;
  line-height: 1.6;
}
.mbc-promo-close {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  z-index: 5;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 0.55rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
@media (max-width: 767.98px) {
  .mbc-promo-media { min-height: 200px; }
}

/* ===== MBC banners / campaigns ===== */
.mbc-banner { padding: 1.5rem 0; }
.mbc-banner-wrap { position: relative; }
.mbc-banner-link { display: block; line-height: 0; }
.mbc-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mbc-banner-link:hover .mbc-banner-img {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}
.mbc-banner-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 2;
}
.mbc-banner-fallback {
  text-align: center;
  padding: 2rem;
  border: 1px dashed #ced4da;
  border-radius: 0.5rem;
  background: #f8f9fa;
}
/* Horizontal slots below programs / partners — creative shown at natural size, centred */
.mbc-banner-after-programas,
.mbc-banner-home-footer,
.mbc-banner-parceiros { padding: 1.75rem 0; text-align: center; }
.mbc-banner-after-programas .mbc-banner-wrap,
.mbc-banner-home-footer .mbc-banner-wrap,
.mbc-banner-parceiros .mbc-banner-wrap { display: inline-block; }
.mbc-banner-after-programas .mbc-banner-img,
.mbc-banner-home-footer .mbc-banner-img,
.mbc-banner-parceiros .mbc-banner-img { width: auto; max-width: 100%; margin: 0 auto; }

/* Featured news thumbs (home) */
.news-thumb { width: 100%; height: 84px; object-fit: cover; }
.main-news-item > img { max-height: 420px; object-fit: cover; }

/* Schedule emission marks (Directo / Repetição / Inédito) */
.sched-mark {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.sched-live { background: #dc3545; color: #fff; }
.sched-new { background: #198754; color: #fff; }
.sched-rep { background: #eceef1; color: #6c757d; }

/* Where-to-watch platform icons */
.watch-icon-sm { width: 42px; height: 42px; font-size: 1.05rem; flex-shrink: 0; }
.watch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fdeaec;
  color: var(--primary-color);
  font-size: 1.6rem;
}

/* Hero-side banner (absolute inside .hero-banner, right, centred) — 300×300 creative */
.mbc-banner-hero-side {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 300px;
  max-width: 34%;
  padding: 0;
}
.mbc-banner-hero-side .container { padding: 0; max-width: 100%; }
.mbc-banner-hero-side .mbc-banner-img { border-radius: 0.6rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
@media (max-width: 991.98px) {
  .mbc-banner-hero-side { display: none; }
}

/* Info-widget ad block (3rd column: Câmbio · Tempo · Publicidade) */
.info-widget-ad .mbc-widget-ad { flex: 1; display: flex; align-items: center; justify-content: center; margin-top: 0.75rem; }
.mbc-widget-ad-link { display: inline-flex; line-height: 0; max-width: 100%; }
.mbc-widget-ad-img { max-width: 100%; height: auto; border-radius: 0.5rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease; }
.mbc-widget-ad-link:hover .mbc-widget-ad-img { transform: translateY(-3px); }

/* Top leaderboard (dismissible, above everything) */
.mbc-leaderboard {
  background: #11151a;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--primary-color);
}
.mbc-leaderboard-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 44px;
}
.mbc-leaderboard-tag {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.mbc-leaderboard-link { display: inline-flex; line-height: 0; }
.mbc-leaderboard-img { max-height: 250px; width: auto; max-width: 100%; border-radius: 4px; }
.mbc-leaderboard-title { color: #fff; font-weight: 600; line-height: 1.2; }
.mbc-leaderboard-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.mbc-leaderboard-close:hover { color: #fff; }

/* ===== Revista Banca & Seguros ===== */
.revista-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}
.revista-latest { overflow: hidden; }
.revista-latest-cover {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: contain;
  object-position: center;
  background: #0b1b30;
  padding: 6px;
}
.revista-prev-list { display: flex; flex-direction: column; gap: 0.75rem; }
.revista-prev-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 0.6rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.revista-prev-item:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }
.revista-prev-cover {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.35rem;
  flex-shrink: 0;
}
.revista-prev-info { flex: 1 1 auto; min-width: 0; }
.revista-prev-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .revista-prev-item { flex-wrap: wrap; }
  .revista-prev-actions { width: 100%; }
  .revista-prev-actions .btn { flex: 1 1 0; }
}

/* ===== Info widgets (câmbio + tempo) ===== */
.info-widget-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.info-widget-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.info-rate-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: #8a9099; border-top: 0; }
.weather-temp { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--dark-color); }
.weather-temp span { font-size: 1.25rem; color: #8a9099; }
.weather-big { font-size: 3rem; }
.weather-forecast { display: flex; justify-content: space-between; text-align: center; border-top: 1px solid #eceef1; padding-top: 0.75rem; }
.weather-day { flex: 1 1 0; }

/* ===== Newsletter social CTA ===== */
.newsletter-social {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.newsletter-social-lead { display: block; font-weight: 600; margin-bottom: 0.9rem; }
.newsletter-social-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.newsletter-social-yt,
.newsletter-social-fb { color: #fff; font-weight: 600; border: 0; }
.newsletter-social-yt { background: #ff0000; }
.newsletter-social-yt:hover { background: #d90000; color: #fff; }
.newsletter-social-fb { background: #1877f2; }
.newsletter-social-fb:hover { background: #0f5fd0; color: #fff; }

/* ===== MBC chatbot / assistant ===== */
.mbc-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1050; font-size: 14px; }
.mbc-chat-launcher {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--primary-color), #a01829);
  color: #fff; font-size: 24px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.mbc-chat-launcher:hover { transform: scale(1.07); }
.mbc-chat.open .mbc-chat-launcher { display: none; }
.mbc-chat-panel {
  position: absolute; right: 0; bottom: 0;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  display: flex; flex-direction: column;
}
.mbc-chat-head {
  background: linear-gradient(135deg, #2b2f33, var(--primary-color));
  color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.mbc-chat-title { display: block; font-size: 15px; line-height: 1.2; }
.mbc-chat-sub { font-size: 12px; opacity: 0.85; }
.mbc-chat-close { background: 0; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.mbc-chat-body { flex: 1; overflow-y: auto; padding: 16px; background: #f6f7f9; display: flex; flex-direction: column; gap: 10px; }
.mbc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; line-height: 1.45; word-wrap: break-word; }
.mbc-msg-bot { background: #fff; border: 1px solid #eceef1; border-bottom-left-radius: 4px; align-self: flex-start; }
.mbc-msg-user { background: var(--primary-color); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.mbc-chat-cta { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; color: var(--primary-color); }
.mbc-chat-wa { display: inline-block; margin-top: 8px; background: #25d366; color: #fff; padding: 8px 15px; border-radius: 22px; font-weight: 600; text-decoration: none; }
.mbc-chat-wa:hover { background: #1da851; color: #fff; }
.mbc-chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid #eef0f2; background: #fff; }
.mbc-chip {
  border: 1px solid var(--primary-color); color: var(--primary-color); background: #fff;
  border-radius: 20px; padding: 6px 12px; font-size: 13px; cursor: pointer; transition: all 0.15s ease;
}
.mbc-chip:hover { background: var(--primary-color); color: #fff; }
.mbc-chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #eef0f2; background: #fff; }
.mbc-chat-input input { flex: 1; border: 1px solid #d9dde1; border-radius: 20px; padding: 9px 14px; outline: none; }
.mbc-chat-input input:focus { border-color: var(--primary-color); }
.mbc-chat-input button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--primary-color); color: #fff; cursor: pointer; flex-shrink: 0; }
.mbc-lead p { margin: 4px 0 0; font-size: 13px; color: #6c757d; }
.mbc-lead-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mbc-lead-form input, .mbc-lead-form textarea { border: 1px solid #d9dde1; border-radius: 8px; padding: 8px 10px; font-size: 13px; width: 100%; }
.mbc-lead-form button { background: var(--primary-color); color: #fff; border: 0; border-radius: 8px; padding: 9px; font-weight: 600; cursor: pointer; }
.mbc-typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #bbb; margin: 0 2px; animation: mbcblink 1s infinite; }
.mbc-typing span:nth-child(2) { animation-delay: 0.2s; }
.mbc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mbcblink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
@media (max-width: 420px) {
  .mbc-chat { right: 14px; bottom: 14px; }
  .mbc-chat-panel { height: calc(100vh - 32px); }
}

/* ===== Equipa / Liderança (página Sobre) ===== */
.team-card { overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.team-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.12) !important; }
.team-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top center; display: block; }

/* ===== Agora no Ar / A Seguir ===== */
.onair-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #dc3545; margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(220,53,69,.7); animation: onairPulse 1.8s infinite;
}
@keyframes onairPulse {
  0% { box-shadow: 0 0 0 0 rgba(220,53,69,.7); }
  70% { box-shadow: 0 0 0 8px rgba(220,53,69,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); }
}
.onair-card { border-left: 4px solid var(--primary-color) !important; }
.onair-bar { height: 6px; border-radius: 4px; background: #eceef1; overflow: hidden; margin: .35rem 0 .3rem; }
.onair-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-color), #ff6b7a); transition: width .6s ease; }

/* Faixa "Em directo agora" (home) */
.mbc-live-strip { background: #11151a; color: #fff; padding: .6rem 0; }
.live-strip-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.live-strip-tag { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.live-strip-now { color: #fff; font-weight: 700; text-decoration: none; }
.live-strip-now:hover { color: #ffd7dc; }
.live-strip-time { color: rgba(255,255,255,.6); font-size: .85rem; white-space: nowrap; }
.live-strip-next { color: rgba(255,255,255,.75); font-size: .85rem; margin-left: auto; }
.live-strip-next strong { color: #fff; font-weight: 600; }
.live-strip-btn {
  background: var(--primary-color); color: #fff; text-decoration: none;
  padding: .3rem .9rem; border-radius: 20px; font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.live-strip-btn:hover { background: #b02a37; color: #fff; }
@media (max-width: 767.98px) {
  .live-strip-next { margin-left: 0; width: 100%; }
}

/* Fonte/actualização dos widgets de dados */
.info-widget-src { font-size: .72rem; color: #9aa3ad; padding-top: .6rem; }
.info-widget-src a { color: #9aa3ad; text-decoration: underline; }
.info-widget-src a:hover { color: var(--primary-color); }

/* =========================================================================
   Cores das categorias — uma cor FIXA por categoria, em todo o site.
   As chaves são geradas por mbc_cat_key() em functions.php.
   ====================================================================== */
.cat-badge {
  color: #fff !important;
  background-color: #6b7280;
  font-weight: 600;
  letter-spacing: .01em;
}
.cat-badge a { color: #fff; text-decoration: none; }

/* Notícias */
.cat-politica        { background-color: #b3121b !important; }
.cat-economia        { background-color: #0b5394 !important; }
.cat-banca-seguros   { background-color: #0f766e !important; }
.cat-direito-justica { background-color: #4338ca !important; }
.cat-desporto        { background-color: #15803d !important; }
.cat-cultura         { background-color: #c2410c !important; }
.cat-saude           { background-color: #be185d !important; }
.cat-tecnologia      { background-color: #0e7490 !important; }
.cat-educacao        { background-color: #7c5314 !important; }
.cat-ambiente        { background-color: #4d7c0f !important; }
.cat-sociedade       { background-color: #475569 !important; }
.cat-entretenimento  { background-color: #a21caf !important; }
.cat-noticias        { background-color: #1f2937 !important; }

/* Exclusivas de programas */
.cat-informacao      { background-color: #1f2937 !important; }
.cat-opiniao         { background-color: #6d28d9 !important; }
.cat-especialidade   { background-color: #a16207 !important; }
.cat-documentario    { background-color: #334155 !important; }
.cat-reportagem      { background-color: #9a3412 !important; }
.cat-geral           { background-color: #6b7280 !important; }

/* Filtros da página de notícias: ponto com a cor da categoria */
.category-badge .cat-dot {
  display: inline-block; width: .5rem; height: .5rem; border-radius: 50%;
  margin-right: .4rem; vertical-align: middle;
}

/* Carrossel das Notícias em Destaque (home) */
.main-news-carousel .carousel-inner { border-radius: .5rem; }
.main-news-carousel .main-news-item > img {
  width: 100%; height: 420px; object-fit: cover; max-height: none;
}
.main-news-carousel .news-overlay { z-index: 2; pointer-events: none; }
.main-news-carousel .news-overlay a { pointer-events: auto; }
.main-news-carousel .news-overlay-link {
  position: absolute; inset: 0; z-index: 1; display: block;
}
.main-news-carousel .carousel-indicators { z-index: 3; margin-bottom: .75rem; }
.main-news-carousel .carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%; border: 0; opacity: .55;
}
.main-news-carousel .carousel-indicators .active { opacity: 1; background-color: var(--primary-color); }
.main-news-carousel .carousel-control-prev,
.main-news-carousel .carousel-control-next { z-index: 3; width: 10%; opacity: 0; transition: opacity .2s; }
.main-news-carousel:hover .carousel-control-prev,
.main-news-carousel:hover .carousel-control-next { opacity: .85; }
.main-news-carousel .carousel-control-prev-icon,
.main-news-carousel .carousel-control-next-icon {
  background-color: rgba(0,0,0,.45); border-radius: 50%; padding: 1.1rem; background-size: 45%;
}
@media (max-width: 991.98px) {
  .main-news-carousel .main-news-item > img { height: 300px; }
  .main-news-carousel .carousel-control-prev,
  .main-news-carousel .carousel-control-next { opacity: .8; }
}

/* Leitor da transmissão ao vivo */
.mbc-player { background: #000; border-radius: .5rem .5rem 0 0; overflow: hidden; }
.mbc-player iframe { border: 0; width: 100%; height: 100%; }
.mbc-player-off { min-height: 420px; background: #14181d; border-radius: .5rem .5rem 0 0; }
.mbc-player-note {
  font-size: .82rem; color: #6c757d; background: #f8f9fa;
  padding: .55rem .9rem; border-top: 1px solid #e9ecef;
}

/* Lista "Como Assistir" — linha inteira clicável */
.watch-list .watch-item { color: inherit; text-decoration: none; transition: background-color .15s; }
.watch-list .watch-item:hover { background-color: #fdf2f3; }
.watch-list .watch-item:hover .watch-icon { background-color: var(--primary-color); color: #fff; }
.watch-list .watch-item:hover h6 { color: var(--primary-color); }
.watch-item-go { font-size: .75rem; color: #adb5bd; }
.watch-list .watch-item:hover .watch-item-go { color: var(--primary-color); }

/* Página de uma edição da Revista Banca & Seguros */
.revista-single-hero { background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%); }
.revista-single-cover {
  max-width: 320px; width: 100%; border-radius: .5rem;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.revista-single-mag { font-size: .95rem; color: #6c757d; margin-bottom: 0; }
.revista-single-preco { font-size: 1.9rem; font-weight: 800; color: var(--primary-color); }
.revista-preco { font-weight: 700; color: var(--primary-color); }
.revista-destaques { padding-left: 1.1rem; }
.revista-destaques li { margin-bottom: .5rem; }
.revista-outra-card { display: block; text-decoration: none; color: inherit; }
.revista-outra-card img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: .4rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); transition: transform .2s, box-shadow .2s;
}
.revista-outra-card:hover img { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.2); }
.revista-outra-info { padding-top: .6rem; }
.revista-outra-card:hover h6 { color: var(--primary-color); }

/* Formulário de subscrição (plugin Newsletter, com a nossa apresentação).
   Selectores propositadamente específicos: o CSS do plugin carrega depois
   do tema e ganharia com igual especificidade. */
.mbc-newsletter-form form.tnp-subscription {
  max-width: 760px; margin: 0 auto; padding: 0;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mbc-newsletter-form form.tnp-subscription div.tnp-field { margin: 0; padding: 0; }
.mbc-newsletter-form form.tnp-subscription div.tnp-field-button {
  grid-column: 1 / -1; text-align: center !important; margin-top: .25rem;
}
.mbc-newsletter-form .tnp-subscription input[type="text"],
.mbc-newsletter-form .tnp-subscription input[type="email"] {
  width: 100%; margin: 0; padding: .75rem 1rem; font-size: 1rem; line-height: 1.5;
  color: #212529; background-color: #fff;
  border: 1px solid #ced4da; border-radius: .375rem; box-shadow: none;
}
.mbc-newsletter-form .tnp-subscription input[type="text"]:focus,
.mbc-newsletter-form .tnp-subscription input[type="email"]:focus {
  outline: 0; border-color: var(--primary-color);
  box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15);
}
.mbc-newsletter-form .tnp-subscription input.tnp-submit {
  width: auto; min-width: 220px; margin: 0;
  padding: .75rem 2.25rem; font-size: 1.05rem; font-weight: 600;
  color: #fff; background-color: var(--primary-color);
  border: 0; border-radius: .375rem; cursor: pointer;
  transition: background-color .15s ease-in-out;
}
.mbc-newsletter-form .tnp-subscription input.tnp-submit:hover { background-color: #b02a37; }
@media (max-width: 767.98px) {
  .mbc-newsletter-form form.tnp-subscription { grid-template-columns: 1fr; }
  .mbc-newsletter-form .tnp-subscription input.tnp-submit { width: 100%; min-width: 0; }
}

/* Ficha do programa: equipa e últimas edições */
.programa-jornalista-foto {
  width: 160px; height: 160px; object-fit: cover; border-radius: 50%;
  margin: 0 auto; display: block; border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  transition: transform .2s, box-shadow .2s;
}
.programa-jornalista:hover .programa-jornalista-foto {
  transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.programa-jornalista-sem-foto {
  background: #e9ecef; color: #adb5bd; font-size: 3rem;
  display: flex; align-items: center; justify-content: center;
}
.programa-video { background: #000; border-radius: .5rem; overflow: hidden; }
.programa-video iframe { border: 0; }
.programa-video-titulo { font-size: .92rem; font-weight: 600; color: #343a40; }
.programa-edicoes-lista { display: grid; gap: 1.1rem; }
@media (max-width: 575.98px) {
  .programa-jornalista-foto { width: 120px; height: 120px; }
}
