/* --- RESET E ESTILOS GERAIS --- */
:root {
  --primary-color: #0054a6; /* Azul Petrobras approx */
  --accent-color: #ffcc00; /* Amarelo Poli/Petrobras */
  --bg-dark: #0f1115;
  --bg-card: #1a1d24;
  --text-light: #f0f0f0;
  --text-gray: #a0a0a0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}

/* --- HEADER --- */
header {
  background-color: rgba(15, 17, 21, 0.95);
  padding: 1rem 5%;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--text-light);
  letter-spacing: 2px;
}

nav ul {
  display: flex;
  gap: 30px;
}
nav a:hover {
  color: var(--primary-color);
}

/* --- HERO SECTION --- */
.hero {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0 5%;
  background: radial-gradient(
    circle at top right,
    #1e2838 0%,
    var(--bg-dark) 60%
  );
  margin-top: 60px;
}

.hero-content {
  max-width: 600px;
  justify-self: start;
}

.hero-viewer-container {
  width: 100%;
  height: 80vh;
  min-height: 500px;
  background: linear-gradient(135deg, #1a1d24 0%, #0f1419 100%);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hero-viewer-container canvas {
  display: block;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero span {
  color: var(--primary-color);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 30px;
}

.cta-button {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-button:hover {
  background-color: #004080;
}

/* --- 3D VIEWER SECTION --- */
.viewer-section {
  padding: 80px 5%;
  background-color: var(--bg-card);
  text-align: center;
}

.viewer-container {
  width: 100%;
  height: calc(100vh - 250px);
  min-height: 600px;
  background: linear-gradient(135deg, #1a1d24 0%, #0f1419 100%);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  margin-top: 30px;
}

.viewer-container canvas {
  display: block;
}

#loading-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-gray);
  pointer-events: none;
}

/* --- FEATURES / ABOUT --- */
.features {
  padding: 80px 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.feature-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}
.feature-card h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
}
.feature-card p {
  color: var(--text-gray);
  font-size: 0.95rem;
}

/* --- GALLERY --- */
.gallery {
  padding: 80px 5%;
  text-align: center;
  background-color: var(--bg-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-card);
  aspect-ratio: 16/9;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 84, 166, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* --- DOWNLOADS --- */
.downloads {
  padding: 80px 5%;
  text-align: center;
  background-color: var(--bg-card);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.download-card {
  background: var(--bg-dark);
  padding: 40px 30px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.download-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 84, 166, 0.3);
}

.download-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), #003d7a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 10px;
}

.download-card h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-light);
}

.download-card p {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin: 0;
}

.download-button {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-top: 10px;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.download-card:hover .download-button {
  background-color: #003d7a;
}

/* --- TEAM --- */
.team {
  padding: 80px 5%;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.team-member {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 8px;
  width: 250px;
}

.team-member h4 {
  color: var(--primary-color);
  margin-bottom: 5px;
}
.team-member span {
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* --- PARTNERS SECTION --- */
.partners {
  padding: 80px 5%;
  text-align: center;
  background-color: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.partners h2 {
  margin-bottom: 40px;
  color: var(--text-light);
}

.partners-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.partner-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  background-color: white;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-logo:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 84, 166, 0.4);
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 10px 20px;
  transition: all 0.3s ease;
  border-radius: 4px;
  font-weight: 300;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-close {
  top: 20px;
  right: 30px;
  font-size: 3rem;
  line-height: 1;
  padding: 5px 20px;
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
  display: none;
}

/* --- FOOTER --- */
footer {
  background-color: #050608;
  padding: 40px 5%;
  text-align: center;
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* Responsividade básica */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    height: auto;
    padding: 80px 5% 40px;
    gap: 30px;
  }

  .hero-content {
    text-align: center;
    justify-self: center;
  }

  .hero-viewer-container {
    height: 60vh;
    min-height: 400px;
  }

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

  header {
    padding: 1rem 3%;
    flex-wrap: wrap;
  }

  .header-title {
    font-size: 1.2rem;
  }

  .partner-logo {
    height: 60px;
    padding: 15px 20px;
  }

  .partners-container {
    gap: 30px;
  }

  /* Lightbox mobile adjustments */
  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 2.5rem;
    padding: 5px 15px;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 2rem;
    padding: 8px 15px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  #lightbox-img {
    max-width: 95%;
    max-height: 80vh;
  }


  nav {
    display: none;
  } /* Simplificação para mobile */

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .download-card {
    padding: 30px 20px;
  }
}
