/* Reset & základné štýly */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, rgba(30, 30, 32, 1) 0%, rgba(15, 15, 18, 1) 50%, rgba(8, 8, 12, 1) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center center;
  color: #ffffff;
  line-height: 1.6;
  font-size: 16px;
  padding-top: 60px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  /* iOS-specific optimizations - simplified */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* FIX: Android-compatible scroll prevention when mobile menu is active */
body.no-scroll {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  -webkit-overflow-scrolling: none !important;
}

/* FIX: iOS-specific enhanced scroll prevention */
@supports (-webkit-touch-callout: none) {
  body.no-scroll {
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
}

/* FIX: Android-specific enhanced scroll prevention */
@supports not (-webkit-touch-callout: none) {
  body.no-scroll {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
  }
}

/* iOS-specific background fix */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background: linear-gradient(135deg, #1e1e20 0%, #0f0f12 50%, #08080c 100%) !important;
    min-height: 100vh !important;
  }
  
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #1e1e20 0%, #0f0f12 50%, #08080c 100%);
    background-size: 100% 100%;
    background-attachment: scroll;
    background-repeat: no-repeat;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    225deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.03) 20%,
    rgba(0, 0, 0, 0.18) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
  /* iOS-specific optimizations */
  -webkit-background-size: 100% 100%;
  background-size: 100% 100%;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* iOS-specific overlay fix */
@supports (-webkit-touch-callout: none) {
  body::after {
    background: linear-gradient(
      225deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.03) 20%,
      rgba(0, 0, 0, 0.18) 50%,
      rgba(0, 0, 0, 0.35) 100%
    ) !important;
    background-attachment: scroll !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
  }
}

/* iOS-specific HTML optimization */
html {
  color-scheme: dark;
  /* iOS performance optimizations */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* FIX: Android-compatible HTML scroll prevention */
html.no-scroll {
  overflow: hidden !important;
  -webkit-overflow-scrolling: none !important;
}

/* FIX: iOS-specific HTML scroll prevention */
@supports (-webkit-touch-callout: none) {
  html.no-scroll {
    touch-action: none !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* FIX: Android-specific HTML scroll prevention */
@supports not (-webkit-touch-callout: none) {
  html.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
  }
}

/* Additional iOS background fix */
@supports (-webkit-touch-callout: none) {
  html {
    background: #1e1e20 !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Mobile menu elements - HIDDEN BY DEFAULT */
.mobile-menu-button {
  display: none;
}

.mobile-menu {
  display: none;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 999;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

nav ul {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

nav li {
  margin: 0 6px;
}

nav a {
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: #ffffff;
  padding: 6px 12px;
  background: transparent;
  border: none;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  display: inline-block;
}

nav a:hover {
  color: #ffffff;
  background: transparent;
  transform: scale(1.15) translateY(-2px);
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9),
               0 0 12px rgba(255, 255, 255, 0.15);
}

nav a.active {
  color: #ffffff;
  background: transparent;
  transform: scale(1.08);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3),
               0 0 12px rgba(255, 255, 255, 0.2),
               0 0 18px rgba(255, 255, 255, 0.1),
               2px 2px 4px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

nav a:not(:hover):not(.active) {
  transform: scale(1);
}

/* Main content */
main {
  max-width: 1200px;
  margin: 10px auto;
  padding: 0 20px;
  background: transparent;
  flex: 1;
}

/* Typography */
h1 {
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  font-size: 42px;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6), 
               1px 1px 12px rgba(0, 0, 0, 0.4),
               0 0 16px rgba(0, 0, 0, 0.3);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

h2 {
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  font-size: 24px;
  color: #ffffff;
  font-weight: 400;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
}

p {
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  font-size: 18px;
  color: #cccccc;
  font-weight: 400;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5),
               1px 1px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

/* Homepage Hero Section */
.hero {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
}

.hero h1 {
  font-size: 42px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 5px;
}

/* Consistent padding for all sections with h1 - match hero page */
.photo-gallery-section,
.video-gallery-section,
.promo-videos-section,
.product-videos-section,
.ai-videos-section,
.portrety-section,
.promo-fotografie-section,
.parove-fotografie-section,
.turnaje-section,
.eventy-section,
.dokument-section,
.about,
.contact {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px; /* Same as hero page */
}

/* DESKTOP ONLY: Align about and contact h1 to the left */
@media (min-width: 901px) {
  .about h1,
  .contact h1 {
    text-align: left;
  }
}

.photo-gallery-section h1 {
  font-size: 42px;
  margin-bottom: 8px;
}

.photo-gallery-section p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Photo Albums Grid - DESKTOP: 3 columns, MOBILE: 1 column */
.photo-albums-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  gap: 30px;
  max-width: 1200px; /* Increased for 3 columns */
  margin: 0 auto;
}

/* Video Gallery Section */
.video-gallery-section h1 {
  font-size: 42px;
  margin-bottom: 8px;
}

/* Force "Portfólio videí" to display in 2 lines */
.video-gallery-section h1:contains("Portfólio videí") {
  white-space: pre-line;
}

/* Alternative method using specific content */
.video-gallery-section h1[data-title="portfolio-videi"] {
  white-space: pre-line;
}

/* Recommended: using a specific class */
.video-gallery-section h1.two-lines {
  white-space: pre-line;
}

.video-gallery-section p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Video Albums Grid - DESKTOP: 3 columns, MOBILE: 1 column */
.video-albums-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  gap: 30px;
  max-width: 1200px; /* Increased for 3 columns */
  margin: 0 auto;
}

/* Video Gallery Styling - DESKTOP: 3 columns, MOBILE: 1 column */
.video-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  gap: 30px;
  padding: 20px;
  max-width: 1200px; /* Increased for 3 columns */
  margin: 0 auto;
  justify-content: center;
  justify-items: center;
}

/* Desktop video card sizing for 3-column layout */
.video-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  width: 100%; /* Full width of grid column */
  max-width: 350px; /* Maximum width for desktop */
  aspect-ratio: 1 / 1.12; /* Maintain aspect ratio */
  position: relative;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
}

.video-card img {
  width: 100%;
  height: calc(100% - 60px); /* Leave space for title */
  border-radius: 10px;
  display: block;
  transition: transform 0.3s ease;
  object-fit: cover;
  object-position: center;
  margin: 0 auto;
}

.video-card:hover img {
  transform: scale(1.02);
}

.video-card h2 {
  font-size: 1.4rem;
  margin-top: 15px;
  color: #ffffff;
  text-align: center;
  font-weight: 600;
}

/* Play Button Overlay */
.video-card::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.video-card:hover::before {
  opacity: 1;
}

/* High-Quality Modal Styling - FIX: Enhanced for iOS scroll prevention */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  /* FIX: iOS scroll prevention */
  -webkit-overflow-scrolling: none;
  overscroll-behavior: none;
}

