@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
  /* Colors - Light Theme */
  --bg-primary: #ffffff; /* White */
  --bg-secondary: #f8f9fa; /* Light grey for panels */
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text-primary: #1e293b; /* Dark text */
  --text-secondary: #64748b;
  
  /* Brand Colors - Piripiri 40 Graus (Vermelho) */
  --accent-primary: #ef4444; /* Vermelho */
  --accent-hover: #dc2626;
  --accent-glow: rgba(239, 68, 68, 0.4);

  /* Utilities */
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

@keyframes bgDrift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(-45deg, #ffffff, #ef4444, #facc15, #ffffff, #ef4444);
  background-size: 200% 200%;
  animation: bgDrift 15s ease infinite;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-md);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px rgba(255, 87, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s var(--transition-smooth) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* UI Utilities */
.btn-primary {
  background: var(--accent-primary);
  color: white;
  padding: 10px 24px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header CSS
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-smooth);
}

.header.scrolled {
  background: var(--bg-glass);
  border-bottom: 1px solid var(--glass-border);
  padding-top: 0;
}

.header-top {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  height: 40px;
  display: flex;
  align-items: center;
  transition: height var(--transition-smooth), opacity var(--transition-smooth);
}

.header.scrolled .header-top {
  height: 0;
  opacity: 0;
  overflow: hidden;
  border: none;
}

.header-top-inner {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
  transition: fill var(--transition-fast), transform var(--transition-fast);
}

.social-icon:hover {
  fill: var(--accent-primary);
  transform: translateY(-2px);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px;
  transition: padding var(--transition-smooth);
}

.header.scrolled .header-main {
  padding: 12px 20px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

.logo-highlight {
  color: var(--accent-primary);
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-primary);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--border-radius-lg);
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  width: 18px;
  height: 18px;
  fill: var(--text-secondary);
  margin-right: 8px;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  width: 120px;
  transition: width var(--transition-smooth);
}

.search-input:focus {
  width: 180px;
}



/* ==========================================================================
   Footer CSS
   ========================================================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding-top: 60px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-title {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================================================
   Page CSS (Home)
   ========================================================================== */
.home-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Hero Section */
.hero-section {
  padding-top: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 250px 250px;
  gap: 20px;
}

.hero-card {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: block;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.hero-card:hover .hero-image {
  transform: scale(1.05);
}

.hero-main {
  grid-row: span 2;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 15, 24, 0.9) 0%, rgba(10, 15, 24, 0.4) 50%, rgba(10, 15, 24, 0.1) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  z-index: 2;
}

.category-badge {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.category-badge.small {
  padding: 2px 8px;
  font-size: 0.7rem;
  margin-bottom: 0;
}

.hero-main .hero-title {
  font-size: 2.2rem;
  line-height: 1.2;
}

.hero-secondary .hero-title {
  font-size: 1.2rem;
  line-height: 1.3;
}

.hero-title {
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Latest News Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 15px;
}

.section-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin: 0;
}

.view-all {
  color: var(--accent-primary);
  font-weight: 600;
}

.view-all:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 87, 34, 0.3);
}

.news-image-wrapper {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.news-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image {
  transform: scale(1.05);
}

.news-image-wrapper .category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.news-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-meta {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.load-more-container {
  display: flex;
  justify-content: center;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 400px 250px 250px;
  }
}
/* --- Banner System --- */
.banner-slider { position: relative; width: 100%; overflow: hidden; border-radius: var(--border-radius-sm); box-shadow: var(--glass-shadow); }
.banner-slide { display: none; width: 100%; text-align: center; }
.banner-slide.active { display: block; animation: fadeInSlide 1s ease-in-out; }
.banner-img { width: 100%; height: auto; max-height: 250px; object-fit: cover; display: block; }
@keyframes fadeInSlide { from { opacity: 0; } to { opacity: 1; } }
.banner-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg-glass); border: 2px dashed var(--accent-primary); border-radius: var(--border-radius-sm); text-align: center; transition: all 0.3s ease; }
.banner-placeholder:hover { background: rgba(239, 68, 68, 0.1); transform: scale(1.02); }
.banner-placeholder a { text-decoration: none; color: var(--text-primary); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.banner-horizontal { height: 150px; width: 100%; }
.banner-vertical { height: 300px; width: 100%; }
.placeholder-text { font-weight: bold; font-size: 1.8rem; color: var(--accent-primary); line-height: 1.2; }
.placeholder-text small { font-size: 1rem; color: var(--text-secondary); font-weight: normal; }

/* --- Top Alert System --- */
.top-alert-container { flex: 1; overflow: hidden; display: flex; align-items: center; margin-right: 20px; }
.top-alert { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 500; font-size: 0.95rem; padding: 4px 15px; border-radius: 20px; background: rgba(0,0,0,0.2); white-space: nowrap; }
.alert-badge { background: #fff; color: #000; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; }
.alert-text { text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }

/* Alert Animations */
.alert-anim-pulse { animation: alertPulse 2s infinite; }
@keyframes alertPulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

.alert-anim-blink { animation: alertBlink 1s infinite; }
@keyframes alertBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.alert-anim-marquee { display: inline-block; animation: alertMarquee 15s linear infinite; }
@keyframes alertMarquee { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100vw); } }

/* --- Modern Search Bar --- */
.search-bar-modern { display: flex; align-items: center; background: var(--bg-secondary); border: 1px solid var(--glass-border); border-radius: 30px; padding: 5px 15px; transition: all 0.3s ease; width: 200px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.search-bar-modern:focus-within { width: 300px; border-color: var(--accent-primary); box-shadow: 0 4px 12px var(--accent-glow); background: #fff; }
.search-input-modern { border: none; background: transparent; outline: none; color: var(--text-primary); width: 100%; font-family: inherit; font-size: 0.95rem; }
.search-btn-modern { background: none; border: none; cursor: pointer; padding: 5px; display: flex; align-items: center; justify-content: center; }
.search-btn-modern svg { width: 20px; height: 20px; fill: var(--text-secondary); transition: fill 0.3s ease; }
.search-btn-modern:hover svg { fill: var(--accent-primary); }

/* --- Mobile CSS Overrides --- */
.header-actions { display: flex; align-items: center; gap: 30px; }
.mobile-menu-btn, .mobile-menu-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 1001;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (max-width: 992px) {
  .header-actions {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 60px 20px 20px 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    align-items: flex-start;
  }

  .header-actions.active {
    right: 0;
  }

  .mobile-overlay.active {
    display: block;
    opacity: 1;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
  }

  .mobile-menu-close {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link {
    border-bottom: 1px solid var(--glass-border);
    display: block;
    padding: 15px 0;
    width: 100%;
  }

  .search-bar-modern {
    width: 100%;
    margin-top: 20px;
  }

  .search-bar-modern:focus-within {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Fix Top Alert on Mobile */
  .header-top-inner {
    justify-content: center;
  }
  .top-alert-container {
    margin-right: 0;
    width: 100%;
    justify-content: center;
  }
  .social-links {
    display: none;
  }

  /* Fix Grid */
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 15px;
  }

  .hero-main {
    grid-row: span 1;
    min-height: 300px;
  }
  
  .hero-secondary {
    min-height: 200px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .container > div[style*="display: flex"] {
    flex-direction: column !important;
  }
  
  aside {
    width: 100% !important;
  }
  
  .injected-mobile-banner {
    display: block !important;
  }
}

/* --- Share Buttons --- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  color: #fff;
}
.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #000000; }

@media (max-width: 768px) {
  .news-share {
    flex-wrap: wrap;
    justify-content: center;
  }
}
