/* V15 CLEAN (refactor) */

/* FONTS */
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-UltraLightIt.woff") format("woff");
  font-weight: 100;
  font-style: italic;
}
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-Light.woff") format("woff");
  font-weight: 200;
  font-style: normal;
}
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-LightItalic.woff") format("woff");
  font-weight: 200;
  font-style: italic;
}
@font-face{
  font-family: 'AvenirNext';
  src: url("../fonts/avenir/AvenirNextCyr-Regular.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-Italic.woff") format("woff");
  font-weight: 300;
  font-style: italic;
}
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-Medium.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-MediumItalic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
}
@font-face{
  font-family: 'AvenirNext';
  src:  url("../fonts/avenir/AvenirNextCyr-Bold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
}

/* GENERAL */
*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  line-height: 1;
}
*::-webkit-media-controls-start-playback-button {
  display: none!important;
  -webkit-appearance: none;
}
.not_mobile{ display: block; }

body{
  margin: 0;
  background-color: #F6F6F6;
  font-family: 'AvenirNext', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
a { text-decoration: none; color: black; }
a:hover{ color: #e84833; }
video{ margin-bottom: -5px; }
p{
  font-family: 'AvenirNext';
  font-size: 18px;
  line-height: 1.1;
  font-weight: 300;
}
h2{ font-family: 'AvenirNext'; font-weight: 300; }
h1{ font-family: 'AvenirNext'; font-weight: 300; }
h3{ font-family: 'AvenirNext'; font-weight: 400; font-size: 14px; }

/* NAVBAR */
.navbar{
  display: flex;
  width:100vw;
  height: 50px;
  background-color: white;
  padding: 0;
  margin: 0;
  justify-content: flex-start;
  position: fixed;
  top:0;
  z-index: 1000 !important;
}
#nav_right{
  display: flex;
  justify-content: flex-start;
  width: 63%;
}
#LOGO{
  display: flex;
  align-items: center;
}
#LOGO img{
  height: 50%;
  cursor: pointer;
  user-select: none;
}
#address{
  display: flex;
  align-items: center;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 18px;
  white-space: nowrap;
}
.page_links{
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin:0;
  margin-right: 5%;
  white-space: nowrap;
}
.page_links a{
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 16px;
  padding-right: 30px;
}
.AVENIR p, .AVENIR a{
  font-family: 'AvenirNext';
  font-weight: 300;
}

/* MAP */
.fullscreen-video {
  position: static;
  top: 0;
  left: 0;
  width: 100vw;
  height: 101vh;
  object-fit: cover;
  opacity: 1;
}
#safari_vid{ display: none; }
#notsafari_vid{ display: none; }

/* AFTER MAP */
.left_section{
  width:37%;
  padding-left: 5%;
}
.right_section{
  width: 80%;
  padding:0% 20% 0% 0%;
}
.left_section_content{ padding: 5px 0 0 0; }
.line{
  height: 1px;
  width: 100%;
  background-color: black;
  margin: 0 8% 0 8%;
}

/* 3d */
[id="3d"]{
  display: flex;
  padding-top:100px;
  scroll-margin-top: 40px;
}

/* research */
[id="research"]{
  display: flex;
  padding-top:100px;
  scroll-margin-top: 40px;
}

/* about */
[id="about"]{
  display: flex;
  padding-top:200px;
  padding-bottom: 200px;
  scroll-margin-top: 40px;
}
#CONTACT_title{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#contact_info{
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
  flex-wrap: wrap;
}
#contact_info p{ font-weight: 300; }
#contact_info a{
  font-family: 'AvenirNext';
  font-size: 18px;
}
#PHONE, #EMAIL{ display: flex; }
#PHONE{ padding-right: 25px; }

/* contact */
[id="contact"]{
  display: flex;
  scroll-margin-top: 260px;
  padding-top: 150px;
  padding-bottom: 150px;
  margin-bottom: 0;
}
#contact_artists a{
  text-decoration: none;
  font-family: 'AvenirNext';
  font-weight: 400;
  font-size: 12px;
  white-space: nowrap;
}
[id="contact"] h2{
  font-weight: 300;
  font-size: 18px;
}

