/* Global variables */
:root {
  --ivory: #F7F4EF;
  --blush: #EED6CC;
  --cocoa: #6A4E3D;
  --amber: #3A2A22;
  --amber-soft: rgba(58, 42, 34, 0.85);
  --line: rgba(58, 42, 34, 0.15);
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Source Serif Pro', serif;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body, html {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--amber);
  overflow-x: hidden;
  /* Remove smooth scrolling from html to let custom smooth scroll work better if needed, 
     but we'll keep it for anchor links */
  scroll-behavior: smooth;
}

/* Loading Screen */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--ivory);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  animation: pulse 2s infinite ease-in-out;
}

.loader-content img {
  height: 60px;
  filter: brightness(0) sepia(1) hue-rotate(340deg) saturate(20%) contrast(1.2); /* Adjust logo color roughly to Cocoa */
  margin-bottom: 20px;
}

.loader-content p {
  font-family: var(--font-display);
  color: var(--cocoa);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* We removed strict snap-type to make scroll softer, instead sections are just full height */
.snap-container {
  /* No strict scroll-snap to make it softer */
}

section {
  min-height: 100vh;
  width: 100vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Padding top to account for sticky header */
  padding-top: 80px;
}

h1, h2, h3, h4, h5, h6, .nav-links a, .btn {
  font-family: var(--font-display);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.5s ease;
  background: linear-gradient(to bottom, rgba(58, 42, 34, 0.5) 0%, rgba(58, 42, 34, 0) 100%);
}

header.scrolled {
  background: var(--ivory);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 8px 50px;
}

.logo img {
  height: 30px;
  width: auto;
  transition: all 0.5s ease;
  filter: none; /* Se mantiene blanco puro sobre el fondo oscuro del Hero */
}

header.scrolled .logo img {
  /* Convierte la imagen blanca en un color oscuro similar a tu paleta (usando tu filtro del loader) */
  filter: brightness(0) sepia(1) hue-rotate(340deg) saturate(20%) contrast(1.2); 
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
}

header.scrolled .nav-links a {
  color: var(--amber);
}

.nav-links a:hover {
  color: var(--blush);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--cocoa);
  color: var(--ivory);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.3s, transform 0.3s;
  border: 1px solid var(--cocoa);
  cursor: pointer;
}

.btn:hover {
  background: var(--amber);
  border-color: var(--amber);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ivory);
  border-color: var(--ivory);
}

header.scrolled .btn-outline {
  color: var(--cocoa);
  border-color: var(--cocoa);
}

.btn-outline:hover {
  background: var(--ivory);
  color: var(--cocoa);
}

header.scrolled .btn-outline:hover {
  background: var(--cocoa);
  color: var(--ivory);
}

/* Book Now nav button — complementary teal to the cocoa/amber warm palette */
.btn-booknow {
  background: #4E7F7D;
  border-color: #4E7F7D;
  color: var(--ivory);
  padding: 10px 24px;
  margin-top: 0;
}

.btn-booknow:hover {
  background: #3d6462;
  border-color: #3d6462;
  transform: translateY(-2px);
}

/* =============================================
   Scroll-triggered entrance animations
   ============================================= */
[data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside animated sections */
[data-animate].is-visible .service-card:nth-child(1),
[data-animate].is-visible .review-card:nth-child(1),
[data-animate].is-visible .gallery-item:nth-child(1),
[data-animate].is-visible .insta-item:nth-child(1) { transition-delay: 0.1s; }

[data-animate].is-visible .service-card:nth-child(2),
[data-animate].is-visible .review-card:nth-child(2),
[data-animate].is-visible .gallery-item:nth-child(2),
[data-animate].is-visible .insta-item:nth-child(2) { transition-delay: 0.2s; }

[data-animate].is-visible .service-card:nth-child(3),
[data-animate].is-visible .review-card:nth-child(3),
[data-animate].is-visible .gallery-item:nth-child(3),
[data-animate].is-visible .insta-item:nth-child(3) { transition-delay: 0.3s; }

[data-animate].is-visible .gallery-item:nth-child(4),
[data-animate].is-visible .insta-item:nth-child(4) { transition-delay: 0.4s; }

[data-animate].is-visible .gallery-item:nth-child(5) { transition-delay: 0.5s; }

/* Cards start slightly further down so the stagger is noticeable */
[data-animate] .service-card,
[data-animate] .review-card,
[data-animate] .gallery-item,
[data-animate] .insta-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible .service-card,
[data-animate].is-visible .review-card,
[data-animate].is-visible .gallery-item,
[data-animate].is-visible .insta-item {
  opacity: 1;
  transform: translateY(0);
}

/* Sections Shared */
.overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(58, 42, 34, 0.4);
  z-index: 1;
}

