/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #222;
  background: #fff;
}

a { color: #1e2d3d; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* === Layout === */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.site-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.main-content {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}

/* === Header === */
.site-header {
  background: #1e2d3d;
  color: #fff;
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.site-logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}

.site-logo:hover { text-decoration: none; opacity: 0.85; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* === Sidebar === */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #fafafa;
  border-right: 1px solid #e8e8e8;
  padding: 20px 0;
  position: sticky;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 49px);
  height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 49px);
  overflow-y: auto;
}

.sidebar__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  padding: 0 18px 8px;
}

.sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

.sidebar__item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 13px;
  color: #555;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar__item a:hover {
  background: #f0f4f8;
  text-decoration: none;
  color: #1e2d3d;
}

.sidebar__item--active a {
  color: #1e2d3d;
  font-weight: 600;
  border-left-color: #1e2d3d;
  background: #f0f4f8;
}

.sidebar__badge {
  font-size: 10px;
  background: #e8eef3;
  color: #1e2d3d;
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar__item--active .sidebar__badge {
  background: #1e2d3d;
  color: #fff;
}

.sidebar__divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 8px 18px;
}

/* === Página de Texto === */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e2d3d;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
}

.page-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.page-body p { margin-bottom: 1em; }
.page-body h2 { font-size: 18px; color: #1e2d3d; margin: 1.5em 0 0.5em; }
.page-body h3 { font-size: 15px; color: #1e2d3d; margin: 1.2em 0 0.4em; }

/* === Aviso de Conteúdo === */
.content-notice {
  background: #fff8e1;
  border-left: 3px solid #f0a500;
  padding: 10px 14px;
  font-size: 12px;
  color: #7a5c00;
  border-radius: 0 4px 4px 0;
  margin-bottom: 20px;
}

/* === Galeria === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.gallery-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid transparent;
  position: relative;
  transition: border-color 0.15s;
  cursor: pointer;
}

.gallery-item:hover {
  border-color: #1e2d3d;
  text-decoration: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 45, 61, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
  background: rgba(30, 45, 61, 0.35);
}

/* === Navegação prev/next === */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.page-nav a {
  font-size: 13px;
  font-weight: 600;
  color: #1e2d3d;
}

.page-nav a:hover { text-decoration: underline; }

/* === Responsivo === */
@media (max-width: 1024px) {
  .sidebar { width: 160px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100vh;
    z-index: 200;
    transition: left 0.25s ease;
    padding-top: 60px;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  }

  .sidebar.is-open { left: 0; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 190;
  }

  .sidebar-overlay.is-visible { display: block; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .main-content { padding: 20px 16px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
