/* ==========================================================================
   SASocial.eu — folha de estilos única
   Replica o aspeto do site WordPress (Blocksy + Elementor) em CSS puro.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --c-primary: #2872fa;
  --c-primary-dark: #1559ed;
  --c-brand: #003462;
  --c-brand-2: #004d80;
  --c-heading: #192a3d;
  --c-text: #3a4f66;
  --c-muted: #808080;
  --c-border: #e1e8ed;
  --c-bg-alt: #f2f5f7;
  --c-bg-soft: #fafbfc;
  --c-white: #ffffff;
  --c-accent: #00a2ff;
  --c-btn-gray: #818a91;
  --c-quote-bg: #e6e9ec;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: "Montserrat", var(--font-system);
  --font-hero: "Poppins", var(--font-system);
  --container-max: 1290px;
  --gutter: 5vw;
  --header-h: 120px;
  --header-h-sticky: 70px;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--c-heading); font-weight: 700; margin: 0 0 20px; line-height: 1.2; }
p { margin: 0 0 24px; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }
ul, ol { margin: 0 0 24px; padding-left: 22px; }
li { margin-bottom: 6px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.container { width: min(var(--container-max), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  padding: 8px 16px; background: var(--c-heading); color: #fff; text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, .1);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
  transition: height .2s ease;
}
.site-header.is-sticky .header-inner { height: var(--header-h-sticky); }
.logo { margin-right: auto; display: block; }
.logo img { height: 50px; width: auto; transition: height .2s ease; }
.site-header.is-sticky .logo img { height: 40px; }

.lang-switcher { display: flex; gap: 28px; font-size: 12px; font-weight: 500; text-transform: uppercase; }
.lang-switcher a { display: inline-flex; align-items: center; gap: 7px; color: var(--c-text); text-decoration: none; }
.lang-switcher a:hover, .lang-switcher a.is-active { color: var(--c-primary); }
.flag { width: 18px; height: 12px; border-radius: 1px; }

.menu-toggle {
  position: relative; width: 20px; height: 20px; margin-left: 4px; padding: 0;
  border: 0; background: none; cursor: pointer; color: #000;
}
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
  content: ""; position: absolute; right: 0; height: 2px; border-radius: 2px; background: currentColor;
}
.menu-toggle::before { top: 3px; width: 20px; }
.menu-toggle span { top: 9px; width: 12px; }
.menu-toggle::after { top: 15px; width: 20px; }
.menu-toggle:hover { color: var(--c-primary); }

/* ---------- Menu off-canvas ---------- */
.offcanvas {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 20px 40px; overflow-y: auto;
  background: var(--c-heading); color: #fff;
}
.offcanvas-close {
  position: absolute; top: 20px; right: 28px;
  width: 36px; height: 36px; border: 0; background: none; color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer;
}
.offcanvas-close:hover { color: var(--c-accent); }
.offcanvas-logo { width: 150px; margin: 0 auto 40px; }
.offcanvas nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.offcanvas nav li { margin: 0; }
.offcanvas nav a {
  display: block; padding: 9px 0;
  color: #fff; font-size: 20px; font-weight: 700; text-decoration: none;
}
.offcanvas nav a:hover { color: var(--c-accent); }
.offcanvas .lang-switcher { margin-top: 30px; justify-content: center; font-size: 14px; }
.offcanvas .lang-switcher a { color: #fff; }
.offcanvas .lang-switcher a.is-active, .offcanvas .lang-switcher a:hover { color: var(--c-accent); }
body.menu-open { overflow: hidden; }

/* ---------- Título de página e hero ---------- */
.page-title { font-size: 30px; line-height: 1.5; margin: 60px 0 40px; }

.hero {
  position: relative; display: flex; align-items: center;
  min-height: 100vh; min-height: 100svh; padding: 10px;
  color: #fff; overflow: hidden;
  background: var(--c-brand) url("../assets/img/ipca_header.jpg") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .88;
  background: radial-gradient(at center center, var(--c-brand-2) 0%, var(--c-heading) 100%);
}
.hero-content { position: relative; padding: 10px; width: 100%; }
.hero-logo { width: 400px; margin: 0 0 30px; }
.hero h1 { color: #fff; font-size: 70px; font-weight: 600; line-height: 1; margin: 0 0 20px; }
.hero h2 { color: var(--c-accent); font-family: var(--font-hero); font-size: 50px; font-weight: 600; line-height: 1; margin: 0; }

/* ---------- Secções ---------- */
.section { padding: 40px 15px; scroll-margin-top: calc(var(--header-h-sticky) + 20px); }
.section h2 { font-size: 20px; line-height: 1; margin: 0 0 20px; }
.section h3 { font-size: 30px; line-height: 1; margin: 0 0 20px; }
.section-title-xl {
  font-family: var(--font-display); font-size: 56px; font-weight: 800; line-height: 1;
  color: var(--c-brand-2); margin: 0 0 40px;
}
.section-title-xl--dark { color: var(--c-heading); font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.two-col .media img { width: 100%; }
.two-col .media { text-align: center; }
.caption { text-align: center; margin: 10px 0 0; }
.text > :last-child { margin-bottom: 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block; padding: 5px 20px; border: 0; border-radius: 3px;
  background: var(--c-primary); color: #fff; font-size: 15px; font-weight: 500; line-height: 1.5;
  text-decoration: none; cursor: pointer; transition: background .2s ease;
}
.btn:hover { background: var(--c-primary-dark); color: #fff; }
.btn--gray { background: var(--c-btn-gray); font-weight: 400; padding: 12px 24px; }
.btn--gray:hover { background: #6c757d; }
.btn--outline { background: transparent; border: 2px solid #fff; color: #fff; font-weight: 400; padding: 12px 24px; }
.btn--outline:hover { background: #fff; color: var(--c-heading); }
.btn-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 10px; }

/* ---------- Notícias (home) ---------- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.news-item { display: grid; gap: 0; }
.news-item .date { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.news-item .date svg { width: 16px; height: 16px; }
.news-item h3 { font-size: 20px; line-height: 1.5; margin: 0 0 16px; }
.news-item h3 a { color: var(--c-heading); text-decoration: none; }
.news-item h3 a:hover { color: var(--c-primary); }
.news-item p { margin: 0; }
.news-item .thumb { margin: 0 0 16px; max-width: 420px; }
.news-more { text-align: center; margin-top: 40px; }

/* ---------- Comunidade ---------- */
.logos { display: grid; grid-template-columns: repeat(9, 1fr); gap: 20px; align-items: center; margin-top: 40px; }
.logos img { width: 100%; }

/* ---------- Arquitetura: camadas ---------- */
.layers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; margin: 30px 0 40px; }
.layers p { margin: 0; }
.layers strong { display: block; }
.layer-1 strong { color: #ffcc00; }
.layer-2 strong, .layer-3 strong, .layer-4 strong { color: #339966; }
.layer-5 strong { color: #333399; }
.two-col + .layers { margin-top: 40px; }

/* ---------- Equipa ---------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.team h3 { font-size: 25px; line-height: 1.5; color: var(--c-muted); margin: 0 0 17px; }
.team .subhead { font-weight: 700; color: var(--c-heading); margin: 0 0 20px; }
.team dl { margin: 0 0 30px; }
.team dt { font-weight: 700; color: var(--c-heading); }
.team dd { margin: 0 0 20px; }
.team dd:last-child { margin-bottom: 0; }

/* ---------- Resultados / números ---------- */
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.results img { width: 100%; }

/* ---------- Carrossel genérico ---------- */
.carousel { position: relative; padding: 0 50px; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; list-style: none; margin: 0; padding: 0; transition: transform .4s ease; touch-action: pan-y; }
.carousel-slide { flex: 0 0 100%; min-width: 0; margin: 0; }
.carousel-btn {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: none; padding: 0;
  color: #b8c2cc; font-size: 44px; line-height: 1; cursor: pointer;
}
.carousel-btn:hover { color: var(--c-primary); }
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.carousel-btn[disabled] { opacity: .3; cursor: default; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #c7cfd6; cursor: pointer; }
.carousel-dots button.is-active { background: var(--c-primary); }
.carousel.is-single .carousel-btn, .carousel.is-single .carousel-dots { display: none; }

/* ---------- Testemunhos ---------- */
.testimonial { margin: 0; }
.testimonial blockquote {
  position: relative; margin: 0 0 20px; padding: 20px;
  background: var(--c-quote-bg); font-size: 20.8px; font-style: italic; line-height: 1.5;
}
.testimonial blockquote::after {
  content: ""; position: absolute; left: 42px; bottom: -8px;
  border: 8px solid transparent; border-top-color: var(--c-quote-bg); border-bottom: 0;
}
.testimonial blockquote p { margin: 0; }
.testimonial figcaption { display: flex; align-items: center; gap: 20px; }
.testimonial img, .testimonial .avatar {
  width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex: 0 0 50px;
}
.testimonial .avatar {
  display: flex; align-items: center; justify-content: center;
  background: var(--c-border); color: var(--c-heading); font-weight: 700; font-size: 16px;
}
.testimonial .name { display: block; font-weight: 700; font-size: 14px; line-height: 1.5; }
.testimonial .role { display: block; font-size: 14px; line-height: 1.5; }

/* ---------- Galeria ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; margin: 0 0 20px; }
.gallery-filters button {
  padding: 7px 14px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.65; color: var(--c-text);
}
.gallery-filters button:hover, .gallery-filters button.is-active { color: var(--c-primary); }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-grid li { margin: 0; }
.gallery-item a { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--c-bg-alt); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item a::after { content: ""; position: absolute; inset: 0; background: var(--c-bg-alt); opacity: 0; transition: opacity .3s ease; }
.gallery-item a:hover::after { opacity: .68; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .92);
}
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; border: 0; background: none; color: #fff; cursor: pointer; padding: 8px;
  font-size: 44px; line-height: 1;
}
.lightbox button:hover { color: var(--c-accent); }
.lightbox-close { top: 12px; right: 20px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #cfd6dd; font-size: 14px; }

/* ---------- Tutoriais (slides) ---------- */
.tslides { padding: 0; }
.tslides .carousel-slide {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 400px; padding: 50px; color: #fff;
}
.tslide-1 { background: #833ca3; }
.tslide-2 { background: #4054b2; }
.tslide-3 { background: #1abc9c; }
.tslide-inner { max-width: 400px; }
.tslides h3 { color: #fff; font-size: 35px; line-height: 1; margin: 0 0 30px; }
.tslides p { font-size: 17px; line-height: 1.4; margin: 0 0 30px; }
.tslides .carousel-btn { color: rgba(238, 238, 238, .9); }
.tslides .carousel-btn:hover { color: #fff; }
.tslides .carousel-dots { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; }
.tslides .carousel-dots button { background: rgba(255, 255, 255, .5); }
.tslides .carousel-dots button.is-active { background: #fff; }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: 40px; }
.footer-main { background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, .1); padding: 20px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
.footer-inner p { margin: 0; text-align: center; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--c-primary); }
.footer-inner img { width: 300px; justify-self: end; }
.footer-lang { display: flex; justify-content: center; gap: 28px; padding: 14px 0; background: var(--c-bg-soft); }
.footer-lang a { display: inline-flex; align-items: center; gap: 7px; color: var(--c-text); text-decoration: none; }
.footer-lang a:hover { color: var(--c-primary); }

/* ---------- Subpáginas ---------- */
.page-content { padding-bottom: 40px; }
.page-content h2 { font-size: 22px; margin: 36px 0 16px; }
.page-content h2:first-child { margin-top: 0; }
.page-content .label { font-weight: 700; color: var(--c-heading); margin-bottom: 12px; }
.page-content ul { margin-bottom: 24px; }
.page-content li { margin-bottom: 8px; }

.entry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 48px; }
.entry-list .news-item .thumb img { width: 100%; }
.article { max-width: 100%; }
.article h1 { font-size: 36px; line-height: 1.2; margin: 0 0 12px; }
.article .date { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 32px; }
.article .article-image { margin: 32px 0; }
.article .article-image img { width: 100%; }
.article-body img { margin: 16px 0; }
.article-body h3 { font-size: 22px; margin: 28px 0 12px; }
.back-link { display: inline-block; margin-top: 32px; }
.notice { padding: 20px; background: var(--c-bg-alt); border-left: 4px solid var(--c-primary); }

.error-page { text-align: center; padding: 80px 0 60px; }
.error-page h1 { font-size: 56px; font-family: var(--font-display); color: var(--c-brand-2); margin-bottom: 8px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
  .hero h1 { font-size: 56px; }
  .hero h2 { font-size: 40px; }
  .section-title-xl { font-size: 48px; }
}
@media (max-width: 1024px) {
  .hero { min-height: 800px; }
  .hero h1 { font-size: 46px; }
  .hero h2 { font-size: 34px; }
  .layers { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(5, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  :root { --header-h: 70px; }
  .logo img { height: 42px; }
  .site-header .lang-switcher { display: none; }
  .page-title { margin: 40px 0 30px; }
}
@media (max-width: 767px) {
  :root { --gutter: 24px; }
  .hero { min-height: 612px; text-align: center; }
  .hero-logo { width: 250px; margin-inline: auto; }
  .hero h1 { font-size: 28px; line-height: 1.3; }
  .hero h2 { font-size: 28px; line-height: 1.3; }
  .section { padding: 30px 10px; }
  .section-title-xl { font-size: 40px; text-align: center; }
  .two-col, .results, .team, .footer-inner { grid-template-columns: 1fr; }
  .two-col .text { order: 0; }
  .two-col .media { order: 1; }
  .layers { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .carousel { padding: 0 32px; }
  .carousel-btn { width: 32px; font-size: 36px; }
  .tslides .carousel-slide { padding: 50px 40px; }
  .tslides h3 { font-size: 28px; }
  .footer-inner img { justify-self: center; }
  .article h1 { font-size: 28px; }
  .btn-stack .btn { width: 100%; text-align: center; }
}
