/* =========================================================
   PMERJ - TESTE DE APPS
   Arquivo: assets/css/style.css
   Layout institucional responsivo
   Banner: assets/img/banner.png
   Cards com imagens/logotipos ajustados
   ========================================================= */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* VARIÁVEIS */
:root {
  --azul-950: #03152b;
  --azul-900: #061b35;
  --azul-850: #071f3e;
  --azul-800: #08264b;
  --azul-700: #003f7f;
  --azul-600: #0057a8;
  --azul-500: #0b63ce;
  --azul-100: #eaf2ff;

  --branco: #ffffff;
  --cinza-50: #f8fafc;
  --cinza-100: #f1f5f9;
  --cinza-200: #e2e8f0;
  --cinza-300: #cbd5e1;
  --cinza-500: #64748b;
  --cinza-700: #334155;
  --cinza-900: #0f172a;

  --dourado: #d4a017;

  --sombra-suave: 0 8px 24px rgba(15, 23, 42, 0.08);
  --sombra-media: 0 12px 35px rgba(15, 23, 42, 0.16);
  --sombra-topo: 0 4px 14px rgba(0, 0, 0, 0.25);

  --radius-card: 10px;
  --container: 1180px;
}

/* BASE */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  color: var(--cinza-900);
}

/* =========================================================
   TOPO INSTITUCIONAL
   ========================================================= */

.header-pmerj {
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--azul-950) 0%,
    var(--azul-900) 42%,
    var(--azul-800) 100%
  );
  color: var(--branco);
  position: relative;
  z-index: 1000;
  box-shadow: var(--sombra-topo);
}

.header-container {
  width: 100%;
  max-width: 1440px;
  min-height: 112px;
  margin: 0 auto;
  padding: 14px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

/* =========================================================
   LOGOTIPO / MARCA
   ========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 330px;
}

.brand-logo {
  width: 78px;
  height: 78px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.brand-text h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-text p {
  margin-top: 6px;
  font-size: clamp(0.8rem, 1vw, 1rem);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* =========================================================
   MENU PRINCIPAL
   ========================================================= */

.main-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex: 1;
}

.main-menu a {
  color: var(--branco);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  opacity: 0.95;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.main-menu a:hover,
.main-menu a.active {
  color: #dbeafe;
  transform: translateY(-1px);
}

/* =========================================================
   AÇÕES DO TOPO
   ========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-button,
.menu-toggle {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.35);
  color: var(--branco);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.25s ease;
}

.search-button:hover,
.menu-toggle:hover {
  background: rgba(59, 130, 246, 0.65);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

/* =========================================================
   BANNER INSTITUCIONAL
   ========================================================= */

.hero-banner {
  width: 100%;
  min-height: 360px;
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(
      90deg,
      rgba(3, 21, 43, 0.62) 0%,
      rgba(5, 36, 76, 0.38) 48%,
      rgba(3, 22, 43, 0.52) 100%
    ),
    url("../img/banner.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px 20px;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.16));
  opacity: 0.8;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.04) 0%, transparent 35%),
    linear-gradient(300deg, rgba(212, 160, 23, 0.08) 0%, transparent 45%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--branco);
  max-width: 920px;
  width: 100%;
}

.hero-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.hero-emblem img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.55));
}

.hero-emblem span {
  margin-top: 5px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.hero-content h2 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.42);
}

.hero-line {
  width: 135px;
  height: 3px;
  background: var(--dourado);
  margin: 18px auto;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(212, 160, 23, 0.35);
}

.hero-content p {
  font-size: clamp(0.85rem, 1.4vw, 1.2rem);
  letter-spacing: 1px;
  font-weight: 500;
  opacity: 0.98;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
}

/* =========================================================
   CONTEÚDO PRINCIPAL
   ========================================================= */

.main-content {
  width: 100%;
  padding: 42px 20px 70px;
}

