/* =========================================
   SOBRE - CSS Específico da Página
   Zait.ag - Pulverizando Tecnologia
   ========================================= */

/* =========================================
   IMAGE CONTAINERS (para blocos de soluções)
   ========================================= */
.sobre-image-container {
  position: relative;
  overflow: hidden;
  min-height: 450px;
  background: var(--zait-bg-darker);
  border-radius: 0 !important;
}

.sobre-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  border-radius: 0 !important;
}

/* =========================================
   CONTADOR
   ========================================= */
.sobre-counter {
  text-align: center;
  margin-bottom: 60px;
}

.sobre-counter-number {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--zait-green-light);
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(185, 207, 56, 0.3);
}

.sobre-counter-label {
  display: block;
  font-size: 1.2rem;
  color: var(--zait-text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* =========================================
   EXCELÊNCIA CONTENT
   ========================================= */
.sobre-excelencia-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 40px;
  background: rgba(255,255,255,0.03);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

.sobre-excelencia-content h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--zait-green-light);
  margin-bottom: 25px;
}

.sobre-excelencia-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--zait-text-muted);
  margin-bottom: 15px;
}

.sobre-excelencia-content p:last-child {
  margin-bottom: 0;
}

/* =========================================
   STATS GRID
   ========================================= */
.sobre-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.sobre-stat-card {
  background: var(--zait-bg-white);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  padding: 40px 25px;
  text-align: center;
  transition: var(--zait-transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sobre-stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(185, 207, 56, 0.15);
  border-color: var(--zait-green-light);
}

.sobre-stat-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--zait-gradient-green);
  border-radius: 16px;
  padding: 15px;
}

.sobre-stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.sobre-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--zait-text-dark);
  margin-bottom: 8px;
}

.sobre-stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--zait-text-gray);
  line-height: 1.4;
}

/* =========================================
   MERCADO GRID
   ========================================= */
.sobre-mercado-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.sobre-mercado-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--zait-text-dark);
  margin-bottom: 25px;
}

.sobre-mercado-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--zait-text-gray);
  margin-bottom: 15px;
}

.sobre-chamada {
  font-size: 1.2rem !important;
  font-weight: 600;
  color: var(--zait-green-medium) !important;
  margin: 30px 0 20px !important;
}

.sobre-mercado-content .inst-cta-btn {
  margin-top: 10px;
}

.sobre-mapa {
  border-radius: 20px;
  overflow: hidden;
}

.sobre-mapa svg {
  width: 75%;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

/* =========================================
   TIMELINE SECTION
   ========================================= */

.sobre-timeline-section .inst-section-header {
  margin-bottom: 60px;
}

/* =========================================
   DUAL TIMELINE
   ========================================= */
.dual-timeline-container {
  display: flex;
  gap: 80px;
  justify-content: center;
  position: relative;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 40px;
  padding-bottom: 85px;
}

/* Linha vertical central separadora entre as duas timelines */
.dual-timeline-container::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--zait-green-light) 10%, var(--zait-green-light) 90%, transparent 100%);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.3;
  z-index: 0;
}

.timeline-column {
  flex: 1;
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.timeline-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--zait-green-light);
}

.timeline-company-title {
  font-size: 1.8rem;
  color: var(--zait-text-light);
  font-weight: bold;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Timeline Single - linha vertical única para cada lado */
.timeline.timeline-single {
  position: relative;
  padding: 15px 0;
  min-height: 100%;
}

.timeline.timeline-single::after {
  content: '';
  position: absolute;
  width: 3px;
  background-color: var(--zait-green-light);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1.5px;
  box-shadow: 0 0 10px rgba(185, 207, 56, 0.5);
  z-index: 1;
  border-radius: 3px;
}

.timeline-single .timeline-item {
  padding: 15px 30px;
  position: relative;
  width: 100%;
  left: 0 !important;
  margin-bottom: 30px;
}

.timeline-single .timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--zait-bg-darker);
  border: 3px solid var(--zait-green-light);
  top: 50%;
  margin-top: -8px;
  border-radius: 50%;
  z-index: 3;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.timeline-single .timeline-item:hover::after {
  background-color: var(--zait-green-light);
  border-color: var(--zait-text-light);
}

