/* =============================================================
   UX Enhancements v2 — Orlando Home Hospital Beds
   Bold visual polish: textures, gradients, depth, motion
   ============================================================= */

/* ---------------------------------------------------------------
   1. SECTION BACKGROUNDS — Break the flat monotony
   Every other section gets a subtle texture/gradient
--------------------------------------------------------------- */

/* Warm diagonal lines on surface sections */
section.section-padding:nth-child(odd) {
  background-image:
    radial-gradient(circle at 20% 80%, rgba(212, 149, 42, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(58, 158, 165, 0.04) 0%, transparent 50%);
}

/* Subtle top/bottom gradient borders between sections */
section.section-padding {
  border-top: 1px solid rgba(27, 77, 110, 0.06);
}

/* Navy gradient sections — add depth with inner glow */
.hero-gradient,
section.hero-gradient {
  background: linear-gradient(135deg, #003653 0%, #1B4D6E 40%, #003653 100%) !important;
  position: relative;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(58, 158, 165, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* ---------------------------------------------------------------
   2. DECORATIVE SVG WAVE DIVIDERS
   Inject between key sections via CSS pseudo-elements
--------------------------------------------------------------- */

/* Wave divider after the dark trust bar */
.bg-primary-900 {
  position: relative;
}
.bg-primary-900::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(to bottom, #003653, transparent);
  z-index: 1;
  pointer-events: none;
}

/* ---------------------------------------------------------------
   3. CARD ENHANCEMENTS — Depth, hover, accent borders
--------------------------------------------------------------- */

/* Product category cards on homepage */
.card-base {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(27, 77, 110, 0.08) !important;
}
.card-base:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 24px 48px rgba(0, 54, 83, 0.14),
              0 8px 16px rgba(0, 54, 83, 0.08) !important;
}

/* Animated gold accent line at bottom of cards */
.card-base::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 3px;
  background: linear-gradient(90deg, #D4952A, #3A9EA5, #D4952A);
  transition: left 0.4s ease, right 0.4s ease;
  border-radius: 0 0 24px 24px;
}
.card-base:hover::after {
  left: 0;
  right: 0;
}

/* Pain point cards (red icon cards) — add left accent */
.card-base .bg-red-50 {
  position: relative;
}

/* ---------------------------------------------------------------
   4. CTA BUTTONS — Shimmer + depth
--------------------------------------------------------------- */

/* Primary button (gold) — shimmer sweep */
.btn-primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(212, 149, 42, 0.3) !important;
  transition: all 0.3s ease !important;
}
.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(212, 149, 42, 0.45) !important;
  transform: translateY(-2px) !important;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  animation: btnShimmer 4s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%   { left: -60%; }
  40%  { left: 120%; }
  100% { left: 120%; }
}

/* Secondary button (navy) — matching hover glow */
.btn-secondary {
  box-shadow: 0 4px 14px rgba(0, 54, 83, 0.2) !important;
  transition: all 0.3s ease !important;
}
.btn-secondary:hover {
  box-shadow: 0 8px 24px rgba(0, 54, 83, 0.35) !important;
  transform: translateY(-2px) !important;
}

/* Outline button — ensure text is ALWAYS visible */
.btn-outline {
  transition: all 0.3s ease !important;
}

/* Fix: carousel "Request a Quote" buttons — force visible colors */
#product-carousel a[href="/contact/"],
#product-carousel a[href*="/contact"],
section a[style*="background:#D4952A"] {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ---------------------------------------------------------------
   5. FLOATING PHONE BUTTON — Pulsing glow
--------------------------------------------------------------- */
a[aria-label="Call us now"] {
  animation: phonePulse 2.5s ease-in-out infinite;
  transition: transform 0.2s ease !important;
}
a[aria-label="Call us now"]:hover {
  transform: scale(1.1) !important;
  animation: none;
}
@keyframes phonePulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(212, 149, 42, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(212, 149, 42, 0.6),
                0 0 0 12px rgba(212, 149, 42, 0.08);
  }
}

/* ---------------------------------------------------------------
   6. HERO SECTION — Parallax zoom + glass card glow
--------------------------------------------------------------- */
section[data-hero] .absolute img {
  transition: transform 12s ease-out;
}
section[data-hero]:hover .absolute img {
  transform: scale(1.05);
}

/* Glass card — add subtle glow border */
.glass-card {
  border: 1px solid rgba(212, 149, 42, 0.15) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 80px rgba(212, 149, 42, 0.06) !important;
}

/* ---------------------------------------------------------------
   7. STATS BAR — Glowing numbers
--------------------------------------------------------------- */
.bg-primary-900 .text-secondary-400,
.bg-primary-900 .font-bold {
  text-shadow: 0 0 12px rgba(212, 149, 42, 0.4);
}

/* ---------------------------------------------------------------
   8. PRODUCT CAROUSEL — Cards + scroll behavior
--------------------------------------------------------------- */
#product-carousel {
  scroll-padding: 24px;
}
#product-carousel > div {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  border: 1px solid rgba(27, 77, 110, 0.08);
}
#product-carousel > div:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 54, 83, 0.15);
  border-color: rgba(212, 149, 42, 0.2);
}

