:root {
  --primary-bg: #f2f2f2;
  --secondary-bg: #eae4d5;
  --accent-color: #b6b09f;
  --text-color: #000000;
  --hover-color: #b6b09f;
  --card-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --transition-duration: 2s;
  --path-length: 157px;
  --animation-duration: 0.3s;
  --high-refresh-rate: 120;
}

/* Detect high refresh rate screens */
@media (min-resolution: 120dpi), (min-resolution: 2dppx) {
  :root {
    --animation-duration: 0.15s;
  }
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--primary-bg);
  margin: 0;
  color: var(--text-color);
  overflow-x: hidden;
  width: 100%;
  position: relative;
  margin: 0 auto;
  max-width: 1920px; /* Maximum width for ultra-wide screens */
}

header {
  background: var(--card-bg);
  padding: 0;
  text-align: center;
  border-bottom: 1px solid var(--accent-color);
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  contain: layout paint style;
  content-visibility: auto;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  padding: 0.3rem 2rem;
  min-height: 40px;
  position: relative;
  z-index: 1001;
  margin: 0;
  border-bottom: 1px solid var(--accent-color);
  margin: 0 auto;
  max-width: 1920px;
  box-sizing: border-box;
}

.logo {
  height: 100px;
  margin: -10px 0 -20px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1001;
}

.logo picture {
  height: 100%;
  display: block;
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-url {
  font-size: 0.9rem;
  color: #666;
}

.logo-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-color);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, background 0.2s;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.main-nav a:hover {
  color: var(--card-bg);
  background: var(--accent-color);
}

/* Clean .welcome section: no background-image at any screen size */
.welcome {
  line-height: 0;
  background: none !important;
}

.welcome img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Loading Animation Styles */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-animation {
  overflow: visible;
  width: 100px;
  height: 150px;
}

.loading-animation g {
  animation: slide var(--transition-duration) linear infinite;
}

.loading-animation g:nth-child(2) {
  animation-delay: calc(var(--transition-duration) / 4);
}

.loading-animation g:nth-child(2) path {
  animation-delay: calc(var(--transition-duration) / 4);
  stroke-dasharray: 0px calc(var(--path-length) + 1);
  stroke-dashoffset: 1px;
}

.loading-animation path {
  stroke: url(#gradient);
  stroke-width: 20px;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 0 var(--path-length);
  stroke-dashoffset: 0;
  animation: escalade var(--transition-duration) cubic-bezier(0.8, 0, 0.2, 1) infinite;
}

@keyframes slide {
  0% {
    transform: translateY(-50px);
  }
  100% {
    transform: translateY(50px);
  }
}

@keyframes escalade {
  0% {
    stroke-dasharray: 0 var(--path-length);
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: var(--path-length) var(--path-length);
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dasharray: var(--path-length) var(--path-length);
    stroke-dashoffset: calc(-1 * (var(--path-length) - 1));
  }
}

.gallery-loading {
  text-align: center;
  padding: 2rem;
  font-size: 1.2rem;
  color: var(--text-color);
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow-color);
  margin: 2rem auto;
  width: fit-content;
  animation: fadeIn 0.3s ease-out;
}

.gallery {
  columns: 4;
  column-gap: 8px;
  padding: 8px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
  contain: layout paint style;
  min-height: 200px;
  opacity: 0;
  animation: fadeIn var(--animation-duration) ease-out forwards;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  perspective: 1000;
  -webkit-perspective: 1000;
  isolation: isolate;
  content-visibility: auto;
}

.item {
  break-inside: avoid;
  margin-bottom: 8px;
  display: block;
  width: 100%;
  background: var(--card-bg);
  border-radius: 0;
  box-shadow: 0 2px 8px var(--shadow-color);
  overflow: hidden;
  text-align: center;
  padding: 0;
  cursor: pointer;
  transition: transform var(--animation-duration) ease-out;
  position: relative;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  opacity: 0;
  animation: fadeIn var(--animation-duration) ease-out forwards;
  contain: layout paint style;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  perspective: 1000;
  -webkit-perspective: 1000;
  isolation: isolate;
  content-visibility: auto;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  margin: 0;
  padding: 0;
  object-fit: cover;
  will-change: opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  content-visibility: auto;
  opacity: 0;
  transition: opacity var(--animation-duration) ease-out;
  background: #f5f5f5;
  contain: layout paint style;
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  perspective: 1000;
  -webkit-perspective: 1000;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  isolation: isolate;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.gallery-image.loaded {
  opacity: 1;
  background: transparent;
}

.image-loading-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: opacity var(--animation-duration) ease-out;
  will-change: opacity;
  animation: pulse calc(var(--animation-duration) * 5) ease-in-out infinite;
  opacity: 1;
}