/* Alternância de cards para timeline LEFT (Drop) */
.timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 25px);
  margin-left: 0;
}

.timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 25px);
  margin-right: 0;
}

/* Alternância de cards para timeline RIGHT (Smart Sensing) */
.timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 25px);
  margin-left: 0;
}

.timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 25px);
  margin-right: 0;
}

/* Datas para timeline single */
.timeline-single .timeline-date {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--zait-light-medium);
  font-weight: bold;
  font-size: 0.85rem;
  z-index: 2;
  white-space: nowrap;
}

.timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-date {
  left: calc(50% + 25px);
  text-align: left;
}

.timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-date {
  right: calc(50% + 25px);
  left: auto;
  text-align: right;
}

/* Datas para timeline RIGHT (Smart Sensing) */
.timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-date {
  left: calc(50% + 25px);
  text-align: left;
}

.timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-date {
  right: calc(50% + 25px);
  left: auto;
  text-align: right;
}

/* Content cards para timeline single */
.timeline-single .timeline-content {
  padding: 15px 20px;
  background-color: var(--zait-dark-light);
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline-single .timeline-item:hover .timeline-content {
  box-shadow: 0 8px 25px rgba(185, 207, 56, 0.2);
  border-color: rgba(185, 207, 56, 0.3);
}

.timeline-single .timeline-title {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--zait-green-light);
  font-weight: 700;
}

.timeline-single .timeline-description {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--zait-text-muted);
  margin: 0;
}

/* Linhas horizontais conectando ao dot - Timeline LEFT */
.timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -17px;
  width: 0;
  height: 2px;
  background-color: var(--zait-green-light);
  box-shadow: 0 0 8px rgba(185, 207, 56, 0.6);
  transition: width 0.3s ease;
  transform: translateY(-50%);
}

.timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -17px;
  width: 0;
  height: 2px;
  background-color: var(--zait-green-light);
  box-shadow: 0 0 8px rgba(185, 207, 56, 0.6);
  transition: width 0.3s ease;
  transform: translateY(-50%);
}

/* Hover - aparecer linhas LEFT */
.timeline-left .timeline-single .timeline-item:hover:nth-child(odd) .timeline-content::after,
.timeline-left .timeline-single .timeline-item:hover:nth-child(even) .timeline-content::after {
  width: 17px;
}

/* Linhas horizontais conectando ao dot - Timeline RIGHT */
.timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -17px;
  width: 0;
  height: 2px;
  background-color: var(--zait-green-light);
  box-shadow: 0 0 8px rgba(185, 207, 56, 0.6);
  transition: width 0.3s ease;
  transform: translateY(-50%);
}

.timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -17px;
  width: 0;
  height: 2px;
  background-color: var(--zait-green-light);
  box-shadow: 0 0 8px rgba(185, 207, 56, 0.6);
  transition: width 0.3s ease;
  transform: translateY(-50%);
}

/* Hover - aparecer linhas RIGHT */
.timeline-right .timeline-single .timeline-item:hover:nth-child(odd) .timeline-content::after,
.timeline-right .timeline-single .timeline-item:hover:nth-child(even) .timeline-content::after {
  width: 17px;
}

/* =========================================
   SEÇÃO DE FUSÃO
   ========================================= */
.timeline-merge-section {
  position: relative;
  padding-top: 40px;
  text-align: center;
}

/* Linha horizontal conectando as duas timelines verticais */
.timeline-merge-section::before {
  content: '';
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 783.8px;
  height: 3px;
  background-color: var(--zait-green-light);
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(185, 207, 56, 0.6));
}

/* Linha vertical central descendo até o dot */
.timeline-merge-section::after {
  content: '';
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50px;
  background-color: var(--zait-green-light);
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(185, 207, 56, 0.6));
}

