/**
* FMX - Federação Moçambicana de Xadrez
* Design Premium Dark Mode
* Cores inspiradas na bandeira de Moçambique
*/

/*--------------------------------------------------------------
# Font & Color Variables
--------------------------------------------------------------*/
/* Fonts */
:root {
  --default-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-font: "Inter", sans-serif;
  --nav-font: "Inter", sans-serif;
}

/* Cores da bandeira de Moçambique */
:root {
  /* Cores primárias da bandeira */
  --moz-green: #009739;      /* Verde - esperança, agricultura */
  --moz-black: #000000;       /* Preto - continente africano */
  --moz-yellow: #FCE300;      /* Amarelo - riqueza mineral */
  --moz-red: #EF3340;         /* Vermelho - luta pela independência */
  --moz-white: #FFFFFF;       /* Branco - paz */
  
  /* Tons adaptados para dark mode premium */
  --bg-primary: #0C0F12;      /* Fundo principal quase preto */
  --bg-secondary: #151A1F;     /* Fundo secundário */
  --bg-tertiary: #1E252B;      /* Fundo terciário */
  --bg-card: #1E252B;          /* Fundo de cards */
  
  --text-primary: #EDEDED;     /* Texto principal (quase branco) */
  --text-secondary: #A0A8B5;    /* Texto secundário (cinza claro) */
  --text-muted: #6A7280;       /* Texto muted */
  --text-disabled: #3F4752;    /* Texto desabilitado */
  
  --border-color: #2C353D;     /* Cor das bordas */
  --border-light: #2A333A;      /* Borda mais clara */
  
  /* Cores de destaque baseadas na bandeira */
  --accent-green: #00A84A;      /* Verde vibrante */
  --accent-yellow: #FFD966;      /* Amarelo suave */
  --accent-red: #FF5E6B;         /* Vermelho suave */
  --accent-white: #FFFFFF;       /* Branco */
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #1E252B 0%, #151A1F 100%);
  --gradient-green: linear-gradient(135deg, rgba(0,151,57,0.15) 0%, rgba(0,151,57,0.05) 100%);
  --gradient-red: linear-gradient(135deg, rgba(239,51,64,0.15) 0%, rgba(239,51,64,0.05) 100%);
  --gradient-yellow: linear-gradient(135deg, rgba(252,227,0,0.1) 0%, rgba(252,227,0,0.02) 100%);
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-green: 0 4px 20px rgba(0, 151, 57, 0.15);
  
  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General Styling
--------------------------------------------------------------*/
body {
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-family: var(--default-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: color-mix(in srgb, var(--accent-green), white 20%);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-family: var(--heading-font);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* Selection */
::selection {
  background-color: var(--accent-green);
  color: var(--moz-white);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(12, 15, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header .logo {
  display: flex;
  align-items: center;
  line-height: 1;
}

.header .logo img {
  max-height: 40px;
  margin-right: 12px;
  transition: transform var(--transition-fast);
}

.header .logo:hover img {
  transform: scale(1.05);
}

.header .logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop */
@media (min-width: 1200px) {
  .navmenu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
  }

  .navmenu li {
    position: relative;
  }

  .navmenu a {
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
  }

  .navmenu a i {
    font-size: 0.75rem;
    margin-left: 0.5rem;
  }

  .navmenu a:hover,
  .navmenu .active {
    color: var(--accent-green);
  }

  .navmenu .dropdown ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }

  .navmenu .dropdown:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .navmenu .dropdown ul li {
    width: 100%;
  }

  .navmenu .dropdown ul a {
    padding: 0.6rem 1.5rem;
    color: var(--text-secondary);
  }

  .navmenu .dropdown ul a:hover {
    color: var(--accent-green);
    background: var(--bg-tertiary);
  }
}

/* Mobile */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
  }

  .navmenu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 2rem;
    transition: right var(--transition-normal);
    z-index: 1001;
  }

  .navmenu.active {
    right: 0;
  }

  .navmenu ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
  }

  .navmenu li {
    margin-bottom: 1rem;
  }

  .navmenu a {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: 0.5rem 0;
  }

  .navmenu a:hover,
  .navmenu .active {
    color: var(--accent-green);
  }

  .navmenu .dropdown ul {
    padding-left: 1rem;
    margin-top: 0.5rem;
    border-left: 2px solid var(--border-color);
  }
}

