/**
 * Hostelería Hero Elementor Styles
 * Design inspired by Figma 360 Hostelería & Nordic Webflow Hero
 */

:root {
  --h-hero-primary: #2563eb;
  --h-hero-primary-hover: #1d4ed8;
  --h-hero-accent: #38bdf8;
  --h-hero-text-white: #ffffff;
  --h-hero-text-muted: #94a3b8;
  --h-hero-bg-card: #060a17;
  --h-hero-radius-card: 28px;
  --h-hero-radius-tab: 14px;
}

.h-hero-widget-container {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

.h-hero-widget-container *,
.h-hero-widget-container *::before,
.h-hero-widget-container *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   Header / Big Title (Split text reveal)
   ========================================================================== */
.h-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  margin-bottom: 24px;
  padding: 0 4px;
  position: relative;
  z-index: 2;
}

.h-hero-header-title {
  margin: 0;
  padding: 0;
  font-size: clamp(2.4rem, 6.2vw, 6.2rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: #111827;
  display: flex;
  flex-wrap: wrap;
}

.h-hero-header-title.is-right {
  text-align: right;
  justify-content: flex-end;
}

.h-hero-header-title.is-left {
  text-align: left;
  justify-content: flex-start;
}

/* Character reveal mask */
.h-hero-word {
  display: inline-flex;
  white-space: nowrap;
  margin-right: 0.28em;
}

.h-hero-char-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.1;
  padding-bottom: 0.08em;
}

.h-hero-char {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transition-delay: calc(var(--char-index, 0) * 0.022s + 0.08s);
}

.h-hero-widget-container.h-hero-revealed .h-hero-char {
  transform: translateY(0%);
}

/* ==========================================================================
   Hero Main Card
   ========================================================================== */
.h-hero-card {
  position: relative;
  width: 100%;
  min-height: 640px;
  border-radius: var(--h-hero-radius-card);
  overflow: hidden;
  background-color: var(--h-hero-bg-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 25px 60px -15px rgba(3, 7, 18, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

/* Cosmic default background */
.h-hero-bg-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(circle at 75% 30%, rgba(56, 189, 248, 0.18) 0%, transparent 45%),
              radial-gradient(circle at 25% 70%, rgba(99, 102, 241, 0.16) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, #0c152c 0%, #050814 100%);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

/* Slide background layers (crossfade) */
.h-hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out, transform 8s ease-out;
  transform: scale(1);
  pointer-events: none;
}

.h-hero-slide-bg.is-active {
  opacity: 1;
  transform: scale(1.03);
}

/* Subtle overlay gradient to ensure text readability */
.h-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: linear-gradient(135deg, rgba(5, 8, 20, 0.82) 0%, rgba(5, 8, 20, 0.4) 50%, rgba(5, 8, 20, 0.88) 100%);
  pointer-events: none;
}

/* Watermark "360" */
.h-hero-watermark {
  position: absolute;
  right: 8%;
  top: 45%;
  transform: translateY(-50%);
  font-size: clamp(8rem, 22vw, 24rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 3;
  user-select: none;
  font-family: inherit;
}

/* ==========================================================================
   Slide Content (Title, Category, Description, Button)
   ========================================================================== */
.h-hero-content-wrap {
  position: relative;
  z-index: 5;
  padding: clamp(2.5rem, 5.5vw, 5rem) clamp(1.8rem, 5vw, 4.5rem) 1.5rem;
  max-width: 680px;
}

.h-hero-slide-content {
  display: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.h-hero-slide-content.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.h-hero-category {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--h-hero-accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
  text-transform: none;
}

.h-hero-slide-title {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--h-hero-text-white);
  margin: 0 0 1.25rem 0;
}

.h-hero-description {
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--h-hero-text-muted);
  margin: 0 0 2rem 0;
  max-width: 480px;
}

.h-hero-btn-wrap {
  display: inline-block;
}

.h-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  border-radius: 9999px;
  background-color: var(--h-hero-primary);
  color: #ffffff !important;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.h-hero-btn:hover {
  background-color: var(--h-hero-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.5);
  color: #ffffff !important;
}

/* ==========================================================================
   Bottom Tabs & Slider Navigation
   ========================================================================== */
.h-hero-tabs-wrap {
  position: relative;
  z-index: 6;
  width: 100%;
  padding: 0 clamp(1.5rem, 4vw, 4rem) clamp(1.8rem, 3.5vw, 3rem);
  margin-top: auto;
}

.h-hero-tabs-grid {
  display: grid;
  grid-template-columns: repeat(var(--tabs-count, 4), 1fr);
  gap: 1.25rem;
  width: 100%;
  align-items: stretch;
}

.h-hero-tab-item {
  position: relative;
  padding: 1.1rem 1.25rem;
  border-radius: var(--h-hero-radius-tab);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  user-select: none;
}

.h-hero-tab-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.h-hero-tab-item.is-active {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.12);
}

.h-hero-tab-texts {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.h-hero-tab-num {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}

.h-hero-tab-item.is-active .h-hero-tab-num {
  color: var(--h-hero-accent);
}

.h-hero-tab-title {
  font-size: 0.98rem;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s, font-weight 0.3s;
}

.h-hero-tab-item:hover .h-hero-tab-title {
  color: #cbd5e1;
}

.h-hero-tab-item.is-active .h-hero-tab-title {
  color: #ffffff;
  font-weight: 600;
}

.h-hero-tab-thumb {
  width: 46px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  opacity: 0.45;
  transition: all 0.35s ease;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.h-hero-tab-item:hover .h-hero-tab-thumb {
  opacity: 0.75;
}

.h-hero-tab-item.is-active .h-hero-tab-thumb {
  opacity: 1;
  transform: scale(1.05);
  border-color: rgba(56, 189, 248, 0.4);
}

/* Tab Progress Line */
.h-hero-tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.h-hero-tab-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--h-hero-accent);
  transition: width 0.05s linear;
}

.h-hero-tab-item.is-active .h-hero-tab-progress-fill {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .h-hero-card {
    min-height: 580px;
  }
  .h-hero-tabs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .h-hero-watermark {
    right: 4%;
    font-size: clamp(6rem, 18vw, 18rem);
  }
}

@media (max-width: 767px) {
  .h-hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 18px;
  }
  .h-hero-header-title.is-right {
    text-align: left;
    justify-content: flex-start;
  }
  .h-hero-card {
    min-height: 520px;
    border-radius: 20px;
  }
  .h-hero-content-wrap {
    padding: 2.2rem 1.5rem 1rem;
  }
  .h-hero-tabs-wrap {
    padding: 0 1.25rem 1.5rem;
  }
  .h-hero-tabs-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .h-hero-tab-item {
    padding: 0.85rem 1rem;
  }
  .h-hero-watermark {
    display: none;
  }
}