/* Carousel badges — make them pop more */
#product-carousel span[style*="background:#D4952A"] {
  box-shadow: 0 2px 8px rgba(212, 149, 42, 0.4);
}

/* ---------------------------------------------------------------
   9. BLOG PROSE — Drop cap, blockquotes, images
--------------------------------------------------------------- */

/* Large decorative drop cap */
article .prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-heading);
  font-size: 3.8em;
  line-height: 0.75;
  padding-right: 10px;
  padding-top: 6px;
  color: #1B4D6E;
  font-weight: 800;
  text-shadow: 2px 2px 0 rgba(212, 149, 42, 0.15);
}

/* Styled blockquotes with gold accent */
article .prose blockquote {
  border-left: 4px solid #D4952A !important;
  background: linear-gradient(135deg, rgba(245, 237, 227, 0.6), rgba(232, 241, 248, 0.3)) !important;
  padding: 1.5rem 1.5rem 1.5rem 2rem !important;
  border-radius: 0 16px 16px 0 !important;
  font-style: italic;
  position: relative;
}
article .prose blockquote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 3rem;
  color: rgba(212, 149, 42, 0.3);
  font-family: Georgia, serif;
  line-height: 1;
}

/* Blog images — subtle shadow + rounded */
article .prose img {
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 54, 83, 0.1) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
article .prose img:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 54, 83, 0.15) !important;
}

/* ---------------------------------------------------------------
   10. SECTION HEADINGS — Decorative underline
--------------------------------------------------------------- */
section .container-custom > .text-center > h2 {
  position: relative;
  display: inline-block;
}
section .container-custom > .text-center > h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #D4952A, #3A9EA5);
  border-radius: 2px;
}

/* ---------------------------------------------------------------
   11. "READY TO GET STARTED" CTA SECTIONS — Standout background
--------------------------------------------------------------- */
section .bg-white.rounded-2xl.shadow-lg {
  background: linear-gradient(135deg, #ffffff 0%, #FFF8F2 50%, #F5EDE3 100%) !important;
  border: 1px solid rgba(212, 149, 42, 0.12);
  box-shadow: 0 12px 36px rgba(0, 54, 83, 0.08) !important;
}

/* ---------------------------------------------------------------
   12. FOOTER — Add top gradient border
--------------------------------------------------------------- */
footer.bg-primary-900 {
  border-top: 3px solid;
  border-image: linear-gradient(90deg, #D4952A, #3A9EA5, #D4952A) 1;
}

/* ---------------------------------------------------------------
   13. NAV HEADER — Subtle bottom shadow on scroll
--------------------------------------------------------------- */
.glass-nav-scrolled {
  box-shadow: 0 2px 20px rgba(0, 54, 83, 0.08) !important;
}

/* ---------------------------------------------------------------
   14. FAQ ACCORDIONS — Visual polish
--------------------------------------------------------------- */
details {
  transition: background 0.2s ease;
  border-radius: 12px !important;
}
details[open] {
  background: rgba(245, 237, 227, 0.4);
}
details summary {
  cursor: pointer;
  transition: color 0.2s ease;
}
details summary:hover {
  color: #D4952A;
}

/* ---------------------------------------------------------------
   15. ACCESSIBILITY + GLOBAL
--------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #3A9EA5;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Global overflow prevention */
body {
  overflow-x: hidden;
}

/* Scrollable tables on mobile */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------
   16. MOBILE RESPONSIVE ADJUSTMENTS
--------------------------------------------------------------- */
@media (max-width: 768px) {
  .section-padding {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .prose table {
    font-size: 0.85rem;
    min-width: 500px;
  }

  /* Drop cap smaller on mobile */
  article .prose > p:first-of-type::first-letter {
    font-size: 2.8em;
    padding-right: 6px;
  }

  /* Section heading underlines */
  section .container-custom > .text-center > h2::after {
    width: 40px;
  }
}

/* ---------------------------------------------------------------
   17. SMOOTH LOADING ANIMATION
--------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main > section {
  animation: fadeInUp 0.5s ease-out both;
}
main > section:nth-child(2) { animation-delay: 0.1s; }
main > section:nth-child(3) { animation-delay: 0.15s; }
main > section:nth-child(4) { animation-delay: 0.2s; }

/* ---------------------------------------------------------------
   18. AD CONTAINER STYLING
--------------------------------------------------------------- */
[data-ad-mobile],
[data-ad-desktop] {
  position: relative;
}
[data-ad-mobile]::before,
[data-ad-desktop]::before {
  content: 'Sponsored';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #a8a29e;
  font-family: var(--font-body);
}