/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer .footer-about .logo {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.footer .footer-about .logo img {
  max-height: 40px;
  margin-right: 12px;
}

.footer .footer-about .logo span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer .footer-about p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer .social-links {
  display: flex;
  gap: 0.75rem;
}

.footer .social-links a {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer .social-links a:hover {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
  transform: translateY(-3px);
}

.footer h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer .footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer .footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.footer .footer-links a i {
  font-size: 0.75rem;
  margin-right: 0.5rem;
  color: var(--accent-green);
}

.footer .footer-links a:hover {
  color: var(--accent-green);
  transform: translateX(5px);
}

.footer .footer-contact p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.footer .footer-contact i {
  width: 24px;
  color: var(--accent-green);
}

.footer .copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/*--------------------------------------------------------------
# Page Titles
--------------------------------------------------------------*/
.page-title {
  padding: 8rem 0 4rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.page-title::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: var(--gradient-green);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
}

.page-title .container {
  position: relative;
  z-index: 1;
}

.page-title h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about-section {
  padding: 4rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  margin-bottom: 1rem;
  display: block;
}

.about-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-green);
  color: var(--accent-green);
  border-radius: 6px;
  font-size: 0.85rem;
  margin-right: 1rem;
}

.feature-list span {
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}

.feature-list small {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-image {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

.image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: white;
  font-weight: 500;
}

.image-caption small {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/*--------------------------------------------------------------
# Stats Cards
--------------------------------------------------------------*/
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-5px);
  box-shadow: var(--shadow-green);
}

.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gradient-green);
  color: var(--accent-green);
}

.stat-icon i {
  font-size: 1.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/*--------------------------------------------------------------
# Timeline
--------------------------------------------------------------*/
.history-section {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border-color);
}

.history-section h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-normal);
}

.timeline-item:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-5px);
}

.timeline-year {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-yellow);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  outline: none;
}

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

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent-green), white 10%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: translateY(-2px);
}

/*--------------------------------------------------------------
# Cards
--------------------------------------------------------------*/
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-green);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/*--------------------------------------------------------------
# Tables
--------------------------------------------------------------*/
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/*--------------------------------------------------------------
# Forms
--------------------------------------------------------------*/
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 151, 57, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/*--------------------------------------------------------------
# Badges
--------------------------------------------------------------*/
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green {
  background: var(--gradient-green);
  color: var(--accent-green);
  border: 1px solid rgba(0, 151, 57, 0.3);
}

.badge-yellow {
  background: var(--gradient-yellow);
  color: var(--accent-yellow);
  border: 1px solid rgba(252, 227, 0, 0.3);
}

.badge-red {
  background: var(--gradient-red);
  color: var(--accent-red);
  border: 1px solid rgba(239, 51, 64, 0.3);
}

/*--------------------------------------------------------------
# Alerts
--------------------------------------------------------------*/
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(0, 151, 57, 0.1);
  border-color: rgba(0, 151, 57, 0.3);
  color: var(--accent-green);
}

.alert-danger {
  background: rgba(239, 51, 64, 0.1);
  border-color: rgba(239, 51, 64, 0.3);
  color: var(--accent-red);
}

.alert-warning {
  background: rgba(252, 227, 0, 0.1);
  border-color: rgba(252, 227, 0, 0.3);
  color: var(--accent-yellow);
}

/*--------------------------------------------------------------
# Pagination
--------------------------------------------------------------*/
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.page-item .page-link:hover,
.page-item.active .page-link {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
  transform: translateY(-2px);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-title {
    padding: 6rem 0 3rem;
  }
  
  .page-title h1 {
    font-size: 2.5rem;
  }
  
  .about-text h2 {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-title h1 {
    font-size: 2rem;
  }
  
  .btn {
    width: 100%;
  }
}