/* ==========================================================================
   OBSESIONES / BORDES - 2013 - 2026 - Galería Bisagra Arte Contemporáneo
   ========================================================================== */

/* 1. RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: #0a0a0a;
  color: #222222;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Lekton', 'Courier New', Courier, monospace;
  line-height: 1.8;
  overflow-x: hidden;
  background-color: #0a0a0a;
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #00a7ab;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00888c;
}

/* 2. TOP-LEFT NAVIGATION & MENU (CUADRADITOS CON TOOLTIPS) */
#nav2 {
  position: absolute;
  left: 20px;
  top: 150px;
  z-index: 1100;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#nav2 img {
  width: 65px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

#nav {
  position: fixed;
  left: 70px;
  top: 150px;
  z-index: 1200;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

#nav.nav-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
}

#nav li {
  position: relative;
  display: flex;
  align-items: center;
}

/* Square Dot Button */
#nav li a.nav-square {
  display: block;
  width: 9px;
  height: 9px;
  background-color: #d8d8d8;
  border: 1px solid #999999;
  border-radius: 2px;
  text-indent: -9999px;
  overflow: hidden;
  outline: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#nav li a.nav-square:hover,
#nav li.active a.nav-square {
  background-color: #00a7ab;
  border-color: #00a7ab;
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(0, 167, 171, 0.8);
}

/* First Button: Inicio / Subir (Vertical Rectangle + Matte Red Light) */
#nav li:first-child {
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#nav li:first-child.nav-home-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0);
}

#nav li:first-child a.nav-square {
  width: 9px;
  height: 18px;
  border-radius: 3px;
  background-color: #c04b4b;
  border: 1px solid #a83b3b;
  box-shadow: 0 0 6px rgba(192, 75, 75, 0.4);
}

#nav li:first-child a.nav-square:hover,
#nav li:first-child.active a.nav-square {
  background-color: #d95353;
  border-color: #d95353;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(217, 83, 83, 0.8);
}

/* Tooltip on Hover */
#nav li .nav-tooltip {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: rgba(15, 15, 15, 0.92);
  color: #ffffff;
  padding: 2px 8px;
  line-height: 1.2;
  font-family: 'Lekton', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#nav li .nav-tooltip::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 4px 4px 4px 0;
  border-style: solid;
  border-color: transparent rgba(15, 15, 15, 0.92) transparent transparent;
}

#nav li:hover .nav-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(2px);
}

/* 3. CONTENT CONTAINER & SECTIONS */
#content {
  width: 100%;
  position: relative;
}

section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 90px 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 0.4s ease;
}

/* Authentic Section Background Colors (Gradient sequence as you scroll down) */
#story-obsesiones {
  background-color: #0a0a0a;
  color: #ffffff;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: block;
}

#story-muestra {
  background-color: #eef0e9;
  color: #41423f;
}

#story-texto {
  background-color: #e6e8e1;
  color: #41423f;
}

#story-biografia {
  background-color: #dddfd9;
  color: #41423f;
}

#story-bisagra {
  background-color: #d5d6d0;
  color: #41423f;
}

#story-freebies {
  background-color: #d2d2cd;
  color: #41423f;
}

/* Section 1 - Hero Layout */
#bgobsesiones {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
  z-index: 1;
}

.story1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  padding: 0;
  pointer-events: none;
}

#logo {
  position: absolute;
  top: 0;
  right: 100px;
  z-index: 100;
  margin: 0;
  display: block;
  pointer-events: auto;
}

#logo img {
  display: block;
  width: 548px;
  max-width: calc(100vw - 120px);
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

/* Section Inner Container */
.story {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* 4. TYPOGRAPHY & ELEMENTS */
h2 {
  font-family: 'Dosis', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.3;
}

.story h2 {
  border-bottom: none;
  padding-bottom: 0;
  display: inline-block;
  margin-bottom: 8px;
}

#story-obsesiones h2 {
  border-bottom: none;
}

