/*
 * Pódiotendência Website Stylesheet
 *
 * This stylesheet defines the colour palette and layout rules for the
 * Pódiotendência corporate website. The design uses a clean and modern
 * aesthetic with a focus on readability and accessibility. Colours are
 * defined as CSS variables to make it easy to adjust the palette. The
 * layout adapts gracefully to different screen sizes using flexbox and
 * CSS grid. Navigation collapses into a hamburger menu on small
 * displays, and form elements are styled for usability.
 */

:root {
  /*
   * Paleta de cores adaptada ao logótipo Pódiotendência
   *
   * - --primary: Laranja vivo inspirado na cor do símbolo
   * - --secondary: Laranja queimado para contrastar em botões
   * - --light: Branco para fundos claros
   * - --dark: Cinzento muito escuro para fundos e cabeçalhos
   * - --muted: Cinzento médio para textos secundários
   */
  --primary: #ffa500;
  --secondary: #e67e22;
  --light: #ffffff;
  --dark: #1a1a1a;
  --muted: #7f8c8d;
}

/* Base typography and layout */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: white;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header and navigation */
header {
  /* Cabeçalho escuro para combinar com a cor de fundo do logótipo */
  background: var(--dark);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid #e3e7eb;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
}

/* Imagem do logótipo no cabeçalho */
.logo-img {
  height: 36px;
  width: auto;
  margin-right: 0.5rem;
}

nav .nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav .nav-links li a {
  color: var(--light);
  font-weight: 500;
  transition: color 0.2s ease;
}

nav .nav-links li a:hover {
  color: var(--primary);
}

/* Hamburger menu button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.menu-toggle span {
  /*
   * As barras do botão de menu (hamburger) precisam ter cor clara para
   * serem visíveis sobre o cabeçalho escuro. Utilizamos a cor --light
   * (branco) para que o ícone apareça bem definido em ecrãs pequenos.
   */
  height: 3px;
  width: 100%;
  background: var(--light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -5px);
}

/* Responsive navigation for mobile */
@media (max-width: 768px) {
  nav .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: flex-start;
    width: 220px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  nav .nav-links.active {
    transform: translateX(0);
  }
  nav .nav-links li {
    margin-bottom: 1rem;
  }
  nav .nav-links li:last-child {
    margin-bottom: 0;
  }
  .menu-toggle {
    display: flex;
    /* Afasta o botão de menu da margem direita em ecrãs pequenos com o mesmo espaçamento do cabeçalho */
    margin-right: 1.5rem;
  }
}

/* Ajustes de tipografia para ecrãs pequenos */
@media (max-width: 768px) {
  .hero h1 {
    /* Reduz o tamanho do título para caber em ecrãs pequenos sem quebra irregular */
    font-size: 1.8rem;
    line-height: 1.3;
    padding: 0 0.5rem;
    /* Mantém comportamento normal de quebra de linha; a frase está manualmente dividida em 3 linhas no HTML */
  }
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  position: relative;
  background-image: url("images/hero-bg.png");
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--secondary);
  color: white;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--primary);
}

/* Section styles */
.section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary);
}

.section p {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  color: var(--muted);
}

/* Services grid */
.services-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

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

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.card p {
  color: var(--muted);
  margin-bottom: 0;
}

/* Testimonials */
.testimonials {
  background: var(--light);
}

.testimonials-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.testimonial {
  background: white;
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 6px;
  max-width: 300px;
  color: var(--dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.testimonial p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Page title bar */
.page-title {
  padding: 6rem 1.5rem;
  background: var(--primary);
  color: white;
  text-align: center;
  margin-top: 60px;
}

.page-title h1 {
  margin: 0;
  font-size: 2.4rem;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d9e0;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
}

footer p {
  margin: 0.5rem 0;
  color: #d8e0e8;
  font-size: 0.9rem;
}
/* Obras (galeria dentro de Serviços) */
.obras-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.obra-card {
  position: relative;
  background: var(--light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.obra-card:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0,0,0,0.08); }
.obra-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.service-tag { padding: 0.6rem 1rem; font-weight: 600; color: white; background: var(--secondary); text-align: center; }

/*--------------------------------------------------------------
 * How It Works section
 *
 * The "Como Trabalhamos" section on the homepage lacked styling,
 * which left the numbered steps looking misaligned and plain.  To
 * better integrate this section with the overall design, we use a
 * responsive grid layout for the steps and style each step as a
 * card.  The numbers appear inside coloured circles and the
 * typography matches the rest of the site.
 */

.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step-card {
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.2s ease;
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--light);
  background: var(--primary);
  height: 48px;
  width: 48px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.step-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.step-card p {
  color: var(--muted);
  margin: 0;
}

/* ==== FIX: espaçamento do título no mobile ==== */

/* 1) Define a altura do cabeçalho como variável reutilizável */
:root{
  --header-height: 72px; /* ajusta para 64–76px conforme o teu header real */
}

/* 2) Mobile/tablet: hero deixa de centrar verticalmente e arranca no topo */
@media (max-width: 768px){
  .hero{
    display: flex;
    align-items: flex-start;   /* <- em vez de center */
    justify-content: center;

    /* reserva espaço: altura do header + respiro + notch (se existir) */
    padding-top: calc(var(--header-height) + 24px + env(safe-area-inset-top));
    padding-bottom: 80px;      /* para a barra CTA não cortar em baixo */
    min-height: 75vh;
  }

  /* garante que não há margens extra impostas antes */
  .hero-content{ margin-top: 0; }
}

/* 3) Telefones pequenos: repete a regra para consistência */
@media (max-width: 480px){
  .hero{
    align-items: flex-start;
    padding-top: calc(var(--header-height) + 24px + env(safe-area-inset-top));
  }
  .hero-content{ margin-top: 0; }
}

/*
 * Floating CTA bar
 *
 * A barra fixa no canto inferior do ecrã oferece um acesso rápido
 * ao contacto telefónico, ao WhatsApp e ao pedido de orçamento.
 * Estas regras definem o posicionamento fixo, o espaçamento,
 * as cores e o estilo dos botões para garantir que o CTA se
 * destaca mas continua coerente com a identidade visual da marca.
 */

.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  z-index: 1100; /* assegura que fica acima de outros elementos */
}

.cta-bar a {
  text-decoration: none;
}

.cta-main-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: var(--light);
  border-radius: 25px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.cta-main-btn:hover {
  background: var(--secondary);
}

.cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: var(--light);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.cta-icon:hover {
  background: var(--secondary);
}

@media (max-width: 480px) {
  .cta-bar {
    justify-content: space-around;
  }
}