.image-loading-animation.fade-out {
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.95);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.95);
  }
}

.loader-gif {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

footer {
  background: var(--card-bg);
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--accent-color);
}

.social-links {
  margin-bottom: 2rem;
}

.social-links h3 {
  color: var(--text-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease, color 0.3s ease;
  padding: 1rem;
  border-radius: 12px;
  background: var(--secondary-bg);
  min-width: 120px;
}

.social-icon:hover {
  transform: translateY(-5px);
  color: var(--accent-color);
}

.social-icon i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.social-icon span {
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-content {
  margin-top: 2rem;
  color: #666;
  font-size: 0.9rem;
}

/* Social Media Colors */
.fa-instagram {
  background: -webkit-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fa-facebook {
  color: #1877f2;
}

.fa-whatsapp {
  color: #25d366;
}

/* Responsive styles for social media */
@media (max-width: 600px) {
  .social-icons {
    gap: 1rem;
  }

  .social-icon {
    min-width: 100px;
    padding: 0.8rem;
  }

  .social-icon i {
    font-size: 1.5rem;
  }

  .social-icon span {
    font-size: 0.8rem;
  }
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  will-change: opacity;
  opacity: 0;
  transition: opacity var(--animation-duration) ease-out;
}

.lightbox.active {
  display: block;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: zoom-in;
  transition: transform var(--animation-duration) ease-out, opacity var(--animation-duration) ease-out;
  will-change: transform;
  opacity: 0;
  transition: opacity var(--animation-duration) ease-out, transform var(--animation-duration) ease-out;
}

/* Smooth transition for image changes */
.lightbox-content.transitioning {
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(0.98);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.lightbox.active .lightbox-content {
  opacity: 1;
}

.lightbox-content.zoomed {
  cursor: zoom-out;
  transform: translate(-50%, -50%) scale(1.4);
}

.close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.lightbox.active .close {
  opacity: 1;
}

.close:hover {
  background: rgba(0, 0, 0, 0.8);
}

#lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.lightbox.active #lightbox-caption {
  opacity: 1;
}

/* Navigation buttons for lightbox */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #f1f1f1;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 15px 12px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 1001;
}

.lightbox.active .nav-btn {
  opacity: 1;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.3);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

/* Responsive navigation buttons */
@media (max-width: 768px) {
  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    padding: 10px 8px;
  }
  
  .prev-btn {
    left: 10px;
  }
  
  .next-btn {
    right: 10px;
  }
}

/* Lightbox counter */
.lightbox-counter {
  position: fixed;
  top: 20px;
  left: 20px;
  color: #f1f1f1;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.lightbox.active .lightbox-counter {
  opacity: 1;
}

@media (max-width: 900px) {
  .main-nav {
    padding: 0.2rem 1.5rem;
    min-height: 38px;
  }
  
  .logo {
    height: 80px;
  }
  
  .logo img {
    height: 100%;
  }
  
  .logo-url {
    font-size: 0.8rem;
  }
  
  .logo-title {
    font-size: 1.1rem;
  }
  
  .main-nav ul {
    gap: 1.2rem;
  }
  
  .main-nav a {
    padding: 0.3rem 0.6rem;
  }

  .welcome {
    width: 100vw;
    margin: 0;
    padding: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
  }
  .welcome img {
    max-height: 54vh;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
  }
  .gallery {
    columns: 2;
    column-gap: 1rem;
    padding: 1rem;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
    isolation: isolate;
    contain: layout paint style;
    content-visibility: auto;
  }
  .item {
    margin-bottom: 1rem;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    isolation: isolate;
    contain: layout paint style;
    content-visibility: auto;
  }
  .gallery-image {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    isolation: isolate;
    contain: layout paint style;
    content-visibility: auto;
  }
}

/* Use the TALL image for PORTRAIT (tall) screens */
@media (max-width: 900px) and (orientation: portrait) {
  .welcome {
    background-image: url('image/mobile welcome.jpg');
  }
}

/* Use the WIDE image for LANDSCAPE (wide) screens */
@media (max-width: 900px) and (orientation: landscape) {
  .welcome {
    height: auto;
    background: none !important;
  }
}

/* Ensure all smaller devices use 'cover' to prevent black bars */
@media (max-width: 900px) {
  .welcome {
    background-size: cover;
  }
}

/* Mobile Navigation Improvements (Consolidated) */
@media (max-width: 768px) {
  .main-nav ul {
    display: none; /* Hide on mobile */
  }
}

/* Ensure desktop navigation is shown and hamburger is hidden on larger screens */
@media (min-width: 769px) {
  .main-nav ul {
    display: flex;
    transform: translateX(0);
    visibility: visible;
  }

  /* Removed .hamburger, .mobile-menu-header, .close-menu styles */
}

/* Hamburger open animation styles */
/* Removed .hamburger.open span styles */

/* Hide mobile menu specific elements on desktop */
/* Removed .mobile-menu-header, .close-menu styles */

.gallery-section {
  margin-bottom: 2.5rem;
}

.gallery-section h3 {
  font-size: 1.4rem;
  color: #ff6f61;
  margin-bottom: 1.2rem;
  margin-top: 0;
  text-align: left;
  letter-spacing: 1px;
}

.gallery-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 3rem 0 2rem 0;
  flex-wrap: wrap;
}
.gallery-filter button {
  background: var(--card-bg);
  border: 1px solid var(--accent-color);
  color: var(--text-color);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gallery-filter button.active,
.gallery-filter button:hover {
  background: var(--accent-color);
  color: var(--card-bg);
}

/* Services Section */
.services {
  padding: 4rem 2rem;
  margin: 0 auto;
  background: var(--primary-bg);
  max-width: 1600px;
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 0 auto;
  max-width: 1400px;
}

.service-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow-color);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card h3 {
  padding: 1.5rem 1.5rem 0.5rem;
  color: #222;
  font-size: 1.3rem;
}