h3 {
  font-family: 'Dosis', sans-serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 12px;
  color: #2c2d2a;
  line-height: 1.5;
}

.author-signature {
  font-size: 17px;
  line-height: 1.35;
  margin-top: 16px;
  margin-bottom: 12px;
}

.muestra-info-container {
  margin-top: 1.2em;
}

.muestra-downloads {
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 12px;
}

.muestra-dates {
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 2px;
  color: #111111;
}

.muestra-address {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: #2b2c29;
}

h4 {
  font-family: 'Dosis', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 10px;
  color: #111111;
}

p {
  font-family: 'Lekton', monospace;
  font-size: 15px;
  line-height: 1.85;
  color: #2b2c29;
  margin-bottom: 20px;
}

em {
  font-style: italic;
}

a {
  color: #111111;
  text-decoration: underline;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: #00a7ab;
}

/* Production Info in Bisagra Section */
#production {
  font-size: 14px;
  width: 100%;
  text-align: left;
  margin-top: 8px;
}

#production table {
  width: 100%;
  margin-top: 8px;
}

#production td {
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
  padding: 6px;
}

#production img {
  border-radius: 3px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  max-width: 100%;
  height: auto;
}

#production img:hover {
  transform: scale(1.1);
}

/* Freebies & Download Links */
#story-freebies .freebies-col img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 15px;
}

#story-freebies a, 
#story-muestra a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid #222222;
  padding-bottom: 1px;
}

#story-freebies a:hover, 
#story-muestra a:hover {
  color: #00a7ab;
  border-bottom-color: #00a7ab;
}

/* 5. RESPONSIVE DESIGN (2026 STANDARDS) */

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
  section {
    padding: 80px 6%;
  }

  .story {
    max-width: 100%;
  }

  #nav2 {
    left: 15px;
    top: 15px;
  }

  #nav2 img {
    width: 50px;
  }

  #nav {
    left: 75px;
    top: 15px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  section {
    padding: 70px 5% 50px 5%;
    min-height: auto;
  }

  #story-obsesiones {
    min-height: 100vh;
  }

  /* Mobile Navigation Styles */
  #nav2 {
    left: 20px;
    top: 20px;
    z-index: 1100;
  }

  #nav2 img {
    width: 50px;
  }

  /* Mobile Vertical Navigation Dots at Bottom-Right */
  #nav {
    position: fixed;
    bottom: 25px;
    top: auto;
    left: auto;
    right: 20px;
    flex-direction: column;
    gap: 10px;
    background: none;
    backdrop-filter: none;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  #nav li a.nav-square {
    width: 11px;
    height: 11px;
  }

  #nav li:first-child a.nav-square {
    width: 11px;
    height: 22px;
  }

  #nav li .nav-tooltip {
    display: block;
    left: auto;
    right: 22px;
    transform: translateY(-50%) translateX(4px);
  }

  #nav li .nav-tooltip::before {
    left: auto;
    right: -4px;
    border-width: 4px 0 4px 4px;
    border-color: transparent transparent transparent rgba(15, 15, 15, 0.92);
  }

  #nav li:hover .nav-tooltip {
    transform: translateY(-50%) translateX(-2px);
  }

  h2 {
    font-size: 24px;
    letter-spacing: 1px;
  }

  .story h2 {
    font-size: 22px;
    line-height: 1.4;
  }

  h3 {
    font-size: 17px;
    line-height: 1.5;
  }

  .author-signature {
    font-size: 15.5px;
    line-height: 1.35;
  }

  .muestra-address {
    font-size: 14.5px;
    line-height: 1.32;
  }

  p {
    font-size: 14px;
    line-height: 1.75;
  }

  #logo {
    right: 15px;
    top: 0;
  }

  #logo img {
    max-width: 80vw;
    width: 340px;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  section {
    padding: 60px 16px 40px 16px;
  }

  h2 {
    font-size: 20px;
  }

  p {
    font-size: 13.5px;
  }
}

/* Book & Freebies 2-column layout */
.book-freebies-grid {
  display: flex;
  gap: 40px;
  align-items: stretch;
  margin-top: 10px;
}

