/* =============================================
   ALANGOLA.AO — main.css (global)
   ============================================= */

:root {
  --primary:   #0E3D58;
  --primary-light: #155070;
  --accent:    #EB6316;
  --accent2:   #1FB6B9;
  --dark:      #071e2c;
  --body-bg:   #f4f6f9;
  --white:     #ffffff;
  --text:      #2d3748;
  --text-muted:#718096;
  --border:    #e2e8f0;
  --card-bg:   #ffffff;
  --success:   #38a169;
  --error:     #e53e3e;
  --warning:   #d69e2e;
  --info:      #3182ce;
  --radius:    12px;
  --shadow:    0 4px 20px rgba(0,0,0,.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --transition:0.25s ease;
}

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

html { scroll-behavior:smooth; }

body {
  font-family:'Inter', sans-serif;
  background:var(--body-bg);
  color:var(--text);
  line-height:1.6;
  overflow-x:hidden;
}

a { color:inherit; text-decoration:none; }
img { max-width:100%; }
ul { list-style:none; }

/* === CONTAINER === */
.container { width:100%; max-width:1200px; margin:0 auto; padding:0 20px; }

/* === BUTTONS === */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 24px; border-radius:8px; font-weight:600;
  font-size:0.9rem; cursor:pointer; transition:var(--transition);
  border:2px solid transparent; white-space:nowrap;
}
.btn-primary   { background:var(--accent); color:var(--dark); }
.btn-primary:hover { background:#d4901c; transform:translateY(-1px); }
.btn-secondary { background:var(--primary); color:#fff; }
.btn-secondary:hover { background:var(--primary-light); }
.btn-outline   { border-color:var(--accent2); color:var(--accent2); background:transparent; }
.btn-outline:hover { background:var(--primary); color:#fff; }
.btn-accent    { background:var(--accent2); color:#fff; }
.btn-danger    { background:var(--error); color:#fff; }
.btn-sm        { padding:7px 16px; font-size:0.82rem; }
.btn-lg        { padding:15px 36px; font-size:1.05rem; }
.btn-block     { width:100%; justify-content:center; }

/* === FLASH MESSAGE === */
.flash {
  position:fixed; top:80px; right:20px; z-index:9999;
  padding:14px 20px; border-radius:var(--radius); box-shadow:var(--shadow-md);
  display:flex; align-items:center; gap:12px; max-width:420px;
  font-weight:500; animation:slideIn .3s ease;
}
.flash-success { background:#f0fff4; border:1px solid var(--success); color:#276749; }
.flash-error   { background:#fff5f5; border:1px solid var(--error);   color:#c53030; }
.flash-info    { background:#ebf8ff; border:1px solid var(--info);    color:#2b6cb0; }
.flash-close   { background:none; border:none; cursor:pointer; font-size:1.2rem; margin-left:auto; }
@keyframes slideIn { from { transform:translateX(100px); opacity:0; } to { transform:none; opacity:1; } }

/* === SECTIONS === */
.section { padding:80px 0; }
.section-sm { padding:50px 0; }
.section-dark { background:var(--dark); color:#fff; }
.section-alt  { background:#eef2f7; }
.section-title {
  font-family:'Russo One', sans-serif;
  font-size:clamp(1.8rem, 4vw, 2.4rem);
  color:var(--primary); margin-bottom:16px;
}
.section-title span { color:var(--accent); }
.section-subtitle { color:var(--text-muted); font-size:1.05rem; margin-bottom:50px; }
.section-header { text-align:center; margin-bottom:50px; }
.divider {
  width:60px; height:4px; background:var(--accent);
  border-radius:2px; margin:16px auto 0;
}

/* === CARDS === */
.card {
  background:var(--card-bg); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden; transition:var(--transition);
}
.card:hover { box-shadow:var(--shadow-md); transform:translateY(-4px); }
.card-body { padding:24px; }
.card-icon {
  width:60px; height:60px; border-radius:12px;
  background:linear-gradient(135deg, var(--primary), var(--accent2));
  display:flex; align-items:center; justify-content:center;
  font-size:1.5rem; color:#fff; margin-bottom:18px;
}

/* === GRID === */
.grid-2 { display:grid; grid-template-columns:repeat(2, 1fr); gap:24px; }
.grid-3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.grid-4 { display:grid; grid-template-columns:repeat(4, 1fr); gap:24px; }

/* === NEWS CARD === */
.news-card { border-radius:var(--radius); overflow:hidden; background:#fff; box-shadow:var(--shadow); transition:var(--transition); }
.news-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.news-card-img { height:200px; overflow:hidden; }
.news-card-img img { width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.news-card:hover .news-card-img img { transform:scale(1.05); }
.news-card-body { padding:20px; }
.news-tag { display:inline-block; background:var(--accent); color:var(--dark); font-size:.75rem; font-weight:700; padding:3px 10px; border-radius:20px; margin-bottom:10px; text-transform:uppercase; letter-spacing:.5px; }
.news-card-body h3 { font-size:1rem; font-weight:700; color:var(--primary); margin-bottom:8px; line-height:1.4; }
.news-card-body p { font-size:.88rem; color:var(--text-muted); }
.news-meta { display:flex; align-items:center; gap:12px; margin-top:14px; font-size:.8rem; color:var(--text-muted); }

/* === PLANS === */
.plan-card {
  border-radius:var(--radius); padding:36px 28px; background:#fff;
  box-shadow:var(--shadow); text-align:center; transition:var(--transition);
  border:2px solid transparent; position:relative;
}
.plan-card:hover, .plan-card.featured { border-color:var(--accent); transform:translateY(-6px); box-shadow:var(--shadow-md); }
.plan-badge { position:absolute; top:-14px; left:50%; transform:translateX(-50%); background:var(--accent); color:var(--dark); padding:4px 18px; border-radius:20px; font-size:.8rem; font-weight:700; }
.plan-name { font-size:1.3rem; font-weight:800; color:var(--primary); margin-bottom:8px; }
.plan-price { font-family:'Russo One', sans-serif; font-size:2.2rem; color:var(--accent); margin:16px 0; }
.plan-price span { font-size:.9rem; color:var(--text-muted); font-family:'Inter', sans-serif; font-weight:400; }
.plan-features { text-align:left; margin:20px 0 28px; }
.plan-features li { padding:8px 0; border-bottom:1px solid var(--border); font-size:.9rem; display:flex; gap:10px; align-items:flex-start; }
.plan-features li i { color:var(--success); margin-top:3px; }
.plan-support { font-size:.82rem; color:var(--text-muted); margin-top:14px; }
.plan-support i { color:var(--success); }

/* === MEMBERS STATS === */
.stat-circle { text-align:center; }
.stat-number { font-family:'Russo One', sans-serif; font-size:3rem; color:var(--accent); }
.stat-label { color:var(--text-muted); font-size:.9rem; }

/* === FORMS === */
.form-group { margin-bottom:20px; }
.form-label { display:block; font-weight:600; margin-bottom:6px; font-size:.9rem; color:var(--text); }
.form-control {
  width:100%; padding:12px 16px; border:1.5px solid var(--border);
  border-radius:8px; font-size:.95rem; transition:var(--transition);
  background:#fff; color:var(--text);
}
.form-control:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(26,58,92,.1); }
.form-control.error { border-color:var(--error); }
.form-hint { font-size:.8rem; color:var(--text-muted); margin-top:4px; }
.form-error { font-size:.82rem; color:var(--error); margin-top:4px; }
select.form-control { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23718096'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:18px; padding-right:40px; }
textarea.form-control { min-height:120px; resize:vertical; }

/* === BADGE === */
.badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:.75rem; font-weight:700; }
.badge-active    { background:#c6f6d5; color:#276749; }
.badge-pending   { background:#fefcbf; color:#744210; }
.badge-suspended { background:#fed7d7; color:#c53030; }
.badge-deleted   { background:#e2e8f0; color:#4a5568; }

/* === AVATAR === */
.avatar { border-radius:50%; object-fit:cover; }
.avatar-sm  { width:36px; height:36px; }
.avatar-md  { width:56px; height:56px; }
.avatar-lg  { width:90px; height:90px; }
.avatar-xl {
  display: block;
  position: relative;
  top: -300px;
  width: 120px;
  height: 120px;
  border: 4px solid #fff;
}

/* === PRESIDENTE SECTION === */
.presidente-section { background:linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%); color:#fff; padding:80px 0; }
.presidente-card { display:flex; gap:50px; align-items:center; }
.presidente-photo { width:450px; height:600px; object-fit:cover; border-radius:var(--radius); box-shadow:0 20px 50px rgba(0,0,0,.4); flex-shrink:0; }
.presidente-info h2 { font-family:'Russo One', sans-serif; font-size:1.4rem; margin-bottom:4px; }
.presidente-info .title { color:var(--accent); font-size:.9rem; margin-bottom:20px; }
.presidente-info blockquote { font-size:1.05rem; line-height:1.8; opacity:.9; font-style:italic; border-left:4px solid var(--accent); padding-left:20px; }
.presidente-social { display:flex; gap:14px; margin-top:24px; }
.presidente-social a { width:40px; height:40px; border-radius:50%; border:1.5px solid rgba(255,255,255,.3); display:flex; align-items:center; justify-content:center; color:#fff; transition:var(--transition); }
.presidente-social a:hover { background:var(--accent); border-color:var(--accent); color:var(--dark); }

/* === ABOUT === */
.mission-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.mission-card { background:#fff; border-radius:var(--radius); padding:30px 24px; box-shadow:var(--shadow); text-align:center; border-top:4px solid var(--accent); }
.mission-card h3 { font-size:1.1rem; font-weight:800; color:var(--primary); margin-bottom:14px; }
.mission-card p { font-size:.9rem; color:var(--text-muted); line-height:1.7; }

/* === VIDEO CARDS (vertical/horizontal) === */
.videos-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:20px; }
.video-card { border-radius:var(--radius); overflow:hidden; background:#fff; box-shadow:var(--shadow); cursor:pointer; }
.video-thumb { aspect-ratio:9/16; position:relative; overflow:hidden; background:#000; }
.video-thumb.horizontal { aspect-ratio:16/9; }
.video-thumb video, .video-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.video-play-btn { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.3); color:#fff; font-size:2.5rem; }

/* === SEARCH BAR === */
.search-bar { display:flex; gap:10px; }
.search-input { flex:1; border:1.5px solid var(--border); border-radius:8px; padding:10px 16px; font-size:.9rem; }
.search-input:focus { outline:none; border-color:var(--primary); }

/* === PAGINATION === */
.pagination { display:flex; gap:6px; justify-content:center; margin-top:36px; }
.page-btn { min-width:40px; height:40px; border:1.5px solid var(--border); border-radius:8px; background:#fff; cursor:pointer; font-size:.9rem; display:flex; align-items:center; justify-content:center; transition:var(--transition); color:var(--text); }
.page-btn:hover, .page-btn.active { background:var(--primary); border-color:var(--primary); color:#fff; }

/* === KYAMI REFERENCE BOX === */
.kyami-box { border:2px solid var(--accent); border-radius:var(--radius); padding:28px; background:#fff; max-width:520px; margin:0 auto; }
.kyami-box h2 { color:var(--accent2); font-size:1.3rem; margin-bottom:16px; }
.kyami-ref-display { background:var(--body-bg); border:2px dashed var(--accent); border-radius:8px; padding:18px 22px; margin:16px 0; }
.kyami-ref-display p { font-size:1rem; margin:6px 0; }
.kyami-ref-display .ref-number { font-size:1.5rem; font-weight:800; color:var(--primary); letter-spacing:3px; }

/* === TOGGLE (admin settings) === */
.toggle { position:relative; display:inline-block; width:52px; height:28px; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:#ccc; border-radius:28px; cursor:pointer; transition:var(--transition); }
.toggle-slider::before { content:''; position:absolute; width:22px; height:22px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:var(--transition); }
.toggle input:checked + .toggle-slider { background:var(--success); }
.toggle input:checked + .toggle-slider::before { transform:translateX(24px); }

/* === CHARTS (inline CSS) === */
.chart-bar-wrap { margin:10px 0; }
.chart-bar-label { font-size:.82rem; color:var(--text-muted); margin-bottom:4px; display:flex; justify-content:space-between; }
.chart-bar-track { background:var(--border); border-radius:4px; height:10px; overflow:hidden; }
.chart-bar-fill { height:100%; border-radius:4px; background:linear-gradient(90deg, var(--primary), var(--accent2)); transition:width 1s ease; }

/* === VIDEO embed fix === */
.video-embed-wrap { position:relative; padding-bottom:56.25%; height:0; overflow:hidden; border-radius:var(--radius); background:#000; }
.video-embed-wrap iframe, .video-embed-wrap video { position:absolute; top:0; left:0; width:100%; height:100%; border:none; }
.post-video { width:100%; max-height:420px; display:block; background:#000; }
.post-media { width:100%; max-height:480px; object-fit:cover; display:block; cursor:zoom-in; }

/* === PAGE HEADER === */
.page-header { background:linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%); color:#fff; padding:80px 0 60px; margin-top:70px; text-align:center; }
.page-header h1 { font-family:'Russo One', sans-serif; font-size:clamp(1.8rem, 4vw, 3rem); margin-bottom:14px; }
.page-header p { font-size:1.05rem; opacity:.85; max-width:600px; margin:0 auto; }

/* === FOOTER === */
.footer { background:var(--dark); color:#fff; }
.footer-top { padding:70px 0 50px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1.5fr; gap:50px; }
.footer-logo { font-family:'Russo One', sans-serif; font-size:2rem; }
.footer-logo span { color:var(--accent); }
.footer-brand p { font-size:.9rem; opacity:.7; margin-top:14px; line-height:1.8; }
.footer-social { display:flex; gap:12px; margin-top:20px; }
.footer-social a { width:38px; height:38px; border-radius:50%; border:1px solid rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; transition:var(--transition); }
.footer-social a:hover { background:var(--accent); border-color:var(--accent); color:var(--dark); }
.footer-col h4 { font-size:.95rem; font-weight:700; margin-bottom:18px; color:var(--accent); }
.footer-col ul li { margin-bottom:10px; }
.footer-col ul li a { font-size:.88rem; opacity:.75; transition:var(--transition); }
.footer-col ul li a:hover { opacity:1; color:var(--accent); }
.footer-contact li { display:flex; gap:12px; align-items:flex-start; font-size:.88rem; opacity:.8; margin-bottom:12px; }
.footer-contact li i { color:var(--accent); margin-top:3px; }
.footer-bottom { background:rgba(0,0,0,.3); padding:18px 0; text-align:center; font-size:.82rem; opacity:.6; }

/* === PLAN select-card active state (register) === */
.plan-select-card.active {
  border-color: var(--accent) !important;
  background: #fff8f4 !important;
}

/* ── Notícias listing tabs ── */
.noticias-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); overflow-x: auto; }
.noticias-tabs::-webkit-scrollbar { height: 3px; }

/* ── Plan cards ── */
.plan-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }

/* ── Notícia / Vídeo / Podcast singlepost ── */
.news-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; }
.video-layout { display: grid; grid-template-columns: 1fr 340px; }
.pod-layout { display: grid; grid-template-columns: 1fr 260px; gap: 36px; }

/* =============================================
   RESPONSIVE — global
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .news-layout { grid-template-columns: 1fr; }
  .video-layout { grid-template-columns: 1fr !important; }
  .pod-layout   { grid-template-columns: 1fr !important; }
  .videos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

@media (max-width: 1200px) {
  .videos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 768px) {
    
    table {font-size: 0.85rem; }
    th, td {padding: 8px; white-space: nowrap;}
  .avatar-sm {width: 28px; height: 28px;}
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .mission-grid { grid-template-columns: 1fr; }
  .presidente-card { flex-direction: column; text-align: left; }
  .presidente-photo { width: 350px; height: 500px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 50px 0; }
  .community-grid {grid-template-columns: 1fr; gap: 30px;}
  /* Vídeos homepage */
  .videos-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .video-thumb { aspect-ratio: 9/16; }

  /* Notícias listing */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .news-card { font-size: .9rem; }
  .noticias-tabs a { padding: 10px 14px; font-size: .85rem; }

  /* Notícia single */
  .news-layout { grid-template-columns: 1fr; gap: 28px; }
  .news-layout aside { order: -1; }

  /* Vídeo single */
  .video-layout { grid-template-columns: 1fr; }

  /* Podcast single */
  .pod-layout { grid-template-columns: 1fr; }

  /* Planos */
  .plan-cards-grid { grid-template-columns: 1fr; }
  .plan-card { max-width: 440px; margin: 0 auto; width: 100%; }

  /* Registo */
  .register-grid { grid-template-columns: 1fr !important; }

  /* Rodapé */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Presidente */
  .presidente-card { flex-direction: column; align-items: flex-start; gap: 24px; }
  .presidente-photo { width: 100%; max-width: 320px; height: auto; aspect-ratio: 3/4; margin: 0 auto; }

  /* Secções gerais */
  .section { padding: 40px 0; }
  .page-header { padding: 60px 0 30px; }
  .page-header h1 { font-size: 1.8rem; }

  /* Hero notícia */
  .noticia-hero { padding: 40px 0 0 !important; }
  .noticia-hero h1 { font-size: 1.5rem !important; }

  /* Video hero dark bg */
  .video-info-bar { padding: 14px 16px !important; }

  /* Podcast hero */
  .pod-hero-wrap { flex-direction: column !important; gap: 16px !important; }
  .pod-cover { width: 140px !important; height: 140px !important; margin: 0 auto !important; }

  /* Grid 3 colunas → 1 */
  .mission-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .plan-card { padding: 24px 18px; }
  .btn-lg { padding: 12px 24px; font-size: .95rem; }
  .kyami-box { padding: 18px; }
  .kyami-ref-display .ref-number { font-size: 1.1rem; letter-spacing: 1px; }

  /* Vídeos 2 colunas no mobile muito pequeno */
  .videos-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Notícias listing: 1 coluna */
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  /* Tabs overflow com scroll */
  .noticias-tabs a { padding: 9px 12px; font-size: .8rem; white-space: nowrap; }

  /* Formulários */
  .form-group { margin-bottom: 14px; }
  .form-control { font-size: .9rem; }
  .btn { font-size: .85rem; padding: 9px 18px; }
  .btn-sm { padding: 6px 12px; font-size: .78rem; }
}