/* FIX: When modal is active, ensure it covers everything */
.modal.active {
  display: flex !important;
  overflow: hidden !important;
  -webkit-overflow-scrolling: none !important;
  overscroll-behavior: none !important;
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.95), rgba(26, 26, 26, 0.95));
  backdrop-filter: blur(20px);
  margin: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 95%;
  max-width: 1200px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Updated Modal Video Wrapper - Dynamic aspect ratio support */
.modal-video-wrapper {
  position: relative;
  width: 100%;
  /* Remove the fixed padding-bottom: 56.25%; */
  height: 0;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  /* This will be set dynamically by JavaScript */
}

.modal-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Portrait video container (9:16 ratio) */
.modal-video-wrapper.portrait {
  padding-bottom: 177.78%; /* 16/9 * 100% for 9:16 ratio */
  max-width: 400px; /* Limit width for portrait videos */
  margin: 0 auto 20px auto; /* Center the portrait video */
}

/* Landscape video container (16:9 ratio) */
.modal-video-wrapper.landscape {
  padding-bottom: 56.25%; /* 9/16 * 100% for 16:9 ratio */
}

/* Square video container (1:1 ratio) */
.modal-video-wrapper.square {
  padding-bottom: 100%; /* 1:1 ratio */
  max-width: 500px;
  margin: 0 auto 20px auto;
}

.close-button {
  color: #ffffff;
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease, transform 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover,
.close-button:focus {
  color: #ff4444;
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.8);
}

#modalVideoTitle {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

/* Loading indicator */
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  z-index: 5;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Category Card Styles */
.category-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.category-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.category-card h2,
.category-card button {
  position: absolute;
  bottom: 30px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin: 0;
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  pointer-events: none;
  text-shadow: 4px 4px 12px rgba(0, 0, 0, 0.9),
               3px 3px 8px rgba(0, 0, 0, 0.8),
               2px 2px 4px rgba(0, 0, 0, 0.7);
}

.category-card p {
  position: absolute;
  bottom: 10px;
  left: 20px;
  color: white;
  margin: 0;
  font-size: 14px;
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.category-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  pointer-events: none;
}

/* Individual Photo Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 80px auto 0 auto;
  padding: 0 20px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -ms-interpolation-mode: bicubic;
  image-orientation: from-image;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

/* Gallery Square - for specific album pages using inline styles */
.gallery-square {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  margin: 30px auto 0 auto !important;
}

.gallery-square img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -ms-interpolation-mode: bicubic;
  image-orientation: from-image;
}

.gallery-square img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.video-item h2 {
  margin-bottom: 10px;
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
}

