/* =====================================================================
   CATV - styles.css (alinhado ao socios.css, limpo e organizado)
   Secções:
   - Variáveis (cores)
   - Reset e base
   - Cabeçalho (site-header)
   - Hero
   - Conteúdo + Galeria
   - Info Clube
   - História CATV
   - Patrocinadores
   - Rodapé
   - Botão WhatsApp
   - Cookie banner
   - Media queries (900 / 768 / 480)
   ===================================================================== */

/* ==================== Variáveis ==================== */
:root {
  --brand-primary: #312783; /* Azul CATV */
  --brand-accent:  #f9b233; /* Laranja CATV */
  --text-primary:  #312783;
  --white:         #ffffff;
}

/* ==================== Reset e base ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
html { font-size: 18px; }
body { font-family: 'Lato', Arial, Helvetica, sans-serif; color: #333; line-height: 1.75; }
img, video, canvas { max-width: 100%; height: auto; display: block; }

/* Otimização para performance - will-change em elementos animados */
.historia-item, .whatsapp-float, .btn-inscrever { will-change: transform; }

/* Performance - contain para elementos isolados */
.hero, .info-clube, .historia-catv { contain: layout style; }

/* Reduzir CLS - aspect-ratio para imagens */
.galeria img { aspect-ratio: 4/3; object-fit: cover; }
.footer-logo img { aspect-ratio: 1/1; object-fit: contain; }
.whatsapp-float .icon { aspect-ratio: 1/1; object-fit: contain; }

/* ==================== Cabeçalho ==================== */
header.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: transparent; /* sem cor para mostrar a imagem do hero */
  box-shadow: none;
}
.logo { display: flex; align-items: center; }
.logo img { height: 100px; width: auto; }
nav ul { list-style: none; display: flex; gap: 32px; align-items: center; }
nav ul li a, .menu-link { color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.1rem; transition: color .2s ease; }
.menu-link:hover { color: var(--brand-accent); }

