/**
 * Renik Digital Universal Module: Adaptive Hero (2026 Standard)
 *
 * Desktop (>=1024px): Classic modern full-width 2-column hero banner (52% 16:9 graphic + 48% copy/CTAs)
 * Tablet (769px-1023px): Centered peeking card scroller (480px width) with 16:9 top banner
 * Mobile (<=768px): Centered peeking card scroller (78vw, max 300px) with Renik Progressive Clamp
 * Motion: 620ms Velvet Apple-Curve Deceleration Standard
 */

:root {
  --rah-container: 1200px;
  --rah-radius: 20px;
  --rah-bg: #ed1c24;
  --rah-border: transparent;
  --rah-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  --rah-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.18), 0 3px 8px rgba(0, 0, 0, 0.08);
  --rah-primary: #ed1c24;
  --rah-primary-hover: #a01b2b;
  --rah-title: #000000;
  --rah-subtitle: #ffffff;
  --rah-desc: #ffffff;
  --rah-mobile-w: 78vw;
  --rah-mobile-max: 300px;
  --rah-tablet-w: 480px;
  --rah-gap: 24px;
}

/* Scroller Section */
.rah-section {
  position: relative;
  width: 100%;
  padding: 1.5rem 0 2.5rem;
  overflow: hidden;
}

.rah-wrap {
  position: relative;
  max-width: var(--rah-container);
  margin: 0 auto;
}

