/* Definição de Cores com Variáveis */
:root {
  --oscar-gold: #D4AF37;
  --oscar-red: #B00000;
  --light-bg: #FFF8DC;
  --dark-text: #2c3e50;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: url('imagens/tapete.jpg') no-repeat center center fixed;
  background-size: cover;
  padding-top: 56px;
  scroll-padding-top: 75px;
  color: var(--dark-text);
  margin: 0;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 75px;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.text-gold {
  color: var(--oscar-gold);
}

header {
  position: relative;
  background: url('imagens/tapete.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
  z-index: 1;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.header-content {
  position: relative;
  z-index: 2;
}

header h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 3em;
  color: var(--white);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  margin: 0;
}

header p {
  font-size: 1.2em;
  margin: 15px 0 0 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
  body, header {
    background-attachment: scroll;
    background-position: center top;
  }
  header {
    padding: 40px 15px;
  }
  header h1 {
    font-size: 2.5em;
  }
  header p {
    font-size: 1em;
  }
}

.section-title {
  font-size: 2.5em;
  font-family: 'Great Vibes', cursive;
  color: var(--oscar-gold);
  margin-bottom: 20px;
  text-align: center;
}

.section-box {
  background-color: var(--white);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

/* Galeria em Grid - Fotos lado a lado */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: #f8f9fa;
  transition: all 0.3s ease;
  aspect-ratio: 4/3;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-weight: 500;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Layout para presentes lado a lado */
.presents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.presente-item {
  background: var(--white);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.presente-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--oscar-gold);
}

.presente-item .image-container {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.presente-item:hover img {
  transform: scale(1.1);
}

.presente-item h5 {
  color: var(--dark-text);
  margin: 10px 0 5px;
  font-weight: 600;
  font-size: 1.2em;
}

.presente-item .price {
  color: var(--oscar-gold);
  font-size: 1.5em;
  font-weight: bold;
  margin: 15px 0;
}

.presente-item .btn {
  margin-top: auto;
  width: 100%;
  padding: 12px;
  font-weight: 600;
  font-size: 1.1em;
}

/* Fallback para imagens */
.img-fallback {
  background: linear-gradient(135deg, var(--oscar-gold), var(--oscar-red));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: bold;
  border-radius: 10px;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.img-fallback i {
  font-size: 2rem;
  opacity: 0.8;
}

footer {
  background-color: var(--oscar-red);
  color: var(--white);
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

#fallback-form {
  max-width: 500px;
  margin: 20px auto;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  text-align: center;
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--white);
  border: none;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  color: var(--white);
}

#map {
  height: 400px;
  width: 100%;
  border-radius: 10px;
  margin-top: 20px;
  border: 2px solid var(--oscar-gold);
}

.local-info {
  background-color: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.mapboxgl-marker {
  background-image: url('https://docs.mapbox.com/mapbox-gl-js/assets/custom_marker.png');
  background-size: cover;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
}

.countdown-section {
  background-color: var(--light-bg);
  border-top: 2px solid var(--oscar-red);
  border-bottom: 2px solid var(--oscar-red);
  padding: 20px 0;
}

#countdown {
  flex-wrap: wrap;
  gap: 15px;
}

#countdown div {
  flex: 1 1 100px;
  min-width: 80px;
  text-align: center;
  padding: 15px 10px;
  background: var(--oscar-gold);
  color: var(--white);
  border-radius: 10px;
  min-width: 100px;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

#countdown div:hover {
  transform: translateY(-5px);
}

#countdown div small {
  display: block;
  margin-top: 5px;
  font-size: 0.8em;
  opacity: 0.9;
}

.btn-outline-danger {
  border-color: var(--oscar-red);
  color: var(--oscar-red);
}

.btn-outline-danger:hover {
  background-color: var(--oscar-red);
  color: var(--white);
}

/* Botão de Música Melhorado */
.music-player-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: all 0.3s ease;
}