/* ARCHIVE */
#ARCHIVE{
  background-color: #c7c7c7;
  padding-bottom: 0px;
  scroll-margin-top: 49px;
}
.section_title{
  background-color:#E9E9E9;
  display: flex;
  align-items: center;
  position: sticky;
  top:49px;
  z-index: 1000;
}
#ARCHIVE_title{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#ARCHIVE_links{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  z-index: 1001;
}
#ARCHIVE_links a{
  text-decoration: none;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 12px;
  color: black;
  white-space: nowrap;
  padding-right: 35px;
}
#ARCHIVE_links a:hover{ color: #00ff44 !important; }

/* TALKS */
#TALKS {
  scroll-margin-top: 80px;
  padding-top: 5px;
  padding-left: 37%;
  background: #d9d9d9;
}
#TALKS p {
  white-space: nowrap;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 11px;
  line-height: 1.1;
}
.interview { padding-top: 15px; }
#last_interview{ padding-bottom: 20px; }
.audio-player {
  display: flex;
  align-items: center !important;
  width: 600px;
  padding-top: 5px;
}
.audio-player p, .audio-player a, .audio-player span {
  white-space: nowrap;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 11px;
  line-height: 1.1;
}
button {
  background: none;
  border: none;
  padding: 0;
  margin-right: 10px;
  cursor: pointer;
  width: 17px;
}
#progressBar {
  border: none;
  flex-grow: 1;
  margin-right: 10px;
  cursor: pointer;
  height: 3px;
  background: white !important;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width:350px;
  top: -2.8px;
}
#progressBar::-webkit-slider-runnable-track {
  width: 100%;
  height: 3px;
  cursor: pointer;
  background: white;
  border: none;
}
#progressBar::-moz-range-track {
  width: 100%;
  height: 3px;
  cursor: pointer;
  background: white;
  border: none;
}
#progressBar::-ms-track {
  width: 100%;
  height: 3px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
#progressBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 3px;
  height: 15px;
  background: black;
  cursor: pointer;
  border-radius: 0px;
  position: relative;
  top: -6.5px; 
}
#progressBar::-moz-range-thumb {
  width: 3px;
  height: 15px;
  background: black;
  border: none;
  cursor: pointer;  
  border-radius: 0px;
  position: relative;
  top: -6.5px; 
}
#progressBar::-ms-thumb {
  width: 3px;
  height: 10px;
  background: black;
  cursor: pointer;
  border-radius: 3px;
  position: relative;
  top: -6.5px; 
}
#currentTime, #duration { font-weight: 300; font-size: 11px; }
#playerTime p { width: 50px; display: flex; align-items: center !important; }
.pdf_trans{ margin-left: 10px; }

