/* =========================================
   1. GERAIS, RESET E LAYOUT (Sincronizado c/ Global)
   ========================================= */
html {
  scroll-behavior: smooth;
}

:root {
  --brand-gold: #baa360;
  --brand-red: #7f1810;
  --text-dark: #2c2c2c;
  --white: #ffffff;
  --light-bg: #fbfbfb;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Open Sans", sans-serif;
  color: var(--text-dark);
}

ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
.section-padding {
  padding: 80px 0;
}
.bg-light {
  background-color: var(--light-bg);
}

section {
  scroll-margin-top: 100px;
}
.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}
.line {
  width: 60px;
  height: 3px;
  background: var(--brand-red);
  margin: 0 auto 20px auto;
  border-radius: 2px;
}

footer a {
  text-decoration: none !important;
  color: inherit !important;
}
footer a:hover {
  color: var(--brand-gold) !important;
}

/* =========================================
   2. HERO SECTION (COM PARALLAX)
   ========================================= */
.hub-hero {
  position: relative;
  margin-top: 110px;
  min-height: 52vh;
  display: flex;
  align-items: center;
  background: url("../img/capa-tech2.jpg");
  background-attachment: fixed;
  background-position: center top;
  background-size: cover;
  color: var(--white);
}

.hub-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(21, 21, 21, 0.82),
    rgba(127, 24, 16, 0.7)
  );
}

.hub-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 28px 0;
}

.hub-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(186, 163, 96, 0.22);
  border: 1px solid rgba(186, 163, 96, 0.45);
  font-size: 0.86rem;
  font-weight: 700;
}

.hub-hero-content h1 {
  margin: 0 0 14px;
  font-size: 2.8rem;
  line-height: 1.15;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.hub-hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.1rem;
}

/* =========================================
   3. SLIDER DE SOFTWARES EM DESTAQUE
   ========================================= */
.vendus-highlight {
  background-color: var(--white);
  overflow: hidden;
  padding-top: 40px;
}

.featured-slide {
  display: grid;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-slide:not(.active) {
  display: none;
}

.featured-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
}

#prevSlide,
#nextSlide {
  width: 48px;
  height: 48px;
  border: 2px solid var(--brand-gold);
  background: transparent;
  color: var(--brand-gold);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}

#prevSlide:hover,
#nextSlide:hover {
  background: var(--brand-gold);
  color: var(--white);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(186, 163, 96, 0.3);
}

.digi-container,
.vendus-container,
.zsgo-container,
.mypos-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  min-height: 500px;
}

.digi-content h2,
.vendus-content h2,
.zsgo-content h2,
.mypos-content h2 {
  font-size: 2.6rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.15;
}
.digi-content p,
.vendus-content p,
.zsgo-content p,
.mypos-content p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 30px;
  line-height: 1.7;
}

.featured-features {
  list-style: none;
  padding: 0;
  margin: 0 0 35px 0;
}
.featured-features li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}
.featured-features li i {
  flex: 0 0 auto;
  color: var(--brand-gold);
  font-size: 1.3rem;
  margin-top: 3px;
}

.digi-image,
.vendus-image,
.zsgo-image,
.mypos-image {
  position: relative;
}
.digi-image img,
.vendus-image img,
.zsgo-image img,
.mypos-image img {
  width: 100%;
  border-radius: 16px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 4px solid var(--white);
  object-fit: cover;
}
.digi-image:hover img,
.vendus-image:hover img,
.zsgo-image:hover img,
.mypos-image:hover img {
  transform: translateY(-10px) scale(1.02);
}

.hub-btn {
  background: var(--brand-red);
  color: var(--white) !important;
  border: 2px solid var(--brand-red);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  font-size: 1.05rem;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
}
.hub-btn:hover {
  background: #5a110b;
  border-color: #5a110b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(127, 24, 16, 0.25);
}

/* =========================================
   4. INTERACTIVE TABS (NOSSAS SOLUÇÕES)
   ========================================= */
.solutions-section {
  padding-bottom: 48px;
}

.interactive-tabs-wrapper {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: flex-start;
  max-width: 1160px;
  margin: 0 auto;
}

.tabs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding: 4px 8px 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 24, 16, 0.35) transparent;
}

.tabs-sidebar::-webkit-scrollbar {
  width: 6px;
}

.tabs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(127, 24, 16, 0.35);
  border-radius: 999px;
}

