@import url("https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600&display=swap");

@font-face {
  font-family: "Minion Pro";
  src: url("../Fonts/MinionPro-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Minion Pro";
  src: url("../Fonts/MinionPro-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}

.footer .links a {
  position: relative;
}
.footer .links .hover-img {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 180px; /* Desktop size */
  height: 54px; /* Desktop size */
  background: url("../Images/Index/crtaA.png") no-repeat center/contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 102;
}

/* Individual letter line images */
.footer .links a:nth-child(1) .hover-img {
  background: url("../Images/Index/line-name.png") no-repeat center/contain;
}
.footer .links a:nth-child(2) .hover-img {
  background: url("../Images/Index/line-a.png") no-repeat center/contain;
}
.footer .links a:nth-child(3) .hover-img {
  background: url("../Images/Index/line-b.png") no-repeat center/contain;
}
.footer .links a:nth-child(4) .hover-img {
  background: url("../Images/Index/line-c.png") no-repeat center/contain;
}
.footer .links a:nth-child(5) .hover-img {
  background: url("../Images/Index/line-d.png") no-repeat center/contain;
}
.footer .links a:nth-child(6) .hover-img {
  background: url("../Images/Index/line-e.png") no-repeat center/contain;
}
.footer .links a:nth-child(7) .hover-img {
  background: url("../Images/Index/line-f.png") no-repeat center/contain;
}
.footer .links a:hover .hover-img {
  opacity: 1;
}
.footer .links a.crossed .hover-img {
  opacity: 1;
}
.footer .links a.crossed .name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: url("../Images/Index/line-name.png") repeat-x center/contain;
  transform: translateY(-50%);
  z-index: 200;
  pointer-events: none;
}
.footer .links .link-letter {
  position: relative;
  z-index: 101;
}

/* Info Overlay */
.info-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  padding: 100px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  max-width: 600px;
  text-align: center;
}

.info-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.info-content {
  text-align: left;
  font-family: "Minion Pro", "Crimson Text", "Times New Roman", serif;
  font-size: 1.1em;
  line-height: 1.4;
  color: #000;
  padding-left: 10px;
}

.info-content p {
  margin: 0 0 0 0;
}

.info-content p:last-child {
  margin-bottom: 0;
}

.info-content strong {
  font-weight: bold;
}

/* Hide mobile content on desktop */
.mobile-content {
  display: none;
}

/* Mobile styles for info overlay */
@media (max-width: 1200px) {
  .info-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px;
    max-width: 90vw;
  }

  .info-content {
    font-size: 1.4em;
    line-height: 1;
    padding-left: 5px;
    text-align: left;
  }

  /* Hide desktop content on mobile */
  .desktop-content {
    display: none;
  }

  /* Show mobile content on mobile */
  .mobile-content {
    display: block;
    text-align: left;
  }

  .mobile-content p {
    margin: 0 0 0.3em 0;
  }

  .mobile-content p:last-child {
    margin-bottom: 0;
  }

  /* Footer font size increases for mobile */
  .footer {
    font-size: 1.3em;
  }

  .footer .name {
    font-size: 1.1em;
  }

  .footer .links {
    font-size: 1.3em;
    align-items: center; /* Fix vertical alignment on mobile */
  }

  /* Smaller hover images for mobile */
  .footer .links .hover-img {
    width: 170px; /* Increased from 150px */
    height: 51px; /* Increased from 45px */
  }

  /* Make "fran hodalj" hover image bigger on mobile */
  .footer .links a:nth-child(1) .hover-img {
    width: 200px;
    height: 60px;
  }
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  overflow: hidden;
  font-family: "Minion Pro", "Crimson Text", "Times New Roman", serif;
  color: rgb(0, 0, 0);
}
body {
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
}
.gallery-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  height: calc(100vh - 120px); /* Account for footer space */
  height: calc(
    100dvh - 120px - env(safe-area-inset-bottom, 0)
  ); /* Dynamic height for mobile */
}
.gallery {
  display: flex;
  gap: 0px;
  justify-content: center;
  align-items: center;
  width: 80vw;
}
.gallery img {
  height: 30vh;
  max-height: 35vh;
  object-fit: contain;
  background: #fff;
}

.footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  bottom: env(safe-area-inset-bottom, 0); /* Account for mobile browser UI */
  left: 0;
  display: flex;
  align-items: center;
  background: #fff;
  padding: 20px 0;
  padding-bottom: calc(
    20px + env(safe-area-inset-bottom, 0)
  ); /* Add safe area padding */
  font-size: 1.125em;
  z-index: 10;
  margin-left: 7.5px;
}
.footer .name {
  /* margin-left: 32px; */
  font-weight: bold;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.footer .links {
  display: flex;
  margin-left: 10px;
  width: 100%;
  gap: 8px;
}
.footer .links a {
  text-decoration: none;
  color: #000000;
  margin-left: 3px;
  margin-right: 0;
  font-weight: bolder;
  padding: 0 8px;
  /* Random margin using nth-child */
}
.footer .links a:nth-child(2) {
  margin-left: 55px;
}
.footer .links a:nth-child(3) {
  margin-left: 80px;
}
.footer .links a:nth-child(4) {
  margin-left: 54px;
}
.footer .links a:nth-child(5) {
  margin-left: 32px;
}
.footer .links a:nth-child(6) {
  margin-left: 68px;
}
.footer .links a:nth-child(7) {
  margin-left: 128px;
}

/* Responsive Design */
@media (max-width: 1000px) {
  .gallery {
    width: 100vw;
    gap: 0.01vw;
    padding: 0 0.02vw;
    box-sizing: border-box;
  }

  .gallery img {
    height: 34vh;
    max-height: 38vh;
    flex-shrink: 1;
    width: calc((100vw - 0.09vw) / 6);
    object-fit: contain;
  }

  /* .footer {
    font-size: 1em;
  }

  .footer .name {
    font-size: 0.9em;
    letter-spacing: 0.3px;
  }

  .footer .links {
    gap: 4px;
    font-size: 1.2em;
  } */

  /* .footer .links a:nth-child(2) {
    margin-left: 28px !important;
  }
  .footer .links a:nth-child(3) {
    margin-left: 40px !important;
  }
  .footer .links a:nth-child(4) {
    margin-left: 27px !important;
  }
  .footer .links a:nth-child(5) {
    margin-left: 16px !important;
  }
  .footer .links a:nth-child(6) {
    margin-left: 34px !important;
  }
  .footer .links a:nth-child(7) {
    margin-left: 64px !important;
  } */
}

@media (max-width: 480px) {
  .gallery {
    width: 100vw;
    gap: 0.02vw;
    padding: 0 0.04vw;
    box-sizing: border-box;
  }

  .gallery img {
    height: 30vh;
    max-height: 34vh;
    flex-shrink: 1;
    width: calc((100vw - 0.18vw) / 6);
    object-fit: contain;
  }

  .footer {
    padding: 10px 0;
    font-size: 1.1em;
  }

  .footer .name {
    font-size: 1em;
  }

  .footer .links {
    gap: 2px;
    font-size: 1.3em;
    align-items: center; /* Fix vertical alignment on mobile */
  }

  .footer .links a:nth-child(2) {
    margin-left: 18px !important;
  }
  .footer .links a:nth-child(3) {
    margin-left: 25px !important;
  }
  .footer .links a:nth-child(4) {
    margin-left: 17px !important;
  }
  .footer .links a:nth-child(5) {
    margin-left: 10px !important;
  }
  .footer .links a:nth-child(6) {
    margin-left: 22px !important;
  }
  .footer .links a:nth-child(7) {
    margin-left: 42px !important;
  }

  /* Smaller hover images for small mobile screens */
  .footer .links .hover-img {
    width: 140px; /* Increased from 120px */
    height: 42px; /* Increased from 36px */
  }

  /* Make "fran hodalj" hover image bigger on small mobile */
  .footer .links a:nth-child(1) .hover-img {
    width: 170px;
    height: 51px;
  }
}

@media (max-width: 320px) {
  .gallery {
    width: 100vw;
    gap: 0px;
    padding: 0px;
    box-sizing: border-box;
  }

  .gallery img {
    height: 24vh;
    max-height: 28vh;
    flex-shrink: 1;
    width: calc(100vw / 6);
    object-fit: contain;
  }

  .footer {
    padding: 8px 0;
    font-size: 1em;
  }

  .footer .name {
    margin-left: 8px;
    font-size: 0.9em;
  }

  .footer .links {
    gap: 1px;
    font-size: 1.2em;
    align-items: center; /* Fix vertical alignment on mobile */
  }

  .footer .links a:nth-child(2) {
    margin-left: 14px !important;
  }
  .footer .links a:nth-child(3) {
    margin-left: 20px !important;
  }
  .footer .links a:nth-child(4) {
    margin-left: 13px !important;
  }
  .footer .links a:nth-child(5) {
    margin-left: 8px !important;
  }
  .footer .links a:nth-child(6) {
    margin-left: 17px !important;
  }
  .footer .links a:nth-child(7) {
    margin-left: 32px !important;
  }

  /* Very small hover images for very small screens */
  .footer .links .hover-img {
    width: 110px; /* Increased from 90px */
    height: 33px; /* Increased from 27px */
  }

  /* Make "fran hodalj" hover image bigger on very small screens */
  .footer .links a:nth-child(1) .hover-img {
    width: 140px;
    height: 42px;
  }
}
