/* =========================================
   RESET Y BASE GLOBAL
   ========================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0b0b0b;
  color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Bloqueo de scroll cuando el menú o visor están activos */
body.menu-active,
body.lightbox-active {
  overflow: hidden;
}

body.home-page {
  overflow: hidden;
}

/* =========================================
   BARRA DE NAVEGACIÓN
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.artist-name {
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.artist-name:hover {
  opacity: 0.7;
}

/* Botón Hamburguesa */
.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  z-index: 1002;
}

.menu-toggle .bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Menú Lateral */
.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background-color: #121212;
  padding: 100px 32px 40px 32px;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-menu.open {
  right: 0;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.nav-menu a {
  color: #888888;
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #ffffff;
  transform: translateX(4px);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================
   PORTADA HERO (index.html)
   ========================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background: url('../img/hero-painting.jpeg') center center / cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 10px;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  word-break: break-word;
}

/* =========================================
   ESTRUCTURA DE PÁGINA INTERNA COMÚN
   ========================================= */
.page-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 120px 24px 80px 24px;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: #888888;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* =========================================
   CUADRÍCULA DE OBRAS (obras.html)
   ========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px 32px;
}

.artwork-card {
  display: flex;
  flex-direction: column;
}

.artwork-image-container {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #141414;
  cursor: pointer;
  position: relative;
  border-radius: 2px;
}

.artwork-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.artwork-image-container:hover .artwork-image {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* =========================================
   LIGHTBOX / PANTALLA COMPLETA CON FLECHAS
   ========================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(5, 5, 5, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
  padding: 20px;
  cursor: zoom-out;
  user-select: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* Botón Volver */
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
  z-index: 2010;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-close .close-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.lightbox-close .close-text {
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 500;
}

/* Flechas laterales de navegación */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.6rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
  z-index: 2010;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 28px;
  padding-right: 3px;
}

.lightbox-next {
  right: 28px;
  padding-left: 3px;
}

/* Contenido de la imagen central */
.lightbox-content {
  max-width: 82vw;
  max-height: 88vh;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: default;
}

.lightbox-image {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  border-radius: 2px;
}

.lightbox.active .lightbox-image {
  transform: scale(1);
  opacity: 1;
}

/* =========================================
   SECCIÓN ACERCA DE (acerca-de.html)
   ========================================= */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.about-image-container {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #141414;
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
}

.about-bio h2 {
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 18px;
}

.about-bio p {
  color: #b0b0b0;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  font-weight: 300;
}

.about-cv {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
}

.about-cv h3 {
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 20px;
  margin-top: 24px;
}

.about-cv h3:first-of-type {
  margin-top: 0;
}

.cv-group {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.cv-year {
  color: #707070;
  font-weight: 400;
}

.cv-details {
  color: #a0a0a0;
}

.cv-details strong {
  color: #ffffff;
  font-weight: 400;
}

/* =========================================
   SECCIÓN DE CONTACTO (contacto.html)
   ========================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.info-block h2 {
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 8px;
}

.info-block p, 
.info-block a {
  color: #a0a0a0;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-block a:hover {
  color: #ffffff;
}

.info-note {
  font-size: 0.82rem;
  color: #666666;
  margin-top: 4px;
}

.social-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Formulario */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #cccccc;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background-color: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  padding: 14px 16px;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  outline: none;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #ffffff;
  background-color: #1a1a1a;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  background-color: #ffffff;
  color: #000000;
  border: none;
  padding: 16px 28px;
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #d8d8d8;
}

/* =========================================
   RESPONSIVE (Tablets y Móviles)
   ========================================= */
@media (max-width: 768px) {
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .about-image-container {
    aspect-ratio: 16 / 10;
  }

  .submit-btn {
    width: 100%;
  }

  .lightbox-content {
    max-width: 92vw;
    max-height: 80vh;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 600px) {
  .nav-container {
    padding: 14px 18px;
  }

  .artist-name {
    font-size: 0.75rem;
    letter-spacing: 2px;
  }

  .page-container {
    padding: 95px 18px 50px 18px;
  }

  .page-header {
    margin-bottom: 40px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .artwork-image-container {
    aspect-ratio: 1 / 1;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
    padding: 6px 14px;
  }

  .lightbox-image {
    max-height: 75vh;
  }
}