@font-face {
    font-family: 'Onuba';
    src: url('../fonts/Onuba-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Onuba';
    src: url('../fonts/Onuba-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Paleta Huelva Original / Turismo Huelva */
    --huelva-blue: #1986e1;
    --huelva-blue-2: #1797df;
    --huelva-navy: #064a78;
    --huelva-deep: #102f46;
    --huelva-green: #0f725f;
    --huelva-mint: #82e6c2;
    --huelva-salmon: #ff765f;
    --huelva-pink: #ffd7de;
    --huelva-yellow: #ffe45c;
    --huelva-sand: #f7eddc;
    --huelva-stone: #d1d1d1;
    --huelva-black: #171717;
    --huelva-white: #ffffff;

    --ink: var(--huelva-deep);
    --muted: #62717d;
    --line: rgba(16, 47, 70, .16);
    --paper: #ffffff;
    --sand: #f7f1e7;
    --blue: var(--huelva-blue);
    --blue-dark: var(--huelva-navy);
    --green: var(--huelva-green);
    --sunset: var(--huelva-salmon);
    --gold: var(--huelva-yellow);
    --shadow: 0 24px 80px rgba(16, 47, 70, .14);
    --radius: 10px;
    --font-body: 'Onuba', Arial, Helvetica, sans-serif;
    --font-heading: 'Onuba', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--ink);
    background: var(--huelva-white);
    line-height: 1.55;
    text-rendering: geometricPrecision;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
main { min-height: 70vh; }

h1, h2, h3, h4,
.brand strong,
.main-nav a,
.btn,
.item-image span,
.text-link,
.admin-sidebar nav a,
.login-card label,
.form-grid label {
    font-family: var(--font-heading);
    font-style: normal;
    font-weight: 300;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: .95rem clamp(1rem, 4vw, 3.4rem);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(16, 47, 70, .1);
}
.site-header::after {
    content: "";
    position: absolute;
    left: clamp(1rem, 4vw, 3.4rem);
    right: clamp(1rem, 4vw, 3.4rem);
    bottom: -1px;
    height: 4px;
    background: linear-gradient(90deg, var(--huelva-blue) 0 25%, var(--huelva-pink) 25% 43%, var(--huelva-green) 43% 62%, var(--huelva-salmon) 62% 80%, var(--huelva-yellow) 80% 100%);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    min-width: max-content;
    color: var(--huelva-deep);
}
.brand img { width: 44px; height: 44px; }
.brand_2 img {padding-left: 50px; height: 44px; }

.brand strong {
    display: block;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: -.02em;
}
.brand small {
    display: block;
    color: var(--huelva-blue);
    margin-top: .12rem;
    font-weight: 300;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.main-nav a {
    padding: .62rem .82rem;
    border-radius: 0;
    color: var(--huelva-deep);
    font-size: 1rem;
    line-height: 1;
    position: relative;
}
.main-nav a::before {
    content: "";
    position: absolute;
    left: .82rem;
    right: .82rem;
    bottom: .32rem;
    height: 2px;
    background: var(--huelva-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
}
.main-nav a:hover::before { transform: scaleX(1); }
.main-nav .admin-link {
    background: var(--huelva-deep);
    color: white;
    margin-left: .3rem;
}
.main-nav .admin-link::before { background: var(--huelva-yellow); }
.nav-toggle {
    display: none;
    border: 0;
    background: var(--huelva-blue);
    color: white;
    border-radius: 0;
    padding: .52rem .72rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    min-height: clamp(580px, 78vh, 820px);
    background: var(--huelva-white);
}
.hero-content {
    position: relative;
    padding: clamp(4rem, 10vw, 8.5rem) clamp(1.1rem, 6vw, 6rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.hero-content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.62)),
        repeating-linear-gradient(90deg, transparent 0 48px, rgba(25,134,225,.08) 48px 49px),
        linear-gradient(135deg, var(--huelva-pink), var(--huelva-white) 42%, #e8f7ff 100%);
}
.hero-content::after {
    content: "";
    position: absolute;
    width: 28vw;
    max-width: 360px;
    aspect-ratio: 1;
    right: -6vw;
    top: 12%;
    background: var(--huelva-yellow);
    box-shadow: -120px 180px 0 var(--huelva-salmon), -250px 40px 0 var(--huelva-blue);
    opacity: .88;
    z-index: 0;
}
.hero-content > * { position: relative; z-index: 1; }
.hero h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 300;
    font-style: normal;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: .88;
    letter-spacing: -.075em;
    max-width: 1080px;
}
.hero-text {
    margin: 1.4rem 0 2rem;
    max-width: 760px;
    color: var(--huelva-deep);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 300;
}
.eyebrow {
    margin: 0 0 .82rem;
    color: var(--huelva-blue);
    font-family: var(--font-heading);
    font-weight: 300;
    text-transform: none;
    letter-spacing: -.01em;
    font-size: 1rem;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: .82em;
    height: .82em;
    margin-right: .42rem;
    vertical-align: -.08em;
    background: currentColor;
}
.search-box {
    display: flex;
    gap: 0;
    max-width: 760px;
    padding: 0;
    border-radius: 0;
    background: white;
    border: 2px solid var(--huelva-deep);
    box-shadow: none;
}
.search-box input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 1rem 1.1rem;
    outline: 0;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 0;
    border-radius: 0;
    padding: .95rem 1.2rem;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
    font-size: 1rem;
    line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: white;
    background: var(--huelva-deep);
    box-shadow: none;
}
.btn-primary:hover { background: var(--huelva-blue); }
.btn-ghost {
    background: white;
    color: var(--huelva-deep);
    border: 2px solid currentColor;
}
.btn.full { width: 100%; margin: .25rem 0; }

.hero-card {
    border-radius: 0;
    background: var(--huelva-blue);
    color: white;
    padding: clamp(1.3rem, 4vw, 3rem);
    box-shadow: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(16,47,70,.1), transparent 40%),
        linear-gradient(0deg, rgba(16,47,70,.22), transparent 50%),
        repeating-linear-gradient(0deg, transparent 0 60px, rgba(255,255,255,.08) 60px 61px),
        repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,.08) 60px 61px);
}
.hero-card::after {
    content: "";
    position: absolute;
    width: 46%;
    aspect-ratio: 1;
    right: 0;
    top: 0;
    background: var(--huelva-green);
    box-shadow: -65px 180px 0 var(--huelva-salmon), -190px 72px 0 var(--huelva-pink), -10px 365px 0 var(--huelva-yellow);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: .45rem .72rem;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 0;
    color: white;
    font-weight: 300;
    background: rgba(16,47,70,.16);
}
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 1.3rem;
    border: 1px solid rgba(255,255,255,.56);
}
.stat-grid div,
.admin-card {
    border-radius: 0;
    background: rgba(255,255,255,.13);
    padding: 1.15rem;
}
.stat-grid div { border: 1px solid rgba(255,255,255,.56); }
.stat-grid strong {
    display: block;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: .88;
    font-weight: 300;
}
.stat-grid span { color: rgba(255,255,255,.84); font-weight: 300; }

