/* Modern lightweight style for UNAM FC Arachnology Lab pages.
   Static HTML only. No JavaScript required. */

:root{
  --bg:#f6f4ef;
  --panel:#ffffff;
  --ink:#1f2933;
  --muted:#5b6773;
  --accent:#163a63;
  --accent-2:#7f1d1d;
  --line:#d9d3c7;
  --soft:#ebe7df;
  --max:1100px;
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height:1.62;
  color:var(--ink);
  background:
    radial-gradient(circle at top left, rgba(22,58,99,.10), transparent 28rem),
    linear-gradient(180deg, #faf9f5 0%, var(--bg) 100%);
}

a{
  color:#14532d;
  text-decoration-thickness:.08em;
  text-underline-offset:.18em;
}

a:hover{ color:#7f1d1d; }

.site-header{
  background:#163a63;
  color:#fff;
  border-bottom:4px solid #a68a46;
}

.topbar{
  max-width:var(--max);
  margin:0 auto;
  padding:1.1rem 1.25rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.brand{
  font-weight:700;
  letter-spacing:.02em;
  font-size:1.4rem;
  line-height:1.2;
  color:#fff;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:.35rem .8rem;
  font-size:1.05rem;
}

.nav a{
  color:#f8fafc;
  text-decoration:none;
  padding:.35rem .55rem;
  border-radius:.5rem;
}

.nav a:hover,
.nav a.active{
  background:rgba(255,255,255,.14);
}

.hero{
  max-width:var(--max);
  margin:0;
  padding:.25rem 0 0;
}

.banner .hero{
  grid-column:1 / -1;
}

.hero h1{
  margin:0;
  font-size:clamp(1.8rem, 4vw, 3rem);
  line-height:1.08;
  letter-spacing:-.03em;
}

.hero p{
  margin:.25rem 0 0;
  color:#e8efe7;
  max-width:780px;
  font-size:.98rem;
}

.banner{
  max-width:var(--max);
  margin:.55rem auto 0;
  padding:0 1.25rem .9rem;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.75rem;
  align-items:start;
}

.banner img,
#logo{
  width:100%;
  height:210px;
  max-height:210px;
  object-fit:cover;
  border-radius:1rem;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 14px 34px rgba(0,0,0,.22);
}

main{
  max-width:var(--max);
  margin:.6rem auto 3rem;
  padding:0 1.25rem;
}

.content-card{
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:1.25rem;
  padding:clamp(1.25rem, 3vw, 2.25rem);
  box-shadow:0 20px 55px rgba(31,41,51,.08);
}

article{
  max-width:900px;
}

h2,h3,h4{
  line-height:1.2;
  color:#17351f;
  margin:0 0 .65rem;
}

h2{
  font-size:clamp(1.1rem, 2vw, 1.6rem);
  border-bottom:1px solid var(--line);
  padding-bottom:.35rem;
  color:#198754;
}

h3{ font-size:1.25rem; }
h4{ font-size:1.05rem; color:var(--muted); }

p{ margin:.75rem 0; }

br{ line-height:1.8; }

img{
  max-width:100%;
  height:auto;
}

#teamcr{
  width:auto;
  vertical-align:middle;
  border-radius:.2rem;
  box-shadow:none;
}

.profile-image,
article img:not(#teamcr){
  border-radius:.8rem;
}

hr{
  border:0;
  border-top:1px solid var(--line);
  margin:1.4rem 0;
}

strong,b{ color:#152a1a; }

.footer{
  max-width:var(--max);
  margin:0 auto;
  padding:1.5rem 1.25rem 2.25rem;
  color:var(--muted);
  font-size:.9rem;
}

.notice{
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:.9rem;
  padding:.9rem 1rem;
}

.cta-link{
  display:inline-block;
  margin:.4rem 0 .7rem;
  padding:.7rem 1rem;
  border-radius:.8rem;
  background:#166534;
  color:#fff !important;
  text-decoration:none;
  font-weight:700;
}

.cta-link:hover{ background:#7f1d1d; }

@media (max-width:760px){
  .banner{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:.45rem;
  }

  .banner img,
  #logo{
    height:95px;
    max-height:95px;
    border-radius:.65rem;
  }

  main{ margin-top:1rem; }
}

.database-link {
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
}

.database-link:hover {
  background: rgba(255,255,255,0.12);
}

.database-cta {
  display: inline-block;
  margin: 0.35rem 0 1rem 0;
}


.method-images{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1rem;
  align-items:start;
  margin:1rem 0 1.4rem;
}

.method-images img{
  width:100%;
  max-height:180px;
  object-fit:contain;
  background:#f8f7f3;
  border:1px solid var(--line);
  border-radius:.85rem;
  padding:.5rem;
}


@media (max-width:760px) and (orientation: landscape){

  .banner img,
  #logo{
    height:140px;
    max-height:140px;
  }

}
/* =========================
   iOS Safari / WebKit FIX
   Evita distorsión vertical de menús
   ========================= */

@supports (-webkit-touch-callout: none) {

  nav,
  .menu,
  .navbar,
  .nav-links,
  ul,
  li,
  a {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .navbar,
  .nav-links,
  nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  nav a,
  .nav-links a,
  .navbar a {
    line-height: 1.2;
    white-space: nowrap;
  }

}

@supports (-webkit-touch-callout: none) {
  @media (max-width:760px) {

    .topbar{
      display:block;
    }

    .brand{
      display:block;
      width:100%;
      margin-bottom:.8rem;
      font-size:1.25rem;
      line-height:1.2;
    }

    .nav{
      width:100%;
      display:flex;
      flex-direction:row;
      flex-wrap:wrap;
      justify-content:flex-start;
      align-items:center;
      gap:.45rem .55rem;
      font-size:.95rem;
    }

    .nav a{
      display:inline-block;
      line-height:1.15;
      padding:.32rem .5rem;
      white-space:normal;
    }

    .database-link{
      border-radius:.6rem;
      padding:.38rem .55rem;
    }

  }
}