/* Villazul Landing Page Custom Styles */

/* Wallpaper pattern backgrounds - DRY implementation */

/* Base pattern utility classes */
.bg-pattern-wallpaper {
  position: relative;
}

.bg-pattern-wallpaper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../static/images/6c98d1931d7bd9f91ae2b0bc497c196a063d8322.png");
  background-size: 40px 53px;
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
}

.bg-pattern-wallpaper > * {
  position: relative;
  z-index: 2;
}

/* Pattern variations */
.bg-pattern-dots::before {
  background-image: url("../static/images/11bab1ac56f097bc20a2de2bb2eedfa44e6390fa.png");
  background-size: 80px 80px;
  opacity: 0.03;
}

.bg-pattern-texture::before {
  background-image: url("../static/images/e29a263b3b00a0e6a8cf12490e9f361c051d51f7.png");
  background-size: 100px 100px;
  opacity: 0.025;
}

.bg-pattern-subtle::before {
  background-image: url("../static/images/e759378b06320423bd75439a0ddb78f19995cc34.png");
  background-size: 60px 60px;
  opacity: 0.02;
}

/* Specific section patterns */
.section-gray-pattern {
  background-color: #f2f2f2;
}

.section-blue-pattern {
  background-color: #295892;
}

.section-blue-pattern::before {
  opacity: 0.06;
  filter: invert(1) brightness(2);
}

.section-green-pattern {
  background: linear-gradient(to bottom, #75b84f, #4f7d36);
}

.section-green-pattern::before {
  opacity: 0.05;
  filter: invert(1) brightness(1.8);
}

/* Header responsive styles */
.header-nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.header-nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #163051;
  transition: width 0.3s ease;
}

.header-nav-link:hover::after {
  width: 100%;
}

/* Smooth transitions for responsive elements */
.header-transition {
  transition: all 0.3s ease-in-out;
}

/* Desktop CTA button hover effect */
.desktop-cta-hover {
  transition: all 0.3s ease;
  transform: translateY(0);
}

.desktop-cta-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(41, 88, 146, 0.3);
}

/* Hero responsive styles */
.hero-transition {
  transition: all 0.5s ease-in-out;
}

/* Desktop hero image mask */
.hero-mask {
  mask-image: url("../static/images/22a3eac462466784154275aafcfbfc99fd541d57.svg");
  mask-size: 239px 46.456px;
  mask-position: 187px 260.544px;
  mask-repeat: no-repeat;
  mask-clip: border-box;
  mask-composite: intersect;
}

/* Smooth height transition for hero */
.hero-height-transition {
  transition: height 0.5s ease-in-out, min-height 0.5s ease-in-out;
}

/* Four Pillars responsive styles */
.pillars-transition {
  transition: all 0.5s ease-in-out;
}

/* Pillar hover effects */
.pillar-item {
  transition: all 0.3s ease;
}

.pillar-item:hover {
  transform: translateY(-2px);
}

/* Smooth layout transition for desktop */
.pillars-layout-transition {
  transition: flex-direction 0.5s ease-in-out, height 0.5s ease-in-out;
}

/* Residents Gallery responsive styles */
.gallery-transition {
  transition: all 0.5s ease-in-out;
}

/* Smooth layout transition for gallery */
.gallery-layout-transition {
  transition: flex-direction 0.5s ease-in-out, height 0.5s ease-in-out;
}

/* Medical Care responsive styles */
.medical-transition {
  transition: all 0.3s ease-in-out;
}

.medical-layout-transition {
  transition: layout 0.3s ease-in-out;
}

.medical-service-item {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  cursor: pointer;
  background-color: transparent !important;
}

.medical-service-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: transparent !important;
}

.medical-service-item img {
  transition: all 0.3s ease-in-out;
}

.medical-service-item:hover img {
  transform: scale(1.05);
}

/* Ensure transparent background for medical service elements */
.medical-service-item,
.medical-service-item *,
.medical-service-item:hover,
.medical-service-item:hover * {
  background-color: transparent !important;
}

/* Only the image divs should have their background images */
.medical-service-item div[style*="background-image"] {
  background-color: transparent !important;
}

/* ===== MOBILE MENU STYLES ===== */

/* Mobile menu button accessibility */
#mobile-menu-button {
  outline: none;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#mobile-menu-button:focus {
  outline: 2px solid #295892;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile menu overlay */
#mobile-menu-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Mobile menu panel */
#mobile-menu {
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Mobile menu navigation links */
.mobile-nav-link {
  text-decoration: none;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:focus {
  outline: 2px solid #295892;
  outline-offset: 2px;
  border-radius: 4px;
  background-color: rgba(41, 88, 146, 0.1);
}

.mobile-nav-link:active {
  background-color: rgba(41, 88, 146, 0.2);
}

/* Mobile CTA button in menu */
.mobile-cta-button {
  text-decoration: none;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-cta-button:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.mobile-cta-button:active {
  transform: scale(0.98);
  background-color: #163051 !important;
}

/* Ensure proper z-index stacking */
#mobile-menu-button {
  z-index: 60;
}

#mobile-menu-overlay {
  z-index: 40;
}

#mobile-menu {
  z-index: 50;
}

/* Smooth scrolling for iOS Safari */
@supports (-webkit-overflow-scrolling: touch) {
  #mobile-menu {
    -webkit-overflow-scrolling: touch;
  }
}

/* Prevent text selection in menu */
#mobile-menu-button,
#mobile-menu {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #mobile-menu {
    border-left: 2px solid #000;
  }

  .mobile-nav-link {
    border-color: #000 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #mobile-menu-overlay,
  #mobile-menu,
  #hamburger-icon,
  #close-icon {
    transition: none !important;
  }
}