.section {
    padding: clamp(2.8rem, 6vw, 5.4rem) clamp(1rem, 4vw, 4rem);
}
.surface {
    background:
        linear-gradient(90deg, rgba(25,134,225,.06), rgba(255,118,95,.08)),
        var(--huelva-sand);
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.section h2,
.section-head h2,
.detail-content h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4.4vw, 4.6rem);
    font-weight: 300;
    line-height: .9;
    letter-spacing: -.065em;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line);
}
.category-tile {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0;
    padding: 1.25rem;
    background: var(--huelva-blue);
    color: white;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,.35);
    position: relative;
    overflow: hidden;
}
.category-tile::after {
    content: "";
    position: absolute;
    right: -12px;
    bottom: -12px;
    width: 74px;
    height: 74px;
    background: rgba(255,255,255,.22);
}
.category-tile:nth-child(2n) { background: var(--huelva-green); }
.category-tile:nth-child(3n) { background: var(--huelva-salmon); color: var(--huelva-deep); }
.category-tile:nth-child(4n) { background: var(--huelva-deep); }
.category-tile span { font-weight: 300; font-size: 1rem; position: relative; z-index: 1; }
.category-tile strong { font-size: 4.1rem; line-height: .85; font-weight: 300; position: relative; z-index: 1; }

