/* ==========================================================================
   Modern CSS Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-bg: #121212;
  --secondary-bg: #1E1E1E;
  --card-bg: #2A2A2A;
  --text-primary: #F0F0F0;
  --text-secondary: #A0A0A0;
  --accent-primary: #FFFFFF;
  /* Changed from blue to white */
  --accent-secondary: #EAEAEA;
  /* Changed from dark blue to light grey */
  --border-color: #444;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Roboto', sans-serif;

  --shadow-light: rgba(200, 200, 200, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.3);
  /* New variable for the white glow effect */
  --accent-glow: 0 0 12px rgba(255, 255, 255, 0.25);
  --shadow-accent: rgba(255, 255, 255, 0.15);
  /* Updated for white glow */

  --fancy-button-bg: #FFFFFF;
  --fancy-button-text: #1D1D1D;
  --fancy-button-hover-bg: #EAEAEA;
  --fancy-button-hover-text: #0077B5;
  /* Kept a subtle blue for button hover text */
  --fancy-button-icon-color: var(--fancy-button-text);
  --fancy-button-icon-hover-color: var(--fancy-button-hover-text);
  --fancy-button-shadow: rgba(0, 0, 0, 0.1);
  --fancy-button-hover-shadow: rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 1.3091rem + 3.4545vw, 3.2rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.8rem, 1.4545rem + 1.7273vw, 2.5rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.3rem, 1.1273rem + 0.8636vw, 1.5rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  text-shadow: var(--accent-glow);
  /* Added glow to links */
}

a:hover {
  color: var(--accent-secondary);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  /* Enhanced glow on hover */
}

/* Accessibility Improvement */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2.5rem;
  background: var(--secondary-bg);
  box-shadow: 0 2px 10px var(--shadow-medium);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: nowrap;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  max-height: 80px;
  transition: transform 0.3s ease;
  display: block;
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

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

.nav-links a {
  position: relative;
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  padding: 0.5rem 0.25rem;
  white-space: nowrap;
  text-shadow: none;
  /* Remove default glow from nav links for clarity */
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 3px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-primary);
  transition: width 0.4s ease;
  border-radius: 2px;
  box-shadow: var(--accent-glow);
  /* Add glow to the underline */
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent-primary);
  text-shadow: var(--accent-glow);
  /* Add glow to active link text */
}

#mobile-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
  margin-left: 1.5rem;
}

/* ==========================================================================
   Hero Section (index.html - Logo Hero)
   ========================================================================== */
.hero-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 70vh;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-bg);
}

.hero-logo {
  max-width: 280px;
  width: 60%;
  height: auto;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(-40px) scale(0.95);
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
  /* Updated glow for logo */
}

.hero-logo.slide-in-hero-logo {
  animation: slideInHeroLogoAnimation 1s ease-out forwards;
}

@keyframes slideInHeroLogoAnimation {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-container h1,
.hero-container p,
.hero-container .fancy-button {
  opacity: 0;
}

.hero-container.animate-hero h1 {
  animation: fadeInUpHeroText 0.8s ease-out 0.3s forwards;
}

.hero-container.animate-hero p {
  animation: fadeInUpHeroText 0.8s ease-out 0.6s forwards;
}

.hero-container.animate-hero .fancy-button {
  animation: fadeInUpButtonHero 0.8s ease-out 0.9s forwards;
}

@keyframes fadeInUpHeroText {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpButtonHero {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-container h1 {
  font-weight: 700;
  text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.hero-container p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: #D0D0D0;
  max-width: 700px;
}

/* ==========================================================================
   Hero Section (services.html - Video Hero)
   ========================================================================== */
.hero {
  position: relative;
  color: var(--text-primary);
  text-align: center;
  padding: 8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-video-wrapper video,
.hero-video-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 1.3818rem + 4.0909vw, 3.5rem);
  font-weight: 700;
  text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: #D0D0D0;
}

/* ==========================================================================
   Buttons (Fancy CTA Button)
   ========================================================================== */
.fancy-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fancy-button-text);
  background: var(--fancy-button-bg);
  border: 2px solid var(--fancy-button-text);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 10px var(--fancy-button-shadow);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.fancy-button .button-label {
  position: relative;
  z-index: 2;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fancy-button::after {
  content: '\f061';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%) translateX(30px);
  color: var(--fancy-button-icon-color);
  opacity: 0;
  font-size: 1em;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s ease;
  z-index: 1;
}

.fancy-button:hover {
  background-color: var(--fancy-button-hover-bg);
  color: var(--fancy-button-hover-text);
  border-color: var(--fancy-button-hover-text);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 15px var(--fancy-button-hover-shadow);
}

.fancy-button:hover .button-label {
  transform: translateX(-12px);
}

.fancy-button:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(-2px);
  color: var(--fancy-button-icon-hover-color);
}

