/*
Theme Name: App First (Mobile-First) — v3
Theme URI: https://example.com
Author: André Montanari + J.A.R.V.I.S.
Author URI: https://example.com
Description: Layout de app (mobile-first) com drawer, overlay e tabbar. v3: topbar oculta no mobile e conteúdo full-bleed (sem margens) no celular.
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: app-first
*/

/* --------------------
   Design tokens
---------------------*/
:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --brand: #067689;
  --brand-strong: #00AAC7;
  --brand-contrast: #ffffff;
  --muted: #efeff4;
  --muted-2: #e6e6ea;
  --border: #dadadd;
  --text-900: #161616;
  --text-700: #2e2e2e;
  --text-500: #6e6e73;
  --text-contrast: #f7f7f9;
  --text-contrast-2: #e9e9ef;
  --header-h: 56px;
  --tabbar-h: 60px;

  /* extras p/ FAB */
  --fab-size: 56px;
  --fab-gap: 16px;
  --fab-shadow: 0 10px 24px #067689;
}

/* Reset */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
  line-height: 1.45;
  color: var(--text-contrast);
  background: linear-gradient(160deg, #00a2ac 0%, #3ad0e9 50%, #00a2ac 100%);
  background-attachment: fixed;
}

/*
.site-logo img {
  max-width: 250px;
  max-height: 85px;
  margin-top: 5px;
  height: auto;
  width: auto;
}
  */

.site-logo svg path {
  transition: fill 0.3s ease;
}

.site-logo:hover svg path {
  fill: #0099ff;
}



.fa-user {
  color: #1d8da1;
  font-size: 24px;
}


/* Tipografia */
h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  margin: 12px 16px 6px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 12px 16px 6px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 12px 16px 6px;
}

p,
.entry {
  color: #333;
}

/* Bloco principal do conteúdo do post */
.post-content {
  background-color: #fff;
  color: #333;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

/* Imagens dentro do conteúdo */
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Efeito sutil ao passar o mouse */
.post-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Legendas de imagens */
.wp-caption,
.post-content figure figcaption {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.4;
  font-style: italic;
}

/* Parágrafos dentro do conteúdo */
.post-content p {
  color: #333;
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
}

/* Links dentro do conteúdo */
.post-content a {
  color: #067689;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.post-content a:hover,
.post-content a:focus {
  color: #04515a;
  opacity: 0.85;
  text-decoration: none;
}

/* Responsividade e leitura em dispositivos móveis */
@media (max-width: 600px) {
  .post-content {
    padding: 1rem 1.25rem;
    font-size: 0.97rem;
    line-height: 1.6;
  }

  .post-content p {
    font-size: 0.97rem;
    line-height: 1.55;
  }

  .post-content a {
    display: inline-block;
    word-break: break-word;
  }

  .post-content img {
    margin: 1rem auto;
    border-radius: 8px;
  }

  .wp-caption,
  .post-content figure figcaption {
    font-size: 0.85rem;
  }
}



/* App Header */
.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  padding-inline: 12px;
  z-index: 30;
}

.app-header .pill {
  background: rgba(255, 255, 255, .12);
  color: var(--text-contrast);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 8px 12px;
}

.app-header__title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

/* Main container - FULL BLEED on mobile */
.app-main {
  padding-top: calc(var(--header-h) + var(--safe-top) + 8px);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Mobile hero (hidden on desktop) */
.mobile-hero {
  display: block;
  padding: 24px 16px 8px;
}

.mobile-hero .cta {
  display: inline-block;
  background: #2d2d2d;
  color: #fafafa;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .18);
}

/* Cards = FULL BLEED on mobile */
.card {
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
  color: var(--text-contrast);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  border: none;
  border-radius: 0;
  margin: 0;
  /* remove margens */
  padding: 16px;
}

.wp-block-latest-posts__list {
  background-color: #fff;
  color: #333;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Estilo dos parágrafos */
.wp-block-latest-posts__list p {
  color: #333;
  margin-bottom: 0.9rem;
  font-size: 1rem;
}

/* Links (títulos e textos clicáveis) */
.wp-block-latest-posts__list a {
  color: #067689;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  font-weight: 600;
}

.wp-block-latest-posts__list a:hover,
.wp-block-latest-posts__list a:focus {
  color: #04515a;
  opacity: 0.85;
  text-decoration: none;
}

/* Responsividade e legibilidade mobile */
@media (max-width: 600px) {
  .wp-block-latest-posts__list {
    padding: 0.9rem;
    font-size: 0.95rem;
  }

  .wp-block-latest-posts__list p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .wp-block-latest-posts__list a {
    display: inline-block;
    word-break: break-word;
  }
}

/* Drawer overlay (menu sanduíche) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 40;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: 84%;
  max-width: 360px;
  background: #ffffff;
  color: var(--text-900);
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  z-index: 41;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .2);
  padding-top: calc(var(--safe-top) + 10px);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer .drawer__header {
  padding: 8px 16px;
  font-weight: 800;
  color: var(--text-700);
}

.drawer .drawer__menu {
  margin: 0;
  padding: 0;
}

/* reset UL */
.drawer .drawer__menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer .drawer__menu li {
  margin: 0;
  padding: 0;
}

.drawer .drawer__menu a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-700);
  border-bottom: 1px solid var(--muted-2);
}

.drawer .drawer__menu a:hover {
  background: var(--muted);
}

/* Tabbar */
.app-tabbar {
  position: fixed;
  inset: auto 0 0 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #e7e7eb;
  border-top: 1px solid #d3d3d8;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 30;
}

.app-tabbar a {
  display: grid;
  place-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--brand-strong);
  font-size: 11px;
  padding-top: 6px;
}

