/* Home Page Specific Styles */

/* Hero Carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 2519 / 950;
  overflow: hidden;
  background: var(--bg-color);
  border-bottom: 3px solid #a92355;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

/* Escurece a imagem para dar contraste no texto branco */
.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(59, 32, 94, 0.8), rgba(0, 0, 0, 0.3));
  z-index: 1;
}

.carousel-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 0 2rem;
  color: white;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.8s ease 0.3s;
}

.carousel-slide.active .carousel-content {
  transform: translateY(0);
  opacity: 1;
}

.carousel-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: white;
}

.carousel-author {
  font-family: var(--font-text);
  font-size: 1.2rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #f4e8ea;
}

/* Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 0;
}

.indicator.active {
  background: white;
  transform: scale(1.2);
}

/* Navigation Arrows */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.8);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .carousel-control:hover {
    background: var(--accent-color);
    box-shadow: 0 4px 15px rgba(169, 35, 85, 0.4);
  }
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}

.hero-curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  /* Curva de onda contínua e mais orgânica, que remete ao infinito do logo */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23Fdfbfd' fill-opacity='1' d='M0,160L48,170.7C96,181,192,203,288,197.3C384,192,480,160,576,160C672,160,768,192,864,208C960,224,1056,224,1152,208C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center bottom;
  z-index: 1;
}

/* Activities Home */
.activities-section {
  position: relative;
  background-image: url('../fundo1.png');
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 1100px;
  /* Greatly increased size to match reference */
  background-color: #fef6f2;
  /* Updated requested background color */
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.activity-card {
  display: flex;
  flex-direction: column;
}

.activity-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.activity-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  /* Inspirado nos círculos perfeitos da logo */
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(59, 32, 94, 0.2);
  transition: all 0.3s ease;
}

.activity-card:hover .activity-icon {
  transform: rotate(10deg) scale(1.1);
  background: var(--accent-color);
}

.activity-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.activity-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.activity-card .btn {
  margin-top: auto;
  align-self: flex-end;
  /* Align buttons to the right as requested */
}

/* About Home */
.about-home {
  background-color: var(--primary-color);
  background-image: url('../fundo azul.png');
  background-repeat: repeat;
  background-size: auto;
  color: white;
  padding: 6rem 0;
  border-bottom: 3px solid #a92355;
}

.about-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  /* Aumentado para dar o espaço de ~2rem debaixo da linha vazada */
  color: white;
}

.about-text p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
}

.about-text .btn-outline {
  border-color: white;
  color: white;
}

.about-text .btn-outline:hover {
  background-color: white;
  color: var(--primary-color);
}

.board-members {
  display: flex;
  gap: -10px;
  margin-bottom: 2rem;
}

.board-member-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 4px solid var(--accent-color);
  /* Remetendo à silhueta vinha do logo */
  box-shadow: 0 6px 15px rgba(59, 32, 94, 0.15);
  background-color: var(--border-color);
  margin-right: -15px;
  /* overlap criando intersecção estilo diagrama de Venn / logo Parlêtre */
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, z-index 0.1s;
}

.board-member-img:hover {
  transform: translateY(-5px) scale(1.1);
  z-index: 10;
  border-color: var(--primary-light);
}

.board-member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Texts Home */
.texts-section {
  position: relative;
  background-color: #fef6f2;
  /* Updated from request */
  /* Remover z-index para não esconder o before atrás de seu próprio fundo */
}

.texts-section::before {
  content: '';
  position: absolute;
  top: -300px;
  /* Stronger bleed upwards deeply into Quem Somos */
  bottom: -400px;
  /* Bleeds deep into the footer */
  left: 0;
  width: 1000px;
  /* Diminuído um pouco conforme pedido */
  background-image: url('../fundo2.png');
  background-repeat: no-repeat;
  background-position: left bottom;
  /* Ancorar na base para não ser cortada em cima */
  background-size: 100% auto;
  pointer-events: none;
  z-index: 1;
  /* Sits over the section background AND the footer background */
  opacity: 0.9;
}