/* Slider de categorías estilo Turismo Huelva / wpr-slider-item-bg */
.category-slider-section {
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(25,134,225,.05), rgba(255,118,95,.06)),
        var(--huelva-white);
}
.category-slider-head {
    align-items: center;
}
.category-slider-actions {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
}
.category-slider-arrow {
    width: 52px;
    height: 52px;
    border: 2px solid var(--huelva-deep);
    border-radius: 0;
    background: white;
    color: var(--huelva-deep);
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.category-slider-arrow:hover,
.category-slider-arrow:focus-visible {
    background: var(--huelva-deep);
    color: white;
    transform: translateY(-1px);
}
.category-slider {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-slider::-webkit-scrollbar {
    display: none;
}
.category-slider-track {
    display: flex;
    gap: clamp(.85rem, 1.8vw, 1.3rem);
    align-items: stretch;
    min-width: 100%;
}
.category-slide {
    flex: 0 0 clamp(310px, 34vw, 540px);
    min-height: clamp(380px, 46vw, 560px);
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    color: white;
    background: var(--huelva-deep);
    border-radius: 0;
    scroll-snap-align: start;
    isolation: isolate;
    border: 1px solid rgba(16,47,70,.14);
}
.category-slide::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    width: 14px;
    height: 14px;
    background: var(--huelva-yellow);
}
.category-slide:nth-child(2n)::before { background: var(--huelva-green); }
.category-slide:nth-child(3n)::before { background: var(--huelva-salmon); }
.category-slide:nth-child(4n)::before { background: var(--huelva-blue); }
.wpr-slider-item-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.035);
    transition: transform .65s ease, filter .65s ease;
    will-change: transform;
}
.category-slide:hover .wpr-slider-item-bg,
.category-slide:focus-visible .wpr-slider-item-bg {
    transform: scale(1.1);
    filter: saturate(1.08) contrast(1.03);
}
.category-slide-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(0deg, rgba(16,47,70,.92) 0%, rgba(16,47,70,.58) 44%, rgba(16,47,70,.08) 100%),
        linear-gradient(90deg, rgba(25,134,225,.32), rgba(255,118,95,.18));
}
.category-slide-shade::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42%;
    aspect-ratio: 1;
    background: rgba(255,228,92,.86);
    mix-blend-mode: screen;
    transform: translate(34%, 34%);
}
.category-slide-content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: .75rem;
    width: 100%;
    padding: clamp(1.15rem, 3.4vw, 2.1rem);
}
.category-slide-kicker {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: var(--huelva-yellow);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1;
}
.category-slide-kicker::before {
    content: "";
    width: .82em;
    height: .82em;
    background: currentColor;
}
.category-slide-content strong {
    display: block;
    max-width: 10ch;
    font-family: var(--font-heading);
    font-size: clamp(2.55rem, 5vw, 5.4rem);
    font-weight: 300;
    line-height: .82;
    letter-spacing: -.07em;
    text-wrap: balance;
}
.category-slide-description {
    max-width: 36rem;
    color: rgba(255,255,255,.86);
    font-size: .98rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category-slide-count {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: .68rem .9rem;
    background: white;
    color: var(--huelva-deep);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1;
}
.category-slider-dots {
    display: flex;
    justify-content: center;
    gap: .45rem;
    margin-top: 1rem;
}
.category-slider-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 0;
    background: rgba(16,47,70,.22);
    cursor: pointer;
    padding: 0;
}
.category-slider-dot.active {
    background: var(--huelva-blue);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}
