/* ============================================
   URIARTE SEBASTIAN - Web 2026
   Basado en especificaciones de "web madre"
   ============================================ */

/* Variables */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #666666;
  --color-accent: #8B7355;
  --color-gray-band: #4a4a4a;
  --color-border: #e5e5e5;
  --font-main: 'Century Gothic', 'Poppins', Arial, sans-serif;
  --max-width: 1400px;
  --transition: 0.3s ease;
  --sidebar-width: 280px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  letter-spacing: 0.05em;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.1rem;
}

/* ============================================
   LAYOUT: Sidebar + Main Content
   ============================================ */

.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar / Menu lateral */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.logo-firma {
  max-width: 180px;
  margin: 0 auto;
}

.logo-firma img {
  width: 100%;
}

/* Navigation */
.main-nav {
  flex: 1;
  padding: 1.5rem 0;
}

.main-nav ul {
  list-style: none;
}

.main-nav > ul > li {
  border-bottom: 1px solid var(--color-border);
}

.main-nav a,
.main-nav .menu-toggle-btn {
  display: block;
  padding: 0.875rem 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--color-text);
}

.main-nav a:hover,
.main-nav .menu-toggle-btn:hover {
  background: #f5f5f5;
  color: var(--color-accent);
}

.main-nav a.active {
  font-weight: 600;
  color: var(--color-accent);
}

/* Submenu */
.has-submenu > .menu-toggle-btn {
  position: relative;
}

.has-submenu > .menu-toggle-btn::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  font-size: 1rem;
  transition: transform var(--transition);
}

.has-submenu.open > .menu-toggle-btn::after {
  content: '-';
}

.submenu {
  display: none;
  background: #fafafa;
}

.has-submenu.open > .submenu {
  display: block;
}

.submenu a,
.submenu .menu-toggle-btn {
  padding-left: 2.5rem;
  font-size: 0.75rem;
}

.submenu .submenu a {
  padding-left: 3.5rem;
  font-size: 0.7rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
}

/* ============================================
   HOMEPAGE - Sin scroll
   ============================================ */

.home-page .main-content {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.slideshow-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.slideshow {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Info band - banda gris */
.info-band {
  background: var(--color-gray-band);
  color: white;
  padding: 0.75rem 2rem;
  font-size: 0.8125rem;
  text-align: center;
  letter-spacing: 0.05em;
}

/* Quote section */
.quote-section {
  padding: 2rem;
  text-align: center;
  background: var(--color-bg);
}

.quote-text {
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  color: var(--color-text-light);
}

.quote-author {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-accent);
}

/* ============================================
   INNER PAGES
   ============================================ */

.page-header {
  padding: 3rem 2rem;
  background: linear-gradient(to bottom, #fafafa, #ffffff);
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: 1.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-content {
  padding: 3rem 2rem;
}

/* Biography layout */
.bio-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  max-width: 900px;
}

.bio-photo img {
  width: 100%;
  border-radius: 2px;
}

.bio-text {
  text-align: justify;
  line-height: 1.8;
}

.bio-text p {
  margin-bottom: 1.5rem;
}

/* Timeline */
.timeline {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.timeline h2 {
  margin-bottom: 2rem;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.timeline-year {
  font-weight: 600;
  color: var(--color-accent);
}

.timeline-content {
  font-size: 0.9375rem;
}

/* ============================================
   OBRA / GALLERY
   ============================================ */

.obra-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
}

.obra-sidebar {
  position: sticky;
  top: 2rem;
}

.obra-sidebar img {
  width: 100%;
  margin-bottom: 1.5rem;
}

.autor-notes {
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--color-text-light);
  text-align: justify;
}

.autor-notes .firma {
  text-align: right;
  margin-top: 1rem;
  font-weight: 600;
  font-style: normal;
}

/* Gallery main */
.gallery-main {
  flex: 1;
}

.gallery-featured {
  position: relative;
  margin-bottom: 1.5rem;
}

.gallery-featured img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #f5f5f5;
}

.gallery-featured-info {
  padding: 1rem;
  background: var(--color-gray-band);
  color: white;
  font-size: 0.8125rem;
}

.gallery-nav {
  position: absolute;
  bottom: 4rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

.gallery-nav button {
  background: rgba(255,255,255,0.9);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}

.gallery-nav button:hover {
  background: white;
}

/* Thumbnails */
.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.gallery-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: var(--color-accent);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Simple gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.gallery-item figcaption {
  padding: 0.75rem;
  font-size: 0.8125rem;
  background: white;
}

/* ============================================
   EXPOSICIONES
   ============================================ */

.expo-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  max-width: 900px;
}

.expo-photo img {
  width: 100%;
}

.expo-list {
  list-style: none;
}

.expo-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.expo-year {
  font-weight: 600;
  color: var(--color-accent);
}

/* ============================================
   PRENSA
   ============================================ */

.prensa-section {
  margin-bottom: 3rem;
}

.prensa-section h2 {
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.critica-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border-left: 3px solid var(--color-accent);
}

.critica-text {
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.critica-author {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.875rem;
}

/* Recortes gallery */
.recortes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.recorte-item {
  background: #f5f5f5;
  padding: 0.5rem;
}

.recorte-item img {
  width: 100%;
}

/* ============================================
   CONTACTO
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 800px;
}

.contact-info h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.contact-info p {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.contact-info a {
  color: var(--color-accent);
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.lightbox-close:hover {
  opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.8125rem;
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: white;
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .bio-container,
  .obra-layout,
  .expo-layout {
    grid-template-columns: 1fr;
  }

  .bio-photo,
  .obra-sidebar,
  .expo-photo {
    max-width: 250px;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .page-header {
    padding: 5rem 1.5rem 2rem;
  }

  .page-content {
    padding: 2rem 1.5rem;
  }

  .home-page .main-content {
    height: auto;
    min-height: 100vh;
  }

  .slideshow-container {
    min-height: 50vh;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item,
  .expo-item {
    grid-template-columns: 80px 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-justify { text-align: justify; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
