/* ==================== */
/* VARIÁVEIS E RESET */
/* ==================== */
:root {
  --primary-yellow: #fea700;
  --primary-blue: #0097ff;
  --primary-color: var(--primary-yellow);
  --primary-dark: #d18a00;
  --dark-bg: #000000;
  --dark-gray: #1f1f1f;
  --medium-gray: #303030;
  --light-gray: #cccccc;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark-bg);
  color: var(--white);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  font-family: "Orbitron", sans-serif;
  margin-top: 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
}

/* ==================== */
/* COMPONENTES COMUNS */
/* ==================== */
.section-title {
  text-align: center;
  color: var(--primary-yellow);
  font-size: 2rem;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.button-primary {
  background-color: var(--primary-blue);
  color: white;
}

.button-primary:hover {
  background-color: var(--primary-yellow);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(254, 167, 0, 0.3);
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
}

/* ==================== */
/* SEÇÃO HEADER */
/* ==================== */
.portifolio-header {
  background: linear-gradient(180deg, var(--dark-gray) 0%, var(--dark-bg) 100%);
  text-align: center;
  padding: 100px 20px 80px;
  position: relative;
}

.portifolio-header h1 {
  font-size: 3.5rem;
  color: var(--primary-yellow);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.portifolio-header .subtitle {
  font-size: 1.3rem;
  color: var(--light-gray);
  max-width: 700px;
  margin: 0 auto 25px;
}

.header-highlight {
  background-color: rgba(0, 151, 255, 0.1);
  border-left: 4px solid var(--primary-blue);
  padding: 15px 20px;
  display: inline-block;
  margin-top: 20px;
}

.header-highlight p {
  font-size: 1.1rem;
  color: var(--primary-yellow);
  margin: 0;
  font-weight: 600;
}

/* ==================== */
/* SEÇÃO ESTATÍSTICAS */
/* ==================== */
.portfolio-stats {
  background-color: var(--dark-gray);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.stat-card {
  text-align: center;
  padding: 30px 20px;
  background-color: rgba(254, 167, 0, 0.05);
  border-radius: 8px;
  border-bottom: 3px solid var(--primary-yellow);
}

.stat-number {
  font-family: "Orbitron", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-yellow);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1rem;
  color: var(--light-gray);
}

/* ==================== */
/* SEÇÃO FILTROS */
/* ==================== */
.portfolio-filter {
  padding: 40px 0;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 40px 0;
}

/* ==================== */
/* SEÇÃO PROJETOS */
/* ==================== */
.portfolio-projects {
  padding: 60px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--medium-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(254, 167, 0, 0.2);
}

.project-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Proporção 16:9 */
  overflow: hidden;
  background: #000;
}

.project-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.view-project {
  padding: 12px 24px;
  background: var(--primary-blue);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-project:hover {
  background: var(--primary-yellow);
  transform: translateY(-3px);
}

.project-content {
  padding: 20px;
}

.project-category {
  display: inline-block;
  background-color: var(--primary-blue);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-card h3 {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 10px;
}

.project-excerpt {
  font-size: 0.95rem;
  color: var(--light-gray);
  margin-bottom: 15px;
}

.project-metrics {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-value {
  font-weight: 700;
  color: var(--primary-yellow);
  font-size: 1.2rem;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--light-gray);
}

/* ==================== */
/* SEÇÃO DEPOIMENTOS */
/* ==================== */
.portfolio-testimonials {
  background-color: var(--dark-gray);
  padding: 80px 0;
}

.testimonials-container {
  width: 100%;
  overflow-x: auto;
  padding: 20px 0;
  scrollbar-width: none;
}

.testimonials-container::-webkit-scrollbar {
  display: none;
}

.testimonials-slider {
  display: flex;
  gap: 30px;
  padding-bottom: 10px;
}

.testimonial-card {
  min-width: 300px;
  scroll-snap-align: start;
  background: var(--medium-gray);
  border-radius: 8px;
  padding: 30px;
  flex-shrink: 0;
}

.testimonial-content p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--light-gray);
  margin-bottom: 25px;
  position: relative;
}

.testimonial-content p::before {
  content: '"';
  font-size: 3rem;
  color: var(--primary-yellow);
  position: absolute;
  top: -20px;
  left: -15px;
  opacity: 0.3;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-author img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  border: 3px solid var(--primary-yellow);
}

.testimonial-author h4 {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 5px;
}

.testimonial-author span {
  font-size: 0.9rem;
  color: var(--light-gray);
}

/* ==================== */
/* SEÇÃO CTA */
/* ==================== */
.portfolio-cta {
  background: linear-gradient(
    135deg,
    rgba(254, 167, 0, 0.1) 0%,
    rgba(0, 151, 255, 0.1) 100%
  );
  padding: 80px 0;
  text-align: center;
}

.cta-content h2 {
  color: var(--primary-yellow);
  font-size: 2rem;
  margin-bottom: 20px;
}

.cta-content p {
  color: var(--light-gray);
  max-width: 600px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
}

/* ==================== */
/* ANIMAÇÕES */
/* ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeIn 0.8s ease forwards;
}

/* ==================== */
/* RESPONSIVIDADE */
/* ==================== */
@media (max-width: 992px) {
  .portifolio-header h1 {
    font-size: 2.8rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 40px 0;
  }

  .portifolio-header {
    padding: 80px 20px 60px;
  }

  .portifolio-header h1 {
    font-size: 2.2rem;
  }

  .portifolio-header .subtitle {
    font-size: 1.1rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }

  .cta-content h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .portifolio-header h1 {
    font-size: 1.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    min-width: 260px;
    padding: 20px;
  }
}

/* Estilo do CTA */
.portfolio-cta {
  background: linear-gradient(
    135deg,
    rgba(254, 167, 0, 0.1) 0%,
    rgba(0, 151, 255, 0.1) 100%
  );
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.portfolio-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("assets/img/rock-pattern.png") repeat;
  opacity: 0.05;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  color: var(--primary-yellow);
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cta-content p {
  color: var(--light-gray);
  font-size: 1.2rem;
  margin-bottom: 40px;
}

/* Estilo do botão aprimorado */
.cta-button {
  display: inline-flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    45deg,
    var(--primary-yellow) 0%,
    var(--primary-blue) 100%
  );
  color: var(--dark-bg);
  padding: 18px 40px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.1rem;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 10px 30px rgba(0, 151, 255, 0.3);
  border: none;
  cursor: pointer;
}

.cta-button .cta-text {
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}

.cta-button .cta-icon {
  position: relative;
  z-index: 2;
  margin-left: 15px;
  transition: all 0.4s ease;
}

.cta-button .cta-hover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 100%);
  opacity: 0;
  z-index: 2;
  white-space: nowrap;
  transition: all 0.4s ease;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--primary-blue) 0%,
    var(--primary-yellow) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Efeitos hover */