.tabs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.tab-button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 12px 14px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  text-align: left;
}
.tab-button .tab-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(127, 24, 16, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.tab-button .tab-icon i {
  color: var(--brand-red);
  font-size: 1.15rem;
}
.tab-button .tab-label h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text-dark);
  font-weight: 700;
  transition: color 0.3s ease;
}
.tab-button .tab-label span {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.25;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}
.tab-button.active {
  background: var(--white);
  border-color: rgba(127, 24, 16, 0.22);
  box-shadow: 0 12px 28px rgba(127, 24, 16, 0.08);
  transform: translateX(0);
}
.tab-button.active .tab-icon {
  background: var(--brand-red);
}
.tab-button.active .tab-icon i {
  color: var(--white);
}
.tab-button.active .tab-label h3 {
  color: var(--brand-red);
}

.tabs-content-area.shadow-container {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  min-height: 0;
}
.tab-panel {
  display: none;
  opacity: 0;
}
.tab-panel.active {
  display: block;
  width: 100%;
  animation: fadePanel 0.3s ease forwards;
}

@keyframes fadePanel {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 500px;
  background: var(--white);
  overflow: hidden;
}
.panel-text {
  padding: 48px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.panel-text h2 {
  font-size: 2.2rem;
  color: var(--text-dark);
  margin-bottom: 15px;
  line-height: 1.2;
}
.panel-text p {
  color: #555;
  font-size: 1.05rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.csc-features {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.csc-features li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.45;
}
.csc-features li i {
  flex: 0 0 24px;
  background: var(--brand-gold);
  color: var(--white);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  margin-top: 1px;
  box-shadow: 0 4px 10px rgba(186, 163, 96, 0.3);
}

.csc-btn {
  margin-top: 24px;
  width: fit-content;
}

.panel-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  height: 100%;
  min-height: 100%;
  padding: 24px;
  background: linear-gradient(135deg, #f7f8f9 0%, #eef1f3 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.solution-image-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92%, 520px);
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  max-width: 100%;
  isolation: isolate;
}

.solution-image-frame.photo {
  width: min(94%, 540px);
  max-width: 540px;
}

.solution-image-frame.illustration {
  width: min(88%, 460px);
  max-width: 460px;
  aspect-ratio: 4 / 3;
}

.solution-image-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.solution-image-frame.photo img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  border-radius: 18px;
}

.solution-image-frame.illustration img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 0;
}

.solution-image-frame.rounded-image img {
  border-radius: 18px;
}

