/*
Theme Name: Tema Escolar Personalizado
Author: O teu Nome
Version: 1.0
Description: Tema responsivo para escola com cores Pantone personalizadas.
*/

:root {
  --pantone-navy: #1a2b4c;  /* 19-4029 TXC */
  --pantone-green-dark: #00965e; /* 3405 C */
  --pantone-green-light: #70d475; /* 7487 C */
  --text-color: #333333;
  --bg-light: #f4f6f8;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-light);
  /* A imagem de fundo será aplicada via Customizer do WordPress */
  background-image: var(--bg-custom-image, none);
  background-size: cover;
  background-attachment: fixed;
}

/* --- CABEÇALHO --- */
.site-header {
  background-color: var(--pantone-navy);
  color: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo img {
  max-height: 60px;
  width: auto;
}

/* Menu */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-navigation a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.main-navigation a:hover {
  color: var(--pantone-green-light);
}

/* Submenus */
.main-navigation ul li {
  position: relative;
}

.main-navigation ul li:hover > ul {
  display: block;
}

.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--pantone-navy);
  min-width: 200px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  padding: 0.5rem 0;
}

.main-navigation ul ul li a {
  padding: 0.5rem 1rem;
  display: block;
}

.main-navigation ul ul li a:hover {
  background-color: var(--pantone-green-dark);
}

/* --- GRELHAS RESPONSIVAS --- */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.section-title {
  color: var(--pantone-navy);
  border-bottom: 3px solid var(--pantone-green-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Grelhas */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-links {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
  flex-grow: 1;
}

/* Botões "Ver Mais" */
.btn-more {
  display: inline-block;
  background-color: var(--pantone-green-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.btn-more:hover {
  background-color: var(--pantone-green-light);
  color: var(--pantone-navy);
}

/* --- RODAPÉ --- */
.site-footer {
  background-color: var(--pantone-navy);
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-partners {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-partners img {
  max-height: 50px;
  filter: grayscale(100%);
  transition: filter 0.3s;
}

.footer-partners img:hover {
  filter: grayscale(0%);
}

/* --- MEDIA QUERIES (TELEMÓVEL / TABLET) --- */
@media (max-width: 992px) {
  .grid-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .grid-3 {
    grid-template-columns: 1fr; /* Projetos, Notícias e Oferta Formativa em 1 coluna */
  }

  .grid-links {
    grid-template-columns: repeat(2, 1fr); /* Máximo 2 por linha em telemóveis */
  }
}