/* ===================================================
   Roglio Beauty Salon — Custom Styles
   Paleta: #FBF1E7 bg · #742A77 brand · #2B2C2D near-black · #2E0C0D dark-brown · #CEC4C1 brown-light
   =================================================== */

html { scroll-behavior: smooth; }

body { font-family: "Inter", sans-serif; }

details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Preloader ── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FBF1E7;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
#preloader-inner {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
}
#preloader-inner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
#preloader-inner::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2.5px solid rgba(116, 42, 119, 0.15);
  border-top-color: #742A77;
  animation: preloader-spin 0.9s linear infinite;
}
@keyframes preloader-spin { to { transform: rotate(360deg); } }

/* ── Linktree Buttons ── */
.linktree-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 0.875rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  letter-spacing: 0.01em;
}
.linktree-btn:active { transform: scale(0.97); }
.linktree-btn:hover  { opacity: 0.92; box-shadow: 0 4px 16px rgba(116, 42, 119, 0.12); }

.linktree-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.linktree-btn-sm:hover { opacity: 0.88; }

/* ── Accordion Cards ── */
.accordion-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid rgba(116, 42, 119, 0.1);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.accordion-card[open] {
  box-shadow: 0 4px 20px rgba(116, 42, 119, 0.08);
}
.accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}
.accordion-content {
  padding: 0 1.25rem 1.25rem;
  line-height: 1.65;
}
.accordion-card[open] .accordion-icon { transform: rotate(180deg); }

/* ── WhatsApp Widget ── */
.whatsapp-widget { width: 100%; }

.whatsapp-widget-shell {
  overflow: hidden;
  border-radius: 1.75rem;
  background: #f7f3ee;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

.whatsapp-widget-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg, #742A77, #9a3a9e);
}

.whatsapp-widget-user {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.whatsapp-widget-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
}

.whatsapp-widget-name {
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
}

.whatsapp-widget-body {
  padding: 1rem 1rem 1.25rem;
  background: linear-gradient(180deg, #fdf8f4, #f8f4ef);
}

.whatsapp-widget-time {
  margin: 0 0 0.9rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(43, 44, 45, 0.45);
}

.whatsapp-widget-bubble {
  max-width: 82%;
  padding: 1rem 1.05rem;
  border-radius: 1.4rem;
  border-top-left-radius: 0.4rem;
  background: #ffffff;
  color: #2e2f34;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
}

.whatsapp-widget-bubble p + p { margin-top: 0.55rem; }

.whatsapp-widget-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
}

.whatsapp-widget-composer textarea {
  min-height: 5rem;
  resize: vertical;
  border-radius: 1.1rem;
  border: 1px solid rgba(116, 42, 119, 0.12);
  background: #ffffff;
  color: #2B2C2D;
  padding: 0.875rem 1rem;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
}

.whatsapp-widget-composer textarea:focus {
  outline: none;
  border-color: rgba(116, 42, 119, 0.5);
  box-shadow: 0 0 0 4px rgba(116, 42, 119, 0.1);
}

.whatsapp-widget-send {
  width: 3.2rem;
  height: 3.2rem;
  border: 0;
  border-radius: 9999px;
  background: linear-gradient(135deg, #742A77, #9a3a9e);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(116, 42, 119, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.whatsapp-widget-send:hover { filter: brightness(1.08); transform: translateY(-1px); }
.whatsapp-widget-send .material-symbols-outlined { font-size: 1.4rem; }

/* ── Gallery Grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  border-radius: 0.85rem;
  overflow: hidden;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: #CEC4C1;
  border: 0;
  padding: 0;
}

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

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(46, 12, 13, 0);
  transition: background 0.3s ease;
}

.gallery-item:hover::after { background: rgba(46, 12, 13, 0.3); }
.gallery-item:hover img,
.gallery-item:hover .gallery-item-thumb { transform: scale(1.05); }

.gallery-item-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.gallery-item-play-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(116, 42, 119, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  backdrop-filter: blur(4px);
}

/* ── Gallery Lightbox ── */
#galleryLightbox {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(46, 12, 13, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#galleryLightbox.open { opacity: 1; visibility: visible; }

.lightbox-media-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(90vw, 960px);
  max-height: 85vh;
  width: 100%;
}

#galleryLightboxImg,
#galleryLightboxVideo {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1rem;
  display: block;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

#galleryLightboxVideo { width: min(90vw, 960px); }

.lightbox-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  background: rgba(116, 42, 119, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 9110;
}

.lightbox-nav-btn:hover { background: rgba(116, 42, 119, 1); }
#lightboxPrev { left: 1.25rem; }
#lightboxNext { right: 1.25rem; }

#lightboxClose {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(116, 42, 119, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9110;
  transition: background 0.2s ease;
}

