/**
 * Page Template CSS - Design System "A Culpa e das Ovelhas"
 * Sections de conteudo: hero, tabs, features, workflow, testimonial,
 * CTA, stats, repos, resources, auth, document.
 * @version 4.0.0 - 2026-02-06
 *
 * DEPENDE de: css/core.css (variaveis, reset, container)
 * DEPENDE de: css/components.css (header, nav, footer, botoes)
 */

/* ========================================
   HERO SECTION - Padrao para todas as paginas
   ======================================== */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gh-dark) 0%, var(--gh-dark-2) 100%);
}

.hero-section.hero-compact {
  min-height: 50vh;
}

.hero-section.hero-mini {
  min-height: 35vh;
}

.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background:
    radial-gradient(circle at 20% 50%, var(--gh-accent) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, var(--gh-purple) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, var(--gh-blue) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: scale(1) rotate(0deg); opacity: 0.1; }
  100% { transform: scale(1.1) rotate(5deg); opacity: 0.2; }
}

.hero-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(48, 54, 61, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 54, 61, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1000px;
  padding: 0 24px;
}

/* Override styles.css legado que aplica grid 2-col em .hero-content */
.hero-section .hero-content {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

.hero-section .hero-title {
  font-family: inherit;
  font-size: clamp(48px, 8vw, 80px);
  font-style: normal;
}

.hero-section .hero-subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--gh-text-muted);
  font-style: normal;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(196, 104, 73, 0.15);
  border: 1px solid rgba(196, 104, 73, 0.4);
  color: var(--gh-accent-light);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.hero-badge svg {
  width: 20px;
  height: 20px;
}

.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--gh-text) 50%, var(--gh-accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title span {
  color: var(--gh-accent);
  -webkit-text-fill-color: var(--gh-accent);
}

.hero-subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--gh-text-muted);
  max-width: 700px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-hero.primary {
  background: var(--gh-accent);
  color: #fff;
}

.btn-hero.primary:hover {
  background: var(--gh-accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196, 104, 73, 0.4);
}

.btn-hero.secondary {
  background: transparent;
  color: var(--gh-text);
  border: 1px solid var(--gh-border);
}

.btn-hero.secondary:hover {
  border-color: var(--gh-text-muted);
  background: var(--gh-dark-2);
  color: var(--gh-text);
}

.btn-hero svg {
  width: 20px;
  height: 20px;
}

.btn-contribute {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gh-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-contribute:hover {
  background: var(--gh-accent-light);
  color: #fff;
  transform: translateY(-2px);
}

/* ========================================
   HERO STATS
   ======================================== */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hero-stat-label {
  font-size: 14px;
  color: var(--gh-text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========================================
   TABS NAVIGATION
   ======================================== */
.tabs-section {
  background: var(--gh-dark-2);
  border-bottom: 1px solid var(--gh-border);
  position: sticky;
  top: 80px;
  z-index: 100;
}

.tabs-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.tabs-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--gh-text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--gh-text);
}

.tab-btn.active {
  color: var(--gh-text);
  border-bottom-color: var(--gh-accent);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   FEATURE SECTIONS
   ======================================== */
.feature-section {
  padding: 120px 0;
  position: relative;
}

.feature-section:nth-child(even) {
  background: var(--gh-dark-2);
}

.feature-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.feature-header {
  text-align: center;
  margin-bottom: 64px;
}

.feature-label {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(196, 104, 73, 0.15);
  color: var(--gh-accent-light);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.feature-subtitle {
  font-size: 18px;
  color: var(--gh-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Cards Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--gh-dark);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gh-accent), var(--gh-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: var(--gh-accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(196, 104, 73, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--gh-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gh-accent-light);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.feature-card-link:hover {
  gap: 12px;
}

/* ========================================
   WORKFLOW SECTION
   ======================================== */
.workflow-section {
  padding: 120px 0;
  background: var(--gh-dark-2);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.workflow-card {
  text-align: center;
  padding: 40px 32px;
  background: var(--gh-dark);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
}

.workflow-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(196, 104, 73, 0.2), rgba(163, 113, 247, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px;
}

.workflow-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.workflow-card p {
  font-size: 14px;
  color: var(--gh-text-muted);
  line-height: 1.6;
}

/* ========================================
   TESTIMONIAL / QUOTE SECTION
   ======================================== */
.testimonial-section {
  padding: 120px 0;
  background: linear-gradient(135deg, var(--gh-dark) 0%, #1a1a2e 50%, var(--gh-dark-2) 100%);
  position: relative;
}

.testimonial-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(196, 104, 73, 0.1) 0%, transparent 60%);
}

.testimonial-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}

.testimonial-quote {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: #fff;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 32px;
}

.testimonial-quote::before {
  content: '\201C';
  display: block;
  font-size: 80px;
  color: var(--gh-accent);
  opacity: 0.5;
  line-height: 0.5;
  margin-bottom: 16px;
}

.testimonial-author {
  font-size: 18px;
  color: var(--gh-accent-light);
  font-weight: 600;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  padding: 120px 0;
  text-align: center;
  background: var(--gh-dark);
}

.cta-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.cta-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--gh-text-muted);
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   STAT CARDS
   ======================================== */
.stats-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 32px;
  background: var(--gh-dark-2);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gh-accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--gh-text-muted);
  text-align: center;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gh-border);
  border-top-color: var(--gh-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   REPO CARDS (reutilizavel)
   ======================================== */
.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.repo-card {
  background: var(--gh-dark-2);
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s ease;
}

.repo-card:hover {
  border-color: var(--gh-accent);
}

.repo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.repo-icon {
  color: var(--gh-text-muted);
}

.repo-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--gh-blue);
  text-decoration: none;
}

