body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #fff;
  color: #222;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  background: #000;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  border-bottom: 3px solid #ff6600;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #ff660033;
  display: flex;
  align-items: center;
}
.logo span {
  color: #ff6600;
  text-shadow: 0 0 6px #111;
}
.nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 32px;
  font-weight: 500;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  /* Add frame like #lang-btn */
  border: 2px solid #ff6600;
  border-radius: 16px;
  padding: 8px 22px;
  background: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.nav a:hover {
  color: #ff6600;
  border-bottom: 2px solid #ff6600;
  /* Optional: highlight border on hover */
  border-color: #111;
  background: #ff6600;
  color: #fff;
}

  /* Active navigation button: orange by default, black on hover */
  .active-nav {
    color: #fff !important;
    background: #ff6600 !important;
    border: 2px solid #ff6600 !important;
    border-radius: 16px;
    box-shadow: 0 2px 8px #ff660088;
    padding: 8px 22px;
    transition: background 0.2s, color 0.2s;
  }
  .active-nav:hover {
    background: #111 !important;
    color: #fff !important;
    border-color: #ff6600 !important;
  }

.hero {
  text-align: center;
  padding: 80px 20px 60px 20px;
  background: rgba(255,255,255,0.8);
  margin: 40px auto 0 auto;
  max-width: 600px;
  border-radius: 20px;
  box-shadow: 0 4px 24px #1112, 0 2px 8px #ff660022;
  border: 2px solid #1112;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #111;
  text-shadow: 0 2px 8px #ff660033;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 28px;
  color: #444;
  border-left: 4px solid #ff6600;
  padding-left: 12px;
}
.btn {
  display: inline-block;
  background: #ff6600;
  color: #fff;
  padding: 12px 32px;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px #1112, 0 2px 8px #ff660022;
  border: 2px solid #111;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover {
  background: #e65c00;
  border-color: #ff6600;
}

.services {
  max-width: 900px;
  margin: 60px auto 0 auto;
  padding: 0 20px;
  overflow-x: hidden;
}