/* Collapsible */
.collapsible {
  display: inline-flex;
  white-space: nowrap;
  align-items: flex-start;
  cursor: pointer;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 12px;
  background-color: transparent;
  align-items: center;
  box-sizing: content-box;
  margin-left: -27px;
}
.collapsible .arrow { margin-right: 10px; transition: transform 0.1s ease; }
.collapsible:hover .arrow { fill: #00ff44; }
#playPauseBtn:hover #playPauseImg { fill: #00ff44; }
.collapsible.active .arrow { transform: rotate(90deg); }
.collapsible:hover { color: #00ff44; }
.content { max-height: 0; overflow: hidden; transition: max-height 0.1s ease-out; }
#collapsible_padding{ height: 25px; }

/* ARCHIVE PROJECTS */
#ARCHIVE img{ width: 100%; }
.archive_proj{
  display: flex;
  padding-top: 60px;
  padding-bottom: 60px;
  scroll-margin-top: 60px;
}
.archive_proj img{ width: 100%; }
.proj_title{ padding-bottom: 10px; }
.proj_title i{ font-family: 'AvenirNext'; font-weight: 200; }
.proj_title h1{
  text-transform: uppercase;
  padding-right: 10px;
  padding-bottom: 7px;
  font-size: 27px;
}
.proj_title h2{
  text-transform: uppercase;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 16px;
  padding-bottom: 3px;
}
.proj_title p{ font-family: 'AvenirNext'; font-weight: 200; font-size: 14px; }
.proj_date{ padding-bottom: 0px; }
.proj_date p{ font-size: 16px; }
.proj_location{ padding-bottom: 7px; padding-top: 50px; }
.proj_location p{ font-family: 'AvenirNext'; font-weight: 200; font-size: 16px; }
.proj_pitch{ padding: 0px 0px 60px 0px; }
.proj_pitch p{ line-height: 1.2; }
.proj_credits{ font-family: 'AvenirNext'; font-weight: 200; font-size: 16px; padding-bottom: 50px; }
.press_pdf{ font-family: 'AvenirNext'; font-weight: 200; font-size: 16px; }
#WAMAAKTADM{ padding-bottom: 0; }
#af_img_grid{ padding-top: 36px; }
#nyp_img_grid{ padding-top: 36px; }
#fxf_img_grid{ padding-top: 36px; }
#WAMAAKTADM_img_grid{ padding-top: 36px; }

/* ----- FOOTER (desktop) ----- */
#footer{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(200px, 2.4vw, 40px);
  background-color: #C7C7C7;
  padding-left: 50%;
  padding-right: 1%;
  padding-top: clamp(10px, 1.2vw, 16px);
  padding-bottom: clamp(10px, 1.2vw, 16px);
  white-space: nowrap;
}
#footer p{
  font-family: 'AvenirNext';
  font-weight: 200;
  font-size: 14px;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: center;
}
#R_logo { height: clamp(24px, 2.2vw, 34px); width: auto; margin: 0; }
#fonca_logo {
  height: clamp(40px, 6vw, 88px);
  width: auto;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-2px);
}

/* IMG GALLERY */
.img_grid{
  display: grid;
  grid-template-columns: repeat(1, 100%);
  justify-content: center;
  align-content: center;
  grid-gap: 5px;
  margin-left: 35%;
  margin-right: 20%;
}
.img_grid img{ cursor: pointer; }

/* JS modal */
/* LIGHTBOX centrado absoluto y contenido */
.modal {
  display: block;
  position: fixed;
  z-index: 1002;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

#myModal .modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: 90vw;      /* no más del ancho visible */
  max-height: 90vh;     /* no más del alto visible */
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

/* DONATE WIDGET */
#donate_widget{
  margin-top: 200px;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
#donate_address{
  display: flex;
  align-items: center;
  font-family: 'AvenirNext';
  white-space: nowrap;
  padding-right: 2%;
}
.gl-simple-donation-widget * {
  font-family: 'AvenirNext' !important;
}
.gl-simple-donation-widget .gl-widget__donation-submit-button {
  font-family: 'AvenirNext', sans-serif !important;
  background-color: #C7C7C7 !important;
  color: black !important;
}
.gl-simple-donation-widget button{ }
.gl-simple-donation-widget button:hover {
  background-color: black !important;
  color: white !important;
  border-color: black !important;
}
.gl-simple-donation-widget .modal-content,
.gl-simple-donation-widget .modal-content *,
.gl-simple-donation-widget .modal-header *,
.gl-simple-donation-widget .modal-body *,
.gl-simple-donation-widget .modal-footer * {
  font-family: 'AvenirNext', sans-serif !important;
  font-weight: 300 !important;
}

/* DONATE ABOUT */
#ABOUT_donate{
  display: flex;
  padding-top:150px;
  padding-bottom: 150px;
  scroll-margin-top: 40px;
}
.website_link{
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 16px;
  padding-left: 30px;
}

/* DONATE FOOTER (sección distinta del footer del sitio) */
#footer_donate{
  display: flex;
  justify-content: space-between;
  align-content: center;
  background-color: #F6F6F6;
  padding-top: 100px;
  padding-bottom: 30px;
  padding-left: 37%;
  padding-right: 25%;
  overflow: auto;
  white-space: nowrap;
}
#footer_donate p{
  font-family: 'AvenirNext';
  font-weight: 200;
  font-size: 14px;
}

/* TABLET */
@media (max-width: 1400px){
  .right_section{
    width: 63%;
    padding:0% 20% 0% 0%;
  }
  .img_grid{ margin-left: 15%; }
}