.book-col,
.freebies-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-col .col-top,
.freebies-col .col-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.book-col .col-bottom,
.freebies-col .col-bottom {
  margin-top: 16px;
  padding-top: 4px;
}

#story-freebies .book-img,
.book-img {
  width: 100%;
  max-width: 294px;
  height: auto;
  display: block;
  align-self: flex-start;
  margin-left: 0;
  margin-right: auto;
  border-radius: 0;
  box-shadow: none !important;
  filter: none !important;
  border: none !important;
  outline: none !important;
}

.wallpaper-block {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.wallpaper-img-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}

.wallpaper-img {
  width: 160px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.wallpaper-img:hover {
  transform: scale(1.03);
}

.wallpaper-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.5;
  font-size: 14px;
  text-align: left;
  align-items: flex-start;
  margin-top: -4px;
}

@media (max-width: 768px) {
  .book-freebies-grid {
    flex-direction: column;
    gap: 28px;
  }

  .book-col .col-bottom,
  .freebies-col .col-bottom {
    margin-top: 12px;
  }
}

/* Screen reader / Accessible visually hidden utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================
   FOOTER CUSTOM & CONTACT MODAL (SHARED IDENTITY)
   ========================================== */

.footer-custom {
  background-color: #cacac5;
  color: #41423f;
  font-family: 'Lekton', monospace;
  padding: 25px 20px 25px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 500;
  width: 100%;
}

.footer-container {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-top {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  padding-bottom: 20px;
}

.footer-quote {
  font-size: 15px;
  line-height: 1.5;
  color: #2b2c28;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.footer-middle {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-subtitle {
  font-size: 13px;
  color: #555652;
  margin: 0;
  letter-spacing: 0.02em;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: #383935;
  border: 1px solid #2b2c28;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  background-color: #00a7ab;
  border-color: #00a7ab;
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-right {
  display: flex;
  align-items: center;
}

.footer-copyright {
  font-size: 13px;
  color: #555652;
  margin: 0;
}

/* Floating Scroll Top Button */
.scroll-top-btn {
  display: none !important;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background-color: #00a7ab;
  border-color: #00a7ab;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 167, 171, 0.35);
}

/* Contact Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-container {
  background-color: #181916;
  border: 1px solid #2a2b27;
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  padding: 32px;
  color: #e5e5e5;
  font-family: 'Lekton', monospace;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-header h3 {
  font-family: 'Dosis', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.close-button {
  background: none;
  border: none;
  color: #888888;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.close-button:hover {
  color: #ffffff;
}

.modal-context {
  font-size: 14px;
  line-height: 1.5;
  color: #aaaaaa;
  margin-bottom: 24px;
  border-bottom: 1px solid #2a2b27;
  padding-bottom: 16px;
}

/* Form Controls */
.php-email-form-modal {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #cccccc;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: #0f100e;
  border: 1px solid #333430;
  border-radius: 4px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: 'Lekton', monospace;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #00a7ab;
  box-shadow: 0 0 0 2px rgba(0, 167, 171, 0.25);
}

.form-status {
  margin-top: 4px;
}

.form-status .loading,
.form-status .error-message,
.form-status .sent-message {
  display: none;
  font-size: 13px;
  padding: 10px;
  border-radius: 4px;
  line-height: 1.4;
}

.form-status .loading {
  background-color: #222320;
  color: #aaaaaa;
}

.form-status .error-message {
  background-color: #3b1818;
  color: #ff9999;
  border: 1px solid #662222;
}

.form-status .sent-message {
  background-color: #122c22;
  color: #88e0b0;
  border: 1px solid #1a523a;
}

.form-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background-color: #00a7ab;
  color: #ffffff;
  border: none;
  padding: 12px 22px;
  font-family: 'Lekton', monospace;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #00888c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 167, 171, 0.3);
}

@media (max-width: 600px) {
  .footer-middle {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .modal-container {
    padding: 24px 20px;
  }
}