/* Desktop: allow wider services container for 3-4 columns */
@media (min-width: 900px) {
  .services {
    max-width: 1200px;
  }
}
.services h2 {
  text-align: center;
  margin-bottom: 32px;
  color: #111;
  text-shadow: 0 2px 8px #ff660033;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

/* Desktop: responsive grid that adapts to container width */
@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
.card {
  background: #111;
  border-radius: 20px;
  border: 3px solid #ff6600;
  padding: 28px 20px;
  min-width: 220px;
  max-width: 240px;
  flex: 1 1 220px;
  text-align: center;
  color: #fff;
  margin: 8px;
}

/* Desktop: remove max-width to allow rectangular cards */
@media (min-width: 900px) {
  .card {
    max-width: none;
    margin: 0;
  }
}
.card:hover {
  background: #222;
}
.card h3 {
  color: #ff6600;
  margin-bottom: 14px;
  font-size: 1.2rem;
}
.card p {
  color: #fff;
  font-size: 1rem;
}

.contact {
  max-width: 540px;
  margin: 60px auto 40px auto;
  background: #111;
  border-radius: 20px;
  border: 3px solid #ff6600;
  padding: 32px 20px;
  color: #fff;
}
.contact h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid #ff6600;
  font-size: 1rem;
  background: #222;
  color: #fff;
  resize: none;
}
.contact-form textarea {
  min-height: 80px;
}
.contact-form button {
  align-self: flex-end;
  background: #ff6600;
  color: #fff;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  padding: 10px 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.contact-form button:hover {
  background: #222;
  color: #ff6600;
}
.lang-select {
  position: relative;
  display: inline-block;
  margin-left: 24px;
}
#lang-btn {
  background: #111;
  color: #fff;
  border: 2px solid #ff6600;
  border-radius: 16px;
  padding: 8px 22px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, border-color 0.2s;
}
#lang-btn:hover {
  background: #ff6600;
  color: #fff;
  border-color: #111;
}
.lang-list {
  display: block;
  position: absolute;
  right: 0;
  top: 110%;
  background: #fff;
  border: 2px solid #ff6600;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  min-width: 140px;
  z-index: 10;
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.lang-list.show {
  max-height: 500px;
  opacity: 1;
}
.lang-list li {
  padding: 12px 20px;
  color: #111;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 1px solid #eee;
  transition: background 0.2s, color 0.2s;
}
.lang-list li:last-child {
  border-bottom: none;
}
.lang-list li:hover {
  background: #ff6600;
  color: #fff;
}

.footer {
  background: #000;
  border-top: 3px solid #ff6600;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.12);
  border-radius: 20px 20px 0 0;
  margin-top: 80px;
  padding: 80px 0 48px 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  flex-wrap: nowrap;
}
.footer-info {
  flex: 0 1 260px;
  max-width: 260px;
  min-width: 180px;
  color: #fff;
  font-size: 1.25rem;
  padding-left: 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.footer-info h3 {
  color: #ff6600;
  margin-bottom: 12px;
  font-size: 1.4rem; /* було 1.2rem, стало більше */
  text-shadow: 0 2px 8px #1112;
}
.footer-info p {
  margin: 10px 0; /* було 6px, стало більше */
  color: #eee;
  font-size: 1.15rem; /* було 1rem, стало більше */
}
.footer-map {
  flex: 0 0 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.footer-map iframe {
  border-radius: 16px;
  border: 2px solid #ff6600;
  box-shadow: 0 2px 8px #1112;
  width: 540px;
  height: 220px;
  background: #222;
  /* pointer-events: auto;  // default, only add if needed */
}
.footer-logo {
  display: none;
}
.footer-logo a {
  display: inline-block;
}
.footer-logo img {
  width: 480px;
  height: auto;
  border-radius: 12px;
}
.footer-hours {
  flex: 1 1 220px;
  color: #fff;
  font-size: 1.15rem;
  padding-right: 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 180px;
}
.footer-hours h3 {
  color: #ff6600;
  margin-bottom: 12px;
  font-size: 1.4rem;
  text-shadow: 0 2px 8px #1112;
}
.footer-hours p {
  margin: 10px 0;
  color: #eee;
  font-size: 1.15rem;
}
/* Gallery styles for fotovideo.html */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 44px 38px; /* більший вертикальний і горизонтальний відступ */
  margin: 40px auto;
  max-width: 1800px;
  justify-items: center;
}

/* Softer, warm orange frames for gallery items (slightly more saturated) */
.gallery-item {
  border: 1px solid rgba(255,102,0,0.32); /* increased warm orange border */
  background: #fff2e6;                     /* slightly warmer tint */
  border-radius: 14px;
  padding: 8px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 12px 30px rgba(255,102,0,0.14); /* warmer, slightly stronger warm shadow */
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  max-width: 440px;
  overflow: hidden;
}

/* Gentle lift on hover with slightly stronger warm accent */
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(16,24,32,0.10), 0 12px 34px rgba(255,102,0,0.14);
  border-color: rgba(255,102,0,0.44);
}

/* Images: keep rounded but no heavy shadows */
.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  box-shadow: none;
  filter: none;
}

/* Ensure gallery groups span full width and stack vertically */
.gallery-group {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

/* Desktop: align gallery groups consistently to prevent staggered layout */
@media (min-width: 701px) {
  .gallery-group {
    align-items: center !important;
  }
  .gallery-group > div[style*="max-width"] {
    max-width: 1200px !important;
    width: 100% !important;
  }
  /* Center 2-photo gallery groups on desktop - convert grid to flex for better centering */
  .gallery-group > div[style*="display:grid"] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 18px !important;
  }
  .gallery-group > div[style*="display:grid"] > .gallery-item {
    flex: 0 0 auto !important;
    max-width: 340px !important;
  }
}