.systems-section {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

/* =========================================================
   TÍTULO DA SEÇÃO
   ========================================================= */

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 28px;
}

.title-line {
  height: 1px;
  background: var(--cinza-300);
  flex: 1;
  max-width: 390px;
}

.title-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--azul-800);
  white-space: nowrap;
}

.title-content h3 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* =========================================================
   LISTA DE SISTEMAS
   ========================================================= */

.systems-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.system-card {
  width: 100%;
  min-height: 86px;
  background: var(--branco);
  border: 1px solid var(--cinza-200);
  border-radius: var(--radius-card);
  box-shadow: var(--sombra-suave);
  text-decoration: none;

  display: grid;
  grid-template-columns: 88px 1fr 36px;
  align-items: center;
  gap: 14px;

  padding: 14px 24px 14px 18px;
  color: var(--azul-700);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.system-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  width: 4px;
  height: 68%;
  background: var(--azul-600);
  border-radius: 0 999px 999px 0;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.system-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra-media);
  border-color: #bfdbfe;
}

.system-card:hover::before {
  transform: scaleY(1);
}

/* Espaço reservado para os logotipos */
.system-icon {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: var(--azul-100);
  border: 1px solid rgba(0, 87, 168, 0.12);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 7px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Imagens dos sistemas centralizadas e proporcionais */
.system-logo {
  width: 100%;
  height: 100%;
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

/* Ajustes individuais por sistema */
.system-card[data-system="aaes"] .system-logo {
  max-width: 56px;
  max-height: 56px;
}

.system-card[data-system="cprosec"] .system-logo {
  max-width: 56px;
  max-height: 56px;
}

.system-card[data-system="pmp"] .system-logo {
  max-width: 58px;
  max-height: 46px;
}

.system-card[data-system="ppg"] .system-logo {
  max-width: 56px;
  max-height: 56px;
}

.system-card[data-system="4cpa"] .system-logo {
  max-width: 56px;
  max-height: 56px;
}

.system-card span {
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 800;
  color: var(--azul-700);
  line-height: 1.35;
}

.system-card .arrow {
  justify-self: end;
  font-size: 1.35rem;
  color: var(--azul-600);
  transition: transform 0.25s ease;
}

.system-card:hover .arrow {
  transform: translateX(4px);
}

/* =========================================================
   OVERLAY MENU MOBILE
   ========================================================= */

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  z-index: 900;
}

.menu-overlay.active {
  display: block;
}

/* =========================================================
   RESPONSIVIDADE - TELAS MUITO GRANDES
   ========================================================= */

@media (min-width: 1600px) {
  .header-container {
    max-width: 1600px;
    padding-left: 48px;
    padding-right: 48px;
  }

  .hero-banner {
    min-height: 420px;
    padding: 70px 24px;
  }

  .systems-section {
    max-width: 1260px;
  }

  .system-card {
    min-height: 92px;
    grid-template-columns: 94px 1fr 38px;
  }

  .system-icon {
    width: 72px;
    height: 72px;
  }

  .system-logo {
    max-width: 58px;
    max-height: 58px;
  }
}

/* =========================================================
   RESPONSIVIDADE - NOTEBOOK GRANDE
   ========================================================= */

@media (max-width: 1280px) {
  .header-container {
    padding: 14px 26px;
    gap: 22px;
  }

  .brand {
    min-width: 300px;
  }

  .brand-logo {
    width: 70px;
    height: 70px;
  }

  .main-menu {
    gap: 20px;
  }

  .main-menu a {
    font-size: 0.9rem;
  }

  .hero-banner {
    min-height: 340px;
  }

  .systems-section {
    max-width: 1080px;
  }
}

/* =========================================================
   RESPONSIVIDADE - NOTEBOOK PEQUENO / TABLET HORIZONTAL
   ========================================================= */

@media (max-width: 1100px) {
  .header-container {
    min-height: 96px;
  }

  .brand {
    min-width: auto;
  }

  .brand-logo {
    width: 64px;
    height: 64px;
  }

  .brand-text h1 {
    font-size: 2.25rem;
  }

  .brand-text p {
    font-size: 0.82rem;
  }

  .main-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 310px;
    height: 100vh;
    background: linear-gradient(180deg, var(--azul-950) 0%, var(--azul-800) 100%);
    z-index: 1001;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 110px 22px 24px;
    gap: 8px;
    box-shadow: -8px 0 26px rgba(0, 0, 0, 0.28);
    transition: right 0.3s ease;
  }

  .main-menu.active {
    right: 0;
  }

  .main-menu a {
    width: 100%;
    padding: 15px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    justify-content: space-between;
    font-size: 0.98rem;
  }

  .main-menu a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: none;
  }

  .menu-toggle {
    display: flex;
  }

  .search-button,
  .menu-toggle {
    width: 48px;
    height: 48px;
  }

  .hero-banner {
    min-height: 320px;
    background-position: center;
  }

  .section-title {
    gap: 16px;
  }

  .title-line {
    max-width: 260px;
  }
}

