/* styles.css */

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
}

/* ===== HEADER ===== */

header {
  width: 100%;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid #222;
}

.logo {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  text-decoration: none;
  position: relative;
}

.logo::after,
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

.logo:hover::after,
.nav a:hover::after {
  width: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  position: relative;
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  letter-spacing: 1px;
}

/* link base */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: transform 0.6s ease;
}

/* mover LABORATORIO completamente a la izquierda */
.nav-link.active-lab {
  transform: translateX(calc(-100% - 30px));
}

/* slogan */
.nav-link .slogan {
  position: absolute;
  left: 100%;
  margin-left: 16px;
  opacity: 0;
  transform: translateX(-10px);
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #aaa;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* mostrar slogan */
.nav-link.active-lab .slogan {
  opacity: 1;
  transform: translateX(0);
}

/* ===== MAIN & GALLERY ===== */

main {
  padding: 40px;
}

.gallery {
  max-width: 1600px;
  margin: 0 auto;
  column-count: 4;
  column-gap: 16px;
}

/* Responsive columns */
@media (max-width: 1400px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .gallery {
    column-count: 2;
  }
  
  main {
    padding: 30px 20px;
  }
}

@media (max-width: 500px) {
  .gallery {
    column-count: 1;
  }
  
  main {
    padding: 20px;
  }
}

/* ===== GALLERY ITEMS ===== */

.gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  break-inside: avoid;
  page-break-inside: avoid;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

.gallery-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
  border-radius: 12px 12px 0 0;
}

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

.gallery-item h3 {
  padding: 16px 16px 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* ===== TAGS DE CADA PUBLICACIÓN ===== */

.post-tags {
  padding: 0 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags span {
  font-size: 12px;
  color: #888;
  background: #1a1a1a;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* ===== FILTROS ===== */

.filters {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  justify-content: center;
}

.filters button {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.6;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  transition: opacity 0.3s ease;
}

.filters button:hover {
  opacity: 0.8;
}

.filters button.active {
  opacity: 1;
  text-decoration: underline;
}

/* ===== ZOOM MODAL ===== */

.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  cursor: zoom-out;
}

.zoom-overlay.active {
  opacity: 1;
  visibility: visible;
}

.zoom-overlay img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== MINI GALLERY ===== */

.mini-gallery {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  padding: 0 20px;
}

.mini-gallery img {
  width: 15px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mini-gallery img:hover {
  transform: scale(1.5);
}

/* ===== NOSOTROS ===== */

.about {
  padding: 80px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-hero h1 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 60px;
}

.about-text p {
  max-width: 600px;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: #ccc;
}

.about-axes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin: 80px 0;
}

@media (max-width: 900px) {
  .about-axes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .about-axes {
    grid-template-columns: 1fr;
  }
}

.axis h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.axis p {
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
}

.about-footer {
  margin-top: 80px;
  font-size: 12px;
  color: #666;
}

/* ===== LOCATION ===== */

.gallery-item .location {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  padding: 0 20px;
}

.gallery-item p {
  display: none;
}

/* ===== CONTACTO – CAJA DE CORREO ===== */

.about-contact {
  margin-top: 6rem;
  padding: 2rem;
  border: 1px solid #222;
  border-radius: 12px;
  background: linear-gradient(180deg, #0d0d0d, #080808);
  max-width: 480px;
}

.about-contact p {
  margin-bottom: 1.2rem;
  font-size: 14px;
  color: #aaa;
}

.about-contact-mail {
  display: inline-block;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
  border: 1px solid #333;
  border-radius: 8px;
  background: #111;
  transition: 
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.about-contact-mail:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: translateY(-2px);
}

.social-links {
  margin-top: 12px;
  display: flex;
  gap: 16px;
}

.social-links a img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-links a:hover img {
  transform: scale(1.2);
  filter: brightness(1.3);
}
