* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    padding: 80px 50px 50px 50px; /* More top padding */
    min-height: 100vh;
    position: relative;
}

/* Container - no max width for desktop */
.container {
    width: 100%;
    margin: 0 auto;
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

/* Logo clickable styling */
#logo-icon {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#logo-icon:active {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 10px;
}

/* Navigation Link Styles - NO UNDERLINES */
.animated-link {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 10px 15px;
}

.animated-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Grid - responsive columns based on viewport width */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}

/* Wider screens - 4 columns */
@media (min-width: 1600px) {
    .artwork-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ultra wide screens - 5 columns */
@media (min-width: 2000px) {
    .artwork-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra ultra wide screens - 6 columns */
@media (min-width: 2400px) {
    .artwork-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Artwork Item */
.artwork-item {
    position: relative;
    cursor: pointer;
    margin-bottom: 20px
}

.artwork-item:hover .artwork-caption {
    color: rgba(255, 255, 255, 0.9);
}

.artwork-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.artwork-thumb {
    aspect-ratio: 1;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
}

.artwork-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.artwork-caption {
    margin-top: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

/* Footer Section */
.footer-section {
    text-align: center;
    margin-top: 80px;
}

/* Footer logo clickable for scroll to top */
#footer-logo-img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#footer-logo-img:hover {
    opacity: 0.8;
}

/* Text box - sticks to left */
.text-box {
    max-width: 900px; /* Max width for readability */
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    body {
        padding: 50px 30px 30px 30px; /* More space at top on mobile */
    }
    
    .artwork-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .artwork-caption {
        font-size: 10px; /* Smaller on mobile */
    }
    
    .text-box[data-responsive="true"] {
        width: 100% !important;
        max-width: 100% !important;
        text-align: justify !important;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 0;
    }
    #fullscreen-link {
	    display:none;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    body {
        padding: 40px 20px 20px 20px; /* More space at top on small mobile */
    }
    
    .artwork-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns even on small mobile */
        gap: 10px;
    }
    
    .artwork-caption {
        font-size: 9px; /* Even smaller on small mobile */
    }
    
    /* Disable hover effects on mobile */
    .artwork-item:hover .artwork-caption {
        color: rgba(255, 255, 255, 0.4); /* Keep original color */
    }
    
    .animated-link:hover {
        color: rgba(255, 255, 255, 0.5); /* Keep original color */
    }
    
    .text-box[data-responsive="true"] {
        width: 100% !important;
        max-width: 100% !important;
        text-align: justify !important;
    }
}

/* Disable all hover animations on touch devices */
@media (hover: none) and (pointer: coarse) {
    .artwork-item:hover .artwork-caption {
        color: rgba(255, 255, 255, 0.4); /* Keep original color */
    }
    
    .animated-link:hover {
        color: rgba(255, 255, 255, 0.5); /* Keep original color */
    }
    
    .artwork-caption {
        font-size: 10px; /* Smaller on touch devices */
    }
}


/* Overlay layer to load artworks */

#overlay {
	display: none;
    background: #000;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;

}

/* Preloader for initial load only */
.preloader {
  width: 40px;
  height: 40px;
  border: 5px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}


/* Close X button with animated lines */
.close-x {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 200;
    display: block;
    transition: opacity 0.3s;
}

.close-x span {
    display: block;
    position: absolute;
    height: 2px;
    width: 32px;
    background: rgb(128, 128, 128);
    transition: all 0.3s ease;
    top: 50%;
    left: 50%;
}

.close-x span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-x span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.close-x:hover span {
    background: rgb(230, 230, 230);
}

.close-x:hover span:first-child {
    transform: translate(-50%, -50%) rotate(135deg);
}

.close-x:hover span:last-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Main container */
#image-container {
	display: flex;
	height: 80vh;
	width: 100%;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    opacity: 1;
    transition: opacity 0.3s;
}

#image-container.loaded {
    opacity: 1;
}

#image-container.dragging {
    cursor: grabbing;
}

/* Image wrapper */
#image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-origin: center center;
}

/* Artwork image */
.artwork-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: absolute;
    top: 0;
    left: 0;
}

/* Navigation arrows */
.nav-arrow {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s, color 0.3s;
    z-index: 100;
}

.nav-arrow:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-arrow.prev {
    left: 0;
}

.nav-arrow.next {
    right: 0;
}

/* Top title bar */
.top-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 0.3s;
    white-space: nowrap;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bottom navigation bar */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 0.3s;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Navigation links container */
.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

/* Text links */
.top-nav a, .bottom-nav a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
    padding: 5px 10px;
    margin: -5px -10px;
    position: relative;
}

.top-nav a:hover, .bottom-nav a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Separator dots */
.separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Instructions text */
.instructions {
	display: block;
    color: rgba(255, 255, 255, 0.25);
    font-style: italic;
    font-size: 12px;
    white-space: nowrap;
    text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .close-x {
        top: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
    }

    .close-x span {
        width: 26px;
    }

    .nav-arrow {
        width: 60px;
        font-size: 20px;
        padding-top: 55%;
    }

    .instructions {
	    display: none;
        white-space: normal;
        max-width: 250px;
        line-height: 1.4;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
        row-gap: 5px;
    }
    
    .separator {
        display: none;
    }
    
    .nav-links a {
        padding: 3px 4px;
        margin: 0;
    }
    #image-container {
	    display: flex;
	    height: 80vh;
		width: 85%;
	    top: 37%;
	    left: 50%;
	    transform: translate(-50%, -50%);
	    cursor: grab;
	    opacity: 1;
	    transition: opacity 0.3s;
	}
	.preloader {
	    top: 37%;
	}
}

/* Zoom indicator */
.zoom-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.zoom-indicator.visible {
    opacity: 1;
}



#overlay.visible {
  display:flex;
  opacity: 1;
  pointer-events: auto;
}

#overlay-content {
  background: white;
  padding: 25px 35px;
  border-radius: 12px;
  position: relative;
  min-width: 300px;

  transform: translateY(-20px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}

#overlay.visible #overlay-content {
  transform: translateY(0);
  opacity: 1;
}

/* Botón de cierre */
#close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4d4d;
  border: none;
  color: white;
  font-size: 18px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background .2s;
}

#close-btn:hover {
  background: #d93636;
}

.item {
  margin: 20px;
  padding: 20px;
  background: #eee;
  cursor: pointer;
  border-radius: 8px;
}



