/* =====================================================
   FOFONEWS — DESIGN SYSTEM
   Portal de Notícias Profissional
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* ── ROOT TOKENS ── */
:root {
  /* Cores principais */
  --brand-blue:          #0A3D91;
  --brand-blue-dark:     #072B66;
  --brand-blue-light:    #1565C0;
  --brand-red:           #E50914;

  --red:                 var(--brand-blue);
  --red-dark:            var(--brand-blue-dark);
  --red-light:           var(--brand-blue-light);

  --black:        #111111;
  --white:        #FFFFFF;
  --gray-100:     #F5F5F5;
  --gray-200:     #E8E8E8;
  --gray-300:     #CCCCCC;
  --gray-500:     #888888;
  --gray-600:     #666666;
  --gray-700:     #444444;

  /* Cores por editoria */
  --cat-politica:        #0A3D91;
  --cat-entretenimento:  #8B00CC;
  --cat-esportes:        #006B3C;
  --cat-economia:        #0055AA;
  --cat-tecnologia:      #0099CC;
  --cat-saude:           #008866;
  --cat-cultura:         #CC6600;
  --cat-brasil:          #009B3A;

  /* Tipografia */
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-serif:   'Merriweather', Georgia, serif;

  /* Tamanhos */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Espaçamentos */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout Unificado com Margens para Desktop */
  --container:      1240px;
  --container-wide: 1240px;
  --sidebar-width:  320px;
  --header-height:  64px;

  /* Bordas */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.1);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.15);
  --shadow-xl:  0 16px 40px rgba(0,0,0,.18);

  /* Transições */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea { font-family: inherit; }

/* ── LAYOUT CONTAINERS ── */
.container,
.container-wide {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
  box-sizing: border-box;
}

.grid-main,
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: 24px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.main-content,
.hero-main {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.sidebar,
.hero-side {
  width: var(--sidebar-width);
  box-sizing: border-box;
}

/* ── CATEGORY BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-blue);
  background: transparent !important;
  line-height: 1;
}

.badge--politica        { color: var(--cat-politica) !important; }
.badge--entretenimento  { color: var(--cat-entretenimento) !important; }
.badge--esportes        { color: var(--cat-esportes) !important; }
.badge--economia        { color: var(--cat-economia) !important; }
.badge--tecnologia      { color: var(--cat-tecnologia) !important; }
.badge--saude           { color: var(--cat-saude) !important; }
.badge--cultura         { color: var(--cat-cultura) !important; }
.badge--brasil          { color: var(--cat-brasil) !important; }
.badge--urgente         { color: var(--brand-red) !important; animation: pulse 1.5s infinite; }
.badge--exclusivo       { color: #6600CC !important; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ── SECTION HEADINGS ── */
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--black);
  padding-bottom: var(--space-3);
  border-bottom: 3px solid var(--gray-200);
  margin-bottom: var(--space-5);
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 28px;
  background: var(--brand-blue);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title .accent { color: var(--brand-blue); }
.section-title a { color: inherit; transition: color var(--transition-fast); }
.section-title a:hover { color: var(--brand-blue-light); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-primary {
  background: var(--brand-blue);
  color: var(--white);
  border: 2px solid var(--brand-blue);
}
.btn-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
}
.btn-outline:hover {
  background: var(--brand-blue);
  color: var(--white);
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-6) 0;
}

/* ── READ TIME ── */
.read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* ── RELATIVE TIME ── */
.time-ago {
  font-size: var(--text-xs);
  color: var(--gray-500);
  white-space: nowrap;
}

/* ── SHARE BUTTONS ── */
.share-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--white);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.share-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.share-btn--whatsapp { background: #25D366; }
.share-btn--facebook { background: #1877F2; }
.share-btn--twitter  { background: #000000; }
.share-btn--copy     { background: var(--gray-500); color: var(--white); }

/* ── RESPONSIVE HELPERS ── */
@media (max-width: 1024px) {
  .grid-main,
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .sidebar,
  .hero-side {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --text-3xl: 1.5rem;
    --text-4xl: 1.875rem;
    --text-5xl: 2.25rem;
  }

  .container, .container-wide { padding-inline: 16px; }
}
