/*
================================================================================
LAKBAY - ORIENTAL MINDORO GLASSMORPHISM THEME
Provincial Tourism Office Branding
================================================================================
Design: Glassmorphism-inspired Forest Green Theme
Primary: #16A34A (Forest Green)
Secondary: #0D9488 (Ocean Teal)
Accent: #14532D (Deep Forest)
Version: 1.0
================================================================================
*/

/* ============================================================================
   1. CSS VARIABLE OVERRIDES
   ============================================================================ */

:root {
  /* Primary Colors - Forest Green */
  --lakbay-primary: #16A34A;
  --lakbay-primary-rgb: 22, 163, 74;
  --lakbay-primary-dark: #15803D;
  --lakbay-primary-darker: #166534;
  --lakbay-primary-light: #22C55E;
  --lakbay-primary-pale: #F0FDF4;
  --lakbay-primary-subtle: #DCFCE7;

  /* Secondary Colors - Ocean Teal */
  --lakbay-secondary: #0D9488;
  --lakbay-secondary-rgb: 13, 148, 136;
  --lakbay-secondary-dark: #0F766E;
  --lakbay-secondary-light: #14B8A6;
  --lakbay-secondary-pale: #CCFBF1;
  --lakbay-secondary-subtle: #99F6E4;

  /* Accent Colors - Deep Forest */
  --lakbay-accent: #166534;
  --lakbay-accent-rgb: 22, 101, 52;
  --lakbay-accent-dark: #14532D;
  --lakbay-accent-light: #22C55E;
  --lakbay-accent-pale: #F0FDF4;
  --lakbay-accent-subtle: #DCFCE7;

  /* Semantic Colors */
  --lakbay-success: #16A34A;
  --lakbay-info: #0D9488;
  --lakbay-new: #22C55E;

  /* Background Dark */
  --lakbay-bg-dark: #14532D;

  /* ============================================================================
     GLASSMORPHISM PROPERTIES
     ============================================================================ */

  /* Glass Backgrounds - White */
  --glass-bg-white: rgba(255, 255, 255, 0.7);
  --glass-bg-white-medium: rgba(255, 255, 255, 0.5);
  --glass-bg-white-light: rgba(255, 255, 255, 0.25);
  --glass-bg-white-heavy: rgba(255, 255, 255, 0.85);

  /* Glass Backgrounds - Dark */
  --glass-bg-dark: rgba(0, 0, 0, 0.3);
  --glass-bg-dark-medium: rgba(0, 0, 0, 0.5);
  --glass-bg-dark-heavy: rgba(0, 0, 0, 0.7);

  /* Glass Backgrounds - Primary Green */
  --glass-bg-primary: rgba(22, 163, 74, 0.1);
  --glass-bg-primary-medium: rgba(22, 163, 74, 0.2);
  --glass-bg-primary-strong: rgba(22, 163, 74, 0.35);

  /* Glass Blur Levels */
  --glass-blur-xs: blur(4px);
  --glass-blur-sm: blur(8px);
  --glass-blur-md: blur(12px);
  --glass-blur-lg: blur(20px);
  --glass-blur-xl: blur(40px);

  /* Glass Borders */
  --glass-border-white: 1px solid rgba(255, 255, 255, 0.2);
  --glass-border-white-strong: 1px solid rgba(255, 255, 255, 0.4);
  --glass-border-white-subtle: 1px solid rgba(255, 255, 255, 0.1);
  --glass-border-primary: 1px solid rgba(22, 163, 74, 0.2);
  --glass-border-primary-strong: 1px solid rgba(22, 163, 74, 0.3);

  /* Glass Shadows */
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
  --glass-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.2);
  --glass-shadow-primary: 0 8px 32px rgba(22, 163, 74, 0.15);
}

/* ============================================================================
   2. GLASSMORPHISM UTILITY CLASSES
   ============================================================================ */

/* White Glass Variants */
.glass {
  background: var(--glass-bg-white);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border: var(--glass-border-white);
  box-shadow: var(--glass-shadow);
}

