:root {
  --primary: #2563eb;
  --secondary: #3b82f6;
  --accent: #60a5fa;
  --accent-light: #bfdbfe;
  --light: #f8fafc;
  --dark: #1e293b;
  --gray: #475569;
  --border: #e2e8f0;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.15);
  --glass-dark: rgba(37, 99, 235, 0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--dark); line-height: 1.7; background: var(--white); overflow-x: hidden; }

/* Controlo de visibilidade por plataforma */
.mobile-only { display: none; }
.desktop-only { display: flex; }

/* Barra de Idioma */
.lang-bar { position: fixed; top: 0; left: 0; right: 0; background: #3b82f6; z-index: 1000; padding: 8px 0; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.lang-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; align-items: center; gap: 6px; padding: 0 20px; flex-wrap: wrap; }
.lang-btn { background: transparent; border: 1.5px solid rgba(255,255,255,0.4); color: rgba(255,255,255,0.8); padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 0.82rem; font-weight: 600; transition: all 0.3s ease; }
.lang-btn:hover { border-color: var(--white); color: var(--white); }
.lang-btn.active { background: var(--white); border-color: var(--white); color: #2563eb; }
.lang-label { color: rgba(255,255,255,0.6); font-size: 0.75rem; margin-right: 10px; text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================
   MENU LATERAL (MOBILE)
   ========================================== */
.mobile-menu-btn {
  display: block; /* Escondido por defeito no Desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-left: auto; /* Empurra o ícone para o canto direito da barra */
}

.side-menu {
  height: 100%;
  width: 0; /* Começa fechado */
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  background-color: rgba(15, 23, 42, 0.98); /* Fundo azul escuro inspirado no teu site */
  overflow-x: hidden;
  transition: 0.4s ease;
  padding-top: 60px;
  box-shadow: 2px 0 15px rgba(0,0,0,0.5);
}

.side-menu.open {
  width: 280px; /* Largura do menu quando aberto */
}

.side-menu-content {
  display: flex;
  flex-direction: column;
  padding: 20px 30px;
}

.side-menu-link {
  padding: 12px 0;
  text-decoration: none;
  font-size: 1.1rem;
  color: #f1f5f9;
  display: block;
  transition: 0.3s;
  font-weight: 500;
}

.side-menu-link:hover {
  color: var(--accent);
}

.side-menu-divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.close-menu-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 36px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
}

/* ==========================================
   AJUSTES PARA MOBILE (dentro do @media max-width: 768px)
   ========================================== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block; /* Mostra o hambúrguer no telemóvel */
  }
  
  /* Removemos os botões antigos da vista mobile que tens no ecrã inteiro */
  .hero-quick-nav {
    display: none !important;
  }
}

/* Hero Section / Banner Moderno (Desktop) - Ecrã Inteiro */
.hero-banner-container {
  position: relative;
  width: 100%;
  height: 100vh; /* Altura total no Chrome / Desktop */
  height: 100svh; /* Ajuste dinâmico para barras de navegação */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 25px;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-slide-media {
  width: 100%;
  height: 100%;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}

.hero-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  padding: 0 30px;
}

.hero-text-side {
  width: 48%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  padding: 35px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  text-align: left;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.hero-badge { 
  background: var(--glass); 
  backdrop-filter: blur(10px); 
  padding: 5px 16px; 
  border-radius: 50px; 
  font-size: 0.7rem; 
  letter-spacing: 2px; 
  text-transform: uppercase; 
  margin-bottom: 14px; 
  border: 1px solid rgba(255,255,255,0.3); 
  display: inline-block; 
  color: #eff6ff; 
}

.hero-text-side h1 { 
  font-size: clamp(1.3rem, 1.9vw, 1.9rem); 
  font-weight: 700; 
  margin-bottom: 12px; 
  line-height: 1.25; 
  color: #ffffff;
}

.hero-subtitle { 
  font-size: clamp(0.85rem, 1vw, 0.98rem); 
  opacity: 0.95; 
  margin-bottom: 20px; 
  line-height: 1.5; 
  font-weight: 300; 
}

.hero-cta { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
}

/* Indicadores / Pontos do Carrossel */
.hero-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots .dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dots .dot.active {
  background: #ffffff;
  width: 30px;
  border-radius: 6px;
}

/* ==========================================
   SETAS DE NAVEGAÇÃO DO CARROSSEL
   ========================================== */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.6);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  user-select: none;
}

