/* ============================================
   BAR ESTARELLAS — Animations & 3D Effects
   ============================================ */

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-smooth);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal--left { transform: translateX(-60px); }
.reveal--left.visible { transform: translateX(0); }

.reveal--right { transform: translateX(60px); }
.reveal--right.visible { transform: translateX(0); }

.reveal--scale { transform: scale(0.9); }
.reveal--scale.visible { transform: scale(1); }

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-smooth);
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger.visible > * { opacity: 1; transform: translateY(0); }

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes kenBurns {
  0%   { transform: scale(1.12) translate(0, 0); }
  33%  { transform: scale(1.18) translate(-1.5%, -1%); }
  66%  { transform: scale(1.2) translate(1%, -1.5%); }
  100% { transform: scale(1.15) translate(-0.5%, 0.5%); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  perspective: 1200px;
  background: #1a1a1a;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/api/upload/estarellas/files/11a42d9a068be87b.png');
  background-position: center;
  background-size: cover;
}

.hero__bg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurns 30s ease-in-out infinite alternate;
  transform-origin: center;
  will-change: transform;
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 92%, rgba(26, 26, 26, 0.8) 100%),
    linear-gradient(
      160deg,
      rgba(26, 26, 26, 0.88) 0%,
      rgba(158, 61, 26, 0.4) 40%,
      rgba(44, 95, 74, 0.3) 70%,
      rgba(30, 77, 110, 0.3) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero__badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero__title {
  color: white;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.5s both;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero__title span {
  color: var(--color-accent-light);
}

.hero__subtitle {
  color: rgba(255,255,255,0.85);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.7s both;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.9s both;
}

.hero__rating {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
  animation: fadeInUp 1s ease 1.1s both;
}

.hero__rating-stars {
  color: var(--color-accent);
  font-size: 1rem;
  letter-spacing: 2px;
}

.hero__rating-text {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.hero__image-col {
  position: relative;
  animation: heroScaleIn 1s var(--ease-smooth) 0.3s both;
}

@keyframes heroScaleIn {
  from { transform: scale(0.9); }
  to { transform: scale(1); }
}

.hero__gallery-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: var(--hero-gallery-max-width, 480px);
}

.hero__gallery-img {
  border-radius: 16px;
  box-shadow: var(--shadow-deep);
  height: var(--hero-gallery-card-height, 200px);
  width: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.hero__gallery-img:first-child {
  grid-row: span 2;
  height: 100%;
}

.hero__gallery-img.pf-hidden {
  display: none;
}

.hero__gallery-img:hover {
  transform: scale(1.04) rotateY(-3deg);
}

/* Floating Ambient Shapes */
.float-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.float-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.float-shape--1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--color-primary), transparent);
  top: 8%;
  right: -8%;
  animation: float 10s ease-in-out infinite;
}

.float-shape--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--color-accent), transparent);
  bottom: 12%;
  left: -5%;
  animation: float 12s ease-in-out infinite 3s;
}

.float-shape--3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--color-ocean-light), transparent);
  top: 50%;
  right: 25%;
  animation: float 8s ease-in-out infinite 5s;
}

/* ---------- About Split ---------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-split__image {
  position: relative;
  transform-style: preserve-3d;
}

.about-split__img {
  border-radius: 20px;
  box-shadow: var(--shadow-deep);
  transition: transform var(--transition-smooth);
}

.about-split__image:hover .about-split__img {
  transform: rotateY(-3deg) rotateX(2deg) scale(1.02);
}

.about-split__depth {
  position: absolute;
  inset: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  z-index: -1;
  transform: translateZ(-30px) scale(1.05);
  opacity: 0.25;
  filter: blur(25px);
}

.about-split__tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.about-split__text p {
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary), var(--color-primary-light));
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
  border-radius: 50%;
  animation: pulse 10s ease-in-out infinite;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.05), transparent);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite 3s;
}

.cta-banner h2 { color: white; }

.cta-banner p {
  color: rgba(255,255,255,0.85);
  max-width: 550px;
  margin-inline: auto;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ---------- Contact Grid ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(199, 87, 46, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-item__label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.contact-item__value {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.contact-item__value a {
  color: var(--color-primary);
  font-weight: 600;
}

.contact-item__value a:hover {
  text-decoration: underline;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .stagger > * {
    opacity: 1;
    transform: none;
  }
}