/* Services heading style — apply same appearance to fotovideo title and gallery group titles */
.services h2,
#fotovideo-title,
.gallery-group-title {
  text-align: center;
  margin-bottom: 32px;
  color: #111;
  text-shadow: 0 2px 8px #ff660033;
  font-family: inherit;
  font-weight: 600; /* трохи грубіший шрифт, як у "Naše služby" */
}

/* size and spacing for gallery group titles (slightly smaller than page title) */
.gallery-group-title {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* Desktop: match fotovideo main container width with services */
@media (min-width: 900px) {
  body.page-wrapper main {
    max-width: 1200px;
  }
}

/* Responsive gallery */
@media (max-width: 1500px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 28px;
    max-width: 1300px;
  }
  .gallery-item {
    max-width: 340px;
  }
  .gallery-item img {
    max-width: 320px;
    height: 220px;
  }
}
@media (max-width: 1100px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 18px;
    max-width: 800px;
  }
  .gallery-item {
    max-width: 300px;
  }
  .gallery-item img {
    max-width: 280px;
    height: 180px;
  }
}
@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
    padding: 0 8px;
  }
  .gallery-item {
    max-width: 100%;
    width: 100%;
  }
  .gallery-item img {
    max-width: 100%;
    height: auto;
    min-height: 200px;
  }
  .gallery-group {
    margin-top: 24px;
  }
  .gallery .gallery-group {
    margin-top: 24px;
  }
  .gallery-group-title {
    font-size: 1.1rem;
    padding: 0 12px;
  }
  /* Override inline grid styles for mobile - use flex instead of trying to override grid */
  .gallery-group > div[style*="display"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Ensure sub-containers also stack vertically */
  .gallery-group div[style*="display:flex"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  .gallery-group .gallery-item {
    max-width: 100% !important;
    width: 100% !important;
  }
}
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
    padding: 0 4px;
  }
  .gallery-item {
    max-width: 100%;
    padding: 6px;
  }
  .gallery-item img {
    max-width: 100%;
    height: auto;
    min-height: 150px;
  }
  main {
    padding: 0 8px;
    margin-top: 30px;
  }
  body.page-wrapper main {
    padding: 0 8px;
    margin-top: 30px;
  }
  #fotovideo-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
  /* Override inline grid styles for very small mobile screens */
  .gallery-group > div[style*="display"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
@media (max-width: 700px) {
  .header {
    flex-direction: column;
    gap: 16px;
    padding: 16px 12px;
    border-radius: 0;
  }
  .footer {
    border-radius: 0;
  }
  .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .nav a {
    margin-left: 0;
    width: 90%;
    max-width: 300px;
    text-align: center;
  }
  .lang-select {
    margin-left: 0;
    margin-top: 4px;
  }
  .hero h1 {
    font-size: 1.8rem;
    white-space: normal;
    padding: 0 10px;
  }
  .hero p {
    font-size: 1rem;
    padding-left: 8px;
    padding-right: 8px;
  }
  .hero {
    padding: 40px 12px;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .card {
    margin: 0 auto;
    max-width: 100%;
  }
  .services {
    padding: 0 12px;
  }
  .contact {
    padding: 24px 12px;
    margin-left: 12px;
    margin-right: 12px;
  }
  .footer-content {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    padding: 0 12px;
  }
  .footer-info, .footer-hours {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }
  .footer-map {
    width: 100%;
  }
  .footer-map iframe {
    width: 100%;
    min-width: 220px;
    height: 200px;
  }
}
@media (max-width: 900px) {
  .header {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 12px;
    border-radius: 0;
  }
  .footer {
    border-radius: 0;
  }
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .nav a {
    margin-left: 0;
    flex: 0 1 auto;
    min-width: 100px;
  }
  .lang-select {
    margin-left: 0;
    flex: 0 1 auto;
  }
  .footer-content {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    margin-left: 0;
    margin-right: 0;
  }
  .footer-map iframe {
    width: 100%;
    min-width: 220px;
    height: 220px;
  }
  .footer-hours, .footer-info {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 1300px) {
  .footer-content {
    margin-left: 12px;
    margin-right: 0;
  }
}
@media (max-width: 1100px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 98vw;
  }
  .footer-info,
  .footer-hours {
    max-width: 100%;
    width: 100%;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }
  .footer-map iframe {
    width: 100%;
    min-width: 220px;
    height: 180px;
  }
}
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .services {
    padding: 0 12px;
  }
  .contact {
    padding: 24px 12px;
    max-width: 90%;
  }
  .footer-content {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  .footer-map iframe {
    width: 100%;
    min-width: 220px;
    height: 200px;
  }
}
@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .services {
    padding: 0 8px;
  }
  .contact {
    padding: 24px 8px;
  }
  .footer-content {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .footer-map iframe {
    width: 100%;
    min-width: 220px;
    height: 180px;
  }
}

/* Notification Modal */
.notification-modal {
  display: none;
  position: fixed;
  z-index: 10003;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.notification-modal.show {
  display: flex;
  animation: fadeIn 0.3s;
}

.notification-content {
  background: #fff;
  border-radius: 20px;
  padding: 40px 50px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  border: 3px solid #ff6600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notification-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.notification-close:hover {
  color: #ff6600;
}

.notification-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.notification-icon.success {
  background: #4CAF50;
  color: #fff;
}

.notification-icon.success::before {
  content: '✓';
}

.notification-icon.error {
  background: #f44336;
  color: #fff;
}

.notification-icon.error::before {
  content: '✕';
}

.notification-content h3 {
  color: #111;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.notification-content p {
  color: #444;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Mobile optimization for notification modal */
@media (max-width: 480px) {
  .notification-content {
    padding: 30px 24px;
    width: 85%;
  }
  .notification-content h3 {
    font-size: 1.4rem;
  }
  .notification-content p {
    font-size: 1rem;
  }
  .notification-icon {
    width: 60px;
    height: 60px;
    font-size: 2.2rem;
  }
  .notification-close {
    top: 10px;
    right: 15px;
    font-size: 1.6rem;
  }
}

/* Gallery modal (lightbox) styles */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(20,20,20,0.92);
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.gallery-modal.show {
  display: flex;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.gallery-modal-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 8px 40px #000b;
  background: #fff;
  object-fit: contain;
}
.gallery-modal-close {
  position: absolute;
  top: 32px;
  right: 48px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  z-index: 10002;
  text-shadow: 0 2px 8px #000, 0 0 8px #ff6600;
  transition: color 0.2s;
  user-select: none;
}
.gallery-modal-close:hover {
  color: #ff6600;
}
@media (max-width: 700px) {
  .gallery-modal-close {
    top: 12px;
    right: 18px;
    font-size: 2.2rem;
  }
  .gallery-modal-img {
    max-width: 98vw;
    max-height: 70vh;
  }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
  .header {
    padding: 12px 8px;
    border-radius: 0;
  }
  .footer {
    border-radius: 0;
  }
  .header .logo .logo-img,
  .header .logo a .logo-img {
    width: 160px;
  }
  .nav a {
    font-size: 0.95rem;
    padding: 8px 18px;
  }
  #lang-btn {
    font-size: 0.95rem;
    padding: 8px 18px;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .btn {
    font-size: 0.95rem;
    padding: 10px 24px;
  }
  .services h2 {
    font-size: 1.5rem;
  }
  .card {
    padding: 20px 16px;
  }
  .card h3 {
    font-size: 1.1rem;
  }
  .card p {
    font-size: 0.95rem;
  }
  .contact h2 {
    font-size: 1.4rem;
  }
  .footer {
    padding: 40px 0 32px 0;
  }
  .footer-info, .footer-hours {
    font-size: 1rem;
  }
  .footer-info h3, .footer-hours h3 {
    font-size: 1.1rem;
  }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 900px) and (orientation: landscape) {
  .hero {
    min-height: 180px;
    padding: 24px 12px;
  }
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }
  .hero p {
    font-size: 1rem;
    margin-bottom: 16px;
  }
}