.item-card {
    border-radius: 0;
    overflow: hidden;
    background: white;
    box-shadow: none;
    border: 1px solid var(--line);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    position: relative;
}
.item-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 12px;
    height: 12px;
    background: var(--huelva-blue);
    z-index: 2;
}
.item-card:nth-child(2n)::before { background: var(--huelva-green); }
.item-card:nth-child(3n)::before { background: var(--huelva-salmon); }
.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(25,134,225,.38);
}
.item-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--huelva-stone);
}
.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.item-card:hover .item-image img { transform: scale(1.04); }
.item-image span {
    position: absolute;
    left: 1rem;
    top: 1rem;
    padding: .4rem .7rem;
    color: white;
    background: var(--huelva-deep);
    border-radius: 0;
    font-size: 1rem;
    line-height: 1;
}
.item-body { padding: 1.2rem; }
.item-body h3 {
    margin: 0 0 .55rem;
    font-size: 1rem;
    line-height: 1.05;
    letter-spacing: -.015em;
    color: var(--huelva-deep);
}
.item-body p { color: #53636e; margin: 0 0 .9rem; }
.item-meta {
    display: grid;
    gap: .35rem;
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: .9rem;
}
.text-link {
    color: var(--huelva-blue);
    font-size: 1rem;
}
.text-link:hover { color: var(--huelva-green); }
.empty-state {
    grid-column: 1/-1;
    border: 1px dashed rgba(16,47,70,.35);
    border-radius: 0;
    padding: 2rem;
    background: white;
    color: var(--muted);
    text-align: center;
}

.page-hero {
    padding: clamp(3.2rem, 8vw, 6.6rem) clamp(1rem, 4vw, 4rem);
    background:
        linear-gradient(90deg, rgba(255,255,255,.72), rgba(255,255,255,.9)),
        linear-gradient(135deg, var(--huelva-pink), #e9f7ff 58%, var(--huelva-yellow));
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: "";
    position: absolute;
    right: clamp(1rem, 5vw, 4rem);
    top: 22%;
    width: 130px;
    height: 130px;
    background: var(--huelva-blue);
    box-shadow: 82px 82px 0 var(--huelva-green), -82px 82px 0 var(--huelva-salmon);
    opacity: .92;
}
.page-hero p { color: var(--huelva-deep); font-size: 1.1rem; position: relative; z-index: 1; }
.page-hero h1 { position: relative; z-index: 1; }

.detail-hero {
    min-height: 520px;
    display: flex;
    align-items: end;
    padding: clamp(2rem, 5vw, 4rem);
    color: white;
    position: relative;
    background:
        linear-gradient(0deg, rgba(16, 47, 70, .86), rgba(16,47,70,.18)),
        var(--detail-bg) center/cover;
}
.detail-hero::after {
    content: "";
    position: absolute;
    left: clamp(1rem, 4vw, 4rem);
    bottom: 0;
    height: 12px;
    width: min(520px, 60vw);
    background: linear-gradient(90deg, var(--huelva-blue) 0 35%, var(--huelva-green) 35% 55%, var(--huelva-salmon) 55% 77%, var(--huelva-yellow) 77% 100%);
}
.detail-hero p { max-width: 800px; font-size: 1.15rem; font-weight: 300; }
.back-link {
    display: inline-flex;
    margin-bottom: 1rem;
    background: rgba(255,255,255,.14);
    padding: .45rem .8rem;
    border-radius: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.5);
}
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    padding: clamp(2rem, 5vw, 4rem);
    background: #fff;
}
.detail-content,
.info-panel {
    background: white;
    border-radius: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: none;
    border: 1px solid var(--line);
}
.info-panel {
    align-self: start;
    position: sticky;
    top: 100px;
    border-top: 12px solid var(--huelva-blue);
}
.info-panel h2,
.info-panel h3 { margin-top: 0; font-weight: 300; }
.info-panel p { color: #445166; }
.rich-text { color: #344256; font-size: 1.05rem; }
.rich-text.small { font-size: .98rem; margin-top: .8rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin: 1rem 0 2rem;
}
.gallery-button {
    border: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: #f1f5f9;
}
.gallery-button img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}
.subgroup-list { display: grid; gap: 1rem; }
.subgroup-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: .85rem;
    background: #fff;
}
.subgroup-card > img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 0;
}
.subgroup-card h3 { margin: .1rem 0 .25rem; font-size: 1rem; }
.subgroup-card p { color: var(--muted); margin: 0 0 .4rem; }
.subgroup-card summary { cursor: pointer; font-weight: 300; color: var(--huelva-blue); }
.mini-gallery {
    display: flex;
    gap: .45rem;
    margin-top: .8rem;
    flex-wrap: wrap;
}
.mini-gallery img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 0;
}
.map-card iframe {
    width: 100%;
    min-height: 260px;
    border: 0;
    border-radius: 0;
    margin-top: 1rem;
}
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.4rem clamp(1rem, 4vw, 4rem);
    background: var(--huelva-deep);
    color: white;
    border-top: 12px solid var(--huelva-blue);
}
.site-footer p { color: rgba(255,255,255,.72); max-width: 480px; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--huelva-yellow); font-weight: 300; }