.fancy-button:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 2px 8px var(--fancy-button-shadow);
}

/* ==========================================================================
   General Sections & Cards
   ========================================================================== */
.section {
  padding: 5rem 2rem;
  text-align: center;
}

.section:nth-of-type(even) {
  background-color: var(--secondary-bg);
}

.section:not(.hero-container) h2 {
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section:not(.hero-container) h2::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 4px;
  background: var(--accent-primary);
  bottom: -10px;
  left: 20%;
  border-radius: 2px;
  box-shadow: var(--accent-glow);
  /* Add glow to the underline */
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-light);
  padding: 2.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
}

.card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 8px var(--shadow-light);
}

.card i {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  text-align: center;
  width: 100%;
  text-shadow: var(--accent-glow);
  /* Add glow to icons */
}

.card h3 {
  color: var(--text-primary);
}

/* ==========================================================================
   Video Showcase Section
   ========================================================================== */
.video-showcase .video-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px var(--shadow-medium);
  border: 2px solid var(--border-color);
}

.video-showcase video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2.39 / 1;
  /* More cinematic aspect ratio for desktop */
}

/* ==========================================================================
   Specific Sections (Testimonials, Contact, About, Services, Gallery)
   ========================================================================== */
.testimonials {
  background-color: var(--primary-bg);
}

.testimonial-card {
  color: var(--text-secondary);
  font-style: italic;
  border-left: 6px solid var(--accent-primary);
  position: relative;
}

.testimonial-card::before {
  content: '\f10d';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 2rem;
  color: var(--accent-secondary);
  opacity: 0.5;
}

.testimonial-card h4 {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-style: normal;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.contact h2,
#quote h2 {
  margin-bottom: 1rem;
}

.contact p,
#quote p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

#quote iframe {
  width: 100%;
  min-height: 700px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-medium);
}

.about-intro p {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.8;
}

.about-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.about-gallery img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 6px 12px var(--shadow-medium);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  object-fit: cover;
  height: 200px;
}

.about-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 18px var(--shadow-accent);
}

.two-column {
  padding: 5rem 2rem;
}

.two-column-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.two-column-content>div {
  flex: 1;
  min-width: 300px;
}

.two-column .text {
  text-align: left;
}

.two-column .image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px var(--shadow-medium);
}

.carousel-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  width: 100%;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 700px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px var(--shadow-accent);
}

.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.carousel-track img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s ease, transform 0.3s ease;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 15px;
}

.carousel-btn.next {
  right: 15px;
}

.gallery-section {
  padding: 5rem 2rem;
  background-color: var(--primary-bg);
}

.gallery-section:nth-of-type(even) {
  background-color: var(--secondary-bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--shadow-light);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 25px var(--shadow-accent);
}