.content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  padding: 0 50px;
  margin: 0 auto;
}

/* Compact sections that feel too tall */
.reviews-slide,
.instagram-slide {
  min-height: auto;
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Slide 1: Hero (2 Columns) */
.hero-slide {
  background: var(--blush); /* fallback */
  padding-top: 0; /* Hero doesn't need header padding if it's full bleed */
  display: flex;
}

.hero-columns {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.hero-text-col {
  flex: 1;
  background: var(--cocoa);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
  position: relative;
  z-index: 2;
}

.hero-text-content {
  max-width: 500px;
}

.hero-main-logo {
  height: 55px; /* Ajusta este valor si lo quieres más grande o más chico */
  width: auto;
  margin-bottom: 20px;
  display: block;
}

/* Hero-specific button: ivory outline to contrast dark cocoa background */
.btn-hero {
  background: transparent;
  border: 1px solid rgba(247, 244, 239, 0.6);
  color: var(--ivory);
  letter-spacing: 3px;
}

.btn-hero:hover {
  background: var(--ivory);
  color: var(--cocoa);
  border-color: var(--ivory);
  transform: translateY(-2px);
}

.hero-text-content h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 30px;
  color: var(--blush);
  font-family: var(--font-body);
}

.hero-text-content p {
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 20px;
  line-height: 1.8;
  color: rgba(247, 244, 239, 0.9);
}

.hero-image-col {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.hero-image-col .slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-image-col .slide.active {
  opacity: 1;
}

/* Slide 2: Technology */
.tech-slide {
  background: var(--ivory);
  display: block;
  align-items: normal;
  justify-content: normal;
  overflow: visible;
  min-height: auto;
  height: auto;
  padding-top: 100px;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 15px;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--amber-soft);
  max-width: 600px;
  margin: 0 auto;
}

.tech-intro-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 70px auto;
}

.tech-eyebrow-minimal {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  color: var(--cocoa);
  margin-bottom: 15px;
  font-weight: 600;
}

.tech-intro-text h2 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--amber);
  margin-bottom: 25px;
  line-height: 1.2;
}

.tech-intro-text p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--amber-soft);
}

.service-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(58, 42, 34, 0.85);
  color: var(--blush);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-badge i {
  color: #D4AF6A;
}

.services-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.services-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  flex: 1;
  background: white;
  border-radius: 8px 60px 8px 8px;
  /* Removed overflow:hidden so the hover arrow can translate freely */
  box-shadow: 0 10px 40px rgba(58, 42, 34, 0.05);
  transition: transform 0.4s;
  display: flex;
  flex-direction: column;
}

/* Keep the image itself clipped to its own border-radius */
.service-card:hover {
  transform: translateY(-5px);
}

.service-img {
  position: relative;
  height: 250px;
  background-size: cover;
  background-position: center;
  border-radius: 8px 60px 0 0;
  overflow: hidden;
}

.service-content {
  padding: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-content h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--amber);
  font-family: var(--font-body);
}

.service-content p {
  font-size: 0.95rem;
  color: var(--amber-soft);
  margin-bottom: 30px;
  line-height: 1.5;
  flex: 1;
}

.learn-more-container {
  display: flex;
  justify-content: flex-end;
}

.learn-more-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--amber);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s, transform 0.3s;
}

.learn-more-link svg {
  transition: transform 0.3s;
}

.learn-more-link:hover {
  color: var(--cocoa);
}

.learn-more-link:hover svg,
.service-card:hover .learn-more-link svg,
.wrap-card:hover .learn-more-link svg {
  transform: translate(3px, -3px);
}

.learn-more-link:hover,
.service-card:hover .learn-more-link,
.wrap-card:hover .learn-more-link {
  color: var(--cocoa);
}

.suggestion-badge {
  position: absolute;
  top: 80px;
  right: 0;
  background: #E53E3E;
  color: white;
  padding: 8px 16px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.85rem;
  z-index: 10;
  border-radius: 4px 0 0 4px;
}

/* Slide 3: Where Care Is Elevated */
.highlight-slide {
  background: var(--blush);
}

.highlight-slide .content-wrapper {
  display: flex;
  align-items: center;
  gap: 60px;
}

.highlight-text {
  flex: 1;
  padding-right: 40px;
}

.highlight-text h2 {
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--amber);
}

.highlight-text p {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: var(--amber-soft);
  line-height: 1.8;
}

.highlight-img-container {
  flex: 1;
  height: 70vh;
  position: relative;
  display: flex;
  gap: 20px;
}

.highlight-img-container .img-box {
  flex: 1;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: -10px 15px 30px rgba(106, 78, 61, 0.15);
}