/* Admin */
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background:
        linear-gradient(90deg, rgba(16,47,70,.86), rgba(25,134,225,.55)),
        linear-gradient(135deg, var(--huelva-blue), var(--huelva-green));
}
.login-card {
    width: min(100%, 440px);
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow);
    border-top: 12px solid var(--huelva-blue);
}
.login-card h1 { margin-bottom: .2rem; font-weight: 300; }
.login-card label,
.form-grid label {
    display: grid;
    gap: .35rem;
    color: #344256;
}
.login-card input,
.form-grid input,
.form-grid textarea,
.form-grid select,
.admin-filters input,
.admin-filters select,
.import-form input {
    width: 100%;
    border: 1px solid rgba(16,47,70,.26);
    border-radius: 0;
    padding: .82rem .9rem;
    background: white;
    outline: 0;
}
.login-card input:focus,
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus,
.admin-filters input:focus,
.admin-filters select:focus {
    border-color: var(--huelva-blue);
    box-shadow: 0 0 0 4px rgba(25,134,225,.12);
}
.admin-body {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
    background: #f7f8fa;
}
.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--huelva-deep);
    color: white;
    padding: 1rem;
    border-right: 12px solid var(--huelva-blue);
}
.admin-brand { color: white; margin-bottom: 1rem; }
.admin-brand small { color: rgba(255,255,255,.68); }
.admin-sidebar nav { display: grid; gap: .35rem; }
.admin-sidebar nav a {
    padding: .82rem .9rem;
    border-radius: 0;
    color: rgba(255,255,255,.86);
    font-size: 1rem;
}
.admin-sidebar nav a:hover { background: rgba(255,255,255,.12); color: white; }
.admin-main {
    padding: clamp(1rem, 3vw, 2rem);
    min-width: 0;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1rem;
}
.admin-topbar h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.2rem); letter-spacing: -.06em; font-weight: 300; }
.admin-grid { display: grid; gap: 1rem; }
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; }
.admin-card {
    background: white;
    border: 1px solid rgba(16,47,70,.12);
    box-shadow: none;
}
.admin-card span { color: var(--muted); font-weight: 300; }
.admin-card strong { display: block; font-size: 2.4rem; font-weight: 300; }
.flash {
    padding: .85rem 1rem;
    border-radius: 0;
    margin-bottom: 1rem;
    background: #eaf7f2;
    color: #065f46;
    font-weight: 300;
    border-left: 8px solid var(--huelva-green);
}
.flash.error { background: #fff0ed; color: #991b1b; border-left-color: var(--huelva-salmon); }
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}
.admin-table th,
.admin-table td {
    padding: .85rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.admin-table th {
    color: #475569;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 300;
}
.admin-table small { color: var(--muted); }
.actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}
.actions form { margin: 0; }
.link-danger {
    border: 0;
    background: none;
    padding: 0;
    color: #b42318;
    font-weight: 300;
    cursor: pointer;
}
.admin-filters {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 230px auto auto;
    gap: .75rem;
    margin-bottom: 1rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.full-row { grid-column: 1 / -1; }
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: .65rem !important;
}
.checkbox-label input { width: auto; }
.form-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}
.import-card { max-width: 900px; }
.import-form {
    display: flex;
    gap: .8rem;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}