.music-player-container.expanded {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.music-toggle-btn {
  background: var(--oscar-gold);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.music-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.music-toggle-btn.playing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(212, 175, 55, 0.8); }
  100% { box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
}

.music-controls {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 250px;
  animation: fadeIn 0.3s ease;
}

.music-player-container.expanded .music-controls {
  display: flex;
}

.music-info {
  text-align: center;
  margin-bottom: 10px;
}

.music-title {
  font-weight: bold;
  color: var(--oscar-red);
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.music-artist {
  font-size: 0.8rem;
  color: var(--dark-text);
  opacity: 0.8;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--oscar-gold), var(--oscar-red));
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--dark-text);
  margin-top: 5px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.volume-slider {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 5px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--oscar-gold);
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--oscar-red);
}

.additional-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.control-btn {
  background: none;
  border: none;
  color: var(--dark-text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px 8px;
  border-radius: 5px;
}

.control-btn:hover {
  color: var(--oscar-gold);
  background: rgba(212, 175, 55, 0.1);
}

.control-btn.active {
  color: var(--oscar-gold);
}

.playlist {
  margin-top: 12px;
  max-height: 150px;
  overflow-y: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 10px;
}

.playlist-item {
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.playlist-item:hover {
  background: rgba(212, 175, 55, 0.1);
}

.playlist-item.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--oscar-gold);
  font-weight: bold;
}

.playlist-item i {
  font-size: 0.7rem;
  opacity: 0.7;
}

.visualizer {
  height: 30px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  margin: 8px 0;
}

.bar {
  width: 3px;
  background: linear-gradient(to top, var(--oscar-gold), var(--oscar-red));
  border-radius: 2px;
  transition: height 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Remove o botão antigo */
.music-button-fixed {
  display: none;
}

.navbar-brand {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8em;
  color: var(--oscar-gold);
}

.navbar .nav-link {
  color: var(--oscar-gold);
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover {
  color: var(--oscar-red);
}

.small-transparent-text {
  font-size: 0.8em;
  opacity: 0.6;
  color: #6c757d;
  margin: 5px 0;
}

.navbar {
  z-index: 1050;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Novos estilos para os botões */
.btn-submit {
  background-color: var(--oscar-gold);
  color: var(--white);
  border: none;
  transition: all 0.3s ease;
  font-weight: 600;
}

.btn-submit:hover {
  background-color: var(--oscar-gold);
  color: var(--white);
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Corrigindo a cor do botão de direções */
.btn-primary {
    background-color: var(--oscar-gold);
    border-color: var(--oscar-gold);
}

.btn-primary:hover {
    background-color: var(--oscar-red);
    border-color: var(--oscar-red);
}

.btn-success {
    background-color: var(--oscar-red);
    border-color: var(--oscar-red);
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: var(--oscar-red);
    filter: brightness(1.2);
    transform: translateY(-2px);
}

/* Particles.js container */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Typed.js cursor */
.typed-cursor {
  opacity: 1;
  animation: typedjsBlink 0.7s infinite;
}

@keyframes typedjsBlink {
  50% { opacity: 0.0; }
}

/* Form validation styles */
.was-validated .form-control:invalid {
  border-color: #dc3545;
}

.was-validated .form-control:valid {
  border-color: #198754;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 5px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--white);
  font-size: 40px;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.lightbox-nav button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: var(--white);
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav button:hover {
  background: rgba(255, 255, 255, 0.5);
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--white);
  font-size: 18px;
}

/* Layout responsivo */
@media (max-width: 768px) {
  .music-player-container {
    top: auto;
    bottom: 15px;
    left: 15px;
    right: auto;
  }
  
  .music-player-container.expanded {
    width: calc(100vw - 30px);
    max-width: 280px;
  }
  
  .music-controls {
    width: 100%;
  }
  
  .section-title {
    font-size: 2em;
  }
  
  .section-box {
    padding: 20px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }
  
  .presents-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .presents-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .presente-item .image-container {
    height: 150px;
  }
  
  #countdown {
    gap: 10px;
  }
  
  #countdown div {
    min-width: 70px;
    padding: 10px 5px;
  }
  
  .gallery-item {
    aspect-ratio: 1/1;
  }
}