/* Track */
.rah-track {
  display: flex;
  gap: var(--rah-gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 12px 0 24px;
  scroll-padding: 0 0;
  touch-action: pan-x pan-y pinch-zoom;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  list-style: none;
  margin: 0;
}

.rah-track::-webkit-scrollbar {
  display: none;
}

.rah-track.is-dragging {
  cursor: grabbing !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}

.rah-track.is-dragging a,
.rah-track.is-dragging img {
  pointer-events: none !important;
}

.rah-track.no-scroll {
  cursor: default !important;
}

/* Base Slide Container */
.rah-slide {
  box-sizing: border-box;
  background: var(--rah-bg);
  border-radius: var(--rah-radius);
  border: 1px solid var(--rah-border);
  box-shadow: var(--rah-shadow);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.rah-slide:hover {
  box-shadow: var(--rah-shadow-hover);
}

.rah-img-col {
  position: relative;
  overflow: hidden;
}

.rah-img {
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.33, 1);
  pointer-events: none;
  -webkit-user-drag: none;
}

.rah-slide:hover .rah-img {
  transform: scale(1.025);
}

.rah-content-col {
  box-sizing: border-box;
  background: var(--rah-bg);
}

.rah-subtitle {
  font-weight: 700;
  color: var(--rah-subtitle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.rah-title {
  font-weight: 800;
  color: var(--rah-title);
  letter-spacing: -0.02em;
  margin: 0;
}

.rah-desc {
  color: var(--rah-desc);
  width: 100%;
}

.rah-desc p,
.rah-desc span,
.rah-desc div {
  color: var(--rah-desc);
}

.rah-desc a {
  color: #ffffff;
  text-decoration: underline;
}

.rah-desc p:last-child {
  margin-bottom: 0;
}

/* Action Buttons */
.rah-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.rah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: all 0.22s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
  white-space: nowrap;
}

.rah-btn-primary {
  background: #000000;
  color: #ffffff !important;
  border: 2px solid #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.rah-btn-primary:hover,
.rah-btn-primary:focus {
  background: #222222;
  border-color: #222222;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
}

.rah-btn-secondary {
  background: #ffffff;
  color: #000000 !important;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.rah-btn-secondary:hover,
.rah-btn-secondary:focus {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #000000 !important;
  transform: translateY(-2px);
}

/* Floating Navigation Arrows (Desktop) */
.rah-arrow {
  position: absolute;
  top: calc(50% - 6px);
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.22s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.rah-arrow-prev {
  left: 16px;
  left: max(-22px, calc(24px - (100vw - 100%) / 2));
}

.rah-arrow-next {
  right: 16px;
  right: max(-22px, calc(24px - (100vw - 100%) / 2));
}

.rah-arrow:hover:not(:disabled) {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.rah-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.rah-arrow.is-hidden {
  display: none !important;
}

/* Pagination Dots */
.rah-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.rah-pagination.is-hidden {
  display: none !important;
}

.rah-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d8d4cf;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.33, 1);
}

.rah-dot:hover {
  background: #a8a39c;
}

.rah-dot.is-active {
  width: 28px;
  background: var(--rah-primary);
}

/* =========================================================
   1. DESKTOP VIEWPORT (>= 1024px)
   Classic Modern Full-Width 2-Column Banner (52% Graphic / 48% Copy)
   Height locked to exact 16:9 ratio (355px at 1200px width).
   Zero red bars, zero letterboxing, 100% flush edge-to-edge.
   ========================================================= */
@media (min-width: 1024px) {
  .rah-slide {
    flex: 0 0 100%;
    max-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 355px;
    max-height: 355px;
    border-radius: var(--rah-radius);
    overflow: hidden;
  }

  .rah-img-col {
    flex: 0 0 52%;
    width: 52%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px 0 0 20px;
    overflow: hidden;
    position: relative;
    background: #111111;
  }

  .rah-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
  }

  .rah-content-col {
    flex: 0 0 48%;
    width: 48%;
    height: 100%;
    padding: 1.75rem 4.5rem 1.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    overflow: hidden;
    background: var(--rah-bg);
  }

  .rah-subtitle {
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 0.35rem;
  }

  .rah-title {
    font-size: 1.85rem;
    line-height: 1.15;
    margin-bottom: 0.65rem;
  }

  .rah-desc {
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Desktop: full natural disclosure */
  .rah-desc.renik-clamp .renik-clamp__glyph {
    display: none !important;
  }
  .rah-desc.renik-clamp .renik-clamp__content {
    max-height: none !important;
  }
  .rah-desc.renik-clamp .renik-clamp__content::after {
    display: none !important;
  }

  .rah-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 0.5rem;
  }

  .rah-btn {
    padding: 0.62rem 1.4rem;
    font-size: 0.92rem;
  }
}

/* =========================================================
   2. TABLET VIEWPORT (769px - 1023px)
   Centered Peeking Card Scroller (480px width)
   Full 16:9 Graphic on Top + Content Below
   Zero letterbox bars, zero vertical voids.
   ========================================================= */
@media (min-width: 769px) and (max-width: 1023px) {
  .rah-section {
    padding: 1rem 0 2rem;
  }

  .rah-wrap {
    max-width: 100%;
  }

  .rah-track {
    align-items: stretch;
    gap: 18px;
    padding: 12px calc((100vw - var(--rah-tablet-w)) / 2) 20px;
    scroll-padding-left: calc((100vw - var(--rah-tablet-w)) / 2);
    scroll-padding-right: calc((100vw - var(--rah-tablet-w)) / 2);
    cursor: default;
  }

  .rah-slide {
    flex: 0 0 var(--rah-tablet-w);
    max-width: var(--rah-tablet-w);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0.85;
    transition: transform 0.38s cubic-bezier(0.25, 1, 0.33, 1),
                opacity 0.38s cubic-bezier(0.25, 1, 0.33, 1),
                box-shadow 0.3s ease;
  }

  .rah-slide.is-active-slide {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16), 0 3px 8px rgba(0, 0, 0, 0.06);
  }

  .rah-img-col {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: 270px;
    max-height: 270px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: #111111;
  }

  .rah-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
  }

  .rah-content-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1.25rem 1.75rem 1.5rem;
    align-items: center;
    text-align: center;
    background: var(--rah-bg);
  }

  .rah-subtitle {
    font-size: 0.88rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
  }

  .rah-title {
    font-size: 1.5rem;
    line-height: 1.18;
    margin-bottom: 0.5rem;
  }

  .rah-desc {
    font-size: 0.9rem;
    line-height: 1.42;
    margin-bottom: 0.85rem;
    width: 100%;
  }

  /* Progressive Clamp on Tablet */
  .rah-desc.renik-clamp {
    position: relative;
    width: 100%;
    text-align: center;
  }

  .rah-desc .renik-clamp__content {
    max-height: 52px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
  }

  .rah-desc.renik-clamp:not(.is-expanded) .renik-clamp__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: linear-gradient(to bottom, rgba(237, 28, 36, 0) 0%, #ed1c24 100%);
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__content {
    max-height: 800px !important;
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__content::after {
    display: none !important;
    opacity: 0 !important;
  }

  .rah-desc.renik-clamp.is-short .renik-clamp__content {
    max-height: none;
  }

  .rah-desc.renik-clamp.is-short .renik-clamp__glyph {
    display: none !important;
  }

  .rah-desc .renik-clamp__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #ffffff;
    font-size: 1.1rem;
    padding: 4px 16px 6px;
    margin: 2px auto 6px;
    cursor: pointer;
    line-height: 1;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  }

  .rah-desc .renik-clamp__glyph:hover,
  .rah-desc .renik-clamp__glyph:focus {
    color: #ffc844;
  }

  .rah-desc.renik-clamp:not(.is-expanded) .renik-clamp__glyph {
    animation: rc-ambient-glyph-pulse 2.2s infinite ease-in-out;
  }

  .rah-desc .renik-clamp__icon {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__icon {
    transform: rotate(180deg) !important;
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__glyph {
    animation: none !important;
  }

  .rah-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: auto;
  }

  .rah-btn {
    flex: 0 1 auto;
    min-width: 140px;
    padding: 0.65rem 1.4rem;
    font-size: 0.92rem;
  }

  .rah-arrow {
    display: none !important;
  }

  .rah-pagination {
    margin-top: 10px;
  }
}

/* =========================================================
   3. MOBILE PHONE VIEWPORT (<= 768px)
   Centered Peeking Card Scroller (78vw, max 300px)
   Renik Progressive Clamp Standard
   Zero clipping, zero letterboxing, equal height cards.
   ========================================================= */
@media (max-width: 768px) {
  .rah-section {
    padding: 0.4rem 0 1rem;
  }

  .rah-wrap {
    max-width: 100%;
  }

  .rah-track {
    align-items: stretch;
    gap: 12px;
    padding: 6px calc((100vw - var(--rah-mobile-w)) / 2) 16px;
    scroll-padding-left: calc((100vw - var(--rah-mobile-w)) / 2);
    scroll-padding-right: calc((100vw - var(--rah-mobile-w)) / 2);
    cursor: default;
  }

  .rah-slide {
    flex: 0 0 var(--rah-mobile-w);
    max-width: var(--rah-mobile-max);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    height: auto;
    border-radius: 18px;
    overflow: hidden;
    transform: scale(0.94);
    opacity: 0.82;
    transition: transform 0.38s cubic-bezier(0.25, 1, 0.33, 1),
                opacity 0.38s cubic-bezier(0.25, 1, 0.33, 1),
                box-shadow 0.3s ease;
  }

  .rah-slide.is-active-slide {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .rah-img-col {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: none;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background: #111111;
  }

  .rah-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    max-height: none;
    object-fit: cover;
    display: block;
  }

  .rah-content-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 12px 12px;
    align-items: center;
    text-align: center;
    background: var(--rah-bg);
  }

  .rah-subtitle {
    font-size: 0.74rem;
    color: var(--rah-subtitle);
    margin-bottom: 2px;
    line-height: 1.15;
  }

  .rah-title {
    font-size: 1.1rem;
    color: var(--rah-title);
    margin-bottom: 3px;
    line-height: 1.15;
  }

  .rah-desc {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--rah-desc);
    width: 100%;
  }

  /* Progressive Clamp on Mobile */
  .rah-desc.renik-clamp {
    position: relative;
    width: 100%;
    text-align: center;
  }

  .rah-desc .renik-clamp__content {
    max-height: 38px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
  }

  .rah-desc.renik-clamp:not(.is-expanded) .renik-clamp__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(237, 28, 36, 0) 0%, #ed1c24 100%);
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__content {
    max-height: 800px !important;
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__content::after {
    display: none !important;
    opacity: 0 !important;
  }

  .rah-desc.renik-clamp.is-short .renik-clamp__content {
    max-height: none;
  }

  .rah-desc.renik-clamp.is-short .renik-clamp__glyph {
    display: none !important;
  }

  .rah-desc .renik-clamp__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #ffffff;
    font-size: 1rem;
    padding: 2px 14px 4px;
    margin: 0 auto 2px;
    cursor: pointer;
    line-height: 1;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  }

  .rah-desc .renik-clamp__glyph:hover,
  .rah-desc .renik-clamp__glyph:focus {
    color: #ffc844;
  }

  .rah-desc.renik-clamp:not(.is-expanded) .renik-clamp__glyph {
    animation: rc-ambient-glyph-pulse 2.2s infinite ease-in-out;
  }

  .rah-desc .renik-clamp__icon {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__icon {
    transform: rotate(180deg) !important;
  }

  .rah-desc.renik-clamp.is-expanded .renik-clamp__glyph {
    animation: none !important;
  }

  .rah-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin-top: 6px;
  }

  .rah-btn {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
    min-height: 32px;
  }

  .rah-btn-secondary {
    padding: 0.4rem 0.7rem;
    font-size: 0.76rem;
    min-height: 32px;
  }

  .rah-arrow {
    display: none !important;
  }

  .rah-pagination {
    margin-top: 6px;
  }
}
