/*
 * Gigaro IPTV - Blog Static Styles
 * CSS standalone para templates HTML estáticos
 * Replica o design system do React
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   CSS VARIABLES (Dark Theme)
   ============================================ */
:root {
  /* Cores principais */
  --background: hsl(220 20% 6%);
  --foreground: hsl(210 40% 98%);

  --card: hsl(220 18% 10%);
  --card-foreground: hsl(210 40% 98%);

  /* Azul - texto (WCAG AA) */
  --primary: hsl(217 91% 70%);
  --primary-foreground: hsl(220 20% 10%);

  /* Cinza escuro */
  --secondary: hsl(220 14% 16%);
  --secondary-foreground: hsl(210 40% 98%);

  --muted: hsl(220 14% 20%);
  --muted-foreground: hsl(215 20% 65%);

  /* Verde - texto (WCAG AA) */
  --accent: hsl(142 70% 55%);
  --accent-foreground: hsl(220 20% 10%);

  /* Botões (WCAG AA com texto branco) */
  --primary-button: hsl(217 91% 40%);
  --accent-button: hsl(142 76% 28%);

  --destructive: hsl(0 84% 60%);
  --border: hsl(220 14% 18%);
  --ring: hsl(217 91% 60%);

  --radius: 0.75rem;

  /* Glow effects */
  --glow-primary: hsl(217 91% 60%);
  --glow-accent: hsl(142 76% 45%);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--foreground);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--muted-foreground);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

strong {
  font-weight: 600;
  color: var(--foreground);
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container-tight {
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-tight {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-tight {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section-padding {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-button);
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(11, 13, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .header-inner {
    height: 5rem;
  }
}

/* Logo */
.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .logo {
    font-size: 1.875rem;
  }
}

/* Navigation */
.nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--foreground);
  background-color: var(--secondary);
}

.nav-link.active {
  color: var(--primary);
  background-color: rgba(96, 165, 250, 0.1);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.mobile-nav.open {
  display: flex;
}

@media (min-width: 1024px) {
  .mobile-nav {
    display: none !important;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-button);
  color: white;
}

.btn-primary:hover {
  background-color: hsl(217 91% 35%);
  color: white;
}

.btn-accent {
  background-color: var(--accent-button);
  color: white;
}

.btn-accent:hover {
  background-color: hsl(142 76% 23%);
  color: white;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Glow effects */
.glow-primary {
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.glow-accent {
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.3);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: 1rem 0;
  margin-top: 4rem; /* Account for fixed header */
}

@media (min-width: 768px) {
  .breadcrumbs {
    margin-top: 5rem;
  }
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.875rem;
}

.breadcrumbs-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs-list a {
  color: var(--muted-foreground);
}

.breadcrumbs-list a:hover {
  color: var(--primary);
}

.breadcrumbs-list .separator {
  color: var(--muted-foreground);
}

.breadcrumbs-list .current {
  color: var(--foreground);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .card {
    padding: 2rem;
  }
}

/* ============================================
   ARTICLE STYLES
   ============================================ */
.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article-meta .separator {
  width: 4px;
  height: 4px;
  background-color: var(--muted-foreground);
  border-radius: 50%;
}

.category-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
}

.article-title {
  margin-bottom: 1rem;
}

.article-author {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article-author strong {
  color: var(--foreground);
}

/* Featured Image */
.featured-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

/* Quick Answer Box */
.quick-answer {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.1));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.quick-answer-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.quick-answer p {
  color: var(--foreground);
  margin-bottom: 0;
}

/* Table of Contents */
.toc {
  background-color: rgba(34, 45, 67, 0.5);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.toc-list {
  list-style: none;
  counter-reset: toc-counter;
}

.toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 0.5rem;
}

.toc-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.toc-list a::before {
  content: counter(toc-counter) ".";
  color: var(--primary);
  font-weight: 500;
}

.toc-list a:hover {
  color: var(--primary);
}

/* Article Content */
.article-content {
  margin-bottom: 3rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--muted-foreground);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content li::marker {
  color: var(--primary);
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted-foreground);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.article-content code {
  background-color: var(--secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.faq-answer {
  color: var(--muted-foreground);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 2rem;
}

.author-avatar {
  font-size: 2.5rem;
  line-height: 1;
}

.author-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--secondary), var(--card));
  border-radius: calc(var(--radius) * 2);
  margin-top: 3rem;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   BLOG LISTING
   ============================================ */
.blog-hero {
  text-align: center;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .blog-hero {
    padding: 4rem 0 3rem;
    margin-top: 5rem;
  }
}

.blog-hero h1 {
  margin-bottom: 1rem;
}

.blog-hero p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Blog Card */
.blog-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card .category-badge {
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.blog-card h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.blog-card h2 a {
  color: var(--foreground);
}

.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.blog-card-meta .separator {
  width: 4px;
  height: 4px;
  background-color: var(--muted-foreground);
  border-radius: 50%;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a {
  background-color: var(--secondary);
  color: var(--muted-foreground);
}

.pagination a:hover {
  background-color: var(--primary-button);
  color: white;
}

.pagination .active {
  background-color: var(--primary-button);
  color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: var(--secondary);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-links a:hover {
  color: var(--foreground);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.footer-bottom small {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
}

.whatsapp-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float a:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: white;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.hidden { display: none; }

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:hidden { display: none; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header,
  .whatsapp-float,
  .btn,
  .cta-section {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .breadcrumbs {
    margin-top: 0;
  }
}
