/* =========================================================
   IMPORTAÇÕES E RESET
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================================================
   VARIÁVEIS CSS
========================================================= */
:root {
  /* Cores principais */
  --rosa-escuro: #8a2e73;
  --rosa-claro: #cc5cb4;
  --rosa-hover: #b856a2;
  --rosa-suave: #f5d5f0;
  
  /* Fundos */
  --fundo-suave: #fdf6f9;
  --fundo-card: #fff5fb;
  --fundo-branco: #ffffff;
  
  /* Tipografia */
  --fonte-titulo: 'Playfair Display', serif;
  --fonte-texto: 'Poppins', sans-serif;
  
  /* Sombras */
  --sombra-leve: 0 2px 10px rgba(138, 46, 115, 0.08);
  --sombra-media: 0 8px 25px rgba(138, 46, 115, 0.12);
  --sombra-forte: 0 15px 40px rgba(138, 46, 115, 0.2);
  
  /* Espaçamentos */
  --espacamento-secao: 100px;
  --border-radius: 20px;
  
  /* Transições */
  --transicao-rapida: 0.3s ease;
  --transicao-media: 0.4s ease;
}

/* =========================================================
   ESTILOS GLOBAIS
========================================================= */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--fonte-texto);
  color: #333;
  background-color: var(--fundo-suave);
  overflow-x: hidden;
  line-height: 1.6;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
  background-color: rgba(253, 246, 249, 0.98);
  backdrop-filter: blur(15px);
  padding: 22px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--sombra-leve);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transicao-rapida);
}

.navbar.scrolled {
  padding: 15px 50px;
  box-shadow: var(--sombra-media);
}

.navbar h1 {
  font-family: var(--fonte-titulo);
  font-size: 2rem;
  font-weight: 700;
  color: var(--rosa-escuro);
  position: relative;
  transition: transform var(--transicao-rapida);
  cursor: pointer;
  letter-spacing: 0.5px;
}

.navbar h1:hover {
  transform: scale(1.05);
}

.navbar h1::after {
  content: '✨';
  position: absolute;
  top: -10px;
  right: -25px;
  font-size: 1rem;
  color: #d4af37;
  animation: sparkle 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
}

.navbar ul li a {
  text-decoration: none;
  color: var(--rosa-escuro);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transicao-rapida);
  position: relative;
  padding: 10px 18px;
  border-radius: 25px;
  display: inline-block;
}

.navbar ul li a::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rosa-claro), var(--rosa-hover));
  transition: all var(--transicao-rapida);
  transform: translateX(-50%);
}

.navbar ul li a:hover {
  color: var(--rosa-hover);
  background-color: rgba(138, 46, 115, 0.06);
}

.navbar ul li a:hover::before {
  width: 60%;
}

/* =========================================================
   HERO SECTION
========================================================= */
.hero {
  background-image: linear-gradient(135deg, rgba(138, 46, 115, 0.35), rgba(184, 86, 162, 0.25)), 
                    url("../img/salao-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--fundo-card), transparent);
  z-index: 1;
}

.hero-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(255, 250, 253, 0.95));
  backdrop-filter: blur(20px);
  padding: 60px 50px;
  border-radius: 30px;
  text-align: center;
  max-width: 680px;
  position: relative;
  z-index: 2;
  box-shadow: 0 20px 60px rgba(138, 46, 115, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: fadeInUp 1.2s ease-out;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--rosa-claro), var(--rosa-escuro), var(--rosa-claro));
  border-radius: 30px;
  z-index: -1;
  opacity: 0.1;
  filter: blur(10px);
}

.hero-content h2 {
  font-family: var(--fonte-titulo);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--rosa-escuro);
  line-height: 1.2;
  text-shadow: 0 2px 15px rgba(138, 46, 115, 0.1);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 35px;
  color: #555;
  font-weight: 400;
  line-height: 1.7;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   BOTÕES
========================================================= */
.btn {
  background: linear-gradient(135deg, var(--rosa-claro), var(--rosa-escuro));
  color: white;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transicao-media);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(204, 92, 180, 0.35);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: linear-gradient(135deg, var(--rosa-hover), #9a3587);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(204, 92, 180, 0.5);
}

.btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* =========================================================
   SEÇÕES