/* MOBILE */
.mobile{ display: none; }

@media (max-width: 990px){

  .mobile{ display: block; }
  .not_mobile{ display: none; }
  body{ background-color:  #f3f3f3; }
  h1, h2{ font-size: 20px; }
  p{ font-size: 16px; line-height: 1.3; }
  a:hover, a:active{ color: black; }
  button:hover, button:active{ color: black; }

  /* NAVBAR */
  .navbar{ display: none; }
  #mobile_navbar{
    display: flex;
    height: 40px;
    background-color: white;
    padding: 0;
    margin: 0;
    justify-content: space-between;
    position: fixed;
    top:0;
    width:100vw;
    z-index: 999;
  }
  .page_links{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin:0;
    margin-right: 1%;
    width: 100%;
  }
  .page_links a{
    font-family: 'AvenirNext';
    font-weight: 300;
    font-size: 13.2px;
    padding-top: 0%;
    padding-right: 3%;
  }
  #LOGO img{ height: 35%; }

  /* MAP */
  .fullscreen-video_mobile {
    position: static;
    top: 0;
    left: 0;
    width: 100vw;
    height: 60vh;
    object-fit: cover;
    opacity: 1;
  }

  /* AFTER MAP */
  .left_section{ width:100%; padding-left: 2%; }
  .right_section{ width: 100%; padding:0% 2% 0% 2%;
    overflow-wrap: anywhere;
    word-break: normal;
    word-wrap: break-word;
  }

  /* 3d */
  [id="3d"]{
    display: block;
    scroll-margin-top: 30px;
    text-align: center;
    padding: 50px 30px 30px 30px; 
  }
  [id="3d"] h1{ padding-bottom: 20px; }

  /* research */
  [id="research"]{
    display: block;
    scroll-margin-top: 30px;
    text-align: center;
    padding: 70px 30px 30px 30px;
  }
  /* (antes estaba anidado inválido) */
  #research .right_section p a { 
    overflow-wrap: anywhere; 
    word-break: break-word; 
  }

  [id="research"] h1{ padding-bottom: 20px; }

  /* about */
  [id="about"]{
    display: block;
    scroll-margin-top: 30px;
    text-align: center;
    padding: 70px 30px 30px 30px;
  }
  [id="about"] h1{ padding-bottom: 20px; }
  #CONTACT_title{ display: block; }
  #contact_info{ flex-direction: column; align-items: center; }
  #PHONE{ padding-right: 0; padding-bottom: 5px; display: flex; flex-wrap: wrap; }
  #EMAIL{ padding-bottom: 5px; flex-wrap: wrap; }

  /* contact */
  [id="contact"]{
    display: block;
    scroll-margin-top: 30px;
    text-align: center;
    padding: 20px 10px 40px 0px;
  }
  [id="contact"] p{ padding: 0 30px 0 40px; }
  [id="contact"] h1{ padding-bottom: 20px; padding-top: 30px; }

  /* ARCHIVE (mobile) */
  #ARCHIVE{
    scroll-margin-top: 40px;
    background-color: #c2c2c2;
  }
  #ARCHIVE_title{ padding: 7px; }
  #ARCHIVE_links{
    display: block;
    background-color: #DCDCDC;
    padding: 1% 1% 1% 2%;
    z-index: 1000 !important;
  }
  #ARCHIVE_links a{
    text-decoration: none;
    font-family: 'AvenirNext';
    font-weight: 300;
    font-size: 12px;
    color: black;
    white-space: nowrap;
    padding-right: 10px;
  }
  #ARCHIVE_links a:hover{ color: black !important; }

  /* TALKS (mobile) */
  .collapsible{ z-index: 0 !important; }
  .collapsible:hover .arrow { fill: black; }
  #TALKS{
    scroll-margin-top: 115px;
    padding-left: 30px;
    background-color: #cfcfcf;
  }
  #TALKS button{
    font-family: 'AvenirNext';
    font-weight: 300;
    font-size: 12px;
    color: black;
  }
  #AI p{ left: -10px; }
  .interview{ padding-right: 20px; }
  .int_titl_pdf_mobile{
    font-family: 'AvenirNext';
    font-weight: 300;
    font-size: 12px;
    color: black;
    width: 100%;
  }
  .pdf_trans{ margin: 0; padding-top: 5px; }
  .audio-player {
    display: flex;
    align-items: center;
    width: 100%;
    padding-top: 8px;
    padding-bottom: 10px;
  }
  #playPauseBtn { margin-right: 10px; }
  #progressBar_container { flex-grow: 1; margin-right: 10px; }
  #progressBar {
    width: 100%;
    background: white !important;
    -webkit-appearance: none;
    appearance: none;
  }
  #playerTime {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 50px;
  }

  .mobile_img{ padding-top: 0px; }
  .img_grid{ display: none; }
  .archive_proj{
    display: block;
    padding-top: 30px;
    scroll-margin-top: 105px;
  }
  .proj_title{ padding-bottom: 10px; padding-top: 0px; }
  .proj_title h2{ font-size: 14px; }
  .proj_title h1{ font-size: 20px; }
  .proj_title p{ font-size: 14px; }
  .section_title{
    background-color:#E9E9E9;
    display: block;
    align-items: center;
    position: sticky;
    top:40px;
    z-index: 1000;
  }
  .archive_text{ padding: 30px 20px 0px 20px; }
  .left_section_content{ padding: 0; }
  .proj_credits{ padding-bottom: 20px; }
  .proj_pitch{ padding-bottom: 30px; }
  .proj_location p, .press_pdf{ font-size: 14px; font-weight: 300; }

  /* FOOTER mobile */
  #footer{ display: none; }
  #footer_mobile{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 100px 30px 30px 30px;
    background-color: #C2C2C2;
  }
  #footer_mobile p{
    font-family: 'AvenirNext';
    font-weight: 300;
    font-size: 12px;
    padding-top: 5px;
  }
  #R_logo{ height: 30px; margin-top: 0px; }
}