/* ==================== Hero ==================== */
.hero {
  min-height: 86vh;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('/imagens/estafeta.jpeg') center/cover no-repeat;
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 140px 16px 40px; /* mais espaço por causa do header por cima */
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: .5px; text-transform: none; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero h2 { font-size: clamp(1.1rem, 2.5vw, 1.75rem); font-weight: 300; margin: 16px 0 26px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.btn-inscrever { background: var(--brand-accent); color: var(--brand-primary); font-weight: 700; border: none; border-radius: 10px; padding: 16px 32px; font-size: 1.2rem; text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.18); transition: transform .15s, background .2s, color .2s; display: inline-block; }
.btn-inscrever:hover { background: var(--brand-primary); color: var(--brand-accent); transform: translateY(-2px); }

/* ==================== Conteúdo + Galeria ==================== */
.conteudo { background: #fff; padding: 60px 20px; }
.conteudo-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; grid-template-areas: 'texto galeria'; }
.texto { display: flex; flex-direction: column; justify-content: center; grid-area: texto; }
.texto h1 { color: var(--brand-accent); font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.texto h1 a,
.texto h1 a:visited,
.texto h1 a:hover,
.texto h1 a:active { color: var(--brand-primary); text-decoration: none; font-weight: 900; }
.texto h1 a:hover { color: var(--brand-accent); }
.texto h2 { color: var(--text-primary); font-size: 1.6rem; font-weight: 700; margin-bottom: 18px; }
.texto p { color: #444; font-size: 1.2rem; line-height: 1.85; }

/* Typewriter */
/* Janela estática do texto a escrever */
#typewriter-text {
  display: block;
  font-size: 1.2rem;
  line-height: 1.85;
  max-width: 72ch;
  height: clamp(200px, 30vh, 320px); /* área fixa mais alta */
  overflow-y: auto; /* permite ler o texto sem crescer a página */
  white-space: normal;
  overflow-wrap: anywhere;
  border-right: 0;
  animation: none;
}
/* Remover cursor visual do typewriter */background-image
.typewriter-cursor { display: none !important; }

.galeria { grid-area: galeria; align-self: start; position: sticky; top: 100px; min-height: 520px; max-width: 520px; width: 100%; overflow: visible; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.galeria img { position: relative; width: 78%; height: auto; border-radius: 16px; box-shadow: 0 10px 28px rgba(0,0,0,.14); transition: transform .25s ease; }
.galeria img:hover { transform: scale(1.02); }
.img-esquerda { align-self: center; transform: rotate(-2.5deg); z-index: 2; }
.img-direita  { align-self: flex-end; margin-top: -20%; transform: rotate(3deg); z-index: 1; }

/* ==================== Info Clube ==================== */
.info-clube { background: #fff; padding: 60px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 1200px; margin: 0 auto; }
.info-caixa { background: #fff; border-radius: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.08); padding: 24px; text-align: center; transition: transform .2s, box-shadow .2s; }
.info-caixa:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.info-caixa h3 { font-size: 1.6rem; color: #1a1a1a; margin-bottom: 12px; }
.info-caixa p  { font-size: 1.1rem; color: #555; line-height: 1.75; }

/* ==================== História CATV ==================== */
.historia-catv { background: linear-gradient(180deg, #fff 0%, #f8fafd 100%); padding: 60px 20px; }
.historia-wrapper { max-width: 1080px; margin: 0 auto; text-align: left; }
.historia-header { border-bottom: 1px solid #e6e9f2; padding-bottom: 8px; margin-bottom: 8px; }
.historia-header h2 { font-size: 2.8rem; color: var(--text-primary); margin-bottom: 6px; }
.historia-sub { font-size: 1.1rem; color: #667085; margin: 0; }
.historia-lista { list-style: none; padding: 0; margin: 12px 0 0; border-top: 0; }
.historia-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; margin: 0; border-bottom: 1px solid #e6e9f2; text-align: left; }
.historia-texto { flex: 1 1 auto; }
.historia-texto h3 { font-size: 1.35rem; color: var(--text-primary); margin-bottom: 6px; font-weight: 700; }
.historia-texto p  { font-size: 1rem; color: #667085; line-height: 1.7; margin: 0; }
.historia-cta { flex: 0 0 auto; color: var(--brand-primary); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 0; border: 0; border-radius: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .2s ease; }
.historia-cta::after { content: ' \203A'; /* › */ font-size: 1.05em; line-height: 1; }
.historia-cta:hover { color: var(--brand-accent); }

/* ==================== Patrocinadores ==================== */
.patrocinadores { background: linear-gradient(180deg, #e4e3f3 0%, #f7f7fb 100%); padding: 60px 20px; }
.patrocinadores-wrapper { max-width: 1080px; margin: 0 auto; text-align: center; }
.patrocinadores h2 { font-size: 2.2rem; color: var(--text-primary); margin-bottom: 10px; }
.patrocinadores-sub { font-size: 1.15rem; color: #666; margin-bottom: 36px; }
.patro-card { background: #fff; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.1); padding: 28px; margin-bottom: 20px; }
.patro-card-content h3 { font-size: 1.8rem; color: #1a1a1a; margin-bottom: 12px; }
.patro-card-content p  { font-size: 1.15rem; color: #555; line-height: 1.75; margin-bottom: 18px; }
.patro-cta { display: inline-block; color: var(--brand-primary); font-weight: 700; text-decoration: none; padding: 12px 22px; border: 2px solid var(--brand-primary); border-radius: 10px; transition: background .2s, color .2s, transform .15s; }
.patro-cta:hover { background: var(--brand-primary); color: var(--white); transform: translateY(-1px); }

/* ==================== Rodapé ==================== */
.site-footer { background: var(--brand-primary); color: var(--white); padding: 32px 0 12px; box-shadow: 0 -2px 12px rgba(49,39,131,0.10); margin-top: 40px; text-align: center; }
.footer-content { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; gap: 24px; }
.footer-logo img { max-height: 80px; }
.footer-content p { margin: 6px 0; font-size: 1rem; }
.footer-redes { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.social-icons { display: flex; gap: 15px; }
.social-link { transition: transform .2s; }
.social-link:hover { transform: scale(1.12); }
.footer-lang { flex: 0 0 100%; display: flex; justify-content: center; align-items: center; gap: 10px; margin: 4px 0 2px; }
.footer-lang .lang-link { color: var(--white); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 6px 10px; border-radius: 8px; transition: color .2s, background .2s, transform .15s; }
.footer-lang .lang-link:hover { color: var(--brand-accent); background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.footer-lang .lang-link.active { background: var(--brand-accent); color: var(--brand-primary); }
.footer-lang .sep { color: rgba(255,255,255,0.65); font-weight: 700; }
.footer-politica { flex: 0 0 100%; text-align: center; margin: 6px 0; }
.footer-politica a { color: var(--brand-accent); text-decoration: none; font-size: 1rem; font-weight: 600; }
.footer-politica a:hover { text-decoration: underline; }
.footer-copy { flex: 0 0 100%; border-top: 1px solid rgba(255,255,255,.3); margin-top: 6px; padding-top: 6px; font-size: 1rem; opacity: .95; }

/* ==================== Botão WhatsApp ==================== */
.whatsapp-float { position: fixed; right: 24px; bottom: 24px; z-index: 9999; background: #25D366; color: #fff; height: 56px; padding: 0 20px 0 18px; border-radius: 28px; box-shadow: 0 4px 12px rgba(0,0,0,0.18); display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.whatsapp-float:hover { background: #1ebc59; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.22); }
.whatsapp-float .icon-wrapper { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.14); }
.whatsapp-float .icon { width: 56px; height: 56px; object-fit: contain; }
.whatsapp-float .label { font-weight: 700; font-size: 16px; }

/* ==================== Cookie banner ==================== */
.cookie-banner { position: fixed; inset: 0; z-index: 9998; display: none; }
.cookie-banner.show { display: block; }
.cookie-inner { width: 100%; max-width: 960px; margin: 0 auto; background: rgba(0,0,0,0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,0.22); position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; }
.cookie-text { font-size: 15px; line-height: 1.5; }
.cookie-text a { color: var(--brand-accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: 10px; font-weight: 800; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--brand-accent); color: var(--brand-primary); border-color: var(--brand-accent); }
.btn-primary:hover { background: var(--brand-primary); color: var(--brand-accent); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--brand-primary); }

/* ==================== Media queries ==================== */
@media (max-width: 900px) {
  .logo img { height: 84px; }
}

@media (max-width: 768px) {
  header.site-header { padding: 14px 16px; }
  nav ul { flex-wrap: wrap; gap: 16px; justify-content: center; }
  .hero { padding-top: 160px; }
  .conteudo { padding: 36px 16px; }
  .conteudo-container { grid-template-columns: 1fr; gap: 32px; grid-template-areas: 'texto' 'galeria'; }
  .texto { text-align: center; }
  .texto h1 { font-size: 2rem; }
  .texto h2 { font-size: 1.4rem; }
  .texto p { font-size: 1.1rem; }
  .galeria { position: static; top: auto; min-height: 0; max-width: 100%; display: flex; align-items: center; }
  .galeria img { position: static; width: 100%; max-width: 360px; margin: 0 auto 16px; transform: none !important; }
  .img-direita { margin-top: 0; }
  .img-esquerda, .img-direita { transform: none !important; }
  .site-footer { padding: 24px 6px 90px; }
  .footer-content { flex-direction: column; gap: 16px; }
  .site-footer .footer-content > .footer-content { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .footer-content p { white-space: normal; text-align: center; }
  .historia-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .historia-cta { margin-top: 4px; }
}

@media (max-width: 480px) {
  .btn-inscrever { font-size: 1.05rem; padding: 12px 20px; }
  .footer-content { gap: 14px; }
  .whatsapp-float .label { display: none; }
  .whatsapp-float { width: 56px; padding: 0; justify-content: center; }
  .cookie-inner { margin: 0 8px; left: 8px; right: 8px; transform: none; max-width: none; }
  #typewriter-text { font-size: 1.1rem; height: clamp(140px, 28vh, 220px); }
}

/* ==================== Utilidades ==================== */
html.no-scroll, body.no-scroll { overflow: hidden; }