.hero-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }


/* Botões gerais */
.btn { padding: 14px 36px; border-radius: 50px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; border: none; }
.btn-primary { background: #ffffff; color: #2563eb; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { background: #eff6ff; transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.6); }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.15); }

/* Seções Gerais do Site */
.section { max-width: 1100px; margin: 0 auto; padding: 80px 30px; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--primary); margin-bottom: 16px; text-align: center; }
.section-subtitle { text-align: center; color: var(--gray); max-width: 700px; margin: 0 auto 50px; font-size: 1.05rem; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.service-card { background: white; border: 2px solid var(--border); border-radius: 16px; padding: 32px 26px; transition: all 0.35s ease; position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--secondary), var(--accent)); transform: scaleX(0); transition: transform 0.35s ease; }
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { border-color: var(--accent); box-shadow: 0 12px 30px rgba(37, 99, 235, 0.06); transform: translateY(-5px); }

/*

.service-card:has(.collapsible-content[style*="display: block"]) {
  background-color: #f1f5f9; 
  border-color: #cbd5e1; 
  box-shadow: none; 
}

.service-card:has(.collapsible-content[style*="display: block"])::before {
  background: var(--gray); 
}
*/

/* Cria o alinhamento lado a lado no topo do cartão */
.service-header {
  display: flex;
  align-items: center; /* Centra verticalmente */
  gap: 16px; /* Espaço entre o ícone e o botão */
  margin-bottom: 16px; /* Espaço para o título abaixo */
}

/* Remove a margem inferior do ícone, pois o espaço já é dado pelo service-header */
.service-icon { 
  font-size: 2.2rem; 
  color: var(--secondary); 
  margin-bottom: 0; 
}

/* Garante que o botão não herda o tamanho gigante (2.2rem) do ícone caso o css global afete o header */
.service-header .btn {
  font-size: 1rem;
}

.service-title { font-weight: 700; color: var(--primary); font-size: 1.05rem; margin-bottom: 10px; }
.service-desc { color: var(--gray); font-size: 0.9rem; line-height: 1.6; }
.service-features { list-style: none; margin: 16px 0 0 0; padding: 0; }
.service-features li { padding: 5px 0; font-size: 0.85rem; color: var(--gray); display: flex; align-items: center; gap: 8px; }
.service-features li::before { content: '✓'; color: var(--secondary); font-weight: 700; }

.method-timeline { position: relative; padding-left: 40px; }
.method-timeline::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--secondary), var(--accent-light)); border-radius: 3px; }
.method-phase { position: relative; margin-bottom: 36px; background: var(--light); border-radius: 14px; padding: 28px 28px 28px 56px; border: 1px solid var(--border); }
.method-phase::before { content: attr(data-num); position: absolute; left: -28px; top: 28px; width: 40px; height: 40px; background: var(--secondary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; border: 4px solid white; box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2); }
.method-phase-title { font-weight: 700; color: var(--primary); font-size: 1.1rem; margin-bottom: 6px; }
.method-phase-week { display: inline-block; background: var(--accent-light); color: var(--primary); padding: 3px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; margin-bottom: 12px; }
.method-phase-desc { color: var(--gray); font-size: 0.93rem; }

.deliver-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.deliver-card { background: white; border: 2px solid var(--border); border-radius: 14px; padding: 26px 24px; transition: all 0.3s ease; }
.deliver-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.05); }
.deliver-icon { font-size: 1.6rem; margin-bottom: 12px; color: var(--secondary); }
.deliver-title { font-weight: 700; color: var(--primary); font-size: 1rem; margin-bottom: 10px; }
.deliver-desc { color: var(--gray); font-size: 0.88rem; line-height: 1.6; }