.repo-name:hover {
  text-decoration: underline;
}

.repo-visibility {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--gh-text-muted);
}

.repo-visibility.private {
  border-color: #d29922;
  color: #d29922;
}

.repo-description {
  font-size: 14px;
  color: var(--gh-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--gh-text-muted);
}

.repo-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-lang-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.repo-lang-dot.js { background: #f1e05a; }
.repo-lang-dot.py { background: #3572A5; }
.repo-lang-dot.html { background: #e34c26; }
.repo-lang-dot.json { background: #292929; }

/* ========================================
   RESOURCE CARDS
   ======================================== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--gh-dark-2);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.resource-card:hover {
  border-color: var(--gh-accent);
  transform: translateY(-2px);
}

.resource-card-icon {
  font-size: 32px;
}

.resource-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gh-text);
  margin-bottom: 4px;
}

.resource-card p {
  font-size: 13px;
  color: var(--gh-text-muted);
  margin: 0;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--gh-dark-2);
  border-top: 1px solid var(--gh-border);
  padding: 64px 24px 32px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  color: var(--gh-text-muted);
  line-height: 1.6;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-text);
  margin-bottom: 16px;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--gh-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--gh-border);
  text-align: center;
  font-size: 12px;
  color: var(--gh-text-muted);
}

/* ========================================
   AUTH CARD (login, registro, etc)
   ======================================== */
.auth-section {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gh-dark) 0%, var(--gh-dark-2) 100%);
  padding: 40px 24px;
}

.auth-card {
  position: relative;
  z-index: 2;
  background: var(--gh-dark-2);
  border: 1px solid var(--gh-border);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
}

.auth-card h1 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}

.auth-card .auth-subtitle {
  font-size: 14px;
  color: var(--gh-text-muted);
  text-align: center;
  margin-bottom: 32px;
}

.auth-card label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-text);
  margin-bottom: 8px;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"],
.auth-card textarea,
.auth-card select {
  width: 100%;
  padding: 12px 16px;
  background: var(--gh-dark);
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  color: var(--gh-text);
  font-size: 14px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.auth-card input:focus,
.auth-card textarea:focus,
.auth-card select:focus {
  outline: none;
  border-color: var(--gh-accent);
}

.auth-card .btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--gh-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-card .btn-submit:hover {
  background: var(--gh-accent-light);
  transform: translateY(-1px);
}

.auth-card .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-card .auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gh-text-muted);
}

.auth-card .auth-footer a {
  color: var(--gh-accent-light);
  font-weight: 600;
}

.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-alert.error {
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid rgba(248, 81, 73, 0.4);
  color: #f85149;
}

.auth-alert.success {
  background: rgba(35, 134, 54, 0.15);
  border: 1px solid rgba(35, 134, 54, 0.4);
  color: var(--gh-green);
}

/* ========================================
   DOCUMENT / LEGAL PAGES
   ======================================== */
.document-section {
  padding: 80px 0;
}

.document-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.document-container h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  margin-top: 48px;
}

.document-container h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gh-text);
  margin-bottom: 12px;
  margin-top: 32px;
}

.document-container p {
  font-size: 16px;
  color: var(--gh-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.document-container ul,
.document-container ol {
  color: var(--gh-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
}

.document-container table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.document-container th,
.document-container td {
  padding: 12px 16px;
  border: 1px solid var(--gh-border);
  text-align: left;
  font-size: 14px;
}

.document-container th {
  background: var(--gh-dark-2);
  color: var(--gh-text);
  font-weight: 600;
}

.document-container td {
  color: var(--gh-text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .repos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-main {
    padding-top: 60px;
  }

  .hero-stats {
    gap: 32px;
  }

  .hero-stat-value {
    font-size: 36px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-section {
    padding: 80px 0;
  }

  .tabs-section {
    top: 60px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .btn-hero {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .auth-card {
    padding: 32px 24px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    gap: 16px;
  }

  .stat-card {
    padding: 16px 20px;
  }
}

/* ========================================
   LIGHT MODE OVERRIDES
   ======================================== */
body.light-mode {
  --gh-dark: #ffffff;
  --gh-dark-2: #f6f8fa;
  --gh-border: #d0d7de;
  --gh-text: #1f2328;
  --gh-text-muted: #656d76;
}

body.light-mode .hero-title {
  background: linear-gradient(135deg, #1f2328 0%, #656d76 50%, var(--gh-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body.light-mode .hero-stat-value {
  color: #1f2328;
}

body.light-mode .feature-card h3,
body.light-mode .workflow-card h3,
body.light-mode .cta-title,
body.light-mode .feature-title {
  color: #1f2328;
}

body.light-mode .testimonial-quote {
  color: #1f2328;
}

body.light-mode .footer-brand {
  color: #1f2328;
}

body.light-mode .hero-bg-animation {
  opacity: 0.08;
}

body.light-mode .hero-grid-bg {
  background-image:
    linear-gradient(rgba(208, 215, 222, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(208, 215, 222, 0.5) 1px, transparent 1px);
}

body.light-mode .auth-card {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

body.light-mode .feature-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.light-mode .feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