.import-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
}
.note { color: var(--muted); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(3, 7, 18, .84);
    padding: 1rem;
}
.lightbox img {
    max-height: 86vh;
    max-width: min(1100px, 96vw);
    border-radius: 0;
    box-shadow: var(--shadow);
}
.lightbox button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 0;
    border-radius: 0;
    width: 44px;
    height: 44px;
    color: white;
    background: rgba(255,255,255,.18);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1050px) {
    .hero,
    .detail-layout { grid-template-columns: 1fr; }
    .hero { min-height: auto; }
    .hero-card { min-height: 420px; }
    .info-panel { position: static; }
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-body { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; border-right: 0; border-bottom: 12px solid var(--huelva-blue); }
    .admin-sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        display: none;
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: 78px;
        padding: .7rem;
        border-radius: 0;
        background: white;
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }
    .main-nav.open { display: flex; }
    .search-box { flex-direction: column; }
    .cards-grid,
    .category-grid,
    .gallery-grid { grid-template-columns: 1fr; }
    .detail-hero { min-height: 390px; }
    .subgroup-card { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; }
    .admin-filters,
    .form-grid { grid-template-columns: 1fr; }
    .admin-sidebar nav { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero h1,
    .page-hero h1,
    .detail-hero h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); }
}


/* Footer institucional PSTD */
.site-footer {
    display: block;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.footer-brand strong {
    display: block;
}

.footer-brand p {
    margin: .35rem 0 0;
    color: rgba(255,255,255,.72);
    max-width: 520px;
}

.footer-logos {
    margin-top: 2rem;
    background: #fff;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.18);
}

.footer-logos img {
    width: 100%;
    max-width: 2048px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 720px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-brand {
        flex-direction: column;
    }

    .footer-logos {
        margin-top: 1.25rem;
        padding: .6rem;
    }
}


/* Multimedia y documentos añadidos */
.subgroup-documents {
    display: grid;
    gap: .55rem;
    margin-top: .9rem;
    align-items: start;
    justify-items: start;
}
.mini-gallery-button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
    display: inline-flex;
}
.mini-gallery-button img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid var(--line);
}
.media-panel {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
.media-panel h3 {
    margin: 0 0 .65rem;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(3, 7, 18, .86);
    padding: 1rem;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    border: 0;
    border-radius: 0;
    width: 46px;
    height: 46px;
    color: white;
    background: rgba(255,255,255,.2);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.image-modal img {
    max-height: 86vh;
    max-width: min(1120px, 96vw);
    border-radius: 0;
    box-shadow: var(--shadow);
}
.video-box {
    width: min(1120px, 96vw);
    background: #000;
    box-shadow: var(--shadow);
}
.video-box video {
    display: block;
    width: 100%;
    max-height: 82vh;
    background: #000;
}
.panorama-shell {
    width: min(1180px, 96vw);
    height: min(760px, 86vh);
    display: grid;
    grid-template-rows: auto 1fr;
    background: #07111f;
    color: white;
    box-shadow: var(--shadow);
}
.panorama-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .85rem 1rem;
    background: rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.panorama-toolbar span {
    color: rgba(255,255,255,.74);
    font-size: .9rem;
}
.panorama-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}
.panorama-actions button {
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.08);
    color: white;
    padding: .45rem .65rem;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}
.panorama-actions button:hover,
.panorama-actions button.active {
    background: rgba(255,255,255,.22);
}
.panorama-stage {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}
.panorama-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    background: #000;
}
.panorama-stage canvas.is-dragging {
    cursor: grabbing;
}
.panorama-loader {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
    background: rgba(7,17,31,.84);
}

@media (max-width: 720px) {
    .panorama-toolbar { align-items: flex-start; flex-direction: column; }
    .panorama-actions { justify-content: flex-start; }
    .panorama-shell { height: 78vh; }
}
.iframe-modal iframe {
    width: min(1180px, 96vw);
    height: min(760px, 86vh);
    border: 0;
    background: white;
    box-shadow: var(--shadow);
}

@media (max-width: 1050px) {
    .category-slide {
        flex-basis: clamp(300px, 58vw, 520px);
    }
}

@media (max-width: 720px) {
    .category-slider-head {
        align-items: flex-start;
    }
    .category-slider-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .category-slider-arrow {
        width: 46px;
        height: 46px;
    }
    .category-slide {
        flex-basis: min(86vw, 420px);
        min-height: 390px;
    }
    .category-slide-content strong {
        max-width: 9ch;
        font-size: clamp(2.65rem, 13vw, 4.5rem);
    }
}

