/* Messier83 Software House - Estilos principais */

/* Skip to content link para acessibilidade */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1a237e;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 100;
  font-weight: 600;
}

.skip-to-content:focus {
  top: 0;
}

body {
  background: #f4f7fb;
  text-align: center;
}

.navbar {
  box-shadow: 0 2px 14px #0001;
}

.hero-section {
  background: linear-gradient(120deg, #1a237e 0%, #2463eb 70%);
  color: #fff;
  padding: 80px 0 60px 0;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.hero-subtitle {
  font-size: 1.18rem;
  margin-bottom: 34px;
  color: #f0f4ff; /* Melhor contraste WCAG AA */
}

.hero-btn {
  font-size: 1.08rem;
  font-weight: 600;
  padding: 12px 36px;
  border-radius: 32px;
}

section {
  margin-bottom: 2.4rem;
}

.card-system {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 2px 12px #0002;
  border: none;
  margin-bottom: 2.2rem;
  text-align: center;
}

.system-icon {
  width: 38px;
  margin-bottom: 8px;
}

.system-img {
  border-radius: 8px;
  box-shadow: 0 1px 8px #0001;
  margin-bottom: 8px;
  margin-top: 8px;
  max-height: 110px;
  width: auto;
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.img-credit {
  font-size: 0.93em;
  color: #666;
  margin-bottom: 0;
}

ul, .feature-list, .db-list, .access-list, .service-list {
  padding-left: 0;
  list-style: none;
  margin-bottom: 0;
  display: inline-block;
  text-align: left;
}

ul li, .feature-list li, .db-list li, .access-list li, .service-list li {
  margin-bottom: 0.55em;
  font-size: 1.06em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.contact-card {
  background: #f3f6fb;
  border-radius: 15px;
  padding: 32px 18px;
  box-shadow: 0 2px 14px #0001;
  display: inline-block;
  text-align: center;
}

.map-img {
  width: 250px;
  border-radius: 9px;
  margin-top: 14px;
  box-shadow: 0 1px 7px #0001;
}

footer {
  text-align: center;
  font-size: 0.98em;
  color: #6b7280;
  padding: 24px 10px 10px 10px;
  margin-top: 2rem;
}

/* ====== Footer Menu ====== */
.footer-menu {
  background: linear-gradient(120deg, #1a237e 0%, #2463eb 70%);
  color: white;
  padding: 0.75rem 0 0.5rem 0;
  margin-top: 1.5rem;
}

.footer-menu-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-menu h3 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-menu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.footer-menu-item {
  flex: 1 1 100px;
  max-width: 130px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.footer-menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.footer-menu-item a {
  color: white;
  text-decoration: none;
  display: block;
}

.footer-menu-icon {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  display: block;
}

.footer-menu-title {
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 0.1rem;
}

.footer-menu-desc {
  font-size: 0.65rem;
  color: #e0eaff;
  line-height: 1.2;
}

.footer-menu-note {
  font-size: 0.62rem;
  color: #c7d2fe;
  font-style: italic;
  margin-top: 0.3rem;
}

@media (max-width: 700px) {
  .footer-menu-links {
    flex-direction: column;
    align-items: center;
  }

  .footer-menu-item {
    max-width: 90%;
  }
}

.transition {
  transition: box-shadow .22s, transform .19s;
}

.transition:hover {
  box-shadow: 0 4px 32px #2463eb22;
  transform: translateY(-5px) scale(1.03);
}

/* ====== Serviços — layout 2 colunas ====== */
.service-list.grid-2cols {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.service-card {
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
  transition: all 0.25s ease-in-out;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: #c7d2fe;
  box-shadow: 0 8px 18px rgba(37,99,235,0.15);
}

.service-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: .6rem;
}

.service-head img {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.service-head strong {
  color: #1a237e;
  font-size: 1.08rem;
  line-height: 1.2;
}

.service-features li {
  position: relative;
  margin: 0.42rem 0;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}

.service-features li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #22c55e;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ====== Filtros de Sistemas ====== */
.filter-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: #fff;
  border: 2px solid #e5e9f2;
  color: #1a237e;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-btn:hover {
  background: #f0f4ff;
  border-color: #2463eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(36,99,235,0.15);
}

.filter-btn.active {
  background: linear-gradient(120deg, #1a237e 0%, #2463eb 70%);
  color: white;
  border-color: #2463eb;
  box-shadow: 0 4px 12px rgba(36,99,235,0.3);
}

.system-item {
  transition: all 0.4s ease;
}

.system-item.hidden {
  display: none;
}

/* ====== Lightbox para Galeria ====== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: white;
  color: #1a237e;
  border: none;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  background: #2463eb;
  color: white;
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  color: #1a237e;
  border: none;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.2s;
}

.lightbox-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 1rem;
}

/* Indicador de que a imagem é clicável */
.system-img, .carousel-item img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.system-img:hover, .carousel-item img:hover {
  transform: scale(1.02);
}

/* ====== Breadcrumbs ====== */
.breadcrumb-container {
  background: #fff;
  padding: 0.8rem 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 0;
}

.breadcrumb {
  margin-bottom: 0;
  background: transparent;
  padding: 0;
  font-size: 0.9rem;
}

.breadcrumb-item {
  color: #6b7280;
}

.breadcrumb-item a {
  color: #1a237e;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: #2463eb;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #1a237e;
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #9ca3af;
  padding: 0 0.5rem;
}

/* ====== Indicador de Progresso de Scroll ====== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #1a237e 0%, #2463eb 100%);
  z-index: 10000;
  transition: width 0.1s ease;
}

/* ====== Botão Voltar ao Topo ====== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #1a237e 0%, #2463eb 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(36, 99, 235, 0.4);
  transition: all 0.3s ease;
  z-index: 9998;
}

.scroll-to-top.show {
  display: flex;
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 20px rgba(36, 99, 235, 0.5);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

/* ====== Scroll Suave ====== */
html {
  scroll-behavior: smooth;
}

/* ====== Cookie Consent Banner - LGPD ====== */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  z-index: 10001;
  animation: slideIn 0.4s ease-out;
  border-top: 3px solid #2463eb;
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
}

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #1a237e;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4b5563;
}

.cookie-consent-text a {
  color: #2463eb;
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-cookie-accept,
.btn-cookie-decline,
.btn-cookie-customize {
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cookie-accept {
  background: linear-gradient(135deg, #1a237e 0%, #2463eb 100%);
  color: white;
}

.btn-cookie-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 99, 235, 0.4);
}

.btn-cookie-decline {
  background: #e5e7eb;
  color: #374151;
}

.btn-cookie-decline:hover {
  background: #d1d5db;
}

.btn-cookie-customize {
  background: transparent;
  color: #2463eb;
  border: 2px solid #2463eb;
}

.btn-cookie-customize:hover {
  background: #f0f4ff;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.cookie-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h3 {
  margin: 0;
  color: #1a237e;
  font-size: 1.3rem;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.cookie-modal-close:hover {
  color: #1a237e;
}

.cookie-modal-body {
  padding: 1.5rem;
}

.cookie-option {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.cookie-option-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cookie-option-header input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.cookie-option-header input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-option-desc {
  margin: 0;
  padding-left: 2rem;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

.cookie-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ====== Responsividade ====== */
@media (max-width: 767px) {
  .card-system {
    margin-bottom: 2.5rem;
  }
  .system-img {
    max-width: 98vw;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .breadcrumb {
    font-size: 0.8rem;
  }

  .cookie-consent-content {
    flex-direction: column;
    gap: 1rem;
  }

  .cookie-consent-buttons {
    width: 100%;
    flex-direction: column;
  }

  .btn-cookie-accept,
  .btn-cookie-decline,
  .btn-cookie-customize {
    width: 100%;
  }

  .cookie-modal-content {
    margin: 1rem;
  }
}

/* ===== MOBILE-FIRST ENHANCEMENTS ===== */

/* Touch targets mínimos de 44x44px conforme WCAG */
@media (max-width: 768px) {
  /* Botões e links devem ter área de toque adequada */
  .btn,
  .nav-link,
  .navbar-toggler,
  .filter-btn,
  a.card,
  .footer-menu-item a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Aumenta espaçamento entre elementos clicáveis */
  .nav-link {
    padding: 0.75rem 1rem;
  }

  .filter-btn {
    padding: 0.625rem 1.25rem;
    margin: 0.25rem;
  }

  /* Cards de sistema com área de toque maior */
  .card {
    padding: 1.25rem;
  }

  /* Formulários com inputs maiores */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    min-height: 44px;
    font-size: 16px; /* Previne zoom no iOS */
    padding: 0.75rem;
  }

  /* Checkboxes e radio buttons maiores */
  input[type="checkbox"],
  input[type="radio"] {
    min-width: 24px;
    min-height: 24px;
    margin-right: 0.5rem;
  }

  /* Botões de ação mais espaçados */
  .btn-primary,
  .btn-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* Otimizações específicas para telas muito pequenas */
@media (max-width: 480px) {
  /* Aumenta fonte base para melhor legibilidade */
  body {
    font-size: 16px;
  }

  /* Headers reduzidos mas ainda legíveis */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Padding reduzido mas funcional */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Footer menu otimizado */
  .footer-menu-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===== HOVER PREVENTION ON TOUCH DEVICES ===== */

@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects em dispositivos touch */
  .card:hover,
  .btn:hover,
  .nav-link:hover {
    transform: none;
  }

  /* Mas mantém feedback visual no active/focus */
  .card:active,
  .btn:active,
  .nav-link:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

/* ===== PREFERS REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