.video-item video {
  width: 100%;
  max-height: 500px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Landing Page */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.landing h1 {
  font-size: 42px;
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
}

.landing p {
  font-size: 18px;
  margin-bottom: 5px;
}

/* About Section - DESKTOP PARAGRAPH ALIGNMENT FIX */
.about h1 {
  margin-top: 10px;
}

.about img {
  max-width: 200px;
  border-radius: 100%;
  margin: 0 auto 30px;
  display: block;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* DESKTOP FIX: About and Contact paragraphs aligned left */
.about p,
.contact p {
  text-align: left;
  max-width: 1200px;
  margin: 0 auto 15px auto;
  padding: 0 20px;
}

/* Contact Section */
.contact a {
  color: #4da6ff;
  word-break: break-all;
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
}

.contact a:hover {
  color: #66b3ff;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 10px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #cccccc;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Responsive Design */
@media (max-width: 900px) {
  /* Hide header in mobile */
  header {
    display: none;
  }
  
  /* Remove padding-top from body since header is hidden and add margin-top to content */
  body {
    padding-top: 0;
    background-attachment: fixed;
  }
  
  /* iOS-specific mobile background fix */
  @supports (-webkit-touch-callout: none) {
    body {
      background-attachment: scroll !important;
      background-size: 100% 100% !important;
      background-repeat: no-repeat !important;
      background: linear-gradient(135deg, #1e1e20 0%, #0f0f12 50%, #08080c 100%) !important;
    }
  }
  
  main {
    margin-top: 0;
  }
  
  /* Special case for about page - no margin-top */
  .about main,
  body.about-page main {
    margin-top: 0 !important;
  }
  
  /* MOBILE MENU BUTTON FIX - Show on mobile with iOS protection */
  .mobile-menu-button {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: rgba(26, 26, 26, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 36px;
    padding: 20px 25px;
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    /* iOS-specific fixes to prevent disappearing */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  .mobile-menu-button:hover {
    background: rgba(26, 26, 26, 1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
  }
  
  /* MOBILE MENU BUTTON FIX - Hide when menu is active */
  .mobile-menu.active + .mobile-menu-button,
  body.mobile-menu-open .mobile-menu-button {
    display: none !important;
  }
  
  /* Mobile menu overlay - FIX: Enhanced for iOS scroll prevention */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* FIX: iOS scroll prevention */
    overflow: hidden;
    -webkit-overflow-scrolling: none;
    overscroll-behavior: none;
    /* iOS-specific fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  /* FIX: Mobile menu for both Android and iOS */
  .mobile-menu.active {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    -webkit-overflow-scrolling: none !important;
    overscroll-behavior: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    touch-action: none !important;
  }
  
  /* FIX: iOS-specific mobile menu enhancements */
  @supports (-webkit-touch-callout: none) {
    .mobile-menu.active {
      touch-action: none !important;
      -webkit-touch-callout: none !important;
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
    }
  }
  
  /* FIX: Android-specific mobile menu enhancements */
  @supports not (-webkit-touch-callout: none) {
    .mobile-menu.active {
      touch-action: none !important;
      overscroll-behavior: contain !important;
      -webkit-overflow-scrolling: touch !important;
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
    }
  }
  
  .mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
  }
  
  .mobile-menu li {
    margin: 8px 0;
    text-align: center;
    display: block;
  }
  
  .mobile-menu a {
    font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 32px;
    letter-spacing: 1px;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
    padding: 15px 30px;
    display: block;
    width: 250px;
    text-align: center;
    /* iOS-specific fixes for menu items */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  .mobile-menu a:hover {
    transform: scale(1.1);
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9),
                 0 0 12px rgba(255, 255, 255, 0.15);
  }
  
  /* Language Switcher Styles */
  .language-switcher {
    position: relative;
  }

  .language-dropdown {
    position: relative;
  }

  .language-button {
    font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: #ffffff;
    padding: 6px 12px;
    background: transparent;
    border: none;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .language-button:hover {
    color: #ffffff;
    background: transparent;
    transform: scale(1.15) translateY(-2px);
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9),
                 0 0 12px rgba(255, 255, 255, 0.15);
  }

  .arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
  }

  .language-dropdown.active .arrow {
    transform: rotate(180deg);
  }

  .language-options {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    min-width: 80px;
    z-index: 1001;
    display: none;
  }

  .language-options.active {
    display: block;
  }

  .language-option {
    display: block;
    padding: 8px 12px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica Neue', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
  }

  .language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
  }

  /* Mobile Language Switcher */
  .mobile-menu .language-switcher {
    margin-top: 20px;
    position: relative;
  }

  .mobile-menu .language-dropdown {
    position: relative;
  }

  .mobile-menu .language-button {
    font-size: 32px;
    padding: 15px 30px;
    width: 250px;
    text-align: center;
    justify-content: center;
  }

  .mobile-menu .arrow {
    font-size: 24px;
    transition: transform 0.3s ease;
  }

  .mobile-menu .language-dropdown.active .arrow {
    transform: rotate(180deg);
  }

  .mobile-menu .language-options {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: calc(80% - 60px);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    width: 60px;
    z-index: 1002;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .mobile-menu .language-options.active {
    display: block !important;
  }

  .mobile-menu .language-option {
    font-size: 16px;
    padding: 6px 0;
    text-align: center;
    white-space: nowrap;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }

  .mobile-menu .language-option:last-child {
    border-bottom: none;
  }

  .mobile-menu .language-option:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* MOBILE ONLY: Make close button smaller with iOS fixes */
  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    /* iOS-specific fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  .mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
  }
  
  /* Portrait videos on mobile */
  .modal-video-wrapper.portrait {
    max-width: 90%;
  }
  
  /* MOBILE VIDEO PLAYER - REMOVE MARGIN AND PADDING */
  .modal-content {
    margin: 0;
    padding: 0;
  }
  
  .modal-video-wrapper {
    margin-bottom: 0;
  }
  
  .modal-video-wrapper.portrait {
    margin: 0 auto 0 auto;
  }
  
  .modal-video-wrapper.square {
    margin: 0 auto 0 auto;
  }
  
  /* Mobile p subtitles and paragraphs - start below menu button line and centered (except for "O mne" and "Kontakt" sections) */
  .hero p,
  .landing p,
  .photo-gallery-section p,
  .video-gallery-section p,
  p:not(.about p):not(.contact p) {
    text-align: center !important;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  /* Exception for about and contact sections - paragraphs aligned left */
  .about p,
  .contact p {
    margin-top: 0;
    text-align: left !important;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 10px;
  }
  
  /* Remove unnecessary spaces between paragraphs in contact section */
  .contact p {
    margin-bottom: 5px;
  }
  
  .contact p:last-child {
    margin-bottom: 0;
  }
  
  /* Gallery Square - 3 columns on mobile */
  .gallery-square {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  /* MOBILE GRIDS - SINGLE COLUMN AND KEEP SQUARE ASPECT RATIO */
  .photo-albums-grid,
  .video-albums-grid {
    grid-template-columns: 1fr !important; /* Force single column */
    gap: 15px; /* Reduced gap for smaller buttons */
    max-width: 280px; /* Much smaller max-width for mobile */
  }
  
  /* MOBILE CATEGORY CARDS - SQUARE ASPECT RATIO FIXED */
  .category-card {
    aspect-ratio: 1 / 1 !important; /* Force square aspect ratio */
    width: 100%;
    max-width: 280px; /* Much smaller maximum width */
    height: auto;
  }
  
  /* Keep h2 titles the same size, but adjust positioning for smaller buttons */
  .category-card h2,
  .category-card button {
    font-size: 26px;        /* Keep same font size as desktop */
    font-weight: 700;       /* Keep same weight */
    letter-spacing: 1.5px;  /* Keep same letter spacing */
    bottom: 20px;           /* Adjust position for smaller button */
    left: 15px;
    right: 15px;
    padding: 0;
  }
  
  /* Video Gallery Mobile Responsive - SINGLE COLUMN */
  .video-gallery {
    grid-template-columns: 1fr !important; /* Force single column */
    gap: 20px;
    padding: 15px;
    justify-content: center;
    justify-items: center;
    max-width: 400px; /* Smaller max-width for mobile */
  }
  
  /* Smaller video cards on mobile */
  .video-card {
    width: 8cm; /* Fixed smaller size for mobile */
    height: 8.96cm; /* Fixed smaller size for mobile */
    max-width: none; /* Remove desktop max-width constraint */
  }
  
  .video-card img {
    width: 7.2cm; /* Fixed smaller size for mobile */
    height: 7.2cm; /* Fixed smaller size for mobile */
  }
  
  .close-button {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
  
  #modalVideoTitle {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  .video-card::before {
    font-size: 2rem;
    width: 60px;
    height: 60px;
  }
  
  /* Make banner bigger on mobile */
  .banner img {
    width: 90% !important;
  }
  
  /* Hide desktop H1 and show mobile H1 */
  .desktop-h1 {
    display: none !important;
  }

  .mobile-h1 {
    display: block !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: 40px !important;
    font-weight: 800 !important;
    margin-top: 15px !important;
    margin-left: 0 !important;
    margin-bottom: 20px !important;
  }
}

@media (max-width: 600px) {
  /* Mobile menu button adjustment for smaller screens */
  .mobile-menu-button {
    top: 15px;
    right: 15px;
    font-size: 32px;
    padding: 18px 22px;
  }
  
  .mobile-menu a {
    font-size: 28px;
  }
  
  /* H1 visibility control */
  .mobile-h1 {
    display: none;
  }

  .desktop-h1 {
    display: block;
  }
}




