/* Isaias Miciu Nicolaevici — Photography
   Mantiene la estética del sitio original (Montserrat / Roboto, gris #222 / #f1f1f1)
   reescrito sin jQuery, Bootstrap ni Revolution Slider. */

:root {
  --dark: #222222;
  --dark-2: #1a1a1a;
  --light: #f1f1f1;
  --gray: #888888;
  --text: #555555;
  --white: #ffffff;
  --head: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --header-h: 92px;
  --ease: cubic-bezier(.25, .8, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--body); font-weight: 300; font-size: 15px; line-height: 1.75; letter-spacing: .3px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: opacity .2s, color .2s; }
a:hover { opacity: .7; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
strong { font-weight: 500; color: var(--dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 900px; }

/* ---------- Kicker / títulos de sección (01/ About) ---------- */
.kicker {
  color: var(--dark); font: 400 18px/1.3 var(--body); text-transform: uppercase;
  letter-spacing: 1.8px; margin: 0 0 18px;
}
.kicker span { color: var(--gray); }
.white .kicker, .kicker.white { color: var(--white); }
.title-section { text-align: center; margin-bottom: 50px; }
.title-section h1 {
  color: var(--dark); font: 700 36px/1.2 var(--head); text-transform: uppercase; letter-spacing: 2px;
}
.title-section.white h1 { color: var(--white); }
.title-section .intro { max-width: 860px; margin: 28px auto 0; }
.title-section.white .intro { color: #bbbbbb; }
.title-section .highlight {
  max-width: 860px; margin: 24px auto 0; font: 500 14px/1.7 var(--head); letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--white);
}

/* ---------- Botón línea (efecto relleno del tema original) ---------- */
.btn-line {
  position: relative; display: inline-block; padding: 8px 14px; margin-top: 10px;
  font: 500 12px/1.4 var(--body); text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--dark); overflow: hidden; border: 0; background: none;
}
.btn-line span { position: relative; z-index: 1; }
.btn-line::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--dark);
  transition: height .25s var(--ease);
}
.btn-line:hover { opacity: 1; color: var(--white); }
.btn-line:hover::after { height: 100%; }
.btn-line.light { color: var(--white); }
.btn-line.light::after { background: var(--white); }
.btn-line.light:hover { color: var(--dark); }