.glass-light {
  background: var(--glass-bg-white-medium);
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  border: var(--glass-border-white);
}

.glass-heavy {
  background: var(--glass-bg-white-light);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border: var(--glass-border-white-strong);
}

/* Dark Glass */
.glass-dark {
  background: var(--glass-bg-dark);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border: var(--glass-border-white-subtle);
  color: white;
}

.glass-dark-heavy {
  background: var(--glass-bg-dark-medium);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border: var(--glass-border-white-subtle);
  color: white;
}

/* Primary Green Glass */
.glass-primary {
  background: var(--glass-bg-primary);
  backdrop-filter: var(--glass-blur-md);
  -webkit-backdrop-filter: var(--glass-blur-md);
  border: var(--glass-border-primary);
}

.glass-primary-strong {
  background: var(--glass-bg-primary-medium);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border: var(--glass-border-primary-strong);
}

/* ============================================================================
   3. NAVBAR - GLASSMORPHISM
   ============================================================================ */

.navbar-lakbay {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(22, 163, 74, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.navbar-lakbay.scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.navbar-lakbay .navbar-brand {
  color: var(--lakbay-primary) !important;
}

.navbar-lakbay .navbar-brand:hover {
  color: var(--lakbay-primary-dark) !important;
}

.navbar-lakbay .nav-link.active {
  color: var(--lakbay-primary) !important;
  background: var(--lakbay-primary-pale);
}

.navbar-lakbay .nav-link:hover {
  color: var(--lakbay-primary) !important;
}

/* Mobile Offcanvas with Glass */
.offcanvas {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.offcanvas-header {
  border-bottom: 1px solid rgba(22, 163, 74, 0.1);
}

/* Dropdown with Glass */
.navbar-lakbay .dropdown-menu {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(22, 163, 74, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.navbar-lakbay .dropdown-item:hover,
.navbar-lakbay .dropdown-item:focus {
  background-color: var(--lakbay-primary-pale);
  color: var(--lakbay-primary-dark);
}

/* ============================================================================
   4. HERO SECTIONS - GLASSMORPHISM
   ============================================================================ */

/* Hero Overlay with Green Tint */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.15) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.6) 100%
  ) !important;
}

/* Alternative Hero Overlay */
.hero-section::after {
  background: linear-gradient(
    to bottom,
    rgba(22, 163, 74, 0.1) 0%,
    rgba(0, 0, 0, 0.5) 100%
  ) !important;
}

/* Glass Search Bar */
.hero-search,
.search-form-wrapper {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.hero-search:focus-within,
.search-form-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--lakbay-primary);
  box-shadow: 0 8px 32px rgba(22, 163, 74, 0.2);
}

/* Municipality Hero Breadcrumb */
.municipality-hero-breadcrumb .breadcrumb {
  background: rgba(22, 163, 74, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.municipality-hero-breadcrumb .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.9);
}

.municipality-hero-breadcrumb .breadcrumb-item a:hover {
  color: #ffffff;
}

.municipality-hero-breadcrumb .breadcrumb-item.active {
  color: #ffffff;
}

/* Stats/Info Boxes on Hero */
.hero-stats,
.hero-info-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--lakbay-radius-lg);
}

/* ============================================================================
   5. CARDS - GLASSMORPHISM
   ============================================================================ */

/* Activity Card Overlay */
.activity-card-overlay {
  background: linear-gradient(
    to top,
    rgba(22, 163, 74, 0.9) 0%,
    rgba(22, 163, 74, 0.4) 40%,
    transparent 100%
  ) !important;
}

.activity-card:hover .activity-card-overlay {
  background: linear-gradient(
    to top,
    rgba(22, 163, 74, 0.95) 0%,
    rgba(22, 163, 74, 0.6) 50%,
    rgba(22, 163, 74, 0.2) 100%
  ) !important;
}

