/* ==========================================================
   Home - Colecciones en Línea
   Complementa assets/css/styles.css
   ========================================================== */

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

.home-page{
  background:#fff;
}

.home-hero{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(280px,.65fr);
  gap:54px;
  align-items:end;
  padding:74px 0 82px;
  border-top:1px solid #e3e7ea;
  border-bottom:1px solid #e3e7ea;
}

.home-eyebrow,
.home-section-kicker,
.home-note-kicker{
  margin:0 0 12px;
  color:#65727c;
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.home-hero h1{
  max-width:850px;
  margin:0;
  color:#1c2f3d;
  font-size:clamp(40px,5vw,68px);
  line-height:1.04;
  letter-spacing:-.035em;
  font-weight:800;
}

.home-lead{
  max-width:760px;
  margin:24px 0 0;
  color:#485660;
  font-size:18px;
  line-height:1.65;
}

.home-search{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  max-width:820px;
  margin-top:34px;
}

.home-search input{
  min-height:54px;
  width:100%;
  border:1px solid #bfc8cf;
  border-radius:4px;
  padding:0 17px;
  font-size:15px;
  color:#17212b;
  background:#fff;
}

.home-search input:focus{
  border-color:#263b4a;
  box-shadow:0 0 0 3px rgba(38,59,74,.1);
  outline:none;
}

.home-search-button{
  min-height:54px;
  border:1px solid #263b4a;
  border-radius:4px;
  padding:0 26px;
  background:#263b4a;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.home-search-button:hover{
  background:#172a38;
}

.home-quick-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:14px;
  font-size:13px;
  color:#69747d;
}

.home-quick-links a{
  color:#263b4a;
  text-decoration:underline;
  text-underline-offset:3px;
}

.home-hero-note{
  border-left:3px solid #263b4a;
  padding:6px 0 6px 22px;
}

.home-hero-note p{
  margin:0;
  color:#485660;
  line-height:1.65;
}

.home-hero-note a{
  display:inline-block;
  margin-top:16px;
  color:#263b4a;
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:4px;
}

.home-section{
  padding:78px 0;
}

.home-section--soft{
  position:relative;
}

.home-section--soft::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 50%;
  width:100vw;
  transform:translateX(-50%);
  background:#f6f6f4;
}

.home-section-heading{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:end;
  margin-bottom:30px;
}

.home-section-heading h2,
.home-about h2{
  margin:0;
  color:#1c2f3d;
  font-size:clamp(28px,3.3vw,44px);
  line-height:1.12;
  letter-spacing:-.025em;
}

.home-section-link{
  flex:0 0 auto;
  color:#263b4a;
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:5px;
}

.collection-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.collection-card{
  display:flex;
  flex-direction:column;
  min-height:430px;
  border:1px solid #dce1e5;
  background:#fff;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.collection-card:hover{
  transform:translateY(-4px);
  border-color:#aeb8bf;
  box-shadow:0 12px 30px rgba(27,43,54,.1);
}

.collection-card-visual{
  min-height:210px;
  background-size:cover;
  background-position:center;
  filter:saturate(.75);
}

