/* ==========================================================================
   PORT 2040 — Dual Gateway Hub (Brasil 🇧🇷 vs Qatar 🇶🇦 AI Agents Portal)
   ========================================================================== */

:root {
  --br-green: #009c3b;
  --br-yellow: #ffdf00;
  --br-blue: #002776;
  --br-glow: rgba(0, 230, 118, 0.25);
  --br-border: rgba(0, 230, 118, 0.4);

  --qa-maroon: #8A1538;
  --qa-white: #ffffff;
  --qa-gold: #D4AF37;
  --qa-glow: rgba(138, 21, 56, 0.4);
  --qa-border: rgba(212, 175, 55, 0.4);

  --gateway-bg: #050b14;
  --gateway-surface: #0a1322;
  --gateway-surface-hover: #101d33;
}

/* Gateway Hero Header */
.gateway-hero {
  text-align: center;
  padding: 36px 20px 24px;
  background: radial-gradient(circle at 50% 0%, #0d223f 0%, transparent 60%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 28px;
}

.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 168, 255, 0.1);
  border: 1px solid rgba(74, 168, 255, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #58b8ff;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.gateway-hero h1 {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.gateway-hero p {
  font-size: 14px;
  color: #94a3b8;
  max-width: 720px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Filter Tabs / Selector Bar */
.gateway-tabs-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.gateway-tab-btn {
  background: rgba(16, 29, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gateway-tab-btn:hover {
  background: #15273f;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.gateway-tab-btn.active {
  background: linear-gradient(135deg, #1b3a5c, #26507c);
  color: #fff;
  border-color: #58b8ff;
  box-shadow: 0 4px 20px rgba(88, 184, 255, 0.25);
}

.gateway-tab-btn.tab-br.active {
  background: linear-gradient(135deg, rgba(0, 156, 59, 0.3), rgba(0, 39, 118, 0.4));
  border-color: #00e676;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.25);
}

.gateway-tab-btn.tab-qa.active {
  background: linear-gradient(135deg, rgba(138, 21, 56, 0.4), rgba(212, 175, 55, 0.25));
  border-color: var(--qa-gold);
  color: #fff;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

/* Dual Pillar Grid Container */
.gateway-pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

/* Pillar Card Master Container */
.pillar-card {
  background: var(--gateway-surface);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

/* Brazil Pillar Styling */
.pillar-card.pillar-br {
  border: 1px solid var(--br-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(0, 230, 118, 0.05);
}

.pillar-card.pillar-br:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 230, 118, 0.15);
  border-color: #00e676;
}

/* Qatar Pillar Styling */
.pillar-card.pillar-qa {
  border: 1px solid var(--qa-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(138, 21, 56, 0.08);
}

.pillar-card.pillar-qa:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.2);
  border-color: var(--qa-gold);
}

/* Flag & Header Area */
.pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.pillar-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.flag-emblem {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-card h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pillar-card p.pillar-desc {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

/* Pillar KPI Ticker */
.pillar-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.pillar-kpi-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.pillar-kpi-box .lbl {
  font-size: 10px;
  color: #7e95b3;
  font-weight: 700;
  text-transform: uppercase;
}

.pillar-kpi-box .val {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
}

/* Pillar Agent List */
.agents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  flex: 1;
}

.agent-link-card {
  background: var(--gateway-surface-hover);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.agent-link-card:hover {
  background: #142540;
  border-color: rgba(74, 168, 255, 0.4);
  transform: translateY(-2px);
}

.pillar-br .agent-link-card:hover {
  border-color: #00e676;
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.15);
}

.pillar-qa .agent-link-card:hover {
  border-color: var(--qa-gold);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.agent-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.agent-icon {
  font-size: 18px;
}

.agent-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.agent-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.agent-summary {
  font-size: 11px;
  color: #7e95b3;
  line-height: 1.4;
}

/* Pillar Action Button */
.btn-pillar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: auto;
}

.btn-pillar-cta.cta-br {
  background: linear-gradient(135deg, #009c3b, #00c853);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 156, 59, 0.3);
}

.btn-pillar-cta.cta-br:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-pillar-cta.cta-qa {
  background: linear-gradient(135deg, #8A1538, #b01c48);
  color: #fff;
  border: 1px solid var(--qa-gold);
  box-shadow: 0 6px 20px rgba(138, 21, 56, 0.4);
}

.btn-pillar-cta.cta-qa:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Corporate Governance / Boardroom Suite */
.boardroom-suite-section {
  background: linear-gradient(180deg, #091222 0%, #060c18 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 36px;
}

.boardroom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.boardroom-header h3 {
  font-size: 16px;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boardroom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.board-card {
  background: #0d192c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.board-card:hover {
  border-color: #58b8ff;
  background: #13243f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 184, 255, 0.15);
}

.board-card strong {
  display: block;
  font-size: 13px;
  color: #fff;
  margin: 6px 0 3px;
}

.board-card small {
  display: block;
  font-size: 11px;
  color: #7e95b3;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .gateway-pillars-grid {
    grid-template-columns: 1fr;
  }
  .boardroom-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }
  .pillar-kpis {
    grid-template-columns: 1fr;
  }
  .boardroom-grid {
    grid-template-columns: 1fr;
  }
}