/* Place Card Overlay */
.place-card-overlay,
.featured-card-overlay {
  background: linear-gradient(
    to top,
    rgba(20, 83, 45, 0.95) 0%,
    rgba(22, 163, 74, 0.4) 50%,
    transparent 100%
  ) !important;
}

.place-card:hover .place-card-overlay,
.featured-card:hover .featured-card-overlay {
  background: linear-gradient(
    to top,
    rgba(20, 83, 45, 1) 0%,
    rgba(22, 163, 74, 0.6) 50%,
    rgba(22, 163, 74, 0.1) 100%
  ) !important;
}

/* Destination Card Overlay */
.destination-card-overlay {
  background: linear-gradient(
    to top,
    rgba(22, 163, 74, 0.9) 0%,
    rgba(22, 163, 74, 0.4) 40%,
    transparent 100%
  ) !important;
}

.destination-card:hover .destination-card-overlay {
  background: linear-gradient(
    to top,
    rgba(22, 163, 74, 0.95) 0%,
    rgba(22, 163, 74, 0.5) 50%,
    transparent 100%
  ) !important;
}

/* Glass Wishlist Button */
.btn-wishlist {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.btn-wishlist:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-wishlist.active {
  background: var(--lakbay-heart) !important;
  color: white !important;
  border-color: var(--lakbay-heart) !important;
}

/* Card Category Badges - Glass Effect */
.place-card-category,
.featured-card-category,
.activity-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
}

/* Horizontal Card Glass */
.horizontal-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(22, 163, 74, 0.1);
  transition: all 0.3s ease;
}

.horizontal-card:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.2);
}

/* Promo Card Overlay */
.promo-card-overlay {
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.8) 0%,
    rgba(20, 83, 45, 0.9) 100%
  ) !important;
}

/* Feature Card Glass Effect */
.feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(22, 163, 74, 0.1);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(22, 163, 74, 0.2);
  box-shadow: 0 8px 32px rgba(22, 163, 74, 0.12);
}

/* ============================================================================
   6. BADGES - GREEN THEME
   ============================================================================ */

.badge-new {
  background: linear-gradient(135deg, var(--lakbay-primary-light) 0%, var(--lakbay-primary) 100%) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.badge-featured {
  background: linear-gradient(135deg, var(--lakbay-primary) 0%, var(--lakbay-primary-dark) 100%) !important;
  color: white !important;
}

.badge-bestseller {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%) !important;
  color: white !important;
}

.badge-hot {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  color: white !important;
}

/* Glass Badge */
.badge-glass {
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white !important;
  font-weight: 500;
}

/* Status Badges */
.badge-status-published,
.badge-success {
  background-color: var(--lakbay-primary-subtle) !important;
  color: var(--lakbay-primary-darker) !important;
}

.badge-primary {
  background-color: var(--lakbay-primary) !important;
  color: white !important;
}

.badge-secondary {
  background-color: var(--lakbay-secondary) !important;
  color: white !important;
}

/* ============================================================================
   7. MODALS & DROPDOWNS - GLASSMORPHISM
   ============================================================================ */

.modal-content {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(22, 163, 74, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid rgba(22, 163, 74, 0.1);
}

.modal-footer {
  border-top: 1px solid rgba(22, 163, 74, 0.1);
}

.dropdown-menu {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(22, 163, 74, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--lakbay-primary-pale) !important;
  color: var(--lakbay-primary-dark);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--lakbay-primary) !important;
  color: white !important;
}

