:root {
    --mr-navy-950: #0b1330;
    --mr-navy-900: #111b3f;
    --mr-navy-800: #172554;
    --mr-blue-700: #1d4ed8;
    --mr-blue-600: #2563eb;
    --mr-blue-100: #dbeafe;
    --mr-purple-700: #6d28d9;
    --mr-purple-600: #7c3aed;
    --mr-purple-100: #ede9fe;
    --mr-cyan-100: #cffafe;
    --mr-ink: #17203b;
    --mr-muted: #5f6982;
    --mr-line: #dfe4f1;
    --mr-surface: #ffffff;
    --mr-surface-alt: #f5f7ff;
    --mr-page: #f8f9fd;
    --mr-pride: linear-gradient(90deg, #e40303 0 14.28%, #ff8c00 14.28% 28.56%, #ffed00 28.56% 42.84%, #008026 42.84% 57.12%, #00a9e0 57.12% 71.4%, #24408e 71.4% 85.68%, #750787 85.68% 100%);
    --mr-flag-progress: linear-gradient(90deg, #000 0 8%, #784f17 8% 16%, #5bcefa 16% 24%, #f5a9b8 24% 32%, #fff 32% 40%, #e40303 40% 50%, #ff8c00 50% 60%, #ffed00 60% 70%, #008026 70% 80%, #24408e 80% 90%, #750787 90% 100%);
    --mr-flag-trans: linear-gradient(90deg, #5bcefa 0 20%, #f5a9b8 20% 40%, #fff 40% 60%, #f5a9b8 60% 80%, #5bcefa 80% 100%);
    --mr-flag-nonbinary: linear-gradient(90deg, #fff430 0 25%, #fff 25% 50%, #9c59d1 50% 75%, #2d2d2d 75% 100%);
    --mr-flag-bi: linear-gradient(90deg, #d60270 0 40%, #9b4f96 40% 60%, #0038a8 60% 100%);
    --mr-flag-pan: linear-gradient(90deg, #ff218c 0 33.33%, #ffd800 33.33% 66.66%, #21b1ff 66.66% 100%);
    --mr-flag-lesbian: linear-gradient(90deg, #d52d00, #ef7627, #fff, #d162a4, #a30262);
    --mr-flag-intersex: linear-gradient(90deg, #ffd800 0 38%, #7902aa 38% 62%, #ffd800 62% 100%);
    --mr-brand: linear-gradient(135deg, var(--mr-blue-700), var(--mr-purple-700));
    --mr-brand-soft: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .14));
    --mr-shadow-sm: 0 10px 30px rgba(15, 30, 72, .07);
    --mr-shadow-md: 0 22px 60px rgba(15, 30, 72, .12);
    --mr-radius-sm: 14px;
    --mr-radius-md: 22px;
    --mr-radius-lg: 32px;
    --mr-font-sans: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mr-font-display: 'Fraunces', Georgia, serif;

    /* Compatibilidad con las páginas existentes. */
    --text-dark: var(--mr-ink);
    --text-muted: var(--mr-muted);
    --bg-main: var(--mr-page);
    --bg-card: var(--mr-surface);
    --p-red: #ef476f;
    --p-orange: #f59e0b;
    --p-yellow: #facc15;
    --p-green: #10b981;
    --p-blue: var(--mr-blue-600);
    --p-purple: var(--mr-purple-600);
    --pride-pastel: var(--mr-pride);
}

html {
    scroll-behavior: smooth;
}

body.site-shell {
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 104px;
    color: var(--mr-ink);
    background:
        radial-gradient(circle at 8% 4%, rgba(37, 99, 235, .08), transparent 26rem),
        radial-gradient(circle at 92% 12%, rgba(124, 58, 237, .09), transparent 28rem),
        var(--mr-page);
    font-family: var(--mr-font-sans);
    -webkit-font-smoothing: antialiased;
}

body.site-shell h1,
body.site-shell h2,
body.site-shell .display-font {
    color: var(--mr-ink);
    font-family: var(--mr-font-display);
    letter-spacing: -.035em;
}

body.site-shell a {
    text-underline-offset: 3px;
}

body.site-shell ::selection {
    color: #fff;
    background: var(--mr-purple-700);
}

.skip-link {
    position: fixed;
    z-index: 2000;
    top: 12px;
    left: 12px;
    padding: .7rem 1rem;
    color: #fff;
    background: var(--mr-navy-950);
    border-radius: 10px;
    transform: translateY(-150%);
    transition: transform .2s ease;
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

body.site-shell :focus-visible {
    outline: 3px solid rgba(37, 99, 235, .42);
    outline-offset: 3px;
}

/* Navegación compartida */
.navbar-global {
    position: fixed;
    z-index: 1030;
    top: 14px;
    right: 0;
    left: 0;
    width: min(1220px, calc(100% - 30px));
    min-height: 72px;
    margin: 0 auto;
    padding: .6rem .75rem;
    overflow: visible;
    background: rgba(255, 255, 255, .91);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(14, 27, 64, .12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.navbar-global::before {
    position: absolute;
    right: 22px;
    bottom: -1px;
    left: 22px;
    height: 3px;
    content: '';
    background: var(--mr-pride);
    border-radius: 999px;
}

.navbar-global .navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.navbar-global .navbar-brand img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.navbar-global .nav-link {
    margin: 0 .08rem;
    padding: .62rem .82rem !important;
    color: #4f5870 !important;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 700;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.navbar-global .nav-link:hover,
.navbar-global .nav-link:focus,
.navbar-global .active-section > .nav-link {
    color: var(--mr-blue-700) !important;
    background: rgba(37, 99, 235, .08);
}

.navbar-global .active-obs > .nav-link {
    color: var(--mr-purple-700) !important;
    background: rgba(124, 58, 237, .09);
}

.navbar-global .dropdown-menu {
    min-width: 230px;
    margin-top: .7rem;
    padding: .65rem;
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--mr-line);
    border-radius: 18px;
    box-shadow: var(--mr-shadow-md);
}

.navbar-global .dropdown-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem .8rem;
    color: var(--mr-ink);
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 700;
}

.navbar-global .dropdown-item i {
    width: 22px;
    color: var(--mr-purple-600);
    text-align: center;
}

.navbar-global .dropdown-item:hover,
.navbar-global .dropdown-item:focus {
    color: var(--mr-blue-700);
    background: var(--mr-surface-alt);
}

.nav-link-app {
    display: grid !important;
    width: 39px;
    height: 39px;
    padding: 0 !important;
    place-items: center;
}

.btn-dona {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-left: .45rem;
    padding: .72rem 1.1rem;
    color: #fff !important;
    background: var(--mr-brand);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 9px 22px rgba(75, 46, 195, .24);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-dona:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(75, 46, 195, .3);
}

/* Controles y componentes comunes */
body.site-shell .btn-primary {
    background: var(--mr-brand);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(37, 76, 196, .2);
}

body.site-shell .btn-primary:hover,
body.site-shell .btn-primary:focus {
    background: linear-gradient(135deg, #1e40af, #5b21b6);
    border-color: transparent;
}

body.site-shell .btn-outline-primary {
    color: var(--mr-blue-700);
    border-color: rgba(29, 78, 216, .35);
}

body.site-shell .btn-outline-primary:hover {
    color: #fff;
    background: var(--mr-blue-700);
    border-color: var(--mr-blue-700);
}

body.site-shell .form-control,
body.site-shell .form-select {
    min-height: 46px;
    color: var(--mr-ink);
    background-color: #fff;
    border-color: var(--mr-line);
    border-radius: 13px;
}

body.site-shell .form-control:focus,
body.site-shell .form-select:focus {
    border-color: var(--mr-blue-600);
    box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .12);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.25rem;
    color: var(--mr-blue-700);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 28px;
    height: 3px;
    content: '';
    background: var(--mr-pride);
    border-radius: 999px;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 2.4rem;
}

.section-heading h2 {
    margin-bottom: .7rem;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.04;
}

.section-heading p {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--mr-muted);
    line-height: 1.75;
}

/* Página principal */
.home-hero {
    position: relative;
    padding: clamp(4.5rem, 8vw, 7.5rem) 0 5.5rem;
}

.home-hero::before {
    position: absolute;
    z-index: -1;
    top: 2%;
    right: -9rem;
    width: 30rem;
    height: 30rem;
    content: '';
    background: radial-gradient(circle, rgba(109, 40, 217, .16), transparent 67%);
    border-radius: 50%;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.home-hero h1 {
    max-width: 800px;
    margin-bottom: 1.5rem;
    font-size: clamp(3.15rem, 7vw, 6.4rem);
    line-height: .98;
}

.home-hero h1 em {
    color: var(--mr-purple-700);
    font-style: normal;
}

.home-hero-lead {
    max-width: 690px;
    margin-bottom: 2rem;
    color: var(--mr-muted);
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    line-height: 1.75;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

.button-brand,
.button-quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 50px;
    padding: .8rem 1.2rem;
    border-radius: 14px;
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.button-brand {
    color: #fff;
    background: var(--mr-brand);
    box-shadow: 0 14px 30px rgba(50, 57, 184, .25);
}

.button-brand:hover {
    color: #fff;
    transform: translateY(-2px);
}

.button-quiet {
    color: var(--mr-ink);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--mr-line);
}

.button-quiet:hover {
    color: var(--mr-blue-700);
    background: #fff;
    transform: translateY(-2px);
}

.home-manifesto {
    position: relative;
    padding: clamp(2rem, 4vw, 3.3rem);
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .07), transparent 60%),
        var(--mr-navy-900);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--mr-radius-lg);
    box-shadow: var(--mr-shadow-md);
}

.home-manifesto::before {
    position: absolute;
    top: 0;
    right: 28px;
    left: 28px;
    height: 5px;
    content: '';
    background: var(--mr-pride);
    border-radius: 0 0 8px 8px;
}

.home-manifesto-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--mr-blue-600), var(--mr-purple-600));
    border-radius: 18px;
    font-size: 1.35rem;
    place-items: center;
}

.home-manifesto blockquote {
    margin: 0 0 2.4rem;
    color: #fff;
    font-family: var(--mr-font-display);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.18;
}

.manifesto-points {
    display: grid;
    gap: .85rem;
}

.manifesto-point {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding-top: .85rem;
    color: rgba(255, 255, 255, .72);
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .86rem;
    font-weight: 700;
}

.manifesto-point i {
    color: #93c5fd;
}

.home-projects {
    padding: 2.5rem 0 6rem;
}

.home-project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.home-project-card {
    position: relative;
    display: flex;
    min-height: 340px;
    padding: 2rem;
    overflow: hidden;
    color: var(--mr-ink);
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--mr-line);
    border-radius: var(--mr-radius-md);
    box-shadow: var(--mr-shadow-sm);
    flex-direction: column;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.home-project-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    content: '';
    background: var(--card-accent, var(--mr-brand));
}

.home-project-card:hover {
    color: var(--mr-ink);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: var(--mr-shadow-md);
    transform: translateY(-7px);
}

.home-project-card .project-index {
    margin-bottom: 2rem;
    color: var(--mr-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.home-project-card .project-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 1.4rem;
    color: var(--card-color, var(--mr-blue-700));
    background: var(--card-bg, var(--mr-blue-100));
    border-radius: 18px;
    font-size: 1.4rem;
    place-items: center;
}

.home-project-card h3 {
    margin-bottom: .8rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.home-project-card p {
    margin-bottom: 1.8rem;
    color: var(--mr-muted);
    line-height: 1.7;
}

.project-arrow {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: auto;
    color: var(--card-color, var(--mr-blue-700));
    font-size: .86rem;
    font-weight: 800;
}

.home-project-card--map {
    --card-accent: linear-gradient(90deg, #2563eb, #06b6d4);
    --card-color: #1d4ed8;
    --card-bg: #dbeafe;
}

.home-project-card--obs {
    --card-accent: linear-gradient(90deg, #7c3aed, #a855f7);
    --card-color: #6d28d9;
    --card-bg: #ede9fe;
}

.home-project-card--bot {
    --card-accent: linear-gradient(90deg, #0891b2, #2563eb);
    --card-color: #0e7490;
    --card-bg: #cffafe;
}

.home-activity {
    padding: 6rem 0;
    background: rgba(255, 255, 255, .72);
    border-top: 1px solid rgba(223, 228, 241, .8);
}

.activity-panel {
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mr-line);
    border-radius: var(--mr-radius-md);
    box-shadow: var(--mr-shadow-sm);
}

.activity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.6rem;
    border-bottom: 1px solid var(--mr-line);
}

.activity-panel-header h3 {
    margin: 0;
    color: var(--mr-ink);
    font-size: 1rem;
    font-weight: 800;
}

.activity-panel-header span {
    color: var(--mr-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.activity-list {
    padding: .6rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: inherit;
    border-radius: 16px;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.activity-item + .activity-item {
    border-top: 1px solid #eef1f7;
}

.activity-item:hover {
    color: inherit;
    background: var(--mr-surface-alt);
    transform: translateX(3px);
}

.activity-avatar {
    width: 64px;
    height: 64px;
    padding: 3px;
    flex: 0 0 auto;
    background: var(--mr-pride);
    border-radius: 18px;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
    border: 3px solid #fff;
    border-radius: 15px;
}

.activity-copy {
    min-width: 0;
}

.activity-copy h4 {
    margin: 0 0 .28rem;
    overflow: hidden;
    color: var(--mr-ink);
    font-size: .95rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-copy p,
.activity-copy small {
    display: block;
    margin: 0;
    overflow: hidden;
    color: var(--mr-muted);
    font-size: .78rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-status {
    margin-left: auto;
    padding: .42rem .65rem;
    color: var(--status-color, var(--mr-blue-700));
    background: var(--status-bg, var(--mr-blue-100));
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 800;
}

.activity-empty {
    padding: 3rem 1.5rem;
    color: var(--mr-muted);
    text-align: center;
}

/* Footer */
.footer-modern {
    position: relative;
    margin-top: 6rem;
    color: rgba(255, 255, 255, .7);
    background: var(--mr-navy-950);
}

.footer-modern::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    content: '';
    background: var(--mr-pride);
}

.footer-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 3.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.footer-kicker {
    display: block;
    margin-bottom: .55rem;
    color: #a5b4fc;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.footer-callout h2 {
    max-width: 680px;
    margin: 0;
    color: #fff !important;
    font-size: clamp(1.75rem, 3vw, 2.7rem);
}

.footer-callout-button {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1.15rem;
    color: var(--mr-navy-950);
    background: #fff;
    border-radius: 14px;
    flex: 0 0 auto;
    font-size: .85rem;
    font-weight: 800;
    text-decoration: none;
}

.footer-callout-button:hover {
    color: var(--mr-blue-700);
}

.footer-main {
    padding: 4rem 0;
}

.footer-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1.3rem;
    object-fit: contain;
}

.footer-desc {
    max-width: 470px;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, .65);
    font-size: .91rem;
    line-height: 1.75;
}

.footer-memorial {
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
}

.footer-memorial i {
    margin-right: .35rem;
    color: #facc15;
}

.footer-title {
    margin-bottom: 1.25rem;
    color: #fff;
    font-family: var(--mr-font-sans) !important;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: .85rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .67);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links i {
    margin-right: .38rem;
    color: #a5b4fc;
}

.footer-bottom {
    padding: 1.4rem 0;
    color: rgba(255, 255, 255, .48);
    background: rgba(0, 0, 0, .16);
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .78rem;
}

.footer-legal {
    display: flex;
    gap: 1.2rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
}

.footer-legal a:hover {
    color: #fff;
}

@media (max-width: 991.98px) {
    body.site-shell {
        padding-top: 92px;
    }

    .navbar-global {
        top: 10px;
        width: calc(100% - 20px);
        min-height: 66px;
        border-radius: 20px;
    }

    .navbar-global .navbar-brand img {
        height: 38px;
    }

    .navbar-global .navbar-collapse {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        padding: 1rem;
        background: rgba(255, 255, 255, .98);
        border: 1px solid var(--mr-line);
        border-radius: 20px;
        box-shadow: var(--mr-shadow-md);
    }

    .navbar-global .nav-link {
        padding: .75rem .85rem !important;
    }

    .navbar-global .dropdown-menu {
        margin-top: 0;
        background: var(--mr-surface-alt);
        border: 0;
        box-shadow: none;
    }

    .nav-donate {
        margin-top: .5rem;
    }

    .btn-dona {
        width: 100%;
        margin-left: 0;
    }

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

    .home-manifesto {
        max-width: 680px;
    }

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

    .home-project-card {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .home-hero {
        padding-top: 3rem;
    }

    .home-hero h1 {
        font-size: clamp(2.75rem, 14vw, 4.2rem);
    }

    .home-actions > * {
        width: 100%;
    }

    .footer-callout {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-main {
        padding: 3rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