========================================================= */
.services-section {
  padding: var(--espacamento-secao) 40px;
  background-color: var(--fundo-card);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.services-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(204, 92, 180, 0.08), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.section-title {
  font-family: var(--fonte-titulo);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--rosa-escuro);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--rosa-claro), var(--rosa-escuro));
  border-radius: 10px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 50px;
  font-weight: 300;
}

/* =========================================================
   GRID DE SERVIÇOS
========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  justify-items: center;
  max-width: 1300px;
  margin: 0 auto;
}

.card {
  background: var(--fundo-branco);
  border-radius: 25px;
  box-shadow: var(--sombra-leve);
  overflow: hidden;
  transition: all var(--transicao-media);
  cursor: pointer;
  max-width: 360px;
  width: 100%;
  position: relative;
  border: 1px solid rgba(204, 92, 180, 0.1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rosa-claro), var(--rosa-escuro));
  opacity: 0;
  transition: opacity var(--transicao-rapida);
}

.card:hover::before {
  opacity: 1;
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* AJUSTE ESPECÍFICO PARA A IMAGEM "TRANÇAS" */
.card:nth-child(3) img {
  object-position: center 30%; /* Ajusta o foco para mostrar mais o rosto */
}

.card h3 {
  padding: 25px 20px 20px;
  color: var(--rosa-escuro);
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: 1.4rem;
  transition: color var(--transicao-rapida);
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(138, 46, 115, 0.2);
}

.card:hover img {
  transform: scale(1.12);
}

.card:hover h3 {
  color: var(--rosa-hover);
}

/* =========================================================
   SEÇÃO DE AGENDAMENTO
========================================================= */
.booking-section {
  background: linear-gradient(135deg, var(--fundo-suave), #fff0f7);
  padding: var(--espacamento-secao) 20px;
  position: relative;
  text-align: center;
}

.booking-section .section-title {
  margin-bottom: 15px;
}

.booking-form-container {
  max-width: 650px;
  margin: 0 auto;
  background: var(--fundo-branco);
  padding: 45px;
  border-radius: 25px;
  box-shadow: var(--sombra-media);
  border: 1px solid rgba(204, 92, 180, 0.1);
}

.booking-form .form-group {
  margin-bottom: 25px;
}

.booking-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--rosa-escuro);
  font-size: 0.95rem;
  text-align: left;
}

.booking-form input,
.booking-form select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(204, 92, 180, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--fonte-texto);
  background-color: #fff8fc;
  transition: all var(--transicao-rapida);
}

/* ESTILOS ESPECÍFICOS PARA INPUT DATE NO IPHONE */
.booking-form input[type="date"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: 48px;
  position: relative;
}

/* Garante que o input date tenha a mesma aparência em todos os dispositivos */
.booking-form input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--rosa-escuro);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transicao-rapida);
}

.booking-form input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Estilo para o texto do placeholder no input date */
.booking-form input[type="date"]:invalid::-webkit-datetime-edit {
  color: #999;
}

.booking-form input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.booking-form input[type="date"]::-webkit-datetime-edit-text {
  color: var(--rosa-escuro);
  padding: 0 2px;
}

.booking-form input[type="date"]::-webkit-datetime-edit-month-field,
.booking-form input[type="date"]::-webkit-datetime-edit-day-field,
.booking-form input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--rosa-escuro);
}

.booking-form .btn {
  width: 100%;
  margin-top: 10px;
}

.booking-form input:focus,
.booking-form select:focus {
  border-color: var(--rosa-hover);
  outline: none;
  background-color: var(--fundo-branco);
  box-shadow: 0 0 0 4px rgba(184, 86, 162, 0.1);
}

.booking-form input::placeholder {
  color: #999;
}

/* =========================================================
   FOOTER
========================================================= */
footer,
.footer {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #fff0f7, #f7eef4);
  color: var(--rosa-escuro);
  font-family: var(--fonte-titulo);
  font-size: 1rem;
  font-weight: 500;
  border-top: 1px solid rgba(204, 92, 180, 0.1);
}

