/* Joy - Custom Design Variables from Figma */

:root {
  /* Colors */
  --primary-main: #004eb8;
  --primary-contrast: #ffffff;
  --white: #ffffff;
  --black: #000000;
  --text-secondary: #1e1e1e;
  --gray-surface: #ffffff;
  --gray-on-surface: #181818;
  --gray-on-surface-variant: #454545;
  --grey-200: #eeeeee;
  --grey-400: #bdbdbd;
  --grey-500: #9e9e9e;
  --text-disabled: #cbcbcb;
  --background-paper-elevation-1: #ffffff;
  
  /* Typography */
  --font-family-h5: 'Poppins', sans-serif;
  --font-family-subtitle2: 'Poppins', sans-serif;
  --font-family-inter-tight: 'Inter Tight', sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-light: 300;
  
  /* Spacing */
  --cell-large: 12px;
  
  /* Transform variables */
  --transform-inner-width: 1;
  --transform-inner-height: 1;
}

/* Font Imports - Match Figma exactly */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter+Tight:wght@400;500;600&display=swap');

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400; /* Regular */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Font Family Classes to Match Figma */
.font-poppins-regular {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
}

.font-poppins-medium {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.font-poppins-semibold {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.font-poppins-light {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
}

.font-inter-tight-regular {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 400;
}

.font-inter-tight-medium {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
}

/* Custom Utilities */
.content-stretch {
  align-content: stretch;
}

.object-50-50 {
  object-position: 50% 50%;
}

/* Smooth transitions */
button, a {
  transition: all 0.3s ease;
}

button:hover, a:hover {
  opacity: 0.9;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-main);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #003a87;
}

/* Input Focus Styles */
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-main);
  outline-offset: 2px;
}

/* Card Hover Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 78, 184, 0.15);
}

/* Partner Logos - Grayscale Effect */
.partner-logo {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Image Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

img {
  animation: fadeIn 0.5s ease-in;
}

/* Hero Video Background */
video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Ensure video doesn't interfere with layout */
section video {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Elegant Dining Image Replacement */
#fullElegantDiningImage {
  z-index: 1;
}

#joyLogoClickable {
  z-index: 2;
  transition: opacity 0.8s ease;
}

#logoTransitionSection.replaced #joyLogoClickable {
  opacity: 0;
  pointer-events: none;
}

/* Expanded Image Styling */
#expandedElegantDiningImg {
  will-change: transform, object-fit;
}

/* Text Overlay Styling */
#elegantDiningText {
  z-index: 10;
  /* max-width: calc(100% - 40px); */
  width: 100%;
  opacity: 1;
  font-size: 46px;
  font-weight: 500;
}

#fullElegantDiningImage.group:hover #elegantDiningText {
  opacity: 1 !important;
}

.elegant-dining-text-bg {
  /* background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0.9) 100%); */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.8) 100%
  );

  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
}

#elegantDiningText > div {
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  width: 100%;
  /* height: 287px; */
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  #elegantDiningText {
    /* max-width: calc(100% - 80px); */
    width: 100%;

  }
  #elegantDiningText > div {
    height: 227px;

  }
}

@media (min-width: 1024px) {
  #elegantDiningText {
    /* max-width: 600px; */
    width: 100%;

  }
}


/* Carousel Styles */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Services Carousel */
.services-carousel-content {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.services-carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.services-carousel-track .service-item {
  flex: 0 0 100%;
  width: 100%;
}

/* Button Styles */
.btn-primary {
  background: var(--primary-main);
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #003a87;
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Disabled Carousel Button Styles */
button[id*="prevBtn"]:disabled,
button[id*="nextBtn"]:disabled,
button#servicesPrevBtn:disabled,
button#servicesNextBtn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

button[id*="prevBtn"]:disabled:hover,
button[id*="nextBtn"]:disabled:hover,
button#servicesPrevBtn:disabled:hover,
button#servicesNextBtn:disabled:hover {
  opacity: 0.5 !important;
  background: inherit !important;
  transform: none !important;
}

/* Responsive utilities */
@media (max-width: 1440px) {
  .container-main {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 768px) {
  .container-main {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Language Selector Dropdown */
.language-dropdown {
  position: relative;
}

.language-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 150px;
}

/* Opening downward (default) */
.language-dropdown-menu.down {
  top: 100%;
  margin-top: 8px;
}

/* Opening upward */
.language-dropdown-menu.up {
  bottom: 100%;
  margin-bottom: 8px;
}

.language-dropdown-menu.active {
  display: block;
}

.language-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 12px;

}

.language-dropdown-item:hover {
  background: #f5f5f5;
  border-radius: 12px;

}


/* Form Input Styles */
.form-input {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-main);
  box-shadow: 0 0 0 2px rgba(0, 78, 184, 0.1);
}

.form-input.error {
  border-color: #d32f2f;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.form-input.error:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

.form-error {
  color: #d32f2f;
  font-size: 11px;
  margin-top: 4px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  line-height: 1.4;
  animation: slideDown 0.3s ease;
}

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

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success State */
.success-message {
  background: #4caf50;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  text-align: center;
}

/* Hide scrollbar for carousel */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Joy Logo Cutout Effect - Transparent logo showing background image through */
.joy-logo-cutout {
  position: relative;
  isolation: isolate;
}

/* Background image masked by logo shape - Reveals image through logo letters */
.joy-logo-mask {
  /* Use the logo PNG as a mask to reveal the background image */
  -webkit-mask-image: url('../images/logos/joy-logo-large.png');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url('../images/logos/joy-logo-large.png');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  display: block;
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */

/* Mobile Menu Animation */
#mobileMenu.active {
  display: flex !important;
}

#mobileMenuBtn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenuBtn.active span:nth-child(2) {
  opacity: 0;
}

#mobileMenuBtn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Scrollbar Hiding for Mobile Carousels */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Zoom and Scaling Fixes */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Prevent layout breaks at different zoom levels */
section {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Ensure containers scale properly */
.max-w-\[1280px\],
.max-w-\[1440px\] {
  max-width: min(1280px, 95vw);
  box-sizing: border-box;
}

.max-w-\[1440px\] {
  max-width: min(1440px, 100vw);
}

/* Fix carousel widths to prevent overflow */
#eventsCarousel,
#galleryCarousel {
  max-width: 100%;
  box-sizing: border-box;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Smooth scroll for touch devices */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Critical: Ensure no horizontal overflow for both LTR and RTL */
html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

html[dir="rtl"] {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Prevent sections from overflowing */
section {
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

  /* Optimize text rendering on mobile */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Prevent any border artifacts */
  section {
    box-sizing: border-box;
  }
  
  /* Force full width on mobile */
  section[class*="hero"] {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* Additional zoom-level fixes */
@media (min-width: 768px) {
  /* Ensure hero section scales properly */
  section[class*="h-[600px]"],
  section[class*="h-[800px]"] {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Fix services section width */
  section[class*="md:h-[895px]"] {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Ensure carousels don't overflow */
  .overflow-x-auto {
    max-width: 100%;
  }

  /* Fix absolute positioned elements */
  .absolute[class*="md:left-1/2"] {
    max-width: 95vw;
  }

  @media (min-width: 1440px) {
    .absolute[class*="md:left-1/2"] {
      max-width: 1416px;
    }
  }
}

