/*
Theme Name: Cole Portfolio
Theme URI:
Author: Jaime Laliena
Description: Tema minimalista de portfolio de arte. Réplica de la plantilla Framer "Cole", con CPT de Colecciones y Obras y navegador con slider.
Version: 3.0
License: GNU General Public License v2 or later
Text Domain: cole-portfolio
*/

/* ============================================
   FONTS & VARIABLES
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,500;0,600;0,700;1,400;1,700&display=swap');

:root {
  --bg:         #000;
  --surface:    #111;
  --border:     rgba(255, 255, 255, 0.1);
  --text:       #e3e3e3;
  --text-muted: rgba(255, 255, 255, 0.6);
  --font:       'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  /*--max-w:      1200px;*/
  --max-w:      96dvw;
  --top-pad:    clamp(7rem, 13vh, 11rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s, opacity 0.2s; }
ul, ol { list-style: none; }

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* ============================================
   HEADER & NAV
============================================ */

.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  z-index: 100;
  pointer-events: none;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}
.main-nav { display: flex; align-items: center; gap: 0.25rem; margin-left: 0; justify-content: space-between; width: 50%; }
.main-nav a {
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 60px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.main-nav a:hover,
.main-nav a.current-menu-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 1px; background: var(--text); transition: transform 0.3s ease, opacity 0.3s ease; }

/* ============================================
   IDENTIDAD (nombre + subtítulo + firma)
============================================ */

.hero-name {
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-transform: uppercase;
  color: #b3b3b3;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  font-weight: 400;
  color: #b3b3b3;
  letter-spacing: -0.01em;
  margin-top: 0.6rem;
}
.signature {
  width: clamp(160px, 18vw, 240px);
  height: auto;
  margin-top: 2rem;
  opacity: 0.92;
}

/* ============================================
   HOME (2 columnas)
============================================ */

.home { padding-top: var(--top-pad); padding-bottom: 2rem; }

.home-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.home-left .exposiciones { margin-top: clamp(2.5rem, 6vw, 4.5rem); }

/* Exposiciones */
.expo-header {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.expo-list { display: flex; flex-direction: column; }
.expo-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.expo-item:first-child { border-top: 1px solid var(--border); }
.expo-item__city  { font-size: 0.95rem; color: var(--text-muted); min-width: 120px; flex-shrink: 0; }
.expo-item__venue { font-size: 0.95rem; font-weight: 500; flex: 1; }
.expo-item__year  { font-size: 0.95rem; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }

/* Tarjetas de colección */
.col-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.col-card { display: flex; flex-direction: column; gap: 0.75rem; }
.col-card__thumb {
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  aspect-ratio: 10/8;
}
.col-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.col-card:hover .col-card__thumb img { transform: scale(1.04); }
.col-card__info { border-top: 1px solid var(--border); padding-top: 0.6rem; display: flex; flex-direction: column; gap: 0.15rem; }
.col-card__title { font-size: 1rem; font-weight: 500; }
.col-card__sub { font-size: 0.85rem; color: var(--text-muted); }

.home-right .contact-cta { padding-inline: 0; margin-top: clamp(1.5rem, 4vw, 2.5rem); }

/* ============================================
   NAVEGADOR DE COLECCIONES (/works) + single
============================================ */

.colecciones-page, .coleccion-single { padding-top: var(--top-pad); padding-bottom: 2rem; }

.browser {
  display: grid;
  grid-template-columns: clamp(400px, 25%, 1900px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.col-list__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 1rem;
}
.col-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.col-list__item {
  display: block;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.col-list__item:hover { color: var(--text); }
.col-list__item.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.back-link { display: inline-block; font-size: 0.9rem; color: var(--text-muted); margin-top: 1.5rem; }
.back-link:hover { color: var(--text); }
.coleccion-desc { margin-top: 1rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; max-width: 40ch; }

/* Paneles (solo el activo visible) */
.collection-panel { display: none; }
.collection-panel.is-active { display: block; }
.browser--single .collection-panel { display: block; }

/* ============================================
   SLIDER
============================================ */

.slider__stage { position: relative; }
.slider__frame {
  position: relative;
  height: clamp(320px, 56vh, 600px);
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
.slider__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}
.slider__slide.is-active { opacity: 1; visibility: visible; }
.slider__slide img { width: 100%; height: 100%; object-fit: cover; }

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s;
}
.slider__arrow:hover { background: rgba(0, 0, 0, 0.7); border-color: rgba(255, 255, 255, 0.5); }
.slider__arrow--prev { left: 14px; }
.slider__arrow--next { right: 14px; }

.slider__caption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.slider__title { font-size: 1.05rem; font-weight: 500; }
.slider__sub { font-size: 0.9rem; color: var(--text-muted); }

.slider__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.slider__thumb {
  padding: 0;
  border: 1px solid transparent;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.7;
}
.slider__thumb img { width: 100%; height: 100%; object-fit: cover; }
.slider__thumb:hover { opacity: 1; }
.slider__thumb.is-active { opacity: 1; border-color: rgba(255, 255, 255, 0.7); }

.slider--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(280px, 40vh, 420px);
  background: var(--surface);
  border-radius: 4px;
}
.slider__empty-text { color: var(--text-muted); }

/* ============================================
   SINGLE OBRA
============================================ */

.obra-single { padding-top: var(--top-pad); padding-bottom: 2rem; }
.obra-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.obra-image { position: sticky; top: var(--top-pad); }
.obra-image img { width: 100%; border-radius: 4px; }
.obra-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0.5rem 0 0.4rem;
}
.obra-year { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.obra-details { border-top: 1px solid var(--border); margin-bottom: 2rem; }
.obra-detail {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.obra-detail__label { color: var(--text-muted); }
.obra-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; }

/* ============================================
   BOTONES + CTA
============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 70px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: #e0e0e0; }

.contact-cta {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
  max-width: var(--max-w);
  margin-inline: auto;
}
.contact-cta__text {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #e3e3e3;
  max-width: 46ch;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ============================================
   PAGE HEADER genérico (index / page)
============================================ */

.page-header { padding-top: var(--top-pad); padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }
.page-header__title {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: #b3b3b3;
}
.page-body { max-width: 65ch; color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.page-body a { color: var(--text); text-decoration: underline; }
.post-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }

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

.site-footer { border-top: 1px solid var(--border); padding-block: clamp(2rem, 4vw, 3rem); overflow: hidden; }
.footer-name {
  font-size: clamp(4rem, 14vw, 13rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 85%;
  text-transform: uppercase;
  color: #b3b3b3;
  white-space: nowrap;
  text-align: center;
  display: block;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

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

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: clamp(2rem, 8vw, 3.5rem); }
  .browser { grid-template-columns: 1fr; gap: 2rem; }
  .obra-layout { grid-template-columns: 1fr; }
  .obra-image { position: static; }
  .col-list { border-top: none; }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    z-index: 99;
    width: 100%;
  }
  .main-nav.open { display: flex; }
  .main-nav.open a { font-size: 1.4rem; }
  .nav-toggle { display: flex; z-index: 101; position: relative; }

  .col-cards { grid-template-columns: repeat(2, 1fr); }
  .expo-item { flex-wrap: wrap; gap: 0.25rem 1rem; }
  .expo-item__year { margin-left: 0; }
  .slider__grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

/* ============================================
   WP ADMIN BAR
============================================ */

.admin-bar .site-header { top: 52px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 58px; }
}