.app-tabbar a .icon {
  font-size: 18px;
}

.app-tabbar a.is-active {
  color: var(--brand);
  font-weight: 700;
}

/* FAB */
.fab {
  position: fixed;
  right: var(--fab-gap);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--fab-gap));
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--brand-contrast);
  text-decoration: none;
  font-size: 24px;
  /* tamanho do glifo */
  line-height: 1;
  /* centralização vertical real */
  box-shadow: var(--fab-shadow);
  z-index: 32;
  transform: translateZ(0);
  /* suaviza animação em mobile */
  opacity: 0.8;
  /* sutil transparência inicial */
  transition: opacity 0.3s ease;
  /* transição suave */
}

.fab:hover,
.fab:focus,
.fab:active {
  opacity: 1;
  /* visibilidade total ao interagir */
}

.fab i {
  margin-top: 15px;
  margin-left: 18px;
}

/* acessibilidade: reduz animação */
@media (prefers-reduced-motion: reduce) {

  .fab,
  .fab:active {
    transition: none;
    transform: none;
  }
}


/* Topbar (DESKTOP ONLY) */
.topbar {
  display: none;
}

/* 🔒 OCULTA NO MOBILE */
@media (min-width: 960px) {
  body {
    background: #ffffff;
    color: var(--text-900);
  }

  .mobile-hero {
    display: none;
  }

  .app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--muted-2);
  }

  .app-main {
    padding-bottom: 40px;
    max-width: 960px;
    margin-inline: auto;
    padding-left: 8px;
    padding-right: 8px;
  }

  .drawer,
  .overlay,
  .app-tabbar,
  .fab {
    display: none;
  }

  .topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--muted-2);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .topbar .brand {
    font-weight: 800;
    color: var(--brand-strong);
  }

  .topbar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
  }

  .topbar nav a {
    color: var(--text-700);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .topbar nav a:hover {
    background: var(--muted);
  }

  .search-inline {
    margin-left: auto;
  }

  .search-inline input[type="search"] {
    padding: 10px 12px;
    border: 1px solid var(--muted-2);
    border-radius: 999px;
    min-width: 260px;
    outline: none;
  }

  /* Cards voltam a ter margens/radius em desktop */
  .card {
    margin: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, .06);
    background: #fff;
    color: var(--text-900);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  }
}

/* Acessibilidade */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #067689;
  outline-offset: 2px;
}



.app-noticia {
  background-color: #eef6ff;
}


.post-list {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
  padding: 7px;
}

.post-item {
  background-color: #fcfeff;
  padding: 5px;
  padding-bottom: 30px;
}

.post-item .post-thumb {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 12px;
}

.post-title a {
  color: #015c6c;
  text-decoration: none;
  font-weight: 700;
}

.post-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.post-excerpt {
  margin-bottom: 16px;
  color: #067689;
}

.post-readmore {
  color: #47b8cc;
  font-weight: 600;
  text-decoration: none;
}

.pagination-area {
  margin: 24px 0;
  text-align: center;
}

/* Cabeçalho da categoria */
.archive-hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 8px 16px 4px;
}

.term-description {
  color: #067689;
  margin: 0 16px 12px;
  line-height: 1.55;
}

/* Lista de posts */
.post-list {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
  padding: 7px;
}

.post-item .post-thumb-wrap {
  display: block;
}

.post-item .post-thumb {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* Título e meta */
.post-title {
  font-size: 20px;
  margin: 4px 0 6px;
}

.post-title a {
  color: #067689;
  text-decoration: none;
  font-weight: 700;
}

.post-meta {
  font-size: 13px;
  opacity: .9;
  margin-bottom: 10px;
}

.post-meta a {
  color: var(--brand-strong);
  text-decoration: none;
}

/* Excerpt e link */
.post-excerpt {
  margin-bottom: 14px;
  color: #067689;
}

.post-readmore {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: none;
}

/* Paginação */
.pagination-area {
  margin: 24px 0;
  text-align: center;
}

.pagination .page-numbers {
  padding: 8px 10px;
  border-radius: 8px;
}

/* Responsivo */
@media (min-width: 960px) {
  .post-list {
    grid-template-columns: repeat(2, 1fr);
    padding: 7px;
  }
}