/* Custom CSS Overrides and Enhancements for Alpin Jahorina Website */
@import url("../Alpin Jahorina Design System/styles.css");

/* Global Responsive Bounds (Prevents Mobile Overflow) */
*, *::before, *::after {
  box-sizing: border-box;
}

img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

.aj-card img, .aj-media img {
  max-width: 100%;
  object-fit: cover;
}

/* Prevent Any Button Overflowing Containers on Mobile */
.aj-btn, button, a.aj-btn {
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Tabular Nums Alignment for Price Tables */
.aj-price, .aj-pricerow__rate, .aj-price-num {
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-feature-settings: "tnum", "lnum";
  font-feature-settings: "tnum", "lnum";
}

/* Main Hero Background Image Integration */
.aj-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center center;
  filter: brightness(0.85) contrast(1.05);
}

/* Glassmorphism Header Polish */
.aj-navbar-scrolled {
  background: var(--surface-glass, rgba(17, 17, 17, 0.92)) !important;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Header Container Padding Protection */
.aj-nav__inner {
  padding-inline: clamp(16px, 4vw, 32px) !important;
  max-width: var(--container-max);
  margin-inline: auto;
  box-sizing: border-box;
}

/* Card Hover Micro-Animations */
.aj-card-hover-lift {
  transition: transform 0.35s cubic-bezier(.16, 1, .3, 1), box-shadow 0.35s cubic-bezier(.16, 1, .3, 1), border-color 0.35s ease;
}

.aj-card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg, 0 12px 32px -8px rgba(0,0,0,0.25));
  border-color: var(--gold-500, #C9A051) !important;
}

/* Ensure stacked buttons inside cards always have clean spacing */
.aj-card .aj-btn + .aj-btn {
  margin-top: var(--space-12) !important;
}

/* Mobile Overlay Menu Styles */
.aj-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  top: var(--nav-height, 76px);
  background: rgba(17, 17, 17, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: var(--space-32) var(--gutter);
  gap: var(--space-24);
  animation: ajFadeIn 0.25s ease-out forwards;
}

@keyframes ajFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Menu Toggle Display Rules */
.aj-mobile-toggle {
  display: none !important;
}

/* Responsive Navigation Styles */
@media (max-width: 991px) {
  .aj-nav__desktop-links {
    display: none !important;
  }
  .aj-mobile-toggle {
    display: flex !important;
  }
  .aj-nav__inner {
    gap: var(--space-12) !important;
  }
}

/* Mobile Devices Optimization (< 640px) */
@media (max-width: 640px) {
  /* Hide email icon button from top navbar on small mobile screens to prevent right overflow of hamburger icon */
  .aj-header-email {
    display: none !important;
  }

  .aj-nav__inner {
    padding-inline: 12px !important;
    gap: 8px !important;
  }

  .aj-nav__links {
    gap: 8px !important;
  }

  /* Responsive Mobile Button Styling */
  .aj-btn, a.aj-btn {
    font-size: 0.88rem !important;
    padding-inline: 14px !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 48px !important;
  }

  /* Mobile Container Padding Protection */
  .aj-container {
    padding-inline: 16px !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #111111;
}
::-webkit-scrollbar-thumb {
  background: #C9A051;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D9BC80;
}