.gallery-item:hover img {
  transform: scale(1.15);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background-color: #0A0A0A;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  border-top: 3px solid var(--accent-primary);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

footer p {
  margin: 0;
  font-size: 0.95rem;
}

.footer-content div a {
  color: var(--text-secondary);
  font-size: 1.8rem;
  margin: 0 0.8rem;
  transition: color 0.3s ease, transform 0.3s ease;
  text-shadow: none;
  /* No glow on footer icons by default */
}

.footer-content div a:hover {
  color: var(--accent-primary);
  transform: scale(1.2) translateY(-2px);
  text-shadow: var(--accent-glow);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
  .navbar {
    padding: 0.75rem 1.5rem;
  }

  .logo img {
    max-height: 50px;
  }

  .nav-wrapper {
    margin-left: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  #mobile-menu {
    margin-left: 1rem;
  }

  .hero-container p {
    font-size: 1.1rem;
  }

  .hero-logo {
    max-width: 220px;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .fancy-button {
    padding: 0.8rem 1.8rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav-wrapper {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
    position: static;
  }

  /* === UPDATED CODE FOR SMOOTH ANIMATION === */
  /* This is the original mobile menu dropdown CSS */
  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--secondary-bg);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1rem 0;
    box-shadow: 0 5px 10px var(--shadow-medium);
    border-top: 1px solid var(--border-color);
    align-items: center;
    z-index: 999;

    /* Hide the menu by default and set up transition */
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  }

  .nav-links.active {
    /* Show the menu when active class is present */
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  /* === END OF UPDATED CODE === */

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
  }

  #mobile-menu {
    display: block;
    order: 2;
    margin-left: 0;
  }

  .hero-container {
    padding: 3rem 1.5rem;
    min-height: 60vh;
  }

  .hero-container p {
    font-size: 1rem;
  }

  .hero-logo {
    max-width: 200px;
    margin-bottom: 1.5rem;
  }

  .hero {
    padding: 6rem 1.5rem;
    min-height: 60vh;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .video-showcase video {
    aspect-ratio: 4 / 3;
    /* Taller aspect ratio for mobile */
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card {
    padding: 2rem;
  }

  .two-column-content {
    flex-direction: column;
  }

  .two-column .image {
    order: -1;
  }

  .carousel-track img {
    height: 300px;
  }

  .carousel-btn {
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }

  .carousel-btn.prev {
    left: 10px;
  }

  .carousel-btn.next {
    right: 10px;
  }

  .footer-content div a {
    font-size: 1.6rem;
    margin: 0 0.6rem;
  }

  #quote iframe {
    min-height: 600px;
  }
}

@media (max-width: 480px) {
  .logo img {
    max-height: 45px;
  }

  .navbar {
    padding: 0.75rem 1rem;
  }

  .hero-container {
    padding: 3rem 1rem;
    min-height: 55vh;
  }

  .hero-container p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .hero-logo {
    max-width: 180px;
    margin-bottom: 1.5rem;
  }

  .hero {
    padding: 5rem 1rem;
    min-height: 50vh;
  }

  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .fancy-button {
    padding: 0.9rem 1.8rem;
    font-size: 0.9rem;
    width: auto;
    max-width: 90%;
  }

  .section {
    padding: 3.5rem 1rem;
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .card h3 {
    font-size: 1.4rem;
  }

  .testimonial-card {
    padding: 2rem 1.5rem;
  }

  .testimonial-card p,
  .testimonial-card h4 {
    margin-left: 1.5rem;
  }

  .testimonial-card h4 {
    font-size: 0.95rem;
  }

  .gallery-item img {
    height: 240px;
  }

  .carousel-track img {
    height: 250px;
  }

  #quote iframe {
    min-height: 550px;
  }

  .footer-content {
    gap: 1rem;
  }

  footer {
    padding: 2.5rem 1rem;
  }
}


/* ==========================================================================
   Gallery Tabs
   ========================================================================== */
.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.tab-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-secondary);
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: none;
}

.tab-link:hover {
  background-color: var(--secondary-bg);
  color: var(--text-primary);
  border-color: var(--accent-secondary);
}

.tab-link.active {
  background-color: var(--accent-primary);
  color: var(--primary-bg);
  border-color: var(--accent-primary);
  box-shadow: var(--accent-glow);
}

/* ==========================================================================
   Responsive Gallery Grid (MODIFIED)
   ========================================================================== */

/* This rule is MODIFIED from your original style.css */
/* It's okay to just add this block at the end, it will override the original */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* This rule is MODIFIED from your original style.css */
.gallery-item img {
  width: 100%;
  height: 280px;
  /* Default desktop height */
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* --- Responsive overrides for the new grid --- */

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on tablets */
    gap: 1.5rem;
  }

  .gallery-item img {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on medium screens */
    gap: 1rem;
  }

  /* Re-add the 1-column layout for cards on mobile, but NOT gallery-grid */
  .cards:not(.gallery-grid) {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 180px;
  }
}

/* This is the key fix for mobile scrolling */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on mobile */
    gap: 0.5rem;
  }

  .gallery-item img {
    height: 120px;
    /* Shorter height for 3-col mobile */
  }

  /* Fix for original .gallery-item img height override */
  .gallery-item img {
    height: 120px;
  }

  .carousel-track img {
    height: 250px;
  }
}

/* ==========================================================================
   PERFORMANCE FIX: Gallery Filter Class
   ========================================================================== */
.gallery-item-hidden {
  display: none;
}