.merge-dot {
  width: 30px;
  height: 30px;
  background-color: var(--zait-green-light);
  border: 4px solid var(--zait-text-light);
  border-radius: 50%;
  margin: 0 auto 30px;
  position: relative;
  z-index: 5;
  top: 70px;
  box-shadow: 0 0 20px rgba(185, 207, 56, 0.8);
  animation: pulse-merge 2s infinite;
}

@keyframes pulse-merge {
  0%, 100% {
    box-shadow: 0 0 20px rgba(185, 207, 56, 0.8);
  }
  50% {
    box-shadow: 0 0 35px rgba(185, 207, 56, 1);
  }
}

.timeline-merge-content {
  max-width: 700px;
  margin: 90px auto 0;
}

.merge-date {
  display: block;
  color: var(--zait-light-medium);
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.merge-content {
  background: linear-gradient(135deg, var(--zait-dark-light), var(--zait-dark-medium));
  padding: 30px 40px;
  border-radius: 12px;
  border: 2px solid var(--zait-green-light);
  box-shadow: 0 10px 40px rgba(185, 207, 56, 0.3);
}

.merge-title-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

/* Inverte a ordem para inglês: logo antes do texto */
.merge-title-container.merge-title-reverse {
  flex-direction: row-reverse;
}

.merge-title {
  font-size: 1.8rem !important;
  color: var(--zait-text-light);
  margin-bottom: 0 !important;
  line-height: 0.8;
}

.merge-title-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.merge-content .timeline-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--zait-text-muted);
}

/* =========================================
   RESPONSIVO
   ========================================= */
@media (max-width: 1400px) {
  .dual-timeline-container {
    gap: 60px;
    max-width: 1400px;
  }

  .timeline-column {
    max-width: 600px;
  }
}

@media (max-width: 1200px) {
  .dual-timeline-container {
    gap: 40px;
    padding: 0 20px;
  }

  .timeline-column {
    max-width: 500px;
  }

  .sobre-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .sobre-mercado-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sobre-mapa {
    order: -1;
  }
}

@media (max-width: 992px) {
  .dual-timeline-container {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }

  .dual-timeline-container::before {
    display: none;
  }

  .timeline-column {
    max-width: 600px;
    width: 100%;
  }

  /* Em mobile, remove a linha horizontal e mantém apenas a vertical */
  .timeline-merge-section::before {
    display: none;
  }

  .timeline-merge-section {
    padding-top: 40px;
  }

  .timeline-merge-section::after {
    width: 3px;
    height: 40px;
    box-shadow: 0 0 10px rgba(185, 207, 56, 0.5);
  }
}