#lightboxClose:hover { background: rgba(116, 42, 119, 1); }

#lightboxCounter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: rgba(206, 196, 193, 0.7);
  font-weight: 700;
  letter-spacing: 0.15em;
  z-index: 9110;
  white-space: nowrap;
  pointer-events: none;
}

#lightboxMuteBtn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 1;
  transition: background 0.2s ease;
}

#lightboxMuteBtn:hover { background: rgba(0, 0, 0, 0.65); }

@media (max-width: 767px) {
  #lightboxPrev { left: 0.5rem; }
  #lightboxNext { right: 0.5rem; }
  .lightbox-nav-btn { width: 2.5rem; height: 2.5rem; }
  #galleryLightboxImg,
  #galleryLightboxVideo { border-radius: 0.75rem; }
}

/* ── Header scroll ── */
#site-header.scrolled { box-shadow: 0 2px 20px rgba(116, 42, 119, 0.1); }

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Back to Top ── */
#backToTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #FBF1E7;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(116, 42, 119, 0.2);
  z-index: 50;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  color: #742A77;
}
#backToTop.visible { transform: scale(1); }
#backToTop:hover { box-shadow: 0 6px 24px rgba(116, 42, 119, 0.4); }
#backToTop .material-symbols-outlined { font-size: 20px; }
#backToTop svg {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  transform: rotate(-90deg);
  pointer-events: none;
}

@media screen and (max-width: 640px) {
  #backToTop { width: 2rem; height: 2rem; bottom: 1rem; right: 1rem; }
  #backToTop .material-symbols-outlined { font-size: 16px; }
}

/* ── Footer Social Icons ── */
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.footer-social-link:hover { transform: translateY(-3px); }

.footer-social-stack {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social-base { transition: opacity 0.25s ease; opacity: 1; }
.footer-social-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.footer-social-link:hover .footer-social-base { opacity: 0; }
.footer-social-link:hover .footer-social-hover { opacity: 1; }

/* ── Carrossel "Sobre" ── */
.sobre-carousel {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 1rem;
  padding-bottom: 2px;
}

.sobre-carousel::-webkit-scrollbar { display: none; }

.sobre-carousel img {
  flex: 0 0 85%;
  width: 85%;
  height: 320px;
  object-fit: contain;
  background: #FBF1E7;
  border-radius: 1rem;
  scroll-snap-align: center;
  user-select: none;
  display: block;
  border: 2px solid rgba(116, 42, 119, 0.1);
  cursor: zoom-in;
}

/* ── Sobre Lightbox (fullscreen + pinch zoom) ── */
#sobreLightbox {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(46, 12, 13, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
#sobreLightbox.open { opacity: 1; visibility: visible; }

.sobre-lightbox-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.sobre-lightbox-wrap.is-zoomed { cursor: grab; }
.sobre-lightbox-wrap.is-dragging { cursor: grabbing; }

#sobreLightboxImg {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform-origin: center;
  transition: transform 0.08s ease;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

#sobreLightboxClose {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(116, 42, 119, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9210;
  transition: background 0.2s ease;
}
#sobreLightboxClose:hover { background: rgba(116, 42, 119, 1); }

#sobreLightboxHint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: rgba(206, 196, 193, 0.55);
  font-weight: 600;
  letter-spacing: 0.12em;
  z-index: 9210;
  white-space: nowrap;
  pointer-events: none;
  text-transform: uppercase;
}

/* ── Social embed container ── */
.social-embed-container iframe,
.social-embed-container blockquote { border-radius: 1rem !important; }