.cta-section { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); color: white; text-align: center; padding: 80px 30px; position: relative; overflow: hidden; }
.cta-section h2 { color: white; border: none; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; position: relative; z-index: 1; }
.cta-section p { opacity: 0.9; max-width: 600px; margin: 0 auto 30px; font-size: 1.05rem; position: relative; z-index: 1; color: #eff6ff; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-form { background: var(--white); border-radius: 16px; padding: 32px; border: 1px solid var(--border); box-shadow: 0 10px 30px var(--glass-dark); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.95rem; background: #f8fafc; color: var(--dark); }
.form-submit { width: 100%; background: var(--secondary); color: white; border: none; padding: 14px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; }

.site-footer { background: #0f172a; color: rgba(255,255,255,0.6); text-align: center; padding: 30px; font-size: 0.85rem; }
.site-footer a { color: #93c5fd; text-decoration: none; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: #fff; color: #333; padding: 30px; width: 90%; max-width: 450px; border-radius: 8px; position: relative; }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #333; }

.back-to-top { position: fixed; bottom: 30px; right: 30px; background-color: #3b82f6; color: #ffffff; width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; }
.back-to-top.show { opacity: 1; visibility: visible; }

/* ==========================================================
   VERSÃO MOBILE (Telemóveis - Ecrãs até 768px) - Ecrã Inteiro
   ================================================---------- */
@media (max-width: 768px) { 
  .contact-grid { grid-template-columns: 1fr; gap: 30px; } 
  .section { padding: 50px 20px; }
  
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }

  .hero-banner-container {
    height: 100vh; /* Altura total no telemóvel */
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 15px 20px; /* Espaço superior ajustado para a barra de topo */
    position: relative;
  }
  
  .hero-slider {
    position: relative;
    flex: 1;
    width: 100%;
    margin-bottom: 10px;
  }

  .hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-banner-img {
    border-radius: 12px;
  }

  /* Posicionamento adaptado das setas no ecrã mobile */
  .hero-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    top: 45%; 
    background: rgba(15, 23, 42, 0.7);
  }

  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }

  .hero-banner-container > .hero-dots {
    display: none !important;
  }

  .mobile-text-container {
    position: relative;
    width: 100%;
  }

  .mobile-text-slide {
    display: none;
    text-align: center;
    padding: 10px 5px;
  }

  .mobile-text-slide.active {
    display: block;
  }

  .mobile-text-slide h1 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 10px;
  }

  .mobile-text-slide .hero-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
  }

  .mobile-text-slide .hero-badge {
    background: var(--light);
    color: var(--primary);
    border-color: var(--border);
    margin-bottom: 8px;
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    text-transform: uppercase;
  }

  .mobile-text-slide .hero-cta {
    justify-content: center;
    display: flex;
    gap: 10px;
  }

  .btn-outline {
    color: var(--primary);
    border-color: var(--primary);
  } 
  
.hero-quick-nav {
    position: absolute;
    top: 75px; /* Coloca os botões logo abaixo da barra de idioma */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    flex-direction: row; /* Muda para linha horizontal */
    width: 100%;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
  }

  .quick-nav-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: auto;
    flex: 1; /* Faz os botões ocuparem espaço igual */
    background: rgba(15, 23, 42, 0.7);
  }

  /* Ajuste do botão Voltar ao Início no mobile para não tapar ecrã */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
  }  
}

/* Ajuste do contentor para alinhar tudo na horizontal */
.lang-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

/* Ajustes visuais para o logo ao lado do selector */
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}

.nav-logo-img {
  height: 28px;
  width: auto;
}

.brand-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
}

/* Estilo para países/escritórios que ainda estão em preparação */
.franchise-card-compact.coming-soon img {
  filter: grayscale(100%);
  opacity: 0.5;
  cursor: pointer;
}

.franchise-card-compact.coming-soon .franchise-title-compact {
  color: #94a3b8;
}

.franchise-card-compact.coming-soon .btn-outline {
  color: #94a3b8;
  border-color: #cbd5e1;
}

.franchise-card-compact.coming-soon .btn-outline:hover {
  background-color: #f1f5f9;
  color: #64748b;
  border-color: #94a3b8;
}