/* =========================================================
   ANIMAÇÕES
========================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sparkle {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  25% {
    transform: rotate(90deg) scale(1.15);
    opacity: 0.8;
  }
  50% {
    transform: rotate(180deg) scale(1.3);
    opacity: 0.6;
  }
  75% {
    transform: rotate(270deg) scale(1.15);
    opacity: 0.8;
  }
}

/* =========================================================
   RESPONSIVIDADE - TABLETS
========================================================= */
@media (max-width: 768px) {
  :root {
    --espacamento-secao: 70px;
  }

  .navbar {
    flex-direction: column;
    padding: 18px 25px;
    gap: 15px;
  }

  .navbar.scrolled {
    padding: 15px 25px;
  }

  .navbar h1 {
    font-size: 1.7rem;
  }

  .navbar ul {
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar ul li a {
    font-size: 0.9rem;
    padding: 8px 14px;
  }

  .hero {
    background-attachment: scroll;
  }

  .hero-content {
    padding: 45px 35px;
    max-width: 90%;
    border-radius: 25px;
  }

  .hero-content h2 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .booking-form-container {
    padding: 35px 25px;
  }
}

/* =========================================================
   RESPONSIVIDADE - SMARTPHONES
========================================================= */
@media (max-width: 480px) {
  :root {
    --espacamento-secao: 60px;
  }

  html {
    font-size: 14px;
  }

  .navbar {
    padding: 15px 20px;
  }

  .navbar h1 {
    font-size: 1.5rem;
  }

  .navbar h1::after {
    right: -20px;
    font-size: 0.85rem;
  }

  .navbar ul {
    gap: 4px;
  }

  .navbar ul li a {
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  .hero {
    height: 100svh;
  }

  .hero-content {
    padding: 35px 25px;
    border-radius: 20px;
    max-width: 95%;
  }

  .hero-content h2 {
    font-size: 1.9rem;
    margin-bottom: 15px;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .btn {
    padding: 14px 32px;
    font-size: 0.9rem;
  }

  .services-section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 1.9rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 35px;
  }

  .services-grid {
    gap: 25px;
  }

  .card {
    border-radius: 20px;
  }

  .card img {
    height: 200px;
  }

  /* Ajuste específico para a imagem "Tranças" em mobile */
  .card:nth-child(3) img {
    object-position: center 25%;
  }

  .card h3 {
    font-size: 1.2rem;
    padding: 20px 15px 15px;
  }

  .booking-section {
    padding: 60px 15px;
  }

  .booking-form-container {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .booking-form input,
  .booking-form select {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  /* Ajustes específicos para input date no iPhone em mobile */
  .booking-form input[type="date"] {
    min-height: 44px;
    font-size: 16px; /* Previne zoom no iOS */
  }

  footer,
  .footer {
    padding: 30px 20px;
    font-size: 0.9rem;
  }
}

/* =========================================================
   RESPONSIVIDADE - SMARTPHONES PEQUENOS
========================================================= */
@media (max-width: 360px) {
  .navbar h1 {
    font-size: 1.3rem;
  }

  .hero-content h2 {
    font-size: 1.7rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .booking-form input[type="date"] {
    font-size: 14px;
  }
}

/* =========================================================
   ESTILOS ESPECÍFICOS PARA DISPOSITIVOS APPLE
========================================================= */
@supports (-webkit-touch-callout: none) {
  /* Estilos específicos para Safari no iOS */
  .booking-form input[type="date"] {
    -webkit-appearance: none;
    min-height: 44px;
    line-height: 1.4;
  }
  
  .booking-form input[type="date"]::-webkit-datetime-edit {
    padding: 0;
    margin: 0;
  }
  
  .booking-form input[type="date"]::-webkit-inner-spin-button,
  .booking-form input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

/* Fundo escuro que cobre a tela */
.confirmation-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Caixa flutuante */
.confirmation-box {
  background: #fff;
  padding: 30px 25px;
  border-radius: 20px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease-out;
}

/* Título e texto */
.confirmation-box h3 {
  margin-bottom: 15px;
  font-size: 22px;
  color: #6a0dad;
}

#confirmationDetails {
  font-size: 15px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Botão de fechar */
.close-btn {
  background: linear-gradient(135deg, #c14fd9, #8b2bbf);
  border: none;
  color: white;
  padding: 10px 25px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.close-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #d15fe4, #9c3ed0);
}

/* Animação da caixa */
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Quando ativa */
.confirmation-modal.show {
  display: flex;
}