.collection-card-visual--arte{
  background:
    linear-gradient(145deg,rgba(43,59,69,.05),rgba(43,59,69,.45)),
    radial-gradient(circle at 35% 28%,#c8b9a9 0 17%,transparent 18%),
    linear-gradient(135deg,#d8d0c8,#8f7062);
}
.collection-card-visual--historia{
  background:
    linear-gradient(145deg,rgba(38,59,74,.05),rgba(38,59,74,.45)),
    linear-gradient(115deg,#b9ada0 0 35%,#6f777c 35% 65%,#d2c5b7 65%);
}
.collection-card-visual--arqueologia{
  background:
    radial-gradient(circle at 52% 48%,#b08a47 0 14%,transparent 15%),
    radial-gradient(circle at 52% 48%,transparent 0 27%,#d4b776 28% 32%,transparent 33%),
    linear-gradient(135deg,#eee8dc,#bfa66f);
}
.collection-card-visual--etnografia{
  background:
    repeating-conic-gradient(from 25deg at 50% 50%,#7f5b43 0 10deg,#c2a383 10deg 20deg),
    linear-gradient(135deg,#decdbd,#876751);
}

.collection-card-content{
  display:flex;
  flex-direction:column;
  flex:1;
  padding:22px 22px 25px;
}

.collection-card-index{
  color:#89949b;
  font-size:12px;
  letter-spacing:.12em;
}

.collection-card h3{
  margin:18px 0 10px;
  color:#1c2f3d;
  font-size:23px;
}

.collection-card p{
  margin:0;
  color:#59666f;
  line-height:1.58;
}

.topic-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.topic-pill{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:66px;
  border:1px solid #d9dee3;
  border-radius:4px;
  padding:14px 18px;
  background:#fff;
  color:#263b4a;
  font-size:15px;
  font-weight:800;
}

.topic-pill span{
  color:#929da4;
  font-size:11px;
  letter-spacing:.1em;
}

.topic-pill:hover{
  border-color:#263b4a;
}

.object-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.object-preview{
  border:1px solid #dce1e5;
  background:#fff;
}

.object-preview-image{
  min-height:250px;
  background:
    linear-gradient(135deg,rgba(38,59,74,.04),rgba(38,59,74,.14)),
    linear-gradient(135deg,#f3f1ed,#d7d1c9);
}

.object-preview-body{
  padding:20px;
}

.object-preview-meta{
  color:#7c878f;
  font-size:11px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.object-preview h3{
  margin:12px 0 8px;
  color:#1d2f3b;
  font-size:19px;
  line-height:1.28;
}

.object-preview p{
  margin:0;
  color:#5b6871;
  line-height:1.55;
}

.home-about{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);
  gap:64px;
  border-top:1px solid #dfe4e7;
  border-bottom:1px solid #dfe4e7;
}

.home-about-main > p:not(.home-section-kicker){
  max-width:780px;
  margin:22px 0 0;
  color:#4c5962;
  font-size:16px;
  line-height:1.75;
}

.home-about-aside{
  align-self:start;
  padding:24px;
  background:#f6f6f4;
  border-top:4px solid #263b4a;
}

.home-about-aside h3{
  margin:0 0 16px;
  color:#1c2f3d;
  font-size:19px;
}

.home-about-aside ul{
  margin:0;
  padding-left:18px;
  color:#505d66;
  line-height:1.65;
}

.home-about-aside li + li{
  margin-top:10px;
}

.service-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.service-card{
  min-height:220px;
  border:1px solid #dce1e5;
  padding:28px;
  background:#fff;
}

.service-card:hover{
  border-color:#263b4a;
}

.service-card-label{
  color:#6f7a82;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.service-card h3{
  max-width:510px;
  margin:16px 0 10px;
  color:#1c2f3d;
  font-size:23px;
  line-height:1.25;
}

.service-card p{
  margin:0;
  color:#58656e;
  line-height:1.65;
}

@media(max-width:1100px){
  .collection-grid,
  .object-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .home-hero,
  .home-about{
    grid-template-columns:1fr;
    gap:36px;
  }

  .home-hero{
    padding:52px 0 58px;
  }

  .topic-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  .home-section{
    padding:58px 0;
  }

  .home-search{
    grid-template-columns:1fr;
  }

  .home-section-heading{
    align-items:flex-start;
    flex-direction:column;
  }

  .collection-grid,
  .object-strip,
  .topic-list,
  .service-grid{
    grid-template-columns:1fr;
  }

  .collection-card{
    min-height:0;
  }

  .home-quick-links span{
    width:100%;
  }
}

.home-section-link--text{
  display:inline;
  width:auto;
  margin-top:8px;
  padding:0;
  border:0;
  border-bottom:1px solid currentColor;
  border-radius:0;
  background:transparent;
  color:#263b4a;
  font-size:13px;
  font-weight:700;
  line-height:1.45;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
  transition:
    color .18s ease,
    border-color .18s ease;
}

.home-section-link--text:hover{
  color:#0b5cab;
  border-bottom-color:#0b5cab;
}

.home-section-link--text:focus-visible{
  outline:3px solid #0b5cab;
  outline-offset:4px;
}

/* ==========================================================
   Modales institucionales - Colecciones en Línea
   Agregar al final de assets/css/home.css
   ========================================================== */

body.modal-open{
  overflow:hidden;
}

.modal-link,
.footer-modal-link,
.home-links-grid button{
  font:inherit;
}

.modal-link{
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  text-decoration:underline;
  cursor:pointer;
}

.home-section-link.modal-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.home-links-grid button{
  width:100%;
  border:1px solid #d9dee3;
  border-radius:8px;
  background:#fff;
  color:inherit;
  text-align:left;
  cursor:pointer;
  padding:20px;
}

.home-links-grid button:hover,
.home-links-grid button:focus-visible{
  border-color:#263b4a;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}

.footer-modal-link{
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  padding:0;
}

.site-modal{
  position:fixed;
  inset:0;
  z-index:3000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.site-modal.is-open{
  display:flex;
}

.site-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(14,23,30,.72);
  backdrop-filter:blur(2px);
}

.site-modal-dialog{
  position:relative;
  z-index:1;
  width:min(720px,100%);
  max-height:calc(100vh - 48px);
  max-height:calc(100dvh - 48px);
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:10px;
  box-shadow:0 24px 70px rgba(0,0,0,.32);
  overflow:hidden;
}

.site-modal-dialog--large{
  width:min(920px,100%);
}

.site-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:26px 30px 18px;
  border-bottom:1px solid #e0e4e8;
}

.site-modal-header h2{
  margin:2px 0 0;
  color:#263b4a;
  font-size:28px;
  line-height:1.2;
}

.site-modal-kicker{
  margin:0;
  color:#6c757d;
  font-size:12px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.site-modal-close{
  flex:0 0 auto;
  width:42px;
  height:42px;
  border:1px solid #cbd3da;
  border-radius:50%;
  background:#fff;
  color:#26313a;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}

.site-modal-close:hover{
  background:#f1f3f5;
}

.site-modal-body{
  overflow-y:auto;
  padding:24px 30px 30px;
  color:#303b44;
  font-size:15px;
  line-height:1.7;
  overscroll-behavior:contain;
}

.site-modal-body h3{
  margin:28px 0 8px;
  color:#263b4a;
  font-size:18px;
}

.site-modal-body h3:first-child{
  margin-top:0;
}

.site-modal-body p{
  margin:0 0 16px;
}

.site-modal-body ol,
.site-modal-body ul{
  margin:0 0 20px;
  padding-left:24px;
}

.site-modal-body li{
  margin-bottom:10px;
}

.site-modal-body a{
  color:#0b5cab;
  text-decoration:underline;
}

.site-modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  padding:18px 30px 24px;
  border-top:1px solid #e0e4e8;
  background:#fafbfc;
}

.site-modal-accept{
  min-height:46px;
  padding:11px 20px;
  border:0;
  border-radius:5px;
  background:#263b4a;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.site-modal-accept:hover{
  background:#172a38;
}

.site-modal-notice{
  margin-top:24px;
  padding:16px 18px;
  border-left:4px solid #263b4a;
  background:#f3f5f6;
}

.operator-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:20px;
}

.operator-list article{
  border:1px solid #d9dee3;
  border-radius:7px;
  padding:16px;
  background:#fff;
}

.operator-list h3{
  margin:0 0 8px;
  font-size:15px;
}

.operator-list code{
  display:inline-block;
  margin-bottom:8px;
  padding:5px 8px;
  border-radius:4px;
  background:#eef1f3;
  color:#17212b;
  font-size:14px;
}

.operator-list p{
  margin:0;
  font-size:14px;
}

.site-modal--welcome .site-modal-dialog{
  border-top:5px solid #263b4a;
}

.mandatory-modal-open .site-modal--welcome{
  z-index:4000;
}

@media(max-width:720px){
  .site-modal{
    padding:10px;
  }

  .site-modal-dialog{
    max-height:calc(100vh - 20px);
    max-height:calc(100dvh - 20px);
    border-radius:7px;
  }

  .site-modal-header{
    padding:20px 18px 14px;
  }

  .site-modal-header h2{
    font-size:22px;
  }

  .site-modal-body{
    padding:18px;
    font-size:14px;
  }

  .site-modal-footer{
    padding:14px 18px 18px;
  }

  .site-modal-accept{
    width:100%;
  }

  .operator-list{
    grid-template-columns:1fr;
  }
}

.modal-text-link{
  appearance:none;
  -webkit-appearance:none;
  display:inline;
  width:auto;
  margin:10px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#263b4a;
  font:inherit;
  font-weight:700;
  line-height:inherit;
  text-align:left;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}

.modal-text-link:hover{
  color:#0b5cab;
}

.modal-text-link:focus-visible{
  outline:3px solid #0b5cab;
  outline-offset:4px;
}

/* =====================================================
   SELECCIÓN DESTACADA / FAVORITOS
   ===================================================== */

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.featured-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d8dde2;
    background-color: #ffffff;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    border-color: #aeb8c0;
    box-shadow: 0 12px 28px rgba(15, 35, 50, 0.12);
}

.featured-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.featured-card__link:focus-visible {
    outline: 3px solid #1c516f;
    outline-offset: 3px;
}

/* Contenedor que controla el tamaño de todas las imágenes */
.featured-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #f1f2f2;
}

/* Imagen controlada y recortada proporcionalmente */
.featured-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}


.featured-card:hover .featured-card__image {
    transform: scale(1.035);
}

/* Información de la pieza */
.featured-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.featured-card__collection {
    display: block;
    margin-bottom: 9px;
    color: #596d7a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.featured-card__title {
    margin: 0;
    color: #102f43;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;

    /* Mantiene una altura visual similar */
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.featured-card__likes {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: auto 0 0;
    padding-top: 18px;
    color: #405663;
    font-size: 0.88rem;
    font-weight: 600;
}

.featured-card__likes span {
    font-size: 1.15rem;
    line-height: 1;
}

/* Tabletas */
@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Celulares */
@media (max-width: 576px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .featured-card__image-wrapper {
        aspect-ratio: 16 / 10;
    }

    .featured-card__body {
        padding: 16px;
    }
}