/* ========================================
   COMPONENTS CSS - Projeto Didasko Portugal
   ======================================== */

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  background: rgba(26, 54, 93, 0.95);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.header.scrolled {
  background: var(--primary-navy);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.logo {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 16px;
  transition: color 0.2s;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--white);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-amber);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  color: var(--white);
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

/* Botão Apoiar fixo */
.btn-apoiar-fixed {
  position: static;
  background: var(--accent-amber);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 15px;
  white-space: nowrap;
}

.btn-apoiar-fixed:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ---- LANGUAGE SWITCHER ---- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.lang-btn {
  display: inline-block;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.lang-btn--active {
  background: var(--accent-amber);
  color: var(--white);
  border-color: var(--accent-amber);
}

.lang-btn--active:hover {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
}

@media (max-width: 900px) {
  .lang-switcher {
    position: fixed;
    top: 14px;
    right: 60px;
    z-index: 901;
  }
}

/* Mobile Nav */
@media (max-width: 1100px) {
  .nav {
    gap: 20px;
  }

  .nav a {
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary-navy);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .nav.open {
    right: 0;
  }

  .nav a {
    font-size: 20px;
    padding: 8px 0;
  }

  .menu-toggle {
    display: block;
  }

  .btn-apoiar-fixed {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 14px;
    z-index: 1000;
  }
}

/* Nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 899;
}

.nav-overlay.active {
  display: block;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn--primary:hover {
  background: #e08e09;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn--secondary {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.btn--outline:hover {
  background: var(--primary-navy);
  color: var(--white);
}

.btn--small {
  padding: 10px 20px;
  font-size: 14px;
}

.footer-support-btn {
  margin-top: 12px;
  display: inline-block;
}

.btn--paypal {
  background: #0070ba;
  color: var(--white);
  padding: 14px 28px;
}

.btn--paypal:hover {
  background: #005a9e;
}

/* Simple row for small CTAs */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* White outline variant (for dark backgrounds) */
.stats-section .btn--outline,
.page-hero .btn--outline {
  border-color: var(--white);
  color: var(--white);
}

.stats-section .btn--outline:hover,
.page-hero .btn--outline:hover {
  background: var(--white);
  color: var(--primary-navy);
}

/* ---- HERO ---- */
.hero {
  height: 100vh;
  min-height: 600px;
  background-color: var(--primary-navy);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
}

.hero--index {
  /* Usa caminho relativo correto a partir da pasta css */
  background: linear-gradient(rgba(26, 54, 93, 0.75), rgba(26, 54, 93, 0.75)), url('../assets/img/hero-portugal.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}


.hero__content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  opacity: 0.95;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

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

@media (max-width: 768px) {
  .hero {
    height: 90vh;
    min-height: 500px;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero__ctas .btn {
    width: 100%;
    max-width: 320px;
    margin: 0;
  }
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: var(--primary-navy);
  color: var(--white);
  text-align: center;
  padding: 140px 20px 80px;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 20px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Generic content cards (used in info sections) */
.info-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .info-card {
    padding: 20px;
  }
}

/* ---- STATS ---- */
.stats-section {
  background: var(--primary-navy);
  color: var(--white);
  padding: 80px 20px;
}

.stats-section h2 {
  color: var(--white);
  text-align: center;
  margin-bottom: 1rem;
}

.stats-section .section-intro {
  color: rgba(255, 255, 255, 0.8);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin: 48px 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 40px 24px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card--highlight {
  background: var(--secondary-terracotta);
  transform: scale(1.05);
}

.stat-card--highlight:hover {
  transform: scale(1.05) translateY(-4px);
}

.stat-number {
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.stat-context {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 0;
}

/* ---- TWO COLUMNS ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---- ABOUT PREVIEW ---- */
.about-preview {
  background: var(--off-white);
}

.about-preview__image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  aspect-ratio: 4 / 3;
}

.about-preview__content h2 {
  margin-bottom: 0.5rem;
}

.about-preview__content h3 {
  color: var(--secondary-terracotta);
  margin-bottom: 1.5rem;
}

.credentials {
  margin-bottom: 1.5rem;
}

.credentials p {
  margin: 8px 0;
  font-weight: 500;
}

blockquote {
  border-left: 4px solid var(--secondary-terracotta);
  padding-left: 24px;
  font-style: italic;
  color: var(--gray-medium);
  margin: 24px 0;
  font-size: 17px;
  line-height: 1.6;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--gray-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 30px;
}

.footer-newsletter {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-newsletter h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  align-items: stretch;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 16px;
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--accent-amber);
  outline: none;
}

.newsletter-form .btn {
  padding: 14px 28px;
  width: 100%;
}

.newsletter-message {
  max-width: 500px;
  margin: 12px auto 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.4;
}

/* Footer (fundo escuro) */
.footer .newsletter-message {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}

.footer .newsletter-message--success {
  border-color: rgba(72, 187, 120, 0.6);
}

.footer .newsletter-message--error {
  border-color: rgba(230, 126, 34, 0.7);
}

/* Popup (fundo claro) */
.newsletter-popup .newsletter-message {
  max-width: 420px;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  color: var(--gray-dark);
}

.newsletter-popup .newsletter-message--success {
  border-color: var(--success);
}

.newsletter-popup .newsletter-message--error {
  border-color: var(--secondary-terracotta);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 18px;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
  font-size: 16px;
}

.footer-links a:hover {
  color: var(--accent-amber);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-partner-section {
  margin-top: 20px;
}

.footer-partner-section h4 {
  margin-bottom: 12px;
}


.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 0;
  background: transparent;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.footer-social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.footer-social-img {
  width: 32px;
  height: 32px;
  display: block;
}

.footer-partner {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-partner-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.footer-partner-col {
  display: inline-flex;
  align-items: center;
}

.footer-partner-logo {
  width: 60px;
  height: auto;
  display: block;
  filter: brightness(1.05);
}

.footer-partner-text {
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

.footer .footer-support-btn {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.footer .footer-support-btn:hover {
  background: var(--accent-amber);
  color: var(--white);
}

.footer-copy {
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .newsletter-form {
    width: 100%;
  }
}

/* ---- NEWSLETTER POPUP ---- */
.newsletter-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}

.popup-content {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-content h3 {
  margin-bottom: 0.5rem;
}

.popup-content p {
  color: var(--gray-medium);
  margin-bottom: 1.5rem;
}

.popup-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-content input[type="email"] {
  padding: 14px 20px;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
}

.popup-content input[type="email"]:focus {
  border-color: var(--accent-amber);
  outline: none;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--gray-medium);
  line-height: 1;
  transition: color 0.2s;
}

.popup-close:hover {
  color: var(--gray-dark);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- COPY BOX ---- */
.copy-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--off-white);
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
}

.copy-box code {
  flex: 1;
  font-family: 'Inter', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-dark);
  word-break: break-all;
}

.btn-copy {
  background: var(--primary-navy);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  border: none;
}

.btn-copy:hover {
  background: var(--secondary-terracotta);
}

.btn-copy.copied {
  background: var(--success);
}

/* ---- TOAST NOTIFICATION ---- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--success);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  z-index: 10000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