.service-card p {
  padding: 0 1.5rem 1.5rem;
  color: #666;
  line-height: 1.6;
}

.flickr-embed {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flickr-embed img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.flickr-embed img:hover {
  transform: scale(1.02);
}

.flickr-embed a {
  display: block;
  width: 100%;
}

/* About Section */
.about {
  padding: 4rem 2rem;
  margin: 0 auto;
  background: var(--secondary-bg);
  max-width: 1600px;
}

.about-content {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
}

.about-text h2 {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature h3 {
  color: #222;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.feature p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.about-image {
  width: 100%;
  height: 100%;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.about-image picture {
  width: 100%;
  height: 100%;
  display: block;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .services {
    padding: 3rem 1.5rem;
  }
  
  .services h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-image {
    order: -1;
    min-height: 300px;
  }
  
  .about-image img {
    max-height: 400px;
  }
}

@media (max-width: 600px) {
  .services {
    padding: 2rem 1rem;
  }
  
  .services h2 {
    font-size: 1.8rem;
  }
  
  .service-card img {
    height: 180px;
  }
  
  .about {
    padding: 2rem 1rem;
  }
  
  .about-text h2 {
    font-size: 1.8rem;
  }
  
  .about-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .about-image {
    min-height: 250px;
  }
}

.show-more-container {
  text-align: center;
  margin: 2rem auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.show-more-btn {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: var(--card-bg);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  min-width: 120px;
}

.show-more-btn:hover {
  background-color: var(--text-color);
}

.gallery-item {
  display: none;
}

.gallery-item.show {
  display: block;
}

/* Location Section Styles */
.location {
  padding: 4rem 2rem;
  margin: 0 auto;
  background: var(--primary-bg);
  max-width: 1600px;
}

.location h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 3rem;
}

.location-container {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1400px;
}

.map-container {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow-color);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.location-info {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow-color);
}

.location-info h3 {
  color: #222;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  color: #666;
}

.info-item i {
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-right: 1rem;
  margin-top: 0.2rem;
}

.info-item p {
  margin: 0;
  line-height: 1.6;
  font-size: 1.1rem;
}

/* Responsive styles for location section */
@media (max-width: 900px) {
  .location {
    padding: 3rem 1.5rem;
  }
  
  .location h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .location-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .map-container {
    height: 350px;
  }
}

@media (max-width: 600px) {
  .location {
    padding: 2rem 1rem;
  }
  
  .location h2 {
    font-size: 1.8rem;
  }
  
  .map-container {
    height: 300px;
  }
  
  .location-info {
    padding: 1.5rem;
  }
  
  .location-info h3 {
    font-size: 1.5rem;
  }
  
  .info-item p {
    font-size: 1rem;
  }
}

@media (min-width: 1600px) and (max-width: 1919px) {
  .gallery {
    column-count: 5;
    column-gap: 2.5rem;
    max-width: 1600px;
  }
  
  .item {
    margin-bottom: 2.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1400px;
  }
  
  .about-content {
    gap: 4rem;
    max-width: 1400px;
  }
  
  .location-container {
    gap: 4rem;
    max-width: 1400px;
  }
}

@media (min-width: 1920px) {
  .gallery {
    column-count: 6;
    column-gap: 3rem;
    max-width: 1800px;
  }
  
  .item {
    margin-bottom: 3rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    max-width: 1600px;
  }
  
  .about-content {
    gap: 6rem;
    max-width: 1600px;
  }
  
  .location-container {
    gap: 6rem;
    max-width: 1600px;
  }
}

/* Main content container */
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  contain: layout paint style;
  content-visibility: auto;
}

/* Responsive adjustments for large screens */
@media (min-width: 1600px) and (max-width: 1919px) {
  .gallery {
    column-count: 5;
    column-gap: 2.5rem;
    max-width: 1600px;
  }
  
  .item {
    margin-bottom: 2.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1400px;
  }
  
  .about-content {
    gap: 4rem;
    max-width: 1400px;
  }
  
  .location-container {
    gap: 4rem;
    max-width: 1400px;
  }
}

/* Responsive adjustments for medium screens */
@media (max-width: 1200px) {
  main {
    padding: 0 1.5rem;
  }
  
  .gallery {
    columns: 3;
    column-gap: 6px;
    padding: 6px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Responsive adjustments for tablets */
@media (max-width: 900px) {
  main {
    padding: 0 1rem;
  }
  
  .gallery {
    columns: 2;
    column-gap: 4px;
    padding: 6px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .location-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .item {
    margin-bottom: 10px;
  }
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
  main {
    padding: 0 0.8rem;
  }
  
  .gallery {
    columns: 1;
    column-gap: 10px;
    padding: 10px;
  }
  
  .item {
    margin-bottom: 10px;
  }
  
  .services-grid {
    gap: 1.5rem;
  }
  
  .about-content {
    gap: 1.5rem;
  }
  
  .location-container {
    gap: 1.5rem;
  }
}

/* Accessibility Improvements */
:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --text-color: #000000;
    --accent-color: #0000FF;
    --hover-color: #0000FF;
  }

  .gallery-image {
    border: 2px solid #000000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optimize mobile performance */
@media (max-width: 900px) {
  .gallery {
    columns: 2;
    column-gap: 1rem;
    padding: 1rem;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
    isolation: isolate;
    contain: layout paint style;
    content-visibility: auto;
  }
  
  .item {
    margin-bottom: 1rem;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    isolation: isolate;
    contain: layout paint style;
    content-visibility: auto;
  }
  
  .gallery-image {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    isolation: isolate;
    contain: layout paint style;
    content-visibility: auto;
  }
}

/* Optimize touch devices */
@media (hover: none) {
  .gallery {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    contain: layout paint style;
    content-visibility: auto;
  }
  
  .item {
    touch-action: manipulation;
    contain: layout paint style;
    content-visibility: auto;
  }
}

/* Add hover effect */
.item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.item:hover .gallery-image {
  transform: scale(1.02);
  transition: transform 0.3s ease-out;
}

/* Add loading animation */
.image-loading-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: opacity var(--animation-duration) ease-out;
  will-change: opacity;
  animation: pulse calc(var(--animation-duration) * 5) ease-in-out infinite;
  opacity: 1;
}

/* Optimize for touch devices */
@media (hover: none) {
  .item:hover {
    transform: none;
    box-shadow: 0 2px 8px var(--shadow-color);
  }
  
  .item:hover .gallery-image {
    transform: none;
  }
}

/* Fix for landscape view on mobile and tablets */
@media (max-width: 900px) and (orientation: landscape) {
  .welcome {
    height: 54vh;
    background-size: cover; /* Fill the screen to remove black bars */
  }
}

@media (min-width: 901px) {
  .welcome {
    max-height: 60vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .welcome img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
  }
}