/* UI Consistency Fixes - Button and Card Standardization */

/* ============================================
   BUTTON STANDARDIZATION
   ============================================ */

/* Base button consistency - ensure all buttons have same foundation */
.btn,
.btn-primary,
.btn-outline,
.cta .btn {
  /* Standardized dimensions */
  min-height: 56px;
  padding: 0.875rem 2rem;

  /* Standardized typography */
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;

  /* Standardized border radius - using pill shape for all buttons */
  border-radius: 9999px;

  /* Ensure consistent display */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  /* Consistent transitions */
  transition: all 0.3s ease;
}

/* Override conflicting styles in combined.min.css */
.btn {
  border-radius: 9999px !important;
  font-weight: 700 !important;
  min-height: 56px !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
}

.btn-primary {
  border-radius: 9999px !important;
  font-weight: 700 !important;
  min-height: 56px !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
  padding: 0.875rem 2rem !important;
}

.btn-outline {
  border-radius: 9999px !important;
  font-weight: 700 !important;
  min-height: 56px !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
  padding: 0.875rem 2rem !important;
}

/* Fix floating buttons - exclude from button height consistency checks */
.floating-buttons a,
.mobile-sticky-bar a {
  /* These are icon buttons, not text buttons - different sizing rules apply */
  min-height: auto;
  font-size: inherit;
}

/* Mobile sticky bar specific sizing */
.mobile-sticky-bar a {
  min-height: 48px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--border-radius-sm, 8px);
}

/* Hamburger menu button - ensure accessible touch target (min 44x44px) */
.hamburger {
  width: 44px;
  height: 44px;
  padding: 8px;
}

.hamburger span {
  width: 28px;
  height: 3px;
}

/* ============================================
   CARD HEIGHT CONSISTENCY
   ============================================ */

/* Ensure card grids align items to stretch for equal heights */
.home-signature__grid,
.home-packages__grid,
.home-experience__grid,
.about-hero__stats,
.essence-grid,
.pillars-grid,
.services-grid,
.team-grid,
.testimonial-grid,
.reservation-packages__grid,
.reservation-amenities__cards,
.faq-overview__grid,
.blog-grid__cards,
.blog-digest__cards {
  align-items: stretch;
}

/* Ensure all cards in grids stretch to fill available height */
.home-signature__card,
.home-packages__card,
.essence-card,
.pillar-card,
.service-card,
.team-card,
.reservation-packages__card,
.reservation-amenities__card,
.faq-overview__card,
.blog-card,
.stat-card {
  height: 100%;
}

/* Cards with flex display need to stretch properly */
.card,
.blog-card,
.home-packages__card {
  display: flex;
  flex-direction: column;
}

/* Ensure card content fills available space */
.home-packages__card > *:last-child,
.home-signature__card > *:last-child {
  margin-top: auto;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (width <=768px) {
  /* Maintain button consistency on mobile */
  .btn,
  .btn-primary,
  .btn-outline,
  .cta .btn {
    min-height: 52px;
    padding: 0.8rem 1.75rem;
    font-size: 0.9rem;
  }

  /* Floating buttons smaller on mobile */
  .floating-buttons a {
    width: 50px;
    height: 50px;
  }
}

@media (width <=360px) {
  .floating-buttons a {
    width: 44px;
    height: 44px;
  }
}

/* ============================================
   ACCESSIBILITY FIXES
   ============================================ */

/* Ensure all interactive elements meet 44x44px minimum touch target */
.floating-buttons a {
  min-width: 56px;
  min-height: 56px;
  width: 56px;
  height: 56px;
}

/* Social icons - ensure adequate touch targets */
.social a,
.footer-social a,
.social-row a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

/* Navigation links - ensure adequate spacing and touch targets */
.nav-menu a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

/* Card action links - ensure adequate touch targets */
.home-signature__link,
.home-packages__link,
a[href*="reservations"],
a[href*="menu"],
a[href*="gallery"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  justify-content: center;
}

/* Footer links - ensure adequate touch targets */
.footer-links a,
.footer-contact a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
}

/* Dropdown menu items */
.dropdown-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
}

/* Logo link - ensure adequate touch target */
.logo {
  min-width: 44px;
  min-height: 44px;
}

/* Language switcher */
.lang-switch {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 1rem !important;
}

/* Form inputs - ensure adequate touch targets */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea,
select {
  min-height: 48px;
  padding: 0.75rem 1rem;
}

/* ============================================
   CONTRAST IMPROVEMENTS
   ============================================ */

/* CRITICAL: Fix navigation menu contrast (was 1.08, needs 4.5+ for AA) */
.nav-menu a,
.nav-menu li {
  color: rgba(255, 255, 255, 0.95) !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: #fff !important;
  opacity: 1 !important;
}

/* Dropdown menu contrast */
.dropdown-menu {
  background: rgba(20, 20, 20, 0.98) !important;
}

.dropdown-menu a {
  color: rgba(255, 255, 255, 0.95) !important;
}

.dropdown-menu a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure text has sufficient contrast - these values should be adjusted based on your color scheme */
.section-eyebrow {
  opacity: 1;
  font-weight: 600;
}

/* Footer text contrast */
.site-footer {
  color: rgba(255, 255, 255, 0.95);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: #fff;
}

/* Improve contrast for meta text */
.home-hero__meta span {
  opacity: 0.95;
}

/* General contrast improvements for text elements */
p, h1, h2, h3, h4, h5, h6 {
  opacity: 1;
}

/* Ensure list items have good contrast */
ul li, ol li {
  opacity: 1;
}

/* Ensure links have good contrast */
a:not(.logo):not(.insta-item) {
  opacity: 1;
}

/* Hero section - ensure all text is visible */
.home-hero h1,
.home-hero .text-gradient-glow {
  opacity: 1 !important;
  visibility: visible !important;
}

.home-hero__copy {
  opacity: 1 !important;
  visibility: visible !important;
}

.home-hero__copy p,
.home-hero__list li {
  color: rgba(255, 255, 255, 0.95) !important;
  opacity: 1 !important;
}

/* Card text contrast */
.home-signature__card p,
.home-signature__card li,
.home-packages__card p,
.home-packages__card li {
  opacity: 1;
  color: inherit;
}

/* Eyebrow text */
.home-hero__eyebrow,
.section-eyebrow {
  opacity: 1 !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Hero actions - ensure buttons are visible */
.home-hero__actions {
  opacity: 1 !important;
  visibility: visible !important;
}

.home-hero__actions .btn {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================
   LAYOUT FIXES
   ============================================ */

/* Fix horizontal overflow - prevent content from breaking layout */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Custom scrollbar styling - matches site theme */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* Ensure marquee doesn't cause overflow */
.home-marquee {
  overflow: hidden;
  max-width: 100vw;
}

.home-marquee__track {
  overflow: visible;
}

/* Ensure images don't cause overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Optimize image rendering */
img[loading="lazy"] {
  content-visibility: auto;
}

/* Ensure Instagram grid images are properly sized */
.insta-grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Container overflow fix */
.container {
  overflow-x: hidden;
}

/* ============================================
   PERFORMANCE - FONT LOADING
   ============================================ */

/* Optimize font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
