/* ============================================================
   MIXAGORA.COM.BR — Portal Regional de Notícias
   Desenvolvido por RobsonHost GRUPO WebsitevIx
   ============================================================ */

:root {
  --color-primary: #2A4B8D;
  --color-primary-dark: #1a2f5c;
  --color-top-bar: #1a2f5c;
  --color-accent-red: #c8102e;
  --color-accent-green: #198754;
  --color-accent-yellow: #ffc107;
  --color-nav-bg: #2A4B8D;
  --color-nav-active: #c8102e;
  --color-nav-hover: #c8102e;
  --color-text: #222;
  --color-muted: #666;
  --color-border: #ddd;
  --color-bg: #ececec;
  --font-main: 'Roboto', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
}

/* ---- Top Bar ---- */
.top-bar {
  background: var(--color-top-bar);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar-date { font-weight: 500; }

.top-bar-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
}

.top-bar-search input {
  border: none;
  background: transparent;
  color: #fff;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  width: 180px;
  outline: none;
}

.top-bar-search input::placeholder { color: rgba(255,255,255,0.6); }

.top-bar-search button {
  border: none;
  background: var(--color-accent-red);
  color: #fff;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.top-bar-social a {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

.top-bar-social a:hover { color: #fff; }

/* ---- Header ---- */
.site-header {
  background: #fff;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-top {
  gap: 1rem;
}

.site-logo img {
  max-height: 72px;
  width: auto;
}

.header-search {
  max-width: 400px;
  margin: 0 auto 0.5rem;
  gap: 0.3rem;
}

.header-search .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-primary);
  text-transform: uppercase;
}