/* Ajustes para tablets */
@media (max-width: 991px) and (min-width: 769px) {
  .timeline-column {
    max-width: 550px;
  }

  .timeline-single .timeline-item {
    padding: 15px 20px;
  }

  .timeline-single .timeline-content {
    padding: 16px 18px;
  }

  .timeline-single .timeline-title {
    font-size: 1.05rem;
  }

  .timeline-single .timeline-description {
    font-size: 0.88rem;
  }

  /* Alinha linha horizontal com o dot vertical */
  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content::after {
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 768px) {
  .sobre-stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0 20px;
  }

  .sobre-counter {
    margin: 0 20px 40px;
  }

  .sobre-mapa svg {
    width: 50%;
  }

  .timeline-merge-section {
    padding-top: 0;
  }

  .sobre-stat-card {
    padding: 30px 20px;
  }

  .timeline-company-title {
    font-size: 1.4rem;
    letter-spacing: 1px;
  }

  .timeline-header {
    margin-bottom: 20px;
  }

  .timeline-single .timeline-item {
    padding: 15px 15px;
    margin-bottom: 30px;
  }

  /* Em mobile, simplificar layout das timelines single */
  .timeline.timeline-single::after {
    left: 30px;
    margin-left: 0;
  }

  .timeline-single .timeline-item::after {
    left: 30px;
    transform: translateX(-50%);
    margin-top: 0;
    top: 50%;
    margin-top: -8px;
  }



  /* Força todos os cards para ficarem alinhados à direita da linha */
  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content {
    margin-left: 60px;
    margin-right: 0;
  }

  /* Ajusta as linhas conectoras - alinhadas com o centro do card */
  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content::after {
    left: -30px;
    right: auto;
    width: 30px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Remove animação de hover em mobile */
  .timeline-left .timeline-single .timeline-item:hover:nth-child(odd) .timeline-content::after,
  .timeline-left .timeline-single .timeline-item:hover:nth-child(even) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:hover:nth-child(odd) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:hover:nth-child(even) .timeline-content::after {
    width: 30px;
  }

  /* Data acima do card */
  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-date,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-date,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-date,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-date {
    position: static;
    top: auto;
    left: auto !important;
    right: auto !important;
    transform: none;
    text-align: left;
    margin-bottom: 10px;
    display: block;
    margin-left: 60px;
  }

  .timeline-single .timeline-content {
    padding: 18px 20px;
  }

  .timeline-single .timeline-title {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .timeline-single .timeline-description {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .merge-content {
    padding: 20px 25px;
    margin: 0 20px;
  }

  .merge-title {
    font-size: 1.4rem !important;
  }

  .merge-title-logo {
    height: 28px;
  }

  .merge-title-container {
    gap: 8px;
  }

  .timeline-merge-section::after {
    top: 50px;
    height: 50px;
    display: none;
  }

  .merge-dot {
    top: 50px;
    width: 24px;
    height: 24px;
    display: none;
  }

  .timeline-merge-content {
    margin: 20px auto 0;
  }

  .sobre-image-container {
    min-height: 300px;
  }

  .sobre-excelencia-content {
    padding: 30px 25px;
    margin: 0 20px;
  }

  .sobre-mercado-content {
    margin: 0 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .sobre-counter-number {
    font-size: 3.5rem;
  }

  .sobre-counter-label {
    font-size: 1rem;
  }

  .sobre-mercado-content h3 {
    font-size: 1.5rem;
  }

  /* Ajustes adicionais para timeline em telas pequenas */
  .timeline-company-title {
    font-size: 1.2rem;
  }

  .timeline.timeline-single {
    padding: 0;
  }

  .timeline.timeline-single::after {
    left: 30px;
  }

  .timeline-single .timeline-item::after {
    left: 32px;
    top: 50%;
    margin-top: 4px;
  }

  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content {
    margin-left: 43px;
  }

  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-content::after {
    left: -25px;
    width: 25px;
    top: 50%;
    transform: translateY(-50%);
  }

  .timeline-left .timeline-single .timeline-item:hover:nth-child(odd) .timeline-content::after,
  .timeline-left .timeline-single .timeline-item:hover:nth-child(even) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:hover:nth-child(odd) .timeline-content::after,
  .timeline-right .timeline-single .timeline-item:hover:nth-child(even) .timeline-content::after {
    width: 25px;
  }

  .timeline-left .timeline-single .timeline-item:nth-child(odd) .timeline-date,
  .timeline-left .timeline-single .timeline-item:nth-child(even) .timeline-date,
  .timeline-right .timeline-single .timeline-item:nth-child(odd) .timeline-date,
  .timeline-right .timeline-single .timeline-item:nth-child(even) .timeline-date {
    margin-left: 43px;
    font-size: 0.8rem;
  }

  .timeline-single .timeline-content {
    padding: 15px 18px;
  }

  .timeline-single .timeline-title {
    font-size: 0.95rem;
  }

  .timeline-single .timeline-description {
    font-size: 0.85rem;
  }

  .merge-title {
    font-size: 1.2rem !important;
  }

  .merge-title-logo {
    height: 24px;
  }

  .merge-content {
    padding: 18px 20px;
  }

  .merge-content .timeline-description {
    font-size: 0.9rem;
  }
}