/* Tooltip Glass */
.tooltip .tooltip-inner {
  background: rgba(20, 83, 45, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: rgba(20, 83, 45, 0.9);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: rgba(20, 83, 45, 0.9);
}

/* Toast Glass */
.toast {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(22, 163, 74, 0.1);
}

.toast-header {
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(22, 163, 74, 0.1);
}

/* ============================================================================
   8. BUTTONS - GREEN THEME
   ============================================================================ */

.btn-primary {
  --bs-btn-bg: var(--lakbay-primary);
  --bs-btn-border-color: var(--lakbay-primary);
  --bs-btn-hover-bg: var(--lakbay-primary-dark);
  --bs-btn-hover-border-color: var(--lakbay-primary-dark);
  --bs-btn-active-bg: var(--lakbay-primary-darker);
  --bs-btn-active-border-color: var(--lakbay-primary-darker);
  --bs-btn-disabled-bg: var(--lakbay-primary);
  --bs-btn-disabled-border-color: var(--lakbay-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--lakbay-primary);
  --bs-btn-border-color: var(--lakbay-primary);
  --bs-btn-hover-bg: var(--lakbay-primary);
  --bs-btn-hover-border-color: var(--lakbay-primary);
  --bs-btn-active-bg: var(--lakbay-primary-dark);
  --bs-btn-active-border-color: var(--lakbay-primary-dark);
}

.btn-secondary {
  --bs-btn-bg: var(--lakbay-secondary);
  --bs-btn-border-color: var(--lakbay-secondary);
  --bs-btn-hover-bg: var(--lakbay-secondary-dark);
  --bs-btn-hover-border-color: var(--lakbay-secondary-dark);
}

.btn-outline-secondary {
  --bs-btn-color: var(--lakbay-secondary);
  --bs-btn-border-color: var(--lakbay-secondary);
  --bs-btn-hover-bg: var(--lakbay-secondary);
  --bs-btn-hover-border-color: var(--lakbay-secondary);
}

.btn-success {
  --bs-btn-bg: var(--lakbay-primary);
  --bs-btn-border-color: var(--lakbay-primary);
  --bs-btn-hover-bg: var(--lakbay-primary-dark);
  --bs-btn-hover-border-color: var(--lakbay-primary-dark);
}

/* Glass Button */
.btn-glass {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  transition: all 0.2s ease;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

/* ============================================================================
   9. FOOTER - FOREST GREEN
   ============================================================================ */

.footer-lakbay {
  background: linear-gradient(
    180deg,
    var(--lakbay-accent) 0%,
    var(--lakbay-accent-dark) 100%
  ) !important;
  position: relative;
}

.footer-lakbay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(22, 163, 74, 0.5) 50%,
    transparent 100%
  );
}

.footer-title {
  color: var(--lakbay-primary-light) !important;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--lakbay-primary-light) !important;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  color: var(--lakbay-primary-light) !important;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   10. BRAND GRADIENTS
   ============================================================================ */

.gradient-primary {
  background: linear-gradient(135deg, var(--lakbay-primary) 0%, var(--lakbay-primary-dark) 100%);
}

.gradient-primary-light {
  background: linear-gradient(135deg, var(--lakbay-primary-light) 0%, var(--lakbay-primary) 100%);
}