/* =========================================================
   RESPONSIVIDADE - TABLET VERTICAL
   ========================================================= */

@media (max-width: 900px) {
  .header-container {
    padding: 12px 20px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand-text h1 {
    font-size: 2rem;
  }

  .brand-text p {
    font-size: 0.76rem;
  }

  .search-button,
  .menu-toggle {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .hero-banner {
    min-height: 300px;
    padding: 40px 18px;
    background-position: center;
  }

  .hero-emblem img {
    width: 64px;
    height: 64px;
  }

  .main-content {
    padding: 36px 18px 58px;
  }

  .section-title {
    margin-bottom: 24px;
  }

  .system-card {
    min-height: 80px;
    grid-template-columns: 78px 1fr 28px;
    padding: 12px 18px 12px 14px;
  }

  .system-icon {
    width: 60px;
    height: 60px;
    padding: 6px;
  }

  .system-logo {
    max-width: 48px;
    max-height: 48px;
  }

  .system-card[data-system="pmp"] .system-logo {
    max-width: 50px;
    max-height: 40px;
  }
}

/* =========================================================
   RESPONSIVIDADE - CELULAR GRANDE
   ========================================================= */

@media (max-width: 700px) {
  .header-container {
    min-height: 84px;
    padding: 10px 16px;
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-text h1 {
    font-size: 1.75rem;
  }

  .brand-text p {
    font-size: 0.67rem;
    line-height: 1.2;
  }

  .header-actions {
    gap: 8px;
  }

  .search-button,
  .menu-toggle {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .hero-banner {
    min-height: 270px;
    padding: 34px 14px;
    background-position: center;
  }

  .hero-content h2 {
    font-size: clamp(2.35rem, 12vw, 4rem);
  }

  .hero-content p {
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.45;
  }

  .hero-emblem {
    margin-bottom: 12px;
  }

  .hero-emblem img {
    width: 54px;
    height: 54px;
  }

  .hero-emblem span {
    font-size: 0.86rem;
  }

  .hero-line {
    width: 105px;
    margin: 14px auto;
  }

  .main-content {
    padding: 30px 14px 48px;
  }

  .section-title {
    gap: 10px;
    margin-bottom: 22px;
  }

  .title-line {
    max-width: none;
  }

  .title-content {
    gap: 10px;
  }

  .title-content h3 {
    font-size: 1.55rem;
  }

  .system-card {
    min-height: 76px;
    grid-template-columns: 68px 1fr 24px;
    gap: 10px;
    padding: 11px 14px 11px 12px;
  }

  .system-icon {
    width: 54px;
    height: 54px;
    padding: 6px;
  }

  .system-logo {
    max-width: 42px;
    max-height: 42px;
  }

  .system-card[data-system="pmp"] .system-logo {
    max-width: 44px;
    max-height: 34px;
  }

  .system-card span {
    font-size: 1rem;
  }

  .system-card .arrow {
    font-size: 1.05rem;
  }

  .main-menu {
    width: 286px;
    right: -296px;
  }
}

/* =========================================================
   RESPONSIVIDADE - CELULAR MÉDIO
   ========================================================= */

@media (max-width: 540px) {
  .header-container {
    min-height: 78px;
  }

  .brand-text p {
    display: none;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-text h1 {
    font-size: 1.65rem;
  }

  .hero-banner {
    min-height: 250px;
  }

  .hero-content h2 {
    letter-spacing: 0;
  }

  .hero-content p {
    font-size: 0.78rem;
    letter-spacing: 0.6px;
  }

  .title-line {
    display: none;
  }

  .section-title {
    justify-content: flex-start;
  }

  .title-content {
    width: 100%;
    justify-content: center;
  }

  .systems-list {
    gap: 10px;
  }

  .system-card {
    border-radius: 9px;
    grid-template-columns: 62px 1fr 20px;
  }

  .system-icon {
    width: 50px;
    height: 50px;
    padding: 5px;
  }

  .system-logo {
    max-width: 40px;
    max-height: 40px;
  }

  .system-card[data-system="pmp"] .system-logo {
    max-width: 42px;
    max-height: 32px;
  }
}

/* =========================================================
   RESPONSIVIDADE - CELULAR PEQUENO
   ========================================================= */

@media (max-width: 420px) {
  .header-container {
    padding: 9px 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-text h1 {
    font-size: 1.45rem;
  }

  .search-button {
    display: none;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .hero-banner {
    min-height: 232px;
    padding: 30px 12px;
  }

  .hero-emblem img {
    width: 46px;
    height: 46px;
  }

  .hero-emblem span {
    font-size: 0.78rem;
  }

  .hero-content h2 {
    font-size: 2.15rem;
  }

  .hero-content p {
    font-size: 0.72rem;
  }

  .main-content {
    padding: 24px 10px 40px;
  }

  .title-content h3 {
    font-size: 1.35rem;
  }

  .system-card {
    min-height: 68px;
    grid-template-columns: 52px 1fr 18px;
    padding: 10px 12px 10px 10px;
  }

  .system-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    padding: 4px;
  }

  .system-logo {
    max-width: 34px;
    max-height: 34px;
  }

  .system-card[data-system="pmp"] .system-logo {
    max-width: 36px;
    max-height: 28px;
  }

  .system-card span {
    font-size: 0.92rem;
  }

  .system-card .arrow {
    font-size: 0.95rem;
  }

  .main-menu {
    width: 260px;
    right: -270px;
    padding: 92px 16px 20px;
  }
}

/* =========================================================
   RESPONSIVIDADE - CELULAR MUITO PEQUENO
   ========================================================= */

@media (max-width: 340px) {
  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand-text h1 {
    font-size: 1.28rem;
  }

  .menu-toggle {
    width: 36px;
    height: 36px;
  }

  .hero-banner {
    min-height: 215px;
  }

  .hero-content h2 {
    font-size: 1.9rem;
  }

  .hero-content p {
    font-size: 0.68rem;
  }

  .system-card {
    grid-template-columns: 46px 1fr 16px;
  }

  .system-icon {
    width: 38px;
    height: 38px;
  }

  .system-logo {
    max-width: 30px;
    max-height: 30px;
  }

  .system-card[data-system="pmp"] .system-logo {
    max-width: 32px;
    max-height: 24px;
  }

  .system-card span {
    font-size: 0.86rem;
  }
}

/* =========================================================
   AJUSTES PARA IMPRESSÃO / PDF
   ========================================================= */

@media print {
  .header-actions,
  .main-menu,
  .menu-toggle,
  .search-button {
    display: none !important;
  }

  .header-pmerj {
    position: static;
    box-shadow: none;
  }

  .hero-banner {
    min-height: 240px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .system-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}