/* Slide 4: Contact Form */
.contact-slide {
  position: relative;
  background: var(--amber);
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.contact-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(58, 42, 34, 0.35) 0%, rgba(58, 42, 34, 0.05) 55%);
}

.contact-panel {
  position: relative;
  z-index: 1;
  max-width: 440px;
  padding: 50px;
  background: rgba(58, 42, 34, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(247, 244, 239, 0.25);
  border-radius: 12px;
  color: var(--ivory);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.contact-panel h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 15px;
}

.contact-panel p {
  font-size: 1rem;
  margin-bottom: 30px;
  color: rgba(247, 244, 239, 0.8);
}

.contact-socials {
  display: flex;
  gap: 14px;
  margin-top: 25px;
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 239, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.social-circle:hover {
  background: var(--ivory);
  color: var(--cocoa);
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 15px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(247, 244, 239, 0.3);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-control::placeholder {
  color: rgba(247, 244, 239, 0.5);
}

.form-control:focus {
  border-bottom-color: var(--ivory);
}

.submit-btn {
  margin-top: 20px;
  width: 100%;
  background: var(--ivory);
  color: var(--cocoa);
  border: none;
  padding: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn:hover {
  background: var(--blush);
}

/* New Sections (Suggested) */
/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 20px;
}

.gallery-item {
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(58, 42, 34, 0.1);
  transition: transform 0.3s;
}

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

.gallery-item.wide {
  grid-column: span 2;
}

/* Reviews */
.reviews-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.review-card {
  flex: 1;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(58, 42, 34, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stars {
  color: var(--cocoa);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.review-text {
  font-size: 1.05rem;
  color: var(--amber-soft);
  font-style: italic;
  margin-bottom: 20px;
  flex: 1;
}

.review-author {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--amber);
}

/* Instagram */
.insta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.insta-item {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(58, 42, 34, 0.1);
  display: block;
  transition: transform 0.3s, filter 0.3s;
}

.insta-item:hover {
  transform: translateY(-5px);
  filter: brightness(1.1);
}

/* Footer */
.site-footer {
  background: var(--cocoa);
  color: var(--ivory);
  padding: 60px 50px 20px;
  border-top: 1px solid var(--line);
}

.footer-content-wrapper {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-logo img {
  height: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(247, 244, 239, 0.8);
}

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(247, 244, 239, 0.8);
  font-size: 0.9rem;
  font-family: var(--font-display);
  transition: color 0.3s;
}

.footer-social-link:hover {
  color: var(--ivory);
}

.footer-social-link i {
  font-size: 1.2rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(247, 244, 239, 0.2);
  font-size: 0.8rem;
  color: rgba(247, 244, 239, 0.6);
}

/* Floating Action Menu Fixes */
.fab-container {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Ensure right alignment */
}

.fab-text {
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.fab svg {
  width: 24px;
  height: 24px;
  fill: var(--ivory);
  transition: transform 0.3s;
}

.fab.active svg {
  transform: rotate(45deg);
}

.fab {
  height: 50px;
  padding: 0 22px;
  background: var(--cocoa);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(106, 78, 61, 0.3);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: fabPulse 3s infinite;
}

.fab:hover {
  background: var(--amber);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(58, 42, 34, 0.4);
  border-color: rgba(255, 255, 255, 1);
}

.fab:hover i {
  transform: scale(1.15) rotate(-8deg);
  transition: transform 0.3s ease;
}

/* Animación de pulso continuo en el borde/sombra */
@keyframes fabPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(106, 78, 61, 0.4), 0 8px 25px rgba(58, 42, 34, 0.3);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(106, 78, 61, 0), 0 8px 25px rgba(58, 42, 34, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(106, 78, 61, 0), 0 8px 25px rgba(58, 42, 34, 0.3);
  }
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Align items to the right */
  gap: 15px;
  margin-bottom: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-container.active .fab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab-item {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Force align right */
  gap: 15px;
  cursor: pointer;
  width: max-content;
}

.fab-item-icon {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s, background 0.3s;
  order: 2; /* Put icon on the right */
}

.fab-item:hover .fab-item-icon {
  transform: scale(1.1);
  background: var(--ivory);
}

.fab-item-icon i {
  font-size: 1.2rem;
  color: var(--cocoa);
}

.fab-item-label {
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--amber);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  opacity: 1; /* Ahora siempre es visible cuando el menú se abre */
  transform: translateX(0);
  transition: transform 0.3s ease, background 0.3s ease;
  order: 1; /* Put label on the left */
}

/* Mantiene una micro-interacción al pasar el cursor para que se sienta dinámico */
.fab-item:hover .fab-item-label {
  transform: translateX(-5px);
  background: var(--ivory);
}