.tab-panel.active .solution-image-frame {
  animation: floatUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes floatUp {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Restaura o design do botão nas Soluções Especializadas */
.btn-primary {
  background: var(--brand-red);
  color: var(--white) !important;
  border: 2px solid var(--brand-red);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  font-size: 1.05rem;
}

.btn-primary:hover {
  background: #5a110b;
  border-color: #5a110b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(127, 24, 16, 0.25);
}

/* =========================================
   5. PARCEIROS
   ========================================= */
.partners-section {
  background: #ffffff;
}
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.partner-card {
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 12px;
  min-height: 140px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}
.partner-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-gold);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}
.partner-card img {
  max-width: 180px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.partner-placeholder {
  width: 100%;
  min-height: 70px;
  border: 2px dashed #d4d4d4;
  border-radius: 8px;
  background: #fafafa;
  color: #666;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin-bottom: 10px;
}

/* =========================================
   6. CONTACTOS E FORMULÁRIO (RESTAURADO!)
   ========================================= */
#contactos {
  background: var(--light-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}
.contact-info h2 {
  color: var(--brand-red);
  margin-bottom: 20px;
  font-size: 2rem;
  line-height: 1.2;
}
.contact-info > p {
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
}
.info-item {
  margin-top: 28px;
}
.info-item strong {
  color: var(--brand-gold);
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.info-item p {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-form-container {
  background: var(--white);
  border-radius: 12px;
  padding: 36px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #444;
  letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fafafa;
  color: #222;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.25s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(186, 163, 96, 0.18);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}
.form-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--brand-red);
  flex-shrink: 0;
}
.g-recaptcha {
  margin-top: 12px !important;
  margin-bottom: 16px !important;
}

.btn-submit {
  background: var(--brand-red);
  color: var(--white);
  border: none;
  padding: 15px 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-radius: 8px;
  width: 100%;
  transition:
    background 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(127, 24, 16, 0.2);
}
.btn-submit:hover {
  background: #5a110b;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(127, 24, 16, 0.3);
}
.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(127, 24, 16, 0.2);
}

/* =========================================
   7. MODAL DIGI
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  padding: 20px;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--white);
  width: min(100%, 560px);
  border-radius: 16px;
  padding: 38px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal-overlay.show .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--brand-red);
}

.modal-header {
  margin-bottom: 24px;
  padding-right: 20px;
  text-align: center;
}

.modal-header h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.2;
}

.modal-header p {
  color: #666;
  font-size: 0.96rem;
  line-height: 1.6;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.recaptcha-wrapper {
  max-width: 100%;
  margin-bottom: 16px;
  overflow: hidden;
}

.recaptcha-wrapper .g-recaptcha {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
}

/* =========================================
   8. RESPONSIVIDADE (MOBILE)
   ========================================= */

@media (max-width: 992px) {
  /* CORREÇÃO INFALÍVEL DO SLIDER */
  .digi-container,
  .vendus-container,
  .zsgo-container,
  .mypos-container {
    /* Passa a ser uma grelha de 1 única coluna! O texto fica naturalmente em cima e a imagem em baixo */
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center;
  }

  .digi-image img,
  .vendus-image img,
  .zsgo-image img,
  .mypos-image img {
    height: auto;
    max-height: 350px;
    width: 100%;
    object-fit: contain; /* Garante que a imagem não fica minúscula nem distorcida */
  }

  .featured-features li {
    justify-content: flex-start;
    text-align: left;
  }

  .slider-controls {
    justify-content: center;
    margin-bottom: 30px;
  }

  /* CORREÇÃO DAS SOLUÇÕES ESPECIALIZADAS (TABS) */
  .interactive-tabs-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  /* Carrossel do menu lateral */
  .tabs-sidebar {
    flex: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding-bottom: 15px;
    padding-right: 0;
    gap: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs-sidebar::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    flex: 0 0 auto;
    min-width: 220px;
    width: max-content;
    padding: 12px 20px;
  }
  .tab-button .tab-label h3,
  .tab-button .tab-label span {
    white-space: nowrap;
  }

  /* Deixa o container crescer automaticamente */
  .tabs-content-area.shadow-container {
    min-height: auto !important;
    height: auto !important;
  }

  .tab-panel.active {
    min-height: auto;
  }

  /* Texto em cima, imagem em baixo */
  .panel-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    height: auto;
    min-height: auto;
  }

  .panel-text {
    padding: 40px 28px;
    text-align: center;
    align-items: center;
  }

  .csc-features li {
    justify-content: flex-start;
    text-align: left;
  }

  .csc-btn {
    margin: 20px auto 0 auto;
  }

  .panel-image {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    height: auto;
    min-height: 280px;
    padding: 28px 24px;
  }

  .solution-image-frame.photo,
  .solution-image-frame.illustration {
    width: min(100%, 420px);
  }

  /* Sincronização Contactos Mobile */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
  }
}

@media (max-width: 768px) {
  /* O Hero */
  .hub-hero {
    margin-top: 74px;
    min-height: 44vh;
    background-attachment: scroll;
  }
  .hub-hero-content h1 {
    font-size: 2rem;
  }

  .digi-content h2,
  .vendus-content h2,
  .zsgo-content h2,
  .mypos-content h2 {
    font-size: 2rem;
  }
  .panel-text h2 {
    font-size: 1.8rem;
  }

  .contact-form-container {
    padding: 24px;
  }

  .modal-overlay {
    align-items: flex-start;
    padding: 16px;
  }

  .modal-container {
    padding: 30px 20px;
    margin-top: 20px;
    border-radius: 12px;
  }

  .modal-header {
    padding-right: 24px;
  }

  .modal-header h3 {
    font-size: 1.45rem;
  }
}

@media (max-width: 480px) {
  .section-padding {
    padding: 60px 0;
  }
}

@media (max-width: 380px) {
  .recaptcha-wrapper .g-recaptcha {
    transform: scale(0.86);
    transform-origin: left top;
    margin-bottom: -10px !important;
  }
}

@media (max-width: 340px) {
  .recaptcha-wrapper .g-recaptcha {
    transform: scale(0.78);
    margin-bottom: -16px !important;
  }
}