.header-banner-top {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* ---- Nav Fixo ---- */
.main-nav {
  background: var(--color-nav-bg) !important;
  padding: 0;
}

.main-nav .nav-link {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0.85rem 0.5rem !important;
  letter-spacing: 0.04em;
  transition: background 0.2s;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.main-nav .nav-item:last-child .nav-link { border-right: none; }

.main-nav .nav-link:hover {
  background: rgba(0,0,0,0.15);
  color: #fff !important;
}

.main-nav .nav-link.active {
  background: var(--color-nav-active) !important;
  color: #fff !important;
}

.navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* ---- Banners ---- */
.banner-top {
  text-align: center;
}

.banner-sidebar {
  margin-bottom: 1rem;
}

.banner-img {
  border-radius: 4px;
  max-width: 100%;
}

.banner-placeholder {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

.banner-sidebar.banner-placeholder {
  min-height: 250px;
}

.banner-slot {
  color: #aaa;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.banner-label {
  display: block;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.7rem;
  margin-top: 2px;
}

/* ---- Category Badges ---- */
.category-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

/* ---- Slide / Carrossel ---- */
.block-slide {
  margin-bottom: 1.5rem;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.carousel-img {
  height: 420px;
  object-fit: cover;
}

.carousel-caption {
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  left: 0; right: 0; bottom: 0;
  padding: 2rem 1.5rem 1.5rem;
  text-align: left;
}

.carousel-caption h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0.4rem 0;
}

.carousel-caption h2 a {
  color: #fff;
  text-decoration: none;
}

.carousel-caption h2 a:hover { color: #ffd700; }

.carousel-caption p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
}

/* ---- Section Headers ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0;
}

.section-link {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-decoration: none;
}

.section-link:hover { color: var(--color-primary); }

/* ---- News Feed Regional (Giro em Ipiaú) ---- */
.block-news-feed { margin-bottom: 2rem; }

.news-feed-list { display: flex; flex-direction: column; gap: 0; }

.news-feed-item-regional,
.news-feed-item {
  display: flex;
  gap: 1.2rem;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 1.2rem 0;
  transition: background 0.2s;
}

.news-feed-item-regional:first-child { padding-top: 0; }

.news-feed-item-regional:hover { background: #fafafa; }

.news-feed-thumb {
  flex: 0 0 280px;
  overflow: hidden;
  border-radius: 4px;
}

.news-feed-item-regional .news-feed-thumb {
  flex: 0 0 320px;
}

.news-feed-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.35s;
  display: block;
}

.news-feed-item-regional .news-feed-thumb img {
  height: 220px;
}

.news-feed-item:hover .news-feed-thumb img {
  transform: scale(1.04);
}

.news-feed-body {
  padding: 0.2rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-feed-title {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 0.4rem 0 0.5rem;
  line-height: 1.35;
}

.news-feed-item-regional .news-feed-title {
  font-size: 1.25rem;
}

.news-feed-title a {
  color: #111;
  text-decoration: none;
}

.news-feed-title a:hover { color: var(--color-accent-red); }

.feed-banner-ad {
  margin: 0.5rem 0 1rem;
  padding: 0.5rem;
  background: #f8f8f8;
  border: 1px dashed #ccc;
  border-radius: 4px;
  text-align: center;
}

.news-feed-summary {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0.3rem 0;
  line-height: 1.5;
}

.news-feed-date {
  font-size: 0.75rem;
  color: #999;
}

/* ---- Category Highlight ---- */
.block-category-highlight {
  margin: 2rem 0;
  padding: 1.2rem;
  background: #fff;
  border-radius: 6px;
  border-top: 4px solid var(--cat-color, var(--color-primary));
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.category-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.highlight-card {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.highlight-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.highlight-card a { text-decoration: none; color: inherit; }

.highlight-card-body {
  padding: 0.6rem;
  background: #fff;
}

.highlight-card-body h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.highlight-card-body time {
  font-size: 0.7rem;
  color: #999;
}

/* ---- Photo Albums ---- */
.block-photo-events { margin: 2rem 0; }

.photo-albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.album-card a.album-link { text-decoration: none; color: inherit; display: block; }
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.album-cover { position: relative; }

.album-cover img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.album-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 0.5rem;
}

.album-count {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.album-info {
  padding: 0.6rem 0.8rem;
}

.album-info h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.album-info time {
  font-size: 0.75rem;
  color: #999;
}

/* ---- Lightbox ---- */
.photo-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.photo-lightbox.active { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  color: #fff;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---- Widgets Sidebar ---- */
.block-widgets { display: flex; flex-direction: column; gap: 1rem; }

.widget {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-header {
  background: var(--color-nav-bg);
  color: #fff;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.widget-body { padding: 0.8rem; font-size: 0.85rem; }

.widget-loading { color: #aaa; font-style: italic; }

.widget-clima .temp { font-size: 2rem; font-weight: 900; color: var(--color-primary); }
.widget-dolar .rate { font-size: 1.4rem; font-weight: 800; }
.widget-megasena .numbers { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 0.5rem; }
.widget-megasena .ball {
  width: 32px; height: 32px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}

.brasileirao-table { width: 100%; font-size: 0.75rem; }
.brasileirao-table td, .brasileirao-table th { padding: 3px 4px; }
.brasileirao-table tr:nth-child(even) { background: #f9f9f9; }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-nav-bg);
  color: #ccc;
  margin-top: 2rem;
}

.footer-title {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 0.4rem; }

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
}

.developer-credit {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

.developer-credit strong { color: #ffc107; }

/* ---- Article Page ---- */
.page-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-primary);
}

.article-title {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 0.5rem 0;
}

.article-meta {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.article-image img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.article-summary {
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  color: var(--color-muted);
}

.article-content {
  line-height: 1.8;
  font-size: 1rem;
}

.article-content p { margin-bottom: 1rem; }

/* ---- Photo Gallery Page ---- */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-caption {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.3rem;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* WhatsApp flutuante */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 9990;
  text-decoration: none;
  transition: transform 0.2s;
}

.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

/* Scroll to top */
.scroll-top-btn {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9989;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: pointer;
}

.scroll-top-btn.visible { opacity: 1; visibility: visible; }

.mobile-search { border-top: 1px solid rgba(255,255,255,0.15); }

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .header-top { flex-direction: column; align-items: flex-start; }
  .header-banner-top { width: 100%; justify-content: center; }
  .carousel-img { height: 260px; }
  .news-feed-thumb { flex: 0 0 140px; }
  .news-feed-thumb img { height: 110px; }
  .main-nav .nav-link { font-size: 0.8rem; padding: 0.6rem 0.4rem !important; }
}

@media (max-width: 576px) {
  .news-feed-item { flex-direction: column; }
  .news-feed-thumb { flex: none; }
  .news-feed-thumb img { height: 180px; }
  .news-feed-body { padding: 0.8rem; }
}