.texts-section .container {
  position: relative;
  z-index: 2;
  /* Sits above the watermark */
}

.texts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 2;
}

.text-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: 20px;
  /* Alinhado ao estilo dos cards de atividades */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 32, 94, 0.04);
  position: relative;
  overflow: hidden;
}

.text-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.text-item:hover {
  border-color: transparent;
  /* Remove old hover border logic to match new style */
  transform: translateX(10px);
  box-shadow: 0 10px 20px rgba(59, 32, 94, 0.08);
}

.text-item:hover::before {
  transform: scaleX(1);
}

.text-item:hover .icon-circle {
  fill: var(--accent-color);
  stroke: var(--accent-color);
}

.text-item:hover .icon-arrow {
  stroke: white;
}

.text-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

.text-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.text-item-action {
  color: var(--accent-color);
}

.texts-action {
  text-align: center;
}

/* CTA Home */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 35, 85, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  color: white;
  margin-bottom: 2rem;
  font-size: 2.8rem;
  letter-spacing: -0.02em;
}

/* Hide mobile carousel nav by default */
.mobile-nav-btn {
  display: none;
}

@media (max-width: 768px) {
  .hero-carousel {
    height: auto;
    min-height: auto;
  }

  .carousel-slide.banner-image-only {
    background-size: cover;
  }

  .carousel-title {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .carousel-content {
    padding: 0 1.5rem;
  }
  
  .carousel-control {
    width: 35px;
    height: 35px;
  }
  
  .carousel-control svg {
    width: 18px;
    height: 18px;
  }
  
  .indicator {
    width: 8px;
    height: 8px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .about-content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .about-text .section-title-left {
    text-align: center;
  }
  
  .about-text .section-title-left::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60px; /* shorter line for mobile center */
  }

  /* Mobile Carousel Navigation Wrapper */
  .mobile-carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
  }

  /* Navigation Buttons */
  .mobile-nav-btn {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(59, 32, 94, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
  }
  
  @media (hover: hover) and (pointer: fine) {
    .mobile-nav-btn:hover {
      background: var(--accent-color);
    }
    
    .mobile-nav-btn:hover svg {
      stroke: white;
    }
  }
  
  .mobile-nav-btn.prev {
    left: -15px;
  }
  
  .mobile-nav-btn.next {
    right: -15px;
  }

  /* Make Activities a horizontal scrollable carousel on mobile */
  .activities-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    width: 100%;
    scroll-behavior: smooth;
  }
  
  .activities-grid::-webkit-scrollbar {
    display: none;
  }

  .activity-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }

  /* Make Texts a horizontal scrollable carousel on mobile */
  .texts-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
    scroll-behavior: smooth;
  }

  .texts-list::-webkit-scrollbar {
    display: none;
  }

  .text-item {
    flex: 0 0 85%;
    scroll-snap-align: center;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  /* Transform the SVG arrow into a "Ler mais" button on mobile */
  .text-item-action {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  
  .text-item-action svg {
    display: none;
  }
  
  .text-item-action::after {
    content: 'Ler mais';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.8rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-text);
    font-size: 0.9rem;
    margin-top: auto;
    transition: all 0.3s ease;
  }

  /* Mobile Watermark Adjustments */
  .activities-section {
    padding-top: 2.5rem;
    background-image: linear-gradient(rgba(254, 246, 242, 0.5), rgba(254, 246, 242, 0.5)), url('../fundo1.png');
    background-position: center, calc(100% + 120px) bottom;
    background-size: 100% 100%, auto calc(100% - 110px);
  }

  .texts-section {
    padding-top: 2.5rem;
  }

  .texts-section::before {
    top: 110px;
    bottom: 0;
    width: 100%;
    background-size: auto 100%;
    background-position: -120px bottom;
    opacity: 0.5;
  }
}