/*
 * WooWoo Ranch Custom Styles
 * Site-wide responsive fixes and custom styling
 */

/* ===================================
   1. HERO SECTION - INLINE DOG IMAGES
   =================================== */

/* Make inline dog images scale with heading text */
.hero-heading,
.display-1 {
  line-height: 1.2;
}

.display-1 img,
.hero-heading img {
  height: 0.85em;
  width: auto;
  vertical-align: middle;
  display: inline-block;
  object-fit: contain;
  margin-top: -0.1em; /* Fine-tune vertical alignment */
}

/* Responsive hero heading font sizes */
.display-1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
}

@media (max-width: 575.98px) {
  .display-1 {
    font-size: 2rem;
  }
  
  .display-1 img {
    height: 0.8em;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .display-1 {
    font-size: 2.75rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .display-1 {
    font-size: 3.5rem;
  }
}

@media (min-width: 992px) {
  .display-1 {
    font-size: 4.5rem;
  }
}

/* ===================================
   2. HERO SECTION - SPACING & LAYOUT
   =================================== */

/* Hero section minimum height */
.hero-section,
section.bg-dark.min-vh-100 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero content container spacing */
.hero-section .container,
section.bg-dark .container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Subtitle text styling */
.hero-subtitle,
.text-body.fs-xl {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Scroll down button spacing */
.scroll-down-btn {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* ===================================
   3. PARALLAX DOG PORTRAITS
   =================================== */

/* Parallax container */
.parallax {
  position: relative;
  width: 100%;
  overflow: visible;
}

/* Ensure parallax layers work correctly */
.parallax-layer {
  will-change: transform;
}

/* Dog portrait images maintain quality */
.parallax-layer img {
  max-width: 100%;
  height: auto;
}

/* Responsive parallax sizing */
@media (max-width: 767.98px) {
  .parallax {
    max-width: 100% !important;
    margin-bottom: -2rem !important;
  }
}

/* ===================================
   4. RESCUE CARDS - Keep Bootstrap defaults
   =================================== */

/* ===================================
   5. FOOTER WALLET ADDRESS
   =================================== */

.wallet-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 0;
}

.wallet-address {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: inherit;
}

.wallet-address-full {
  display: none;
}

.wallet-copy-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: inherit;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.wallet-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.wallet-copy-btn.copied {
  background: #198754;
  border-color: #198754;
}

/* ===================================
   6. NAVIGATION IMPROVEMENTS
   =================================== */

/* Navbar is already fixed-top, ensure proper z-index */
.navbar.fixed-top {
  z-index: 1030;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mobile menu improvements */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: inherit;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  /* Mobile CTA button */
  .navbar .btn-primary {
    width: 100%;
    margin-top: 1rem;
  }
}

/* ===================================
   7. RESPONSIVE TYPOGRAPHY
   =================================== */

/* Section headings */
h2, .h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
}

/* Card titles */
h3, .h3, h4, .h4 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
}

/* Body text */
body {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
}

/* ===================================
   8. ACCESSIBILITY IMPROVEMENTS
   =================================== */

/* Focus states */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .parallax-layer,
  .scroll-down-btn,
  .mouse,
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===================================
   9. PERFORMANCE OPTIMIZATIONS
   =================================== */

/* Prevent layout shift */
img {
  max-width: 100%;
  height: auto;
}

/* Optimize paint */
.parallax,
.parallax-layer {
  contain: layout style;
}

/* ===================================
   10. UTILITY CLASSES
   =================================== */

.text-truncate-middle {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Touch target minimum size */
@media (pointer: coarse) {
  .btn,
  .nav-link,
  a {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Prevent horizontal scroll without creating nested scroll context */
html {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  overflow-x: clip;
  overflow-y: visible;
}

/* Prevent page-wrapper from creating nested scroll */
.page-wrapper {
  min-height: 0;
  overflow: visible;
}

.container,
.container-fluid {
  max-width: 100%;
}