.cta-button:hover {
  box-shadow: 0 15px 40px rgba(254, 167, 0, 0.4);
  transform: translateY(-5px);
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:hover .cta-text {
  transform: translateY(-100%);
  opacity: 0;
}

.cta-button:hover .cta-icon {
  transform: translateX(10px);
}

.cta-button:hover .cta-hover {
  transform: translate(-50%, -50%);
  opacity: 1;

}

/* Responsivo */
@media (max-width: 768px) {
  .cta-content h2 {
    font-size: 1.8rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

  .cta-button {
    padding: 15px 30px;
    font-size: 1rem;
  }
}

/* ==================== */
/* CORREÇÕES PARA SCROLL HORIZONTAL */
/* ==================== */

/* 1. Prevenção global */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* 2. Container principal ajustado */
.container {
  width: 95%;
  max-width: 100vw;
  padding: 20px 15px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 3. Header otimizado */
.portifolio-header {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 80px 15px;
}

.portifolio-header h1 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

/* 4. Seção de depoimentos ajustada */
.testimonials-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 15px;
}

.testimonials-slider {
  padding-bottom: 20px;
  padding-left: 15px;
  padding-right: 15px;
}

/* 5. Grids responsivas */
.stats-grid,
.projects-grid {
  width: 100%;
  padding: 0;
}

/* 6. Elementos que podem causar overflow */
.project-card,
.stat-card,
.testimonial-card {
  max-width: 100%;
}

/* 7. Botões e filtros */
.filter-options {
  justify-content: center;
  padding: 0 10px;
}

/* 8. Textos longos */
h1, h2, h3, p, a, span {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==================== */
/* AJUSTES ESPECÍFICOS PARA MOBILE */
/* ==================== */

@media (max-width: 768px) {
  /* Header mobile */
  .portifolio-header {
    padding: 60px 15px;
  }
  
  /* Seção CTA */
  .portfolio-cta {
    padding: 60px 15px;
  }
  
  .cta-button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  /* Testimonials */
  .testimonial-card {
    min-width: 85vw;
  }
}

@media (max-width: 480px) {
  /* Ajustes finos para mobile pequeno */
  .portifolio-header h1 {
    font-size: 1.8rem;
  }
  
  .filter-options {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
  
  .filter-options::-webkit-scrollbar {
    display: none;
  }
  
  .filter-btn {
    flex-shrink: 0;
  }
  
  /* Cards de projeto */
  .project-card {
    margin: 0 auto;
  }
}

/* ==================== */
/* PREVENÇÃO ADICIONAL */
/* ==================== */

/* Garante que imagens não ultrapassem os limites */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Remove sombras em mobile para evitar overflow */
@media (max-width: 768px) {
  .project-card:hover {
    box-shadow: none;
    transform: none;
  }
  
  .project-card:hover .project-image img {
    transform: none;
  }
}

/* Corrige possíveis problemas com white-space */
[class*="-card"] h3,
[class*="-content"] p {
  white-space: normal;
}