/* ---------- Hero / slideshow ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 480px; background: #000; overflow: hidden; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity 1.6s ease-in-out; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.hero-slide.is-active img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero-caption {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #fff;
  padding: 0 20px; text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
.hero-caption h2 { font: 700 clamp(28px, 5vw, 60px)/1.15 var(--head); text-transform: uppercase; letter-spacing: 4px; }
.hero-caption p { font: 300 clamp(14px, 1.6vw, 20px)/1.5 var(--body); letter-spacing: 2px; margin-top: 14px; }
.hero-arrow {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 54px; height: 54px;
  background: rgba(0,0,0,.25); color: #fff; border: 0; font-size: 34px; line-height: 1; border-radius: 50%;
  opacity: 0; transition: opacity .3s, background .2s;
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(0,0,0,.5); }
.hero-arrow.prev { left: 20px; } .hero-arrow.next { right: 20px; }

/* ---------- Header (barra oscura sobre el pie del slider, luego fija arriba) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; margin-top: calc(-1 * var(--header-h)); height: var(--header-h);
  background: rgba(34,34,34,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .3s;
}
.site-header.scrolled { background: rgba(26,26,26,.94); }
.header-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 50px; gap: 20px;
}
.brand { display: block; line-height: 0; }
.brand img { height: 62px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 18px; }
.main-nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.main-nav ul a {
  display: block; padding: 6px 15px; color: #eeeeee; font: 500 12px/1 var(--body); letter-spacing: 1.8px; text-transform: uppercase;
}
.main-nav ul a.active { color: #fff; }
.lang-switch { display: flex; gap: 2px; margin-left: 10px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.lang-switch a { color: #aaa; font: 500 11px/1 var(--body); letter-spacing: 1.5px; padding: 6px 6px; }
.lang-switch a.active { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .25s, opacity .25s; }

/* ---------- About ---------- */
.about-section { background: var(--light); }
.about-box { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-info { padding: 60px 8% 60px 70px; }
.about-title {
  color: var(--dark); font: 700 36px/42px var(--head); text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 26px;
}
.about-text { max-width: 540px; letter-spacing: .6px; }

/* ---------- Fine art ---------- */
.fineart-section { background: var(--dark); padding: 100px 0 70px; }
.filter { list-style: none; margin: 0 0 50px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.filter button {
  position: relative; background: none; border: 0; padding: 4px 0; color: var(--gray);
  font: 400 12px/1.4 var(--body); text-transform: uppercase; letter-spacing: 1.4px; transition: color .2s;
}
.filter button::after {
  content: ''; position: absolute; left: 0; top: 50%; height: 1px; width: 0; background: #fff; transition: width .2s;
}
.filter button:hover, .filter button.active { color: #fff; }
.filter button:hover::after, .filter button.active::after { width: 100%; }

.art-grid { columns: 3; column-gap: 0; padding: 0 30px; }
.art-item {
  position: relative; margin: 0; overflow: hidden; break-inside: avoid;
  transition: opacity .35s, transform .35s;
}
.art-item.hide { display: none; }
.art-item.fade-in { animation: fadeIn .45s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.art-item img { width: 100%; transform: scale(1.1); transition: transform .4s var(--ease); }
.art-item:hover img, .art-item:focus-within img { transform: scale(1); }
.art-link { position: absolute; inset: 0; z-index: 1; }
.hover-box {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.93); opacity: 0; transition: opacity .25s; pointer-events: none;
}
.art-item:hover .hover-box, .art-item:focus-within .hover-box { opacity: 1; pointer-events: auto; }
.project-tags { list-style: none; margin: 0; padding: 0 40px; text-align: center; }
.project-tags li { margin: 6px 0; }
.project-tags a {
  color: var(--dark); font: 500 13px/1.4 var(--head); letter-spacing: 1.6px; text-transform: uppercase;
  border-bottom: 1px solid transparent;
}
.project-tags a:hover { opacity: 1; border-bottom-color: var(--dark); }
.collection-links { list-style: none; margin: 50px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.collection-links a { color: #bbb; font: 400 12px/1.4 var(--body); letter-spacing: 1.4px; text-transform: uppercase; }
.collection-links a span { display: inline-block; transition: transform .2s; }
.collection-links a:hover { color: #fff; opacity: 1; }
.collection-links a:hover span { transform: translateX(4px); }
.collection-links.dark a { color: var(--gray); }
.collection-links.dark a:hover { color: var(--dark); }

/* ---------- Cards (libros / trabajos) ---------- */
.books-section { padding: 100px 0 60px; }
.works-section { padding: 100px 0 70px; background: var(--light); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 30px; }
.card { margin-bottom: 40px; }
.card-img { display: block; overflow: hidden; background: #e5e5e5; }
.card-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.card-img:hover { opacity: 1; }
.card-img:hover img { transform: scale(1.04); }
.books .card-img img { aspect-ratio: auto; }
.card-body { text-align: center; padding-top: 18px; }
.card-body h2 { font: 400 22px/1.3 var(--head); letter-spacing: 1.6px; text-transform: uppercase; color: var(--dark); margin-bottom: 6px; }
.card-body span { font-size: 12px; letter-spacing: 1.4px; color: var(--dark); }

.work-feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: center; margin-bottom: 60px; }
.work-feature-img { display: block; overflow: hidden; }
.work-feature-img img { width: 100%; transition: transform .6s var(--ease); }
.work-feature-img:hover { opacity: 1; }
.work-feature-img:hover img { transform: scale(1.03); }
.work-feature .meta { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gray); }
.work-feature h2 { font: 700 28px/1.25 var(--head); letter-spacing: 2px; text-transform: uppercase; color: var(--dark); margin: 8px 0 18px; }

/* ---------- Exhibitions ---------- */
.exhibitions-section { padding: 100px 0; background: var(--dark); }
.exh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.exh-item { position: relative; min-height: 260px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.exh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.exh-item:hover .exh-bg { transform: scale(1.05); }
.exh-item::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.25); z-index: 1; }
.exh-content { position: relative; z-index: 2; padding: 50px 20px; }
.exh-content span { display: block; color: #eee; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 20px; }
.exh-content h2 { position: relative; color: #fff; font: 400 24px/1.3 var(--head); letter-spacing: 2px; text-transform: uppercase; padding-bottom: 30px; }
.exh-content h2::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 70px; height: 2px; margin-left: -35px; background: #fff; }

/* ---------- Contact ---------- */
.contact-section { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); }
.contact-image img { width: 100%; height: 100%; object-fit: cover; }
.contact-form-part { padding: 90px 8% 80px 70px; }
.contact-form-part h1 { color: var(--dark); font: 700 36px/1.2 var(--head); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 34px; }
#contact-form { max-width: 480px; }
#contact-form input, #contact-form textarea {
  display: block; width: 100%; border: 0; border-bottom: 1px solid #dddddd; background: transparent; padding: 12px 0;
  margin-bottom: 18px; font: 300 14px/1.5 var(--body); color: var(--dark); outline: none; transition: border-color .2s; border-radius: 0;
}
#contact-form input:focus, #contact-form textarea:focus { border-bottom-color: var(--dark); }
#contact-form textarea { height: 120px; resize: vertical; }
#contact-form button {
  background: var(--dark); color: #fff; border: 0; padding: 12px 34px; font: 500 12px/1 var(--body);
  letter-spacing: 1.8px; text-transform: uppercase; transition: opacity .2s; margin-top: 6px;
}
#contact-form button:hover { opacity: .8; }
#contact-form button[disabled] { opacity: .5; cursor: wait; }
.hp { position: absolute; left: -9999px; }
.form-msg { margin-top: 14px; font-size: 13px; min-height: 1.5em; }
.form-msg.ok { color: #2f7d32; } .form-msg.err { color: #b3261e; }
.contact-info { margin-top: 36px; line-height: 2.1; }
.contact-info a { display: inline-flex; align-items: center; gap: 10px; color: var(--dark); }
.contact-info svg { width: 15px; height: 15px; fill: var(--dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid #eeeeee; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 26px 50px; gap: 20px; flex-wrap: wrap; }
.footer-inner p { margin: 0; font-size: 12px; color: var(--dark); letter-spacing: .6px; }
.social { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.social a { font-size: 12px; color: var(--gray); letter-spacing: 1px; }

/* ---------- Páginas internas ---------- */
.inner-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid #eeeeee; height: var(--header-h); backdrop-filter: blur(6px); }
.inner-actions { display: flex; align-items: center; gap: 26px; }
.inner-header .lang-switch { border-left: 0; margin: 0; padding: 0; }
.inner-header .lang-switch a { color: #aaa; }
.inner-header .lang-switch a.active { color: var(--dark); }
.close-link { font: 500 12px/1 var(--body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--dark); }
.page-title { padding: 70px 0 50px; }
.work-hero { margin: 0; background: var(--light); display: flex; justify-content: center; }
.work-hero a { display: block; cursor: zoom-in; }
.work-hero img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - var(--header-h)); object-fit: contain; }
.page-title .crumbs { font: 500 11px/1.4 var(--body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--gray); margin-bottom: 10px; }
.page-title h1 { color: var(--dark); font: 700 clamp(26px, 4vw, 40px)/1.15 var(--head); text-transform: uppercase; letter-spacing: 2px; }
.page-title .date { margin: 10px 0 0; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dark); }
.page-intro { margin-top: 24px; max-width: 900px; }
.page-intro em { color: var(--dark); }
.page-title .actions { margin-top: 18px; display: flex; gap: 16px; flex-wrap: wrap; }
.more-collections { padding: 60px 0 80px; text-align: center; }
.more-collections .collection-links { margin-top: 10px; }

/* Galería justificada (filas con alto parejo, sin JS) */
.gallery.justified { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px; }
.g-item { position: relative; flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * 300px); overflow: hidden; background: #f3f3f3; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.g-item:hover { opacity: 1; }
.g-item:hover img { transform: scale(1.025); }
.g-filler { flex-grow: 1000000; }

/* On assignment */
.assign-grid { display: grid; grid-template-columns: 1fr 1fr; }
.assign-item { position: relative; display: block; overflow: hidden; }
.assign-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; transition: transform .5s var(--ease); }
.assign-item:hover { opacity: 1; }
.assign-item:hover img { transform: scale(1.04); }
.assign-hover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: rgba(255,255,255,.92); opacity: 0; transition: opacity .25s; padding: 30px; color: var(--dark);
}
.assign-item:hover .assign-hover, .assign-item:focus .assign-hover { opacity: 1; }
.assign-hover b { font: 400 36px/1 var(--body); margin-bottom: 10px; }
.assign-hover em { font: 400 14px/1.5 var(--head); font-style: normal; letter-spacing: 1.5px; text-transform: uppercase; }

/* Carrusel de libro */
.carousel { position: relative; max-width: 1170px; margin: 0 auto 60px; padding: 0 20px; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; background: #111; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; }
.carousel-slide img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.carousel-slide:hover { opacity: 1; }
.carousel-btn { position: absolute; top: calc(50% - 50px); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--dark); font-size: 28px; line-height: 1; }
.carousel-btn.prev { left: 34px; } .carousel-btn.next { right: 34px; }
.carousel-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.carousel-thumbs button { padding: 0; border: 2px solid transparent; background: none; opacity: .55; transition: opacity .2s, border-color .2s; }
.carousel-thumbs button.active, .carousel-thumbs button:hover { opacity: 1; border-color: var(--dark); }
.carousel-thumbs img { width: 72px; height: 54px; object-fit: cover; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(12,12,12,.97); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; transition: opacity .25s; }
.lightbox img.loading { opacity: .3; }
.lightbox figcaption { color: #bbb; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 12px; text-align: center; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; opacity: .7; transition: opacity .2s; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 14px; right: 22px; font-size: 40px; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 54px; padding: 20px; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #888; font-size: 12px; letter-spacing: 2px; }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide.is-active img { animation: none; transform: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .header-inner { padding: 0 24px; }
  .main-nav ul a { padding: 6px 9px; letter-spacing: 1.2px; }
}
@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  /* sin backdrop-filter: si no, el menú fijo se posiciona relativo a la barra y queda fuera de pantalla */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(34,34,34,.8); }
  .brand, .nav-toggle { position: relative; z-index: 2; }
  .main-nav {
    position: fixed; inset: 0; height: 100vh; height: 100dvh; flex-direction: column; justify-content: center; align-items: stretch; gap: 0;
    background: rgba(21,21,21,.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 90px 0; transform: scale(.98); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s; overflow-y: auto; text-align: center;
  }
  .site-header.open .main-nav { opacity: 1; transform: none; visibility: visible; }
  .site-header.open { background: transparent; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .main-nav ul { flex-direction: column; }
  .main-nav ul a { padding: 14px 24px; font-size: 14px; }
  .lang-switch { border-left: 0; margin: 18px 0 0; padding: 0; justify-content: center; }
  .about-box, .contact-section { grid-template-columns: 1fr; }
  .about-info, .contact-form-part { padding: 60px 24px; }
  .about-title { font-size: 26px; line-height: 1.3; }
  .art-grid { columns: 2; padding: 0 15px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .work-feature { grid-template-columns: 1fr; gap: 26px; }
  .contact-image { max-height: 420px; overflow: hidden; }
}
@media (max-width: 640px) {
  :root { --header-h: 72px; }
  body { font-size: 14.5px; }
  .brand img { height: 48px; }
  .title-section h1, .contact-form-part h1 { font-size: 26px; }
  .fineart-section, .books-section, .works-section, .exhibitions-section { padding: 70px 0 50px; }
  .art-grid { columns: 1; padding: 0; }
  .cards { grid-template-columns: 1fr; }
  .assign-grid { grid-template-columns: 1fr; }
  .assign-hover { opacity: 0; }
  .gallery.justified { gap: 4px; padding: 0 4px; }
  .g-item { flex-basis: calc(var(--r) * 180px); }
  .footer-inner { padding: 20px 24px; justify-content: center; text-align: center; }
  .inner-actions { gap: 14px; }
  .carousel-btn { display: none; }
  .hero-arrow { display: none; }
  .lb-prev, .lb-next { font-size: 40px; padding: 10px; }
}

/* Portada de colección */
.collection-cover { margin: 0 0 8px; }
.collection-cover img { width: 100%; max-height: 82vh; object-fit: cover; }