.gradient-forest {
  background: linear-gradient(135deg, #166534 0%, #14532D 100%);
}

.gradient-ocean {
  background: linear-gradient(135deg, var(--lakbay-secondary) 0%, #0E7490 100%);
}

.gradient-sunrise {
  background: linear-gradient(135deg, #FBBF24 0%, var(--lakbay-primary) 100%);
}

/* Mesh Gradient for Section Backgrounds */
.gradient-mesh {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(22, 163, 74, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
}

/* Text Gradient */
.text-gradient-primary {
  background: linear-gradient(135deg, var(--lakbay-primary) 0%, var(--lakbay-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================================
   11. FORM ELEMENTS - GREEN THEME
   ============================================================================ */

.form-control:focus,
.form-select:focus {
  border-color: var(--lakbay-primary);
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.25);
}

.form-check-input:checked {
  background-color: var(--lakbay-primary);
  border-color: var(--lakbay-primary);
}

.form-check-input:focus {
  border-color: var(--lakbay-primary);
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.25);
}

.form-range::-webkit-slider-thumb {
  background: var(--lakbay-primary);
}

.form-range::-moz-range-thumb {
  background: var(--lakbay-primary);
}

/* ============================================================================
   12. LINKS & TEXT - GREEN THEME
   ============================================================================ */

a {
  color: var(--lakbay-primary);
}

a:hover {
  color: var(--lakbay-primary-dark);
}

.text-primary {
  color: var(--lakbay-primary) !important;
}

.text-secondary {
  color: var(--lakbay-secondary) !important;
}

.bg-primary {
  background-color: var(--lakbay-primary) !important;
}

.bg-secondary {
  background-color: var(--lakbay-secondary) !important;
}

.border-primary {
  border-color: var(--lakbay-primary) !important;
}

/* ============================================================================
   13. PAGINATION - GREEN THEME
   ============================================================================ */

.pagination .page-link {
  color: var(--lakbay-primary);
}

.pagination .page-link:hover {
  color: var(--lakbay-primary-dark);
  background-color: var(--lakbay-primary-pale);
  border-color: var(--lakbay-primary);
}

.pagination .page-item.active .page-link {
  background-color: var(--lakbay-primary);
  border-color: var(--lakbay-primary);
  color: white;
}

/* ============================================================================
   14. TABS & NAV - GREEN THEME
   ============================================================================ */

.nav-tabs .nav-link.active {
  color: var(--lakbay-primary);
  border-bottom-color: var(--lakbay-primary);
}

.nav-tabs .nav-link:hover {
  color: var(--lakbay-primary-dark);
}

.nav-pills .nav-link.active {
  background-color: var(--lakbay-primary);
  color: white;
}

.nav-pills .nav-link:hover:not(.active) {
  color: var(--lakbay-primary);
  background-color: var(--lakbay-primary-pale);
}

/* ============================================================================
   15. ALERTS - GREEN THEME
   ============================================================================ */

.alert-success {
  background-color: var(--lakbay-primary-pale);
  border-color: var(--lakbay-primary-subtle);
  color: var(--lakbay-primary-darker);
}

.alert-info {
  background-color: var(--lakbay-secondary-pale);
  border-color: var(--lakbay-secondary-subtle);
  color: var(--lakbay-secondary-dark);
}

/* ============================================================================
   16. PROGRESS & SPINNERS - GREEN THEME
   ============================================================================ */

.progress-bar {
  background-color: var(--lakbay-primary);
}

.spinner-border.text-primary {
  color: var(--lakbay-primary) !important;
}

/* ============================================================================
   17. DECORATIVE ELEMENTS
   ============================================================================ */

/* Decorative blob shapes for sections */
.section-blob {
  position: relative;
  overflow: hidden;
}

.section-blob::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  pointer-events: none;
  z-index: 0;
}

.section-blob::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -100px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
}

/* Light divider line */
.divider-light {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(22, 163, 74, 0.3) 50%,
    transparent 100%
  );
}

/* ============================================================================
   18. SCROLLBAR STYLING
   ============================================================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--lakbay-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--lakbay-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lakbay-primary-dark);
}

/* ============================================================================
   19. PERFORMANCE & ACCESSIBILITY
   ============================================================================ */

/* Fallback for unsupported browsers */
@supports not (backdrop-filter: blur(10px)) {
  .glass,
  .glass-light,
  .glass-heavy,
  .glass-primary {
    background: rgba(255, 255, 255, 0.95);
  }

  .glass-dark,
  .glass-dark-heavy {
    background: rgba(0, 0, 0, 0.85);
  }

  .navbar-lakbay {
    background: rgba(255, 255, 255, 0.98) !important;
  }

  .modal-content,
  .dropdown-menu,
  .offcanvas {
    background: #FFFFFF !important;
  }

  .btn-wishlist {
    background: rgba(255, 255, 255, 0.95) !important;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .glass,
  .glass-light,
  .glass-heavy,
  .glass-dark,
  .glass-dark-heavy,
  .glass-primary,
  .glass-primary-strong,
  .navbar-lakbay,
  .modal-content,
  .dropdown-menu,
  .offcanvas,
  .toast,
  .btn-wishlist {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .btn-wishlist:hover {
    transform: none;
  }

  .footer-social a:hover {
    transform: none;
  }
}

/* Mobile optimization - lighter blur for performance */
@media (max-width: 767.98px) {
  .glass,
  .glass-light,
  .glass-primary,
  .navbar-lakbay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .glass-heavy,
  .glass-primary-strong {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .modal-content {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
}

/* High contrast focus states for accessibility */
:focus-visible {
  outline: 2px solid var(--lakbay-primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.4);
}

/* ============================================================================
   20. PRINT STYLES
   ============================================================================ */

@media print {
  .glass,
  .glass-light,
  .glass-heavy,
  .glass-dark,
  .glass-primary,
  .navbar-lakbay,
  .modal-content,
  .dropdown-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: white !important;
  }

  .footer-lakbay {
    background: var(--lakbay-accent-dark) !important;
  }
}

/* ============================================================================
   21. MOBILE CARDS - AIRBNB STYLE
   ============================================================================ */

.mobile-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-card:active {
  transform: scale(0.98);
}

.mobile-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Larger touch target for favorite button - 44px minimum (Apple HIG) */
.btn-favorite {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-favorite:active {
  transform: scale(0.9);
}

/* Heart animation on favorite */
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.btn-favorite.liked {
  animation: heartPop 0.3s ease;
}

.btn-favorite.liked .fa-heart {
  color: #ef4444;
}

/* Enhanced heart beat animation */
@keyframes heartBeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.btn-favorite.just-liked i {
  animation: heartBeat 0.6s ease;
}

/* ============================================================================
   22. EMPTY & LOADING STATES
   ============================================================================ */

/* Empty state styling */
.empty-icon-wrapper {
  position: relative;
  display: inline-block;
}

.empty-icon-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    rgba(22, 163, 74, 0.1) 0%,
    rgba(13, 148, 136, 0.1) 100%);
}

.empty-icon-wrapper i {
  position: relative;
}

/* Skeleton loading cards */
.skeleton-card {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================================
   23. MOBILE TYPOGRAPHY & SPACING
   ============================================================================ */

:root {
  --mobile-font-xs: 12px;
  --mobile-font-sm: 13px;
  --mobile-font-base: 15px;
  --mobile-font-md: 16px;
  --mobile-font-lg: 18px;
  --mobile-font-xl: 20px;
}

/* Card content typography */
.mobile-card h6 {
  font-size: var(--mobile-font-md);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mobile-card .text-muted.small {
  font-size: var(--mobile-font-sm);
  line-height: 1.4;
}

/* Distance badge - enhanced */
.distance-badge {
  font-size: var(--mobile-font-xs);
  font-weight: 600;
  background: rgba(22, 163, 74, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ============================================================================
   24. MICRO-INTERACTIONS & ANIMATIONS
   ============================================================================ */

/* Staggered card animation on load */
.mobile-card {
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.4s ease forwards;
}

.mobile-card:nth-child(1) { animation-delay: 0s; }
.mobile-card:nth-child(2) { animation-delay: 0.1s; }
.mobile-card:nth-child(3) { animation-delay: 0.15s; }
.mobile-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button press feedback */
.btn {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-success:active {
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

/* ============================================================================
   25. MOBILE FILTER BAR
   ============================================================================ */

/* Sticky Filter Container */
.filters-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

/* Scroll fade indicator */
.filters-scroll {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
}

.filters-scroll::-webkit-scrollbar {
  display: none;
}

/* Enhanced filter pills - 44px touch target */
.btn-filter {
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  min-height: 44px;
  border: 1.5px solid var(--bs-success);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-filter.selected {
  background: var(--bs-success);
  color: white;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

/* ============================================================================
   26. MOBILE SEARCH EXPERIENCE
   ============================================================================ */

/* Favorites toggle chip */
.favorites-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 24px;
  background: #f3f4f6;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.15s ease;
  cursor: pointer;
}

.favorites-chip:hover {
  background: #e5e7eb;
}

.favorites-chip.active {
  background: rgba(22, 163, 74, 0.1);
  color: var(--bs-success);
}

.favorites-chip.active i {
  color: #ef4444;
}

.favorites-chip i {
  font-size: 16px;
}

/* Enhanced search input - pill style */
.search-wrapper {
  position: relative;
}

.search-wrapper .form-control {
  height: 52px;
  border-radius: 26px;
  padding-left: 48px;
  padding-right: 56px;
  font-size: 16px;
  border: 2px solid #e5e7eb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-wrapper .form-control:focus {
  border-color: var(--bs-success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.search-wrapper .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
}

.search-wrapper .btn-search {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   27. DATATABLE PAGINATION - MOBILE FRIENDLY
   ============================================================================ */

.dataTables_paginate {
  padding: 20px 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.dataTables_paginate .paginate_button {
  min-width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  border-radius: 12px !important;
  margin: 0 4px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.dataTables_paginate .paginate_button.current {
  background: var(--bs-success) !important;
  border-color: var(--bs-success) !important;
  color: white !important;
}

.dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  background: rgba(22, 163, 74, 0.1) !important;
  border-color: var(--bs-success) !important;
  color: var(--bs-success) !important;
}

/* Hide DataTables info on mobile for cleaner look */
@media (max-width: 575.98px) {
  .dataTables_info {
    display: none !important;
  }
}

/* ============================================================================
   IPHONE 14 PRO MAX & WEBVIEW COMPATIBILITY
   ============================================================================ */

/* iPhone 14 Pro Max portrait (430 x 932 @ 3x) */
@media only screen
    and (device-width: 430px)
    and (device-height: 932px)
    and (-webkit-device-pixel-ratio: 3) {

    /* Hero section - account for Dynamic Island */
    .hero-mobile {
        padding-top: 59px;
    }
}

/* All large iPhones (Pro Max models: 414px-430px) */
@media only screen and (min-width: 414px) and (max-width: 430px) {
    .mobile-card img {
        height: 200px;
    }

    .gallery-grid img {
        height: 140px;
    }

    .map-container {
        height: 350px;
    }
}

/* ============================================================================
   GENERAL MOBILE RESPONSIVE IMPROVEMENTS
   ============================================================================ */

@media (max-width: 576px) {
    /* Full-width containers on mobile */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Cards fill width */
    .mobile-card {
        margin-left: 0;
        margin-right: 0;
    }

    /* Responsive font sizes */
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    h4, .h4 { font-size: 1.1rem; }
    h5, .h5 { font-size: 1rem; }
    h6, .h6 { font-size: 0.9rem; }

    /* Input font size 16px to prevent iOS zoom on focus */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Full-width buttons on mobile */
    .btn-block-mobile {
        display: block;
        width: 100%;
    }
}

/* ============================================================================
   DATATABLE MOBILE WEBVIEW COMPATIBILITY
   ============================================================================ */

/* Hide DataTable search/length on mobile - custom UI handles this */
@media (max-width: 768px) {
    .dataTables_filter,
    .dataTables_length {
        display: none !important;
    }
}

/* Full-width table wrapper */
.dataTables_wrapper {
    width: 100%;
    overflow: visible;
}

/* Remove table borders for card-based display */
#placesTable,
#favoritesTable,
#searchTable {
    border: none !important;
    background: transparent !important;
}

#placesTable thead,
#favoritesTable thead,
#searchTable thead {
    display: none !important;
}

#placesTable tbody tr,
#favoritesTable tbody tr,
#searchTable tbody tr {
    display: block;
    background: transparent !important;
    border: none !important;
}

#placesTable tbody td,
#favoritesTable tbody td,
#searchTable tbody td {
    display: block;
    padding: 0 !important;
    border: none !important;
}

/* Pagination touch-friendly improvements */
@media (max-width: 576px) {
    .dataTables_paginate {
        padding: 20px 16px !important;
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    .dataTables_paginate .paginate_button {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }
}

/* ============================================================================
   WEBVIEW-SPECIFIC TOUCH ENHANCEMENTS
   ============================================================================ */

/* Ensure all clickable elements have proper touch feedback */
.btn,
.card,
.mobile-card,
.list-group-item,
.nav-link {
    -webkit-tap-highlight-color: rgba(22, 163, 74, 0.2);
}

/* Smooth transitions for touch interactions */
.btn,
.card,
.mobile-card {
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

/* Active state for touch feedback */
.btn:active,
.card:active,
.mobile-card:active {
    transform: scale(0.98);
}

/* Prevent text selection on interactive elements */
.btn,
.nav-link,
.pagination,
.mobile-card {
    -webkit-user-select: none;
    user-select: none;
}

/* Allow text selection in content areas */
.content-body,
.description,
article,
p {
    -webkit-user-select: text;
    user-select: text;
}

/* ============================================================================
   MOBILE INFINITE SCROLL
   ============================================================================ */

/* Cards container */
#places-container,
#favorites-container,
#search-container {
    min-height: 200px;
}

/* Infinite scroll loader - bottom spinner */
.infinite-scroll-loader {
    padding: 20px 0;
    text-align: center;
}

.infinite-scroll-loader .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Sentinel - invisible trigger element */
.infinite-scroll-sentinel {
    height: 1px;
    width: 100%;
}

/* End of content message */
.infinite-scroll-end {
    padding: 30px 16px;
    font-size: 14px;
    color: var(--bs-secondary);
    text-align: center;
}

.infinite-scroll-end i {
    display: block;
    margin-bottom: 8px;
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Smooth card entry animation for infinite scroll */
.mobile-card.fade-in {
    animation: mobileCardFadeIn 0.3s ease-out forwards;
}

@keyframes mobileCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for skeleton */
.skeleton-loading {
    pointer-events: none;
}

/* Hide DataTables wrapper completely when using infinite scroll */
.dataTables_wrapper.no-pagination .dataTables_paginate {
    display: none !important;
}

/* ============================================================================
   IPHONE 14 PRO MAX MOBILE RESPONSIVENESS IMPROVEMENTS
   ============================================================================ */

/* 1. TOUCH TARGET IMPROVEMENTS - 44px minimum (Apple HIG) */

/* Offcanvas navigation links */
.offcanvas .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Collapsible menu items in offcanvas */
.offcanvas .collapse .nav-link,
.offcanvas .collapsing .nav-link {
    min-height: 44px;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

/* Filter and action buttons on mobile */
@media (max-width: 576px) {
    .btn-outline-secondary,
    .btn-outline-success {
        min-height: 44px;
        min-width: 44px;
    }

    /* Search input touch target */
    .input-group .form-control,
    .input-group .btn {
        min-height: 44px;
    }

    /* Dropdown toggle buttons */
    .dropdown-toggle {
        min-height: 44px;
    }
}

/* 2. CONTAINER PADDING - Increased for iPhone 14 Pro Max */
@media (min-width: 414px) and (max-width: 430px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 3. SAFE AREA HANDLING - iOS notch and home indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    footer.mt-auto {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    }

    .offcanvas-body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    /* Fixed bottom elements */
    .fixed-bottom,
    .sticky-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 4. SCROLL SNAP - Smoother horizontal scrolling */
.municipality-track {
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1rem;
}

.municipality-slide {
    scroll-snap-align: start;
}

.filters-scroll {
    scroll-snap-type: x mandatory;
    scroll-padding-left: 12px;
}

.filters-scroll .btn-filter,
.filters-scroll > * {
    scroll-snap-align: start;
}

/* ============================================================================
   FOOTER 2-COLUMN MOBILE LAYOUT
   ============================================================================ */

/* Force 2-column footer on mobile */
@media (max-width: 767.98px) {
    footer .row > div[class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Keep branding section full width */
    footer .row > div:first-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Reduce footer padding on mobile */
    footer.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    footer h6 {
        font-size: 0.875rem;
        margin-bottom: 0.75rem !important;
    }

    footer .list-unstyled li {
        margin-bottom: 0.375rem !important;
    }

    footer .list-unstyled.small {
        font-size: 0.75rem;
    }
}