/* Footer móvil (apilado y centrado) */
@media (max-width: 990px) {
  #footer { display: none; }
  #footer_mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #C2C2C2;
    padding: 20px 18px;
  }
  #footer_mobile p {
    font-family: 'AvenirNext';
    font-weight: 300;
    font-size: 12px;
    margin: 0;
  }
  #footer_mobile #R_logo {
    height: clamp(28px, 10vw, 48px);
    width: auto;
  }
  #footer_mobile #fonca_logo {
    height: clamp(56px, 20vw, 92px);
    width: auto;
    transform: translateY(-2px);
  }
}

/* Sketchfab (minimal & responsive) */
.sketchfab-wrap { width: 100%; }
.sketchfab-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}
@media (max-width: 990px) {
  .sketchfab-iframe { aspect-ratio: 4 / 5; }
}

/* Ritmo vertical dentro del contenido inyectado */
.section .right_section > * + * { margin-top: clamp(12px, 1.6vw, 28px); }
.section .right_section figure { margin: clamp(12px, 1.6vw, 28px) 0; }
.section .right_section figure figcaption {
  margin-top: 6px;
  font-family: 'AvenirNext';
  font-weight: 300;
  font-size: 12px;
  line-height: 1.2;
}
.section .right_section img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* LINKS SOLO EN CONTENIDO (NO MENÚS) */
.section .right_section a:link,
#TALKS a:link,
.archive_text a:link,
.press_pdf a:link,
.proj_location a:link { color: #d60000; }

.section .right_section a:visited,
#TALKS a:visited,
.archive_text a:visited,
.press_pdf a:visited,
.proj_location a:visited { color: #8c1a1a; }

.section .right_section a:hover,
.section .right_section a:focus,
#TALKS a:hover,
#TALKS a:focus,
.archive_text a:hover,
.archive_text a:focus,
.press_pdf a:hover,
.press_pdf a:focus,
.proj_location a:hover,
.proj_location a:focus { color: #ff3b30; }

.section .right_section a:active,
#TALKS a:active,
.archive_text a:active,
.press_pdf a:active,
.proj_location a:active { color: #b00000; }