/* ================================================================
   Archivo Fotográfico de General Pacheco — Hoja de estilos común
   Compartida entre index.php, tema.php, album.php, foto.php, etc.
   Editorial cálido: serif (Lora) + tierra (terracota/ochre).
   ================================================================ */

  html{
    scroll-behavior: smooth;
  }
  :root{
    /* Base "Comunidad Vibrante" (acento) */
    --gpw-magenta:#B7245C;
    --gpw-magenta-2:#8f1d46;

    /* Identidad Archivo (neutra, cálida, editorial) */
    --af-ink:#111318;
    --af-ink-2:#2A2E37;
    --af-paper:#FAF7F3;
    --af-paper-2:#F0E6D8;
    --af-card:#FFFFFF;
    --af-line:rgba(90,62,38,.14);
    --af-soft:rgba(17,19,24,.06);

    /* Tierra (acento local, distinto del magenta institucional) */
    --af-terracota:#A9633E;
    --af-terracota-2:#8A4E30;
    --af-ochre:#B98A4D;
    --font-serif: "Lora", Georgia, "Times New Roman", serif;

    --radius-xl:22px;
    --radius-lg:16px;
    --radius-md:12px;

    --shadow-1: 0 10px 30px rgba(17,19,24,.10);
    --shadow-2: 0 6px 18px rgba(17,19,24,.12);

    --max: 1180px;
    --font: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  }

  *{box-sizing:border-box}
  body{
    margin:0;
    font-family:var(--font);
    color:var(--af-ink);
    background: radial-gradient(1200px 600px at 20% -10%, rgba(183,36,92,.10), transparent 60%),
                radial-gradient(900px 500px at 90% 10%, rgba(183,36,92,.08), transparent 55%),
                radial-gradient(1000px 700px at 50% 40%, rgba(169,99,62,.07), transparent 60%),
                var(--af-paper);
    position:relative;
  }
  body::before{
    content:"";
    position:fixed; inset:0;
    pointer-events:none;
    z-index:0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
    opacity:.05;
    mix-blend-mode: multiply;
  }
  body > *{position:relative; z-index:1;}
  a{color:inherit}

  .wrap{max-width:var(--max); margin:0 auto; padding:0 18px;}
  .btn{
    display:inline-flex; align-items:center; gap:10px;
    padding:12px 16px;
    border-radius:999px;
    border:1px solid var(--af-line);
    background:rgba(255,255,255,.72);
    backdrop-filter: blur(8px);
    text-decoration:none;
    font-weight:600;
    transition:.18s ease;
    cursor:pointer;
  }
  .btn:hover{transform: translateY(-1px); box-shadow:var(--shadow-2); border-color: rgba(183,36,92,.35);}
  .btn--primary{
    background: var(--af-terracota);
    border-radius: 6px;
    text-transform:uppercase;
    letter-spacing:.04em;
    font-size:14px;
    border: none;
    color:#fff;
  }
  .btn--primary:hover{background: var(--af-terracota-2);}
  .btn--ghost{
    background:transparent;
    border:1px solid rgba(255,255,255,.35);
    color:#fff;
  }
  .chip{
    display:inline-flex; align-items:center;
    padding:8px 12px;
    border-radius:999px;
    border:1px solid var(--af-line);
    background:#fff;
    font-size:13px;
    font-weight:600;
    color:var(--af-ink-2);
    text-decoration:none;
    transition:.15s ease;
  }
  .chip:hover{border-color: rgba(169,99,62,.35); color:var(--af-terracota-2);}

  /* HERO */
  .hero{
    position:relative;
    min-height: 86vh;
    display:flex;
    align-items:stretch;
    overflow:hidden;
    border-bottom:1px solid rgba(255,255,255,.10);
  }
  .hero__bg{
    position:absolute; inset:0;
    background:
      linear-gradient(90deg, rgba(17,19,24,.86) 0%, rgba(17,19,24,.58) 52%, rgba(17,19,24,.34) 100%),
      url("../img/hero_index.jpg") center/cover no-repeat;
    filter: saturate(1.05) contrast(1.05);
    transform: scale(1.02);
  }
  .hero__grain{
    position:absolute; inset:0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    opacity:.35;
  }
  .hero__content{
    position:relative;
    width:100%;
    display:flex;
    align-items:center;
    padding: 56px 0;
  }
  .hero__panel{
    max-width: 820px;
    color:#fff;
  }
  .hero__kicker{
    display:inline-flex;
    gap:10px;
    align-items:center;
    font-size:13px;
    letter-spacing:.12em;
    text-transform:uppercase;
    color: rgba(255,255,255,.78);
    margin-bottom:14px;
  }
  .hero__title{
    font-family: var(--font-serif);
    font-weight:700;
    font-size: clamp(28px, 4vw, 46px);
    line-height:1.06;
    margin: 0 0 12px;
    text-shadow: 0 10px 40px rgba(0,0,0,.25);
  }
  .hero__desc{
    font-size: 16px;
    line-height:1.6;
    color: rgba(255,255,255,.86);
    margin: 0 0 22px;
  }
  .hero__actions{
    display:flex; flex-wrap:wrap; gap:10px;
    align-items:center;
  }

  .searchbar{
    margin-top:16px;
    display:grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
    gap:12px;
    align-items:stretch;
  }
  .field{
    display:flex; align-items:center; gap:10px;
    background: rgba(255,255,255,.90);
    border:1px solid rgba(255,255,255,.45);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,.12);
  }
  .field input{
    border:none; outline:none; background:transparent;
	min-width: 0;
    width:100%;
    font-family:var(--font);
    font-size:15px;
	
  }
  .field small{white-space: nowrap; flex: 0 0 auto; font-size: 12px; color: rgba(17,19,24,.55); font-weight:600;}
  .searchbar__inv{
    display:flex;
    background: rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    overflow:hidden;
    backdrop-filter: blur(10px);
  }
  .searchbar__inv input{
    flex:1;
    border:none; outline:none;
    background:transparent;
    color:#fff;
    padding: 12px 14px;
    font-family:var(--font);
  }
  .searchbar__inv input::placeholder{color: rgba(255,255,255,.70); min-width: 0;}
  .searchbar__inv button{
	  flex: 0 0 auto;
  white-space: nowrap;
    border:none;
    padding: 12px 14px;
    background: var(--af-terracota);
    color:#fff;
    font-weight:700;
    cursor:pointer;
  }
  .searchbar__inv button:hover{background: var(--af-terracota-2);}

  @media (max-width: 860px){
    .searchbar{grid-template-columns:1fr;}
  }

  /* SECCIONES */
  .section{padding: 34px 0 10px; scroll-margin-top: 20px;}
  .section__head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    margin: 10px 0 16px;
  }
  .h2{
    margin:0 0 2px;
    font-family: var(--font-serif);
    font-weight:600;
    font-size: 24px;
    letter-spacing:-.01em;
    padding-left:14px;
    border-left: 3px solid var(--af-terracota);
  }
  .muted{color: rgba(17,19,24,.62); padding-left:14px;}

  .grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:14px;
    counter-reset: ficha;
  }
  @media (max-width: 980px){ .grid{grid-template-columns: repeat(2, 1fr);} }
  @media (max-width: 620px){ .grid{grid-template-columns: 1fr;} }

  .card{
    counter-increment: ficha;
    position:relative;
    background: var(--af-card);
    border:1px solid var(--af-line);
    border-radius: 6px;
    overflow:hidden;
    box-shadow: 0 2px 10px rgba(58,38,20,.06);
    transition: border-color .18s ease;
  }
  .card:hover{border-color: var(--af-terracota);}
  .card__media{
  height: 170px;
  position:relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: sepia(.18) saturate(.92);
}

  .card__body{padding: 14px 14px 16px;}
  .card__title{margin:0 0 6px; font-size:16px; font-family: var(--font-serif); font-weight:600;}
  .card__meta{
    font-size:13px;
    color: rgba(17,19,24,.62);
    line-height:1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card__foot{padding: 0 14px 16px; display:flex; gap:8px; flex-wrap:wrap;}

  /* Botones tipo ficha/rótulo de museo (fuera del hero) */
  .section .btn, .album .btn, .photo .btn, .about .btn{
    border-radius:4px;
    border:1px solid var(--af-terracota);
    background:transparent;
    backdrop-filter:none;
    color: var(--af-terracota-2);
    text-transform:uppercase;
    font-size:12px;
    letter-spacing:.06em;
    font-weight:700;
    padding:10px 14px;
  }
  .section .btn:hover, .album .btn:hover, .photo .btn:hover, .about .btn:hover{
    background: var(--af-terracota);
    color:#fff;
    transform:none;
    box-shadow:none;
    border-color: var(--af-terracota);
  }

  /* ALBUM */
  .album{
    padding: 34px 0 20px;
    background: var(--af-paper-2);
    border-top: 1px solid var(--af-line);
    border-bottom: 1px solid var(--af-line);
  }
  .album__top{
    background: rgba(255,255,255,.6);
    border:1px solid var(--af-line);
    border-radius: 8px;
    padding: 18px;
    box-shadow:none;
  }
  .crumbs{
    font-size:13px;
    color: rgba(17,19,24,.58);
    margin-bottom: 8px;
  }
  .album__title{margin:0; font-family: var(--font-serif); font-size:26px; letter-spacing:-.01em;}
  .album__desc{margin:8px 0 0; color: rgba(17,19,24,.70); line-height:1.65;}
  .album__inline-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    font-weight:700;
    color: var(--af-terracota-2);
    white-space:nowrap;
  }
  .album__inline-link i{font-size:11px;}
  .album__inline-link:hover{color: var(--af-terracota);}
  .tags{margin-top:12px; display:flex; flex-wrap:wrap; gap:8px;}

  .photos{
    margin-top:14px;
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:10px;
  }
  @media (max-width: 980px){ .photos{grid-template-columns: repeat(3, 1fr);} }
  @media (max-width: 720px){ .photos{grid-template-columns: repeat(2, 1fr);} }

  .thumb{
    position:relative;
    border-radius: 3px;
    overflow:hidden;
    border:1px solid var(--af-line);
    background:#fff;
    padding: 6px 6px 0;
    transition: border-color .16s ease;
    cursor:pointer;
  }
  .thumb:hover{border-color: var(--af-terracota);}
  .thumb img{width:100%; height: 184px; object-fit:cover; display:block; filter: sepia(.15);}
  .thumb__cap{
    padding: 8px 2px 10px;
    font-family: var(--font-serif);
    font-style:italic;
    color: var(--af-ink-2);
    font-size:12px;
    line-height:1.35;
  }

  /* FICHA FOTO */
  .photo{
    padding: 34px 0 40px;
    background: linear-gradient(180deg, rgba(58,38,20,.05), transparent 260px);
  }
  .photo__layout{
    max-width: 860px;
    margin: 0 auto;
  }
  .photo__heading-box{
    max-width: fit-content;
    margin: 0 auto 20px;
    padding: 16px 28px;
    background: #fff;
    border: 1px solid var(--af-line);
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(58,38,20,.09);
  }
  .photo__heading{
    margin:0;
    font-family: var(--font-serif);
    font-weight:600;
    font-style:italic;
    font-size: clamp(22px, 3.2vw, 30px);
    line-height:1.2;
    color: var(--af-ink);
    text-align:center;
  }
  .photo__subheading{
    margin:8px 0 0;
    font-family: var(--font-serif);
    font-size:13.5px;
    letter-spacing:.05em;
    color: rgba(17,19,24,.52);
    text-align:center;
  }

  .frame{
    margin: 20px 0 22px;
    background:#fff;
    border:1px solid var(--af-line);
    border-radius: 3px;
    padding: 14px 14px 0;
    box-shadow: 0 16px 36px rgba(58,38,20,.14), 0 2px 6px rgba(58,38,20,.08);
  }
  .frame__img{
    width:100%;
    display:block;
    max-height: 74vh;
    object-fit:contain;
    background: #0f1218;
    border: 1px solid rgba(17,19,24,.08);
  }
  .frame__actions{
    margin-top: 14px;
    padding: 14px 0;
    display:flex; gap:10px; flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    border-top:1px dashed rgba(90,62,38,.22);
  }

  /* La "ficha de papel" */
  .panel{
    position:relative;
    background:
      radial-gradient(1200px 300px at 50% -80px, rgba(169,99,62,.05), transparent),
      linear-gradient(180deg, #FBF7ED, #F4EBDA);
    border:1px solid rgba(90,62,38,.24);
    border-radius: 3px;
    padding: 28px 26px 24px;
    box-shadow: 0 18px 40px rgba(58,38,20,.14), inset 0 0 0 1px rgba(255,255,255,.5);
  }
  /* Doblez de esquina, como una ficha usada */
  .panel::before{
    content:"";
    position:absolute;
    top:0; right:0;
    width:0; height:0;
    border-style:solid;
    border-width: 0 26px 26px 0;
    border-color: transparent #E9DCC3 transparent transparent;
    filter: drop-shadow(-2px 2px 3px rgba(58,38,20,.22));
    border-top-right-radius: 3px;
  }

  .panel__kicker{
    margin:0 0 2px;
    font-family: var(--font-serif);
    font-style:italic;
    font-size:12px;
    letter-spacing:.10em;
    text-transform:uppercase;
    color: var(--af-terracota-2);
  }
  .panel__code{
    margin:0 0 14px;
    padding-bottom:12px;
    border-bottom: 3px double rgba(90,62,38,.38);
    font-family: "Courier New", Courier, monospace;
    font-size: 17px;
    font-weight:700;
    letter-spacing:.03em;
    color: var(--af-ink);
    word-break: break-word;
  }

  .photo__title{margin:0 0 8px; font-family: var(--font-serif); font-size:23px; letter-spacing:-.01em;}
  .kv{display:grid; gap:0; margin-top: 4px;}
  .kv__row{
    display:grid;
    grid-template-columns: 130px 1fr;
    gap:10px;
    padding: 9px 0;
    border-top: 1px dashed rgba(90,62,38,.24);
  }
  .kv__row:first-child{border-top:none; padding-top:0;}
  .k{
    color: rgba(58,38,20,.62);
    font-weight:700;
    font-size:10.5px;
    letter-spacing:.06em;
    text-transform:uppercase;
    font-family: "Courier New", Courier, monospace;
  }
  .v{color: rgba(17,19,24,.86); font-weight:400; font-size:13.5px; line-height:1.5;}
  .desc{
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid rgba(90,62,38,.18);
    color: rgba(17,19,24,.72);
    line-height:1.7;
  }
  .desc--first{
    margin-top:0;
    padding-top:0;
    padding-bottom:16px;
    border-top:none;
    border-bottom:1px dashed rgba(90,62,38,.24);
    font-size:15px;
    color: rgba(17,19,24,.78);
  }

  @media (max-width: 640px){
    .panel{padding: 22px 18px 20px;}
    .frame{padding: 10px 10px 0;}
    .kv__row{grid-template-columns: 108px 1fr; gap:8px;}
  }

  .cite{
    margin-top:12px;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(169,99,62,.10), rgba(17,19,24,.03));
    border:1px solid rgba(169,99,62,.28);
  }
  .cite__head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
  }
  .cite__title{margin:0; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color: rgba(17,19,24,.70); font-weight:800;}
  .cite__text{
    font-size:13px;
    line-height:1.55;
    color: rgba(17,19,24,.82);
    background: rgba(255,255,255,.75);
    border:1px solid rgba(17,19,24,.10);
    border-radius: 14px;
    padding: 10px 12px;
    word-break: break-word;
  }

  /* ACERCA DEL PROYECTO */
  .about{padding: 40px 0 10px;}
  .about__text{
    color: rgba(17,19,24,.74);
    line-height:1.75;
    font-size:15.5px;
  }
  .about__text p{margin:0 0 14px;}
  .about__collab{
    margin-top:18px;
    padding:16px 18px;
    border-radius:8px;
    background: linear-gradient(135deg, rgba(169,99,62,.09), rgba(17,19,24,.02));
    border:1px solid rgba(169,99,62,.25);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
  }
  .about__collab p{margin:0; color: rgba(17,19,24,.78); font-size:14.5px;}

  /* AGRADECIMIENTOS */
  .af-thanks{
    margin-top: 30px;
    background: var(--af-paper);
    border-top: 1px solid var(--af-line);
  }
  .af-thanks__inner{
    padding: 26px 18px;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:8px;
  }
  .af-thanks__label{
    font-family: var(--font-serif);
    font-style:italic;
    font-size:13px;
    color: rgba(17,19,24,.55);
    margin:0;
  }
  .af-thanks__text{
    font-size:12.5px;
    line-height:1.5;
    color: rgba(17,19,24,.62);
    max-width:60ch;
    margin:0;
  }
  .af-thanks__logo{
    height:64px;
    width:auto;
    margin:6px 0;
  }

  /* FOOTER */
  .af-footer{
    margin-top: 20px;
    background: var(--af-paper-2);
    border-top: 3px solid var(--af-terracota);
  }
  .af-footer__inner{
    padding: 22px 18px;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:10px;
  }
  .af-footer__logo{
    width: 200px;
    height:auto;
  }
  .af-footer__text{color: rgba(17,19,24,.78); max-width:60ch;}
  .af-footer__decreto{
    margin:0 0 8px;
    font-size:12.5px;
    line-height:1.5;
    color: rgba(17,19,24,.58);
    font-style:italic;
  }
  .af-footer__creditos{
    margin:0;
    font-size:13px;
    color: rgba(17,19,24,.68);
  }
  .af-footer__creditos a{
    color: var(--af-terracota-2);
    font-weight:700;
    text-decoration:none;
    border-bottom:1px solid rgba(169,99,62,.45);
  }
  .af-footer__creditos a:hover{border-color: var(--af-terracota-2);}

  /* BANNER DE TEMA / ÁLBUM (full-bleed, mismo lenguaje que el hero del home,
     pero más bajo — para páginas internas) */
  .topic-hero{
    --hero-indent: max(18px, calc((100vw - var(--max)) / 2 + 18px - 14px));
    position:relative;
    min-height: 42vh;
    display:flex;
    align-items:stretch;
    overflow:hidden;
    border-bottom:1px solid rgba(255,255,255,.10);
  }
  .topic-hero__bg{
    position:absolute; inset:0;
    background-size:cover;
    background-position:center;
    filter: saturate(1.05) contrast(1.05);
    transform: scale(1.02);
  }
  .topic-hero__content{
    position:relative;
    width:100%;
    display:flex;
    align-items:flex-end;
    padding: 32px 24px 62px var(--hero-indent);
  }
  .topic-hero__panel{max-width: 820px; color:#fff;}
  .topic-hero__panel--wide{max-width: 1040px;}
  .topic-hero__kicker{
    display:inline-flex;
    gap:10px;
    align-items:center;
    font-size:13px;
    letter-spacing:.12em;
    text-transform:uppercase;
    color: rgba(255,255,255,.78);
    margin-bottom:14px;
  }
  .topic-hero__title{
    margin:0 0 12px;
    font-family: var(--font-serif);
    font-weight:700;
    font-size: clamp(28px, 4vw, 44px);
    line-height:1.06;
    text-shadow: 0 10px 40px rgba(0,0,0,.25);
  }
  .topic-hero__desc{
    margin:0 0 20px;
    max-width: 70ch;
    font-size: 16px;
    line-height:1.6;
    color: rgba(255,255,255,.86);
  }
  .topic-hero__actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    margin-bottom: 16px;
  }
  .topic-hero__crumbs{
    position:absolute;
    left:0; right:0; bottom:0;
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14.5px;
    color: rgba(255,255,255,.92);
    background: rgba(17,19,24,.46);
    border-top:1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(6px);
    padding: 12px 24px 12px var(--hero-indent);
  }
  .topic-hero__crumbs a{
    color:#fff;
    text-decoration:underline;
    text-decoration-color: rgba(255,255,255,.40);
  }
  .topic-hero__crumbs a:hover{text-decoration-color:#fff;}

  /* Estado vacío (sin álbumes/fotos visibles) */
  .empty-box{
    background:#fff;
    border:1px solid var(--af-line);
    border-radius: 8px;
    padding: 16px;
    color: rgba(17,19,24,.62);
  }

  /* Panel que "sube" y se superpone al banner (usar junto a .album__top, p. ej.) */
  .overlap-hero{
    margin-top: -28px;
    position: relative;
    z-index: 2;
  }

  /* FILTROS (álbum) — panel único combinado */
  .filters-panel{
    margin-top: 10px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--af-line);
    background: var(--af-card);
  }
  .filters-panel__head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
    padding-bottom:12px;
    border-bottom:1px solid var(--af-line);
  }
  .filters-panel__title{
    margin:0 0 4px;
    font-size:13px;
    letter-spacing:.08em;
    text-transform:uppercase;
    color: rgba(17,19,24,.60);
    font-weight:700;
  }
  .filters-panel__help{
    margin:0;
    font-size:12.5px;
    color: rgba(17,19,24,.48);
    max-width:52ch;
  }
  .filters-panel__clear{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12.5px;
    font-weight:700;
    color: var(--af-terracota-2);
    white-space:nowrap;
    flex:0 0 auto;
  }
  .filters-panel__clear:hover{color: var(--af-terracota);}
  .filters-panel__clear i{font-size:11px;}

  /* Formulario de filtros (selects agrupados + botón aplicar) */
  .filters-form__grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 20px;
    margin-bottom: 18px;
  }
  @media (max-width: 780px){
    .filters-form__grid{grid-template-columns: 1fr 1fr;}
  }
  @media (max-width: 520px){
    .filters-form__grid{grid-template-columns: 1fr;}
  }

  .filters-field{display:flex; flex-direction:column; gap:6px;}
  .filters-field__label{
    margin:0;
    font-size:12px;
    letter-spacing:.06em;
    text-transform:uppercase;
    color: rgba(17,19,24,.50);
    font-weight:700;
  }
  .filters-field select{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    width:100%;
    background: var(--af-card);
    border:1px solid var(--af-line);
    border-radius:8px;
    padding:10px 32px 10px 12px;
    font-family:var(--font);
    font-size:13.5px;
    color: var(--af-ink);
    cursor:pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23A9633E'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position: right 12px center;
  }
  .filters-field select:focus{border-color: var(--af-terracota); outline:none;}
  .filters-field select:hover{border-color: rgba(169,99,62,.45);}

  .filters-form__submit{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border:none;
    border-radius:6px;
    padding:11px 20px;
    background: var(--af-terracota);
    color:#fff;
    font-weight:700;
    font-size:13.5px;
    text-transform:uppercase;
    letter-spacing:.04em;
    cursor:pointer;
  }
  .filters-form__submit:hover{background: var(--af-terracota-2);}

  /* Chips activos: fondo sólido (no solo color+borde), más legible de un vistazo */
  .chip.is-active{
    border-color: var(--af-terracota);
    color:#fff;
    background: var(--af-terracota);
  }

  /* Barra horizontal sin scrollbar visible */
  .filters__bar{
    display:flex;
    gap:8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 2px 0;
    scrollbar-width: none;
  }
  .filters__bar::-webkit-scrollbar{display:none;}

  .filters__rail{position: relative;}
  .filters__rail::before,
  .filters__rail::after{
    content:"";
    position:absolute;
    top:0; bottom:0;
    width:34px;
    pointer-events:none;
    opacity:0;
    transition:.15s ease;
  }
  .filters__rail::before{
    left:0;
    background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,0));
  }
  .filters__rail::after{
    right:0;
    background: linear-gradient(270deg, rgba(255,255,255,.95), rgba(255,255,255,0));
  }
  .filters__rail.has-left::before{opacity:1;}
  .filters__rail.has-right::after{opacity:1;}

  .filters__nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:30px;
    height:30px;
    border-radius:999px;
    border:1px solid var(--af-line);
    background: var(--af-card);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:.15s ease;
  }
  .filters__nav:hover{border-color: var(--af-terracota);}
  .filters__nav:active{transform:translateY(-50%) scale(.96);}
  .filters__nav.is-hidden{display:none;}
  .filters__nav--left{left:-6px;}
  .filters__nav--right{right:-6px;}
  .filters__nav i{color: rgba(17,19,24,.62); font-size:13px;}
  .filters__nav:hover i{color: var(--af-terracota-2);}

  /* Fila de badges en el hero (código / autor / fecha, con ícono) — para foto.php */
  .topic-hero__meta{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    color: rgba(255,255,255,.86);
    font-size:14px;
    margin-bottom:18px;
  }
  .topic-hero__meta span{display:inline-flex; align-items:center; gap:7px;}
  .topic-hero__meta i{opacity:.80; font-size:13px;}

  /* MAPA (ficha completa) */
  .mapbox{
    margin-top:12px;
    padding-top:12px;
    border-top: 1px solid rgba(90,62,38,.14);
  }
  .mapbox__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:0 0 10px 0;
  }
  .mapbox__title{
    margin:0;
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
    color: rgba(17,19,24,.56);
    font-weight:700;
  }
  .mapbox__warn{
    font-size:11.5px;
    font-weight:700;
    color: var(--af-terracota-2);
    background: rgba(169,99,62,.10);
    border:1px solid rgba(169,99,62,.24);
    padding:5px 10px;
    border-radius:4px;
    white-space:nowrap;
    text-transform:uppercase;
    letter-spacing:.03em;
  }
  #leafletMap{
    height: 260px;
    border-radius: 8px;
    overflow:hidden;
    border:1px solid var(--af-line);
    background:#eaecef;
  }

  /* Descripción del álbum: fragmento visible + "ver más" para ampliar */
  .album-desc{
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid var(--af-line);
    border-radius: 8px;
    background: rgba(169,99,62,.035);
  }
  .album-desc__label{
    display:flex;
    align-items:center;
    gap:11px;
    margin:0 0 12px;
    font-size:21px;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight:600;
    color: var(--af-terracota-2);
  }
  .album-desc__label i{
    color: var(--af-terracota);
    font-size:18px;
  }
  .album-desc__text{
    margin: 0 0 8px;
    color: rgba(17,19,24,.74);
    line-height:1.7;
    font-size:15px;
  }
  .album-desc__text:last-child{margin-bottom:0;}
  .album-desc__full{display:none;}
  .album-desc__toggle-input:checked ~ .album-desc__short{display:none;}
  .album-desc__toggle-input:checked ~ .album-desc__full{display:block;}
  .album-desc__toggle-label{
    display:inline-flex;
    align-items:center;
    gap:5px;
    cursor:pointer;
    color: var(--af-terracota-2);
    font-weight:700;
    margin-left:2px;
  }
  .album-desc__toggle-label:hover{color: var(--af-terracota);}
  .album-desc__toggle-label i{font-size:11px;}

  /* ÍNDICE DE COLECCIONES (listado compacto, agrupado por letra) */
  .coleccion-index{margin-top:8px;}
  .coleccion-index__letter{
    font-family: var(--font-serif);
    font-weight:700;
    font-size:18px;
    color: var(--af-terracota);
    margin: 26px 0 8px;
    padding-bottom:4px;
    border-bottom:2px solid var(--af-line);
  }
  .coleccion-index__letter:first-child{margin-top:0;}
  .coleccion-index__grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 24px;
  }
  @media (max-width: 780px){ .coleccion-index__grid{grid-template-columns: 1fr 1fr;} }
  @media (max-width: 520px){ .coleccion-index__grid{grid-template-columns: 1fr;} }
  .coleccion-index__item{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    gap:8px;
    padding:8px 0;
    border-bottom:1px dashed var(--af-line);
    text-decoration:none;
    color: var(--af-ink);
    font-size:14px;
  }
  .coleccion-index__item:hover{color: var(--af-terracota-2);}
  .coleccion-index__count{
    flex:0 0 auto;
    color: rgba(17,19,24,.42);
    font-size:12.5px;
    white-space:nowrap;
  }
  /* APORTES / REPORTES SOBRE UNA FOTO (foto.php) */
  .aporte-trigger{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    width:100%;
    margin-top:16px;
    padding:13px 16px;
    border:1px solid rgba(169,99,62,.35);
    border-radius:6px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(58,38,20,.07);
    color: var(--af-terracota-2);
    font-size:14px;
    font-weight:700;
    text-align:center;
    cursor:pointer;
  }
  .aporte-trigger:hover{background: rgba(169,99,62,.06); border-color: var(--af-terracota);}
  .aporte-trigger i{font-size:14px;}
  .aporte-toggle-input:checked ~ .aporte-trigger{display:none;}

  .aporte-form-wrap{display:none; margin-top:14px;}
  .aporte-toggle-input:checked ~ .aporte-form-wrap{display:block;}

  .aporte-form-wrap form{
    padding:18px;
    border:1px solid var(--af-line);
    border-radius:8px;
    background: var(--af-paper-2);
  }

  .aporte-field{margin-bottom:12px;}
  .aporte-field:last-of-type{margin-bottom:0;}
  .aporte-field label{
    display:block;
    margin-bottom:5px;
    font-size:12px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    color: rgba(17,19,24,.56);
  }
  .aporte-field input,
  .aporte-field select,
  .aporte-field textarea{
    width:100%;
    border:1px solid var(--af-line);
    border-radius:6px;
    padding:9px 11px;
    font-family: var(--font);
    font-size:13.5px;
    color: var(--af-ink);
    background:#fff;
  }
  .aporte-field input:disabled{
    background: rgba(17,19,24,.04);
    color: rgba(17,19,24,.5);
  }
  .aporte-field textarea{min-height:90px; resize:vertical;}

  .aporte-honeypot{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;}

  .aporte-aviso{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:14px;
    padding:10px 12px;
    border-radius:6px;
    font-size:13px;
    font-weight:700;
  }
  .aporte-aviso--ok{
    background: rgba(16,185,129,.10);
    color:#065f46;
    border:1px solid rgba(16,185,129,.25);
  }
  .aporte-aviso--error{
    background: rgba(220,38,38,.08);
    color:#991b1b;
    border:1px solid rgba(220,38,38,.22);
  }

  /* MAPA PRINCIPAL (mapa.php) */
  #mapaPrincipal{
    width:100%;
    height: 70vh;
    min-height: 420px;
    border-radius: 8px;
    border: 1px solid var(--af-line);
    overflow:hidden;
    margin-top: 4px;
  }
  .mapa-pin{
    display:block;
    width:14px; height:14px;
    border-radius:50%;
    background: var(--af-terracota);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(58,38,20,.45);
  }
  .mapa-pin--aprox{
    background: var(--af-ochre);
    opacity:.85;
  }
  .mapa-cluster{
    display:flex;
    align-items:center;
    justify-content:center;
    width:40px; height:40px;
    border-radius:50%;
    background: rgba(169,99,62,.85);
    border: 3px solid rgba(255,255,255,.9);
    color:#fff;
    font-weight:700;
    font-family: var(--font);
    font-size:13px;
    box-shadow: 0 2px 8px rgba(58,38,20,.3);
  }
  .mapa-cluster--medium{background: rgba(138,78,48,.88); width:46px; height:46px;}
  .mapa-cluster--large{background: rgba(58,38,20,.90); width:54px; height:54px; font-size:14px;}

  .mapa-popup{width:170px;}
  .mapa-popup img{
    width:100%; height:110px; object-fit:cover;
    border-radius:4px; margin-bottom:8px; filter: sepia(.15);
  }
  .mapa-popup__title{
    font-family: var(--font-serif);
    font-weight:600;
    font-size:13px;
    line-height:1.3;
    color: var(--af-ink);
    margin-bottom:6px;
  }
  .mapa-popup__link{
    display:inline-flex;
    align-items:center;
    gap:5px;
    font-size:12px;
    font-weight:700;
    color: var(--af-terracota-2);
  }
  .mapa-popup__link i{font-size:10px;}

  .leaflet-popup-content-wrapper{
    border-radius:8px;
    font-family: var(--font);
  }
  .leaflet-popup-content{margin:10px;}

  .mapa-legend{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    margin-top:12px;
    font-size:12.5px;
    color: rgba(17,19,24,.62);
  }
  .mapa-legend span{display:inline-flex; align-items:center; gap:7px;}

  /* MAPA — experiencia de pantalla completa tipo app (mapa.php) */
  body.mapa-app{
    margin:0;
    height:100%;
    overflow:hidden;
  }
  html.mapa-app-html{height:100%;}

  #mapaFull{
    position:fixed;
    inset:0;
    z-index:1;
    background:#eef0f1;
  }

  .mapa-app-topbar{
    position:fixed;
    top:0; left:0; right:0;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 18px;
    background: linear-gradient(to bottom, rgba(17,19,24,.62), transparent);
    pointer-events:none;
  }
  .mapa-app-topbar > *{pointer-events:auto;}

  .mapa-app-brand{
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:#fff;
    font-family: var(--font-serif);
    font-weight:600;
    font-style:italic;
    font-size:14.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,.45);
    text-decoration:none;
    line-height:1.25;
  }
  .mapa-app-brand i{font-size:13px; opacity:.9;}

  .mapa-app-back{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:9px 14px;
    border-radius:999px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(6px);
    border:1px solid rgba(255,255,255,.5);
    color: var(--af-ink);
    font-size:12.5px;
    font-weight:700;
    text-decoration:none;
    box-shadow: 0 4px 14px rgba(17,19,24,.18);
    white-space:nowrap;
  }
  .mapa-app-back:hover{background:#fff;}

  /* Panel flotante de filtros (desktop: siempre visible; mobile: detrás de un botón) */
  .mapa-app-panel{
    position:fixed;
    top:74px;
    right:16px;
    z-index:1000;
    width:300px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 96px);
    overflow-y:auto;
    background:#fff;
    border-radius:12px;
    box-shadow: 0 14px 36px rgba(17,19,24,.22);
    border:1px solid rgba(17,19,24,.06);
  }
  .mapa-app-panel__head{padding:16px 16px 0;}
  .mapa-app-panel__title{
    margin:0;
    font-family: var(--font-serif);
    font-weight:600;
    font-size:16px;
    color: var(--af-ink);
  }
  .mapa-app-panel__count{
    margin:3px 0 14px;
    font-size:12.5px;
    color: rgba(17,19,24,.55);
  }
  .mapa-app-panel__body{padding:0 16px 16px;}

  .mapa-app-field{margin-bottom:12px;}
  .mapa-app-field:last-of-type{margin-bottom:0;}
  .mapa-app-field label{
    display:block;
    margin-bottom:5px;
    font-size:11px;
    font-weight:700;
    letter-spacing:.05em;
    text-transform:uppercase;
    color: rgba(17,19,24,.50);
  }
  .mapa-app-field select{
    width:100%;
    border:1px solid var(--af-line);
    border-radius:6px;
    padding:9px 10px;
    font-family: var(--font);
    font-size:13px;
    color: var(--af-ink);
    background:#fff;
  }

  .mapa-app-submit{
    width:100%;
    margin-top:6px;
    padding:11px;
    border:none;
    border-radius:6px;
    background: var(--af-terracota);
    color:#fff;
    font-weight:700;
    font-size:12.5px;
    text-transform:uppercase;
    letter-spacing:.03em;
    cursor:pointer;
  }
  .mapa-app-submit:hover{background: var(--af-terracota-2);}

  .mapa-app-clear{
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin-top:10px;
    font-size:12px;
    font-weight:700;
    color: var(--af-terracota-2);
  }

  .mapa-app-legend{
    display:flex;
    flex-direction:column;
    gap:7px;
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid var(--af-line);
    font-size:12px;
    color: rgba(17,19,24,.60);
  }
  .mapa-app-legend span{display:inline-flex; align-items:center; gap:8px;}

  /* Botón redondo que reemplaza al panel en mobile */
  .mapa-app-panel-toggle{
    display:none;
    position:fixed;
    top:74px; right:16px;
    z-index:1001;
    width:44px; height:44px;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    border:none;
    background:#fff;
    box-shadow: 0 6px 18px rgba(17,19,24,.22);
    color: var(--af-terracota-2);
    font-size:16px;
    cursor:pointer;
  }
  @media (max-width: 760px){
    .mapa-app-panel{display:none;}
    .mapa-app-panel-toggle{display:flex;}
    .mapa-toggle-input:checked ~ .mapa-app-panel{
      display:block;
      top:70px; right:10px; left:10px;
      width:auto; max-width:none;
    }
    .mapa-toggle-input:checked ~ .mapa-app-panel-toggle{
      background: var(--af-terracota);
      color:#fff;
    }
  }

  .mapa-app-empty{
    position:fixed;
    top:50%; left:50%;
    transform:translate(-50%,-50%);
    z-index:1000;
    background:#fff;
    padding:20px 26px;
    border-radius:10px;
    box-shadow: 0 14px 36px rgba(17,19,24,.22);
    color: rgba(17,19,24,.68);
    font-size:14px;
    text-align:center;
    max-width:320px;
  }

  /* Selector de capa base (Mapa / Satélite) — combina con el resto de los controles flotantes */
  .leaflet-control-layers{
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(17,19,24,.22) !important;
    border: none !important;
    font-family: var(--font) !important;
  }
  .leaflet-control-layers-toggle{
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
  }
  .leaflet-control-layers label{
    font-size: 13px;
    color: var(--af-ink);
    padding: 2px 0;
  }
  .leaflet-control-layers-selector{
    margin-right: 7px !important;
  }