/* =============================================
       Variáveis Globais e Configurações Básicas
============================================= */
:root {
  --primary: #1a6d3f;
  --primary-dark: #135530;
  --secondary: #1b2530;
  --light: #f8f9fa;
  --dark: #212529;
  --purple: #6f42c1;
  --default-font: "Open Sans", system-ui, -apple-system, sans-serif;
  --heading-font: "Marcellus", serif;
  --hero-heading-color: #ffffff;
  --card-border-radius: 10px;
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --card-header-padding: 1.5rem;
  --icon-size: 50px;
}

/* Reset básico para todos os elementos */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Configurações globais do body e html */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--default-font);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
  width: 100%;
  min-height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font);
  color: var(--secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* =============================================
       Componentes Globais
============================================= */
.section {
  padding: 80px 0;
  position: relative;
}

/* Ajustes para dispositivos menores */
@media (max-width: 991.98px) {
  .section {
    padding: 60px 0;
  }
}

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

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

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.section-title p {
  font-size: 1.25rem;
  color: #6c757d;
  max-width: 700px;
  margin: 0 auto;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
}

.btn {
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

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

.btn-outline-purple {
  color: var(--purple);
  border-color: var(--purple);
}

.btn-outline-purple:hover {
  background-color: var(--purple);
  color: white;
}

.bg-light {
  background-color: var(--light) !important;
}

.section-with-image {
  padding: 80px 0;
  position: relative;
}

.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

/* Espaçamento entre seções principais */
section {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Prevenção para colagens verticais */
.section-services+.section-why-us,
.section-why-us+.section-process,
.section-process+.section-cta,
.section-cta+.section-faq {
  margin-top: 60px;
}

/* =============================================
       Header & Navigation
============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1030;
}

.navbar-brand img {
  height: 60px;
  transition: all 0.3s;
}

.navbar-brand img:hover {
  opacity: 0.9;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: var(--dark);
  padding: 0.5rem 1rem;
  transition: all 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar .cta-button {
  background: var(--primary);
  color: white;
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  margin-left: 1rem;
  font-weight: 600;
  transition: all 0.3s;
}

.navbar .cta-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Container principal para compensar a navbar fixa */
.main-container {
  padding-top: 80px;
  /* Altura da navbar padrão */
}

@media (max-width: 991.98px) {
  .navbar .cta-button {
    margin-left: 0;
    margin-top: 10px;
  }

  .navbar-toggler {
    border: none;
    padding: 0.5rem;
  }

  .navbar-toggler:focus {
    box-shadow: none;
  }

  .navbar-brand img {
    height: 50px;
  }
}

/* =============================================
       Mega Menu
============================================= */
.nav-item.dropdown-mega {
  position: static;
}

.mega-menu {
  display: none;
  opacity: 0;
  position: absolute;
  width: 100%;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: white;
  border-top: 2px solid rgba(26, 109, 63, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 1020;
  top: 100%;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mega-menu.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mega-menu .container {
  max-width: 100%;
}

.dropdown-item-service {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
  height: 100%;
  cursor: pointer;
}

.dropdown-item-service:hover {
  background-color: #f1f1f1;
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.dropdown-item-service.active {
  background-color: #f0f0f0;
  border-left: 3px solid #28a745;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  background-color: var(--primary);
  flex-shrink: 0;
}

.service-content h6 {
  margin-bottom: 0.5rem;
  color: #333;
}

.service-content p {
  margin-bottom: 0;
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 991.98px) {
  .mega-menu {
    position: static !important;
    box-shadow: none;
    border-top: 1px solid #eee;
    padding: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mega-menu.show {
    max-height: 1000px;
    padding: 1rem;
  }

  .dropdown-item-service {
    margin-bottom: 0.5rem;
  }

  .mega-menu .container {
    padding-left: 0;
    padding-right: 0;
  }

  .mega-menu .row.g-3 {
    margin-left: 0;
    margin-right: 0;
  }

  .mega-menu .col-lg-4,
  .mega-menu .col-md-6 {
    padding-left: 0;
    padding-right: 0;
  }
}

/* =============================================
       Hero Section
============================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero .carousel-item {
  height: 100vh;
  min-height: 600px;
}

.hero .carousel-item img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.hero .carousel-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 100px 20px 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

.hero .carousel-container h2 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--hero-heading-color);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero .carousel-container p {
  font-size: 1.25rem;
  max-width: 700px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 991.98px) {
  .hero .carousel-container h2 {
    font-size: 2rem;
  }

  .hero .carousel-container p {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .hero {
    height: 80vh;
    min-height: 500px;
  }

  .hero .carousel-item {
    height: 80vh;
    min-height: 500px;
  }
}

@media (max-width: 575.98px) {
  .hero .carousel-container {
    padding: 60px 20px 40px;
  }

  .hero .carousel-container h2 {
    font-size: 1.75rem;
  }
}

/* =============================================
       Services Section
============================================= */
.services-section {
  padding: 100px 0;
  background-color: var(--light);
}

.section-services .row.g-4 {
  margin-bottom: 40px;
}

.service-card {
  background: white;
  border-radius: var(--card-border-radius);
  overflow: hidden;
  height: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: none;
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card .card-header {
  background-color: var(--primary);
  color: white;
  padding: var(--card-header-padding);
  border-radius: 8px 8px 0 0 !important;
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.service-icon-box {
  width: var(--icon-size);
  height: var(--icon-size);
  background-color: white !important;
  color: var(--primary) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.service-card .card-header h4 {
  color: white !important;
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.service-card .card-body {
  padding: 1.8rem;
  border: 1px solid #eee;
  border-top: none !important;
  border-radius: 0 0 8px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  text-align: center;
  font-weight: bold;
  margin-bottom: 15px;
}

.service-card ul {
  padding-left: 20px;
  margin-bottom: 20px;
  flex: 1;
  list-style: none;
}

.service-card ul li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 25px;
}

.service-card ul li:before {
  content: "\f00c";
  /* Bootstrap check icon */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--primary);
}

.service-card:hover .card-header {
  background-color: var(--primary-dark);
}

@media (max-width: 991.98px) {
  .service-card .card-header {
    padding: 1.2rem;
    min-height: 75px;
  }

  .service-icon-box {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .service-card .card-header h4 {
    font-size: 1.2rem;
  }
}

@media (max-width: 767.98px) {
  .service-card .card-header {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .service-icon-box {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .service-card .card-header {
    padding: 1rem;
  }

  .service-card .card-body {
    padding: 1.5rem;
  }
}

/* =============================================
       About Section
============================================= */
.about-section {
  padding: 100px 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* =============================================
       Energy Section
============================================= */
.energy-section {
  padding: 100px 0;
  background-color: var(--light);
}

.benefit-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.benefit-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.solution-card {
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s;
}

.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* =============================================
       Testimonials Section
============================================= */
.testimonials-section {
  padding: 100px 0;
}

.testimonial-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.client-info {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.client-avatar {
  margin-right: 1rem;
}

.rating {
  color: #ffc107;
  margin-bottom: 1rem;
}

/* =============================================
       CTA Section
============================================= */
.cta-section {
  padding: 80px 0;
  background-color: var(--primary);
  color: white;
}

.cta-section h2 {
  color: white;
}

/* =============================================
       Footer
============================================= */
.footer {
  background-color: var(--secondary);
  color: white;
  padding: 80px 0 0;
}

.footer h4 {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px 0;
  margin-top: 60px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: all 0.3s;
}

.footer-bottom a:hover {
  color: white !important;
  text-decoration: underline;
}

.text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  margin-right: 10px;
  transition: all 0.3s;
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
}

/* =============================================
       Page Title Banner
============================================= */
.page-title-banner {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  color: white;
  margin-top: -1px;
  /* Remove possível linha branca */
  padding: 0;
  overflow: hidden;
}

/* Imagem de fundo do banner */
.page-title-banner .bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  background-image: url('../img/empresa.png');
}

/* Sobreposição escura no banner */
.page-title-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Container do conteúdo no banner */
.page-title-banner .container {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 15px;
  margin: 0 auto;
}

/* Área de texto centralizada */
.page-title-banner .content {
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Título do banner */
.page-title-banner h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* Parágrafo do banner */
.page-title-banner p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 600px;
}

.breadcrumbs {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 15px;
  border-radius: 50px;
  justify-content: flex-start;
}

.breadcrumbs ol {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  margin: 0 8px 0 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s;
}

.breadcrumbs a:hover {
  color: white;
}

@media (max-width: 991.98px) {
  .page-title-banner {
    min-height: 400px;
    padding: 80px 20px;
  }

  .page-title-banner h1 {
    font-size: 2.2rem;
  }

  .page-title-banner p {
    font-size: 1.1rem;
    max-width: 100%;
  }

  .page-title-banner .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 575.98px) {
  .page-title-banner h1 {
    font-size: 1.8rem;
  }

  .breadcrumbs {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* =============================================
       About Page Styles
============================================= */
.about-page {
  /* Estilos específicos para a página sobre */
}

.value-card {
  background: white;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.team-member {
  padding: 20px;
  background: white;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.team-member img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.differential-item {
  padding: 20px;
  background: white;
  border-radius: 10px;
  height: 100%;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.differential-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* =============================================
       Projects Page Styles (CORRIGIDO)
============================================= */
.projects-page {
  /* Estilos específicos para a página de projetos */
}

.project-card {
  background: white;
  border-radius: var(--card-border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  height: 100%;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column; /* Faz o card um contêiner flexível */
}

.featured-card {
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(26, 109, 63, 0.2);
}

.project-card .project-img {
  position: relative;
  overflow: hidden;
}

.project-card .project-img img {
  height: 200px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.03);
}

.category-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 123, 255, 0.9);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.project-card .project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Permite que o conteúdo do card preencha o espaço vertical */
  justify-content: flex-start; /* Alinha o conteúdo ao topo */
  /* REMOVIDO: text-align: center; e align-items: center; daqui para permitir alinhamento à esquerda padrão de h3 e p */
}

.project-card .project-content h3 {
  font-family: var(--heading-font);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.featured-card .card-title {
  font-size: 1.6rem;
}

.project-card .project-content p {
  margin-bottom: 1.25rem;
  color: #555;
  line-height: 1.6;
  min-height: 5em; /* Garante altura mínima para alinhamento consistente dos parágrafos */
}

/* Estilos para a lista de features do projeto */
.project-card .project-features {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
  /* REMOVIDO: display: flex; flex-direction: column; align-items: center; se a lista deve ser left-aligned */
}

.project-card .project-features li {
  display: flex;
  align-items: center; /* Alinha o ícone e o texto verticalmente */
  /* REMOVIDO: justify-content: center; se a lista deve ser left-aligned */
  margin-bottom: 8px;
}

.project-card .project-features li i {
  margin-right: 8px; /* Espaço entre ícone e texto */
}

/* Overlay do projeto: HIDDEN por padrão e VISÍVEL no hover */
.project-card .project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 109, 63, 0.7); /* Fundo verde semi-transparente */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* HIDDEN por padrão */
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none; /* Garante que elementos abaixo sejam clicáveis quando overlay está hidden */
}

.project-card:hover .project-overlay {
  opacity: 1; /* VISÍVEL no hover */
  pointer-events: auto; /* Torna o overlay clicável no hover */
}

.read-more {
  color: white; /* Alterado para branco para contraste com o overlay verde */
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: 0; /* Removido margin-top, pois o overlay centraliza */
  text-decoration: none;
}

.read-more i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.read-more:hover {
  color: #f0f0f0; /* Cor de hover para o texto branco */
}

.read-more:hover i {
  transform: translateX(5px);
}

.author-info {
  display: flex;
  align-items: center;
  margin-top: auto; /* Garante que o author-info vá para o final do card-body */
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.author-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.featured-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Media Queries para Projetos (manter as que já estavam e ajustar se necessário) */
@media (max-width: 575.98px) {
  .author-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .author-info img {
    margin-right: 0;
    margin-bottom: 8px;
  }
}
/* =============================================
       Utility Classes
============================================= */
/* Correções para Cases de Sucesso */
.case-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex; /* Adicionado: Faz o card um contêiner flexível */
  flex-direction: column; /* Adicionado: Empilha o conteúdo verticalmente */
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.case-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.case-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Adicionado: Ajuda na renderização consistente da imagem */
  transition: transform 0.5s ease;
}

.case-card:hover .case-img img {
  transform: scale(1.05);
}

.case-logo {
  position: absolute;
  bottom: 0px; /* Ajustado: Posiciona o logo na linha de base da imagem */
  right: 20px;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px;
  transform: translateY(50%); /* Adicionado: Para que metade do logo fique abaixo da imagem */
  z-index: 2; /* Garante que o logo fique acima da imagem */
}

.case-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.case-content {
  padding: 30px 20px 20px;
  flex-grow: 1; /* Adicionado: Permite que o conteúdo preencha o espaço vertical restante */
  display: flex; /* Adicionado: Para controlar o alinhamento interno */
  flex-direction: column; /* Adicionado: Empilha os elementos do conteúdo */
}

.case-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.case-content p {
    flex-grow: 1; /* Adicionado: Permite que o parágrafo ocupe o máximo de espaço antes do botão */
    margin-bottom: 1.25rem; /* Mantém o espaçamento original */
}

.read-more {
  color: var(--primary); /* Cor principal do tema */
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: auto; /* Ajustado: Empurra o botão para o final do case-content */
  text-decoration: none;
  opacity: 1;
  pointer-events: auto;
}

.read-more i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more:hover i {
  transform: translateX(5px);
}

/* =============================================
       Scroll Top & Preloader
============================================= */
#scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.3s;
}

#scroll-top:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

#scroll-top i {
  font-size: 20px;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#preloader:before {
  content: '';
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

