/* ==============================
   PANORAR — styles.css
   ============================== */

/* --- Variables --- */
:root {
  --bg:          #0c0c0c;
  --surface:     #161616;
  --surface2:    #1c1c1c;
  --text:        #f0ede8;
  --text-muted:  #8a8a8a;
  --gold:        #c8a96d;
  --border:      rgba(255, 255, 255, 0.07);
  --nav-height:  72px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }


/* ==============================
   NAVIGATION
   ============================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  z-index: 1000;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#navbar.scrolled {
  background: rgba(12, 12, 12, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--text);
  transition: color 0.3s;
}
.nav-logo:hover { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 44px;
  list-style: none;
}
.nav-links a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ==============================
   HERO
   ============================== */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../../Fundo.jpg');
  background-size: cover;
  background-position: center;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.25) 0%,
    rgba(10, 10, 10, 0.25) 45%,
    rgba(10, 10, 10, 0.72) 78%,
    #0c0c0c 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 52px);
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.85), 0 0 60px rgba(0, 0, 0, 0.5);
}

.hero-line {
  width: 36px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 300;
}

.scroll-indicator {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
  animation: scrollBounce 2.2s ease-in-out infinite;
}
.scroll-indicator::before {
  content: 'scroll';
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-indicator::after {
  content: '';
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 1; }
}


/* ==============================
   SECTIONS
   ============================== */
.section { padding: 120px 0; }
.section-alt { background: var(--surface); }

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 56px;
}

.section-header {
  margin-bottom: 64px;
  text-align: center;
}
.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}


/* ==============================
   GALLERY GRID
   ============================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }

/* Placeholder (sem imagem real) */
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(135deg, #161616, #1e1e1e);
  transition: background 0.4s;
}
.gallery-item:hover .gallery-placeholder {
  background: linear-gradient(135deg, #191919, #242424);
}
.gallery-placeholder svg {
  width: 30px;
  height: 30px;
  color: var(--text-muted);
  opacity: 0.25;
}
.gallery-placeholder-text {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.4;
}

/* Overlay com título ao hover */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.75) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 20px 24px;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
}


/* ==============================
   VIDEO GRID
   ============================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 3px;
}

.video-item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface2);
}
.video-item video,
.video-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(135deg, #141414, #1c1c1c);
}
.video-placeholder svg {
  width: 38px;
  height: 38px;
  color: var(--text-muted);
  opacity: 0.22;
}
.video-placeholder-text {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.4;
}


/* ==============================
   360° VIEWER
   ============================== */
.viewer-360-wrapper {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

#panorama-360 {
  width: 100%;
  height: 600px;
  display: block;
}

/* Oculta controles padrão do Pannellum */
.pnlm-controls-container { display: none !important; }
.pnlm-about-msg           { display: none !important; }

.viewer-controls {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(18, 18, 18, 0.48);
  padding: 10px 20px;
  border-radius: 40px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.btn-360 {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s;
}
.btn-360:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}
.btn-360.active { color: var(--gold); }
.btn-360 svg { width: 20px; height: 20px; fill: currentColor; }

.viewer-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}


/* ==============================
   CONTACT
   ============================== */
.contact-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  transition: color 0.3s, border-color 0.3s;
}
.contact-email:hover {
  color: var(--gold);
  border-color: rgba(200, 169, 109, 0.5);
}

.social-links {
  display: flex;
  gap: 20px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
}
.social-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.social-link svg { width: 17px; height: 17px; fill: currentColor; }


/* ==============================
   FOOTER
   ============================== */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--text-muted);
}
.footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}


/* ==============================
   LIGHTBOX
   ============================== */
dialog#lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(6, 6, 6, 0.97);
  overflow: hidden;
}
dialog#lightbox::backdrop { background: transparent; }
dialog#lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Botão fechar */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 2rem;
  font-weight: 200;
  cursor: pointer;
  line-height: 1;
  transition: color 0.25s;
  z-index: 20;
}
.lightbox-close:hover { color: #fff; }

/* Setas de navegação */
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, color 0.25s;
  z-index: 20;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.lightbox-prev svg,
.lightbox-next svg { width: 22px; height: 22px; fill: currentColor; }

/* Wrapper da imagem (área de zoom/drag) */
.lightbox-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88vw;
  height: 88vh;
  overflow: hidden;
  cursor: zoom-in;
}
.lightbox-img-wrapper.zoomed  { cursor: grab; }
.lightbox-img-wrapper.dragging { cursor: grabbing; }

/* Imagem */
#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

/* Contador  1 / 13 */
.lightbox-counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 20;
}

/* Dica de zoom (aparece brevemente ao abrir) */
.lightbox-hint {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; width: 40px; height: 40px; }
  .lightbox-next { right: 10px; width: 40px; height: 40px; }
  .lightbox-img-wrapper { width: 96vw; height: 80vh; }
}


/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #navbar { padding: 0 24px; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(12, 12, 12, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    gap: 0;
    padding: 16px 0 24px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.35s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links li { text-align: center; }
  .nav-links a { display: block; padding: 14px; font-size: 0.8rem; }

  .nav-toggle { display: flex; }

  .container { padding: 0 24px; }
  .section { padding: 80px 0; }
  .section-header { margin-bottom: 40px; }

  .gallery-grid { grid-template-columns: 1fr; }
  .video-grid   { grid-template-columns: 1fr; }

  #panorama-360 { height: 380px; }

  footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 52px; letter-spacing: 0.2em; }
  #panorama-360 { height: 280px; }
  .viewer-controls { padding: 8px 14px; gap: 6px; }
  .btn-360 { width: 34px; height: 34px; }
  .btn-360 svg { width: 17px; height: 17px; }
}
