:root {
    --bg-igac-gris: #eff0f1;
    --navy: #10406f;
    --accent: #3169af;
    --accent-dark: #234570;
    --ink: #28353b;
    --muted: #586674;
    --line: #d6dde4;
    --paper: #f5f6f7;
    --white: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.5 "Gill Sans Std", "Gill Sans", Arial, sans-serif;
}
img { max-width: 100%; }
a { color: var(--navy); }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
.skip-link {
    position: absolute;
    z-index: 100001;
    top: -80px;
    left: 12px;
    padding: 10px 16px;
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* La franja GOV.CO, los logos y el pie usan la misma hoja del portal. */
.portal-nav { top: 0; z-index: 1000; box-shadow: 0 2px 9px rgba(21, 45, 75, .1); }
.portal-nav .navbarigac { min-height: 64px; height: auto; align-items: stretch; }
.portal-nav .logos { min-width: 0; }
.portal-nav .observatorio-brand { display: flex; align-items: center; min-width: 0; order: 2; }
.portal-nav .observatorio-brand img { display: block; width: 220px; height: 52px; max-width: 220px; padding: 0; object-fit: contain; }
.portal-nav .portal-links {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin: 0 22px 0 auto;
    padding: 0;
    list-style: none;
}
.portal-nav .portal-links li { display: flex; align-items: stretch; padding: 0 4px; }
.portal-nav .portal-links a,
.portal-nav .portal-links a:visited {
    display: flex;
    align-items: center;
    width: auto;
    padding: 0 10px;
    color: #4b5664 !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
.portal-nav .portal-links a:hover,
.portal-nav .portal-links a[aria-current="page"] {
    color: #10406f !important;
    border-bottom-color: #3169af;
}
.portal-nav .portal-menu-toggle { display: none; }

.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: .91rem;
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #8d9cad; }
.breadcrumb a { color: var(--navy); }
.hero {
    position: relative;
    overflow: hidden;
    color: var(--ink);
    background: linear-gradient(110deg, #eceff2 0%, #f7f8f9 58%, #fff 100%);
    border-bottom: 1px solid var(--line);
}
.hero .wrap { padding-block: 34px 52px; }
.hero-home .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 34%);
    align-items: center;
    gap: clamp(28px, 4vw, 60px);
}
.hero-home .hero-visual {
    height: 260px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(35, 41, 46, .12);
}
.hero-home .hero-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--accent-dark);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.hero .eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
.hero h1 {
    max-width: 790px;
    margin: 0;
    color: var(--navy);
    font-family: "Gill Sans Std", "Gill Sans", Arial, sans-serif;
    font-size: clamp(2rem, 3.3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.15;
}
.hero .lead { max-width: 760px; margin: 15px 0 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.12rem); }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 23px; }
.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 5px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}
.button:hover { transform: translateY(-2px); text-decoration: none; }
.button-primary { background: var(--accent); color: var(--white); }
.button-primary:hover { background: var(--accent-dark); color: var(--white); }
.button-outline, .button-ghost { border-color: var(--accent); background: transparent; color: var(--navy); }
.button-outline:hover, .button-ghost:hover { background: #e8eef6; color: var(--navy); }

.section { padding-block: 52px; }
#elige { scroll-margin-top: 76px; }
.section-tight { padding-top: 0; padding-bottom: 24px; }
.section-tight + .section { padding-top: 8px; }
.section-heading { max-width: 760px; margin-bottom: 24px; }
.section-heading h2, .article h2 {
    margin: 0 0 10px;
    color: var(--navy);
    font-family: "Gill Sans Std Bold", "Gill Sans Std", sans-serif;
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    line-height: 1.15;
}
.section-heading p { margin: 0; color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.topic-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 26px rgba(21, 55, 91, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(21, 55, 91, .14); color: var(--ink); text-decoration: none; }
.topic-media {
    position: relative;
    display: flex;
    height: 218px;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding: 28px 22px 0;
    isolation: isolate;
}
.topic-media::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .8), transparent 38%),
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 64, 111, .035) 32px 33px);
}
.topic-media-qgis { background: linear-gradient(130deg, #dfe5eb, #f0f2f4); }
.topic-media-arcgis { background: linear-gradient(130deg, #e3e8ed, #f3f5f7); }
.topic-media-planet { background: linear-gradient(130deg, #dce4ed, #eef2f6); }
.topic-window {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 178px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(16, 64, 111, .16);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    box-shadow: 0 14px 28px rgba(35, 41, 46, .16);
    transition: transform .2s ease;
}
.topic-card:hover .topic-window { transform: translateY(-5px); }
.topic-window-bar {
    display: flex;
    height: 27px;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border-bottom: 1px solid #e1e6eb;
    background: #fbfcfd;
    color: #4b5d6b;
    font: 700 .68rem/1 "Gill Sans Std", "Gill Sans", Arial, sans-serif;
}
.window-dots { display: flex; gap: 4px; }
.window-dots span { width: 6px; height: 6px; border-radius: 50%; background: #a8b9c8; }
.topic-window-screen { height: calc(100% - 27px); overflow: hidden; }
.topic-window-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.topic-media-qgis .topic-window-screen img { transform: scale(3); transform-origin: right 58%; }
.topic-media-planet .topic-window-screen img { transform: scale(1.25); transform-origin: 66% 44%; filter: brightness(1.08) saturate(1.1); }
.topic-packages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
    background: linear-gradient(145deg, #f7f9fb, #e6ebf0);
}
.package-file {
    position: relative;
    display: flex;
    width: 92px;
    height: 119px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 13px;
    border: 1px solid #bccbd9;
    border-radius: 7px;
    background: var(--white);
    box-shadow: 0 8px 15px rgba(35, 41, 46, .14);
    color: var(--navy);
}
.package-file::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 13px;
    width: 32px;
    height: 26px;
    border: 2px solid var(--accent);
    border-radius: 3px;
}
.package-file::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 18px;
    width: 22px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 5px var(--accent);
}
.package-file strong { font-size: 1.7rem; line-height: 1; }
.package-file small { margin-top: 4px; font-size: .63rem; line-height: 1; }
.package-file-old { transform: rotate(-5deg) translateY(6px); }
.package-file-new { transform: rotate(4deg) translateY(-4px); border-color: #8ba9c6; }
.topic-badge {
    position: absolute;
    z-index: 2;
    top: 13px;
    right: 17px;
    padding: 4px 10px;
    border: 1px solid rgba(16, 64, 111, .14);
    background: var(--white);
    color: var(--navy);
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(35, 41, 46, .08);
    font-size: .73rem;
    font-weight: 700;
}
.topic-content { display: flex; flex: 1; flex-direction: column; padding: 23px 24px 25px; }
.topic-card .number { color: var(--accent); font-size: .81rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.topic-card .topic-title { margin: 9px 0 6px; color: var(--navy); font-family: "Gill Sans Std", "Gill Sans", Arial, sans-serif; font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.topic-description { margin: 0 0 22px; color: var(--muted); }
.topic-card .card-link { margin-top: auto; color: var(--navy); font-weight: 700; }
.resource-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: 7px;
}
.resource-strip strong, .resource-strip span { display: block; }
.resource-strip strong { color: var(--navy); font-size: 1.2rem; }
.resource-strip span { color: var(--muted); }
.resource-strip ul { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.resource-strip li { padding: 6px 10px; border-radius: 4px; background: #e8eef5; color: var(--navy); font-size: .88rem; font-weight: 700; }
.panel { padding: 28px 31px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.panel h2, .panel h3 { margin-top: 0; color: var(--navy); }

.guide-journey { position: static; top: auto; z-index: auto; margin-bottom: 28px; }
.guide-journey-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.guide-journey-heading p { margin: 0; color: var(--accent-dark); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.guide-journey-heading a { font-weight: 700; text-decoration: none; }
.guide-journey-heading a:hover { text-decoration: underline; }
.guide-journey ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.guide-journey li { min-width: 0; }
.guide-journey li a {
    display: flex;
    min-height: 61px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}
.guide-journey li a:hover { border-color: #9fb7d0; background: #e8eef5; }
.guide-journey li span { display: inline-flex; width: 30px; height: 30px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: #e6edf5; color: var(--accent-dark); font-size: .8rem; }
.article { min-width: 0; }
.article > section {
    scroll-margin-top: 110px;
    margin-bottom: 24px;
    padding: clamp(24px, 3vw, 38px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.article h3 { margin: 21px 0 8px; color: var(--navy); font-family: "Gill Sans Std", "Gill Sans", Arial, sans-serif; font-size: 1.2rem; font-weight: 700; }
.article p { margin: 0 0 16px; }
.article ol, .article ul { padding-left: 25px; }
.article li { margin-bottom: 9px; }
.article .intro { color: var(--muted); font-size: 1.1rem; }
.step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-block: 22px; }
.step { padding: 20px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 8px; }
.step .step-number {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
}
.step h3 { margin: 12px 0 5px; font-size: 1.14rem; }
.step p { margin: 0; color: var(--muted); }
.walkthrough { margin-top: 22px; border-top: 1px solid var(--line); }
.walkthrough-step { display: grid; grid-template-columns: minmax(0, .42fr) minmax(0, .58fr); align-items: center; gap: clamp(22px, 3vw, 42px); padding: 28px 0; border-bottom: 1px solid var(--line); }
.walkthrough-number { display: inline-flex; padding: 5px 10px; border-radius: 4px; background: #e6edf5; color: var(--accent-dark); font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.walkthrough-copy h3 { margin: 13px 0 9px; font-size: clamp(1.25rem, 2vw, 1.55rem); }
.walkthrough-copy p { max-width: 38ch; margin: 0; color: var(--muted); }
.walkthrough-figure { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.walkthrough-figure a { position: relative; display: block; height: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #edf1f5; box-shadow: 0 8px 24px rgba(35, 41, 46, .09); }
.walkthrough-figure img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.walkthrough-step-menu .walkthrough-figure a { height: 240px; }
.walkthrough-step-menu img { transform: scale(1.7); transform-origin: left top; object-position: left top; }
.walkthrough-step-toolbar .walkthrough-figure a { height: 175px; }
.walkthrough-step-toolbar img { transform: scale(2.1); transform-origin: right top; object-position: right top; }
.walkthrough-step-login img { transform: scale(1.65); transform-origin: right 52%; }
.walkthrough-figure figcaption { padding: 9px 2px 0; color: var(--muted); font-size: .93rem; }
.walkthrough--arcgis .walkthrough-figure a { display: flex; height: auto; min-height: 160px; align-items: center; justify-content: center; padding: 14px; }
.walkthrough--arcgis .walkthrough-figure img { width: auto; height: auto; max-width: 100%; max-height: 300px; object-fit: contain; transform: none; }
.arcgis-demos { display: grid; gap: 12px; margin-block: 20px; }
.arcgis-demo { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.arcgis-demo summary { padding: 16px 18px; color: var(--navy); font-weight: 700; cursor: pointer; }
.arcgis-demo[open] summary { border-bottom: 1px solid var(--line); }
.arcgis-demo-body { padding: 16px 18px 18px; }
.arcgis-demo-body p { margin-bottom: 12px; }
.arcgis-demo video { display: block; width: 100%; max-height: 480px; border-radius: 6px; background: #142c44; }
.figure-grid { display: grid; gap: 0; margin-block: 23px; counter-reset: visual; }
.figure-grid figure { display: grid; grid-template-columns: minmax(0, .34fr) minmax(0, .66fr); align-items: center; gap: clamp(20px, 3vw, 40px); min-width: 0; margin: 0; padding: 22px 0; border-bottom: 1px solid var(--line); counter-increment: visual; }
.figure-grid figure:first-child { border-top: 1px solid var(--line); }
.figure-grid figure a { position: relative; display: block; grid-column: 2; grid-row: 1; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; background: #edf1f5; box-shadow: 0 8px 24px rgba(35, 41, 46, .09); }
.figure-grid figure img { display: block; width: 100%; height: 100%; object-fit: contain; }
.figure-grid figcaption { grid-column: 1; grid-row: 1; color: var(--navy); font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.figure-grid figcaption::before { content: "Captura " counter(visual, decimal-leading-zero); display: block; margin-bottom: 10px; color: var(--accent-dark); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.walkthrough-figure a:hover, .figure-grid figure a:hover { border-color: var(--accent); box-shadow: 0 10px 28px rgba(35, 41, 46, .16); }
.callout { margin-block: 20px; padding: 17px 20px; border-left: 4px solid var(--accent); background: #edf2f8; }
.callout p:last-child { margin-bottom: 0; }
.callout.warning { border-left-color: #d3981c; background: #fff8e6; }
.download-list { display: grid; gap: 14px; margin-block: 22px; }
.download-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 21px;
    border: 1px solid #c8d4e0;
    border-radius: 8px;
    background: #f5f8fb;
}
.download-card h3 { margin: 0 0 5px; font-size: 1.2rem; }
.download-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.download-card .actions { margin-top: 0; }
.route-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.route-links a { font-weight: 700; }
.footer { margin-top: 48px; }
.footer h2, .footer h3 { margin-top: 0; margin-bottom: 8px; font-weight: 500; line-height: 1.2; }
.footer .footer-enlaces { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer .footer-enlaces span { color: #3366cc; font-size: 14px; }
.footer .gov-co-footer-auto { gap: 8px; }
.footer .redes-sociales a { gap: 2px; }

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .walkthrough-step { grid-template-columns: 1fr; gap: 18px; }
    .walkthrough-copy p { max-width: 70ch; }
    .figure-grid figure { grid-template-columns: 1fr; gap: 13px; }
    .figure-grid figcaption { grid-column: 1; grid-row: 1; }
    .figure-grid figure a { grid-column: 1; grid-row: 2; }
}
@media (max-width: 900px) {
    .hero-home .wrap { grid-template-columns: 1fr; }
    .hero-home .hero-visual { height: auto; aspect-ratio: 16 / 7; }
}
@media (max-width: 768px) {
    .portal-nav .navbarigac { flex-wrap: wrap; min-height: 60px; }
    .portal-nav .logos { width: auto; }
    .portal-nav .observatorio-brand img { max-width: min(220px, calc(100vw - 180px)); }
    .portal-nav .portal-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        align-self: center;
        width: 52px;
        height: 60px;
        margin: 0 0 0 auto;
        padding: 0 15px;
        cursor: pointer;
    }
    .portal-nav .portal-menu-toggle .icon-bar { flex: none; margin: 0 0 4px; }
    .portal-nav .navbarigac .portal-links {
        display: none;
        width: 100%;
        flex-direction: column;
        order: 3;
        gap: 0;
        margin: 0;
        padding: 6px 0;
        border-top: 1.5px solid #3366cc;
        background: #e9eaeb;
    }
    .portal-nav .navbarigac .portal-links.is-open { display: flex; }
    .portal-nav .portal-links li { padding: 0 12px; }
    .portal-nav .portal-links a { min-height: 44px; padding: 8px 12px; }
}
@media (max-width: 640px) {
    html, body { font-size: 16px !important; }
    .wrap { width: min(100% - 28px, 1160px); }
    .portal-nav .observatorio-brand img { max-width: min(220px, calc(100vw - 180px)); height: 52px; padding: 0; }
    .portal-nav .portal-links a { font-size: 14px; }
    .hero .wrap { padding-block: 30px 42px; }
    .section { padding-block: 38px; }
    #elige { scroll-margin-top: 106px; }
    .grid-3, .step-grid, .figure-grid { grid-template-columns: 1fr; }
    .guide-journey { margin-bottom: 20px; }
    .guide-journey-heading { align-items: flex-start; }
    .guide-journey-heading a { text-align: right; }
    .guide-journey li a { min-height: 58px; font-size: .91rem; }
    .walkthrough-step { padding: 24px 0; }
    .walkthrough-figure a { height: 220px; }
    .walkthrough-step-menu .walkthrough-figure a { height: 200px; }
    .walkthrough-step-toolbar .walkthrough-figure a { height: 150px; }
    .walkthrough-step-login img { transform: scale(1.15); object-position: right center; }
    .topic-media { height: 190px; padding-inline: 18px; }
    .topic-window { height: 154px; }
    .package-file { width: 82px; height: 103px; padding: 11px; }
    .package-file strong { font-size: 1.5rem; }
    .panel { padding: 22px; }
    .resource-strip { padding: 20px; }
    .article > section { padding: 21px; }
    .download-card .actions, .download-card .actions .button { width: 100%; }
    .button { max-width: 100%; }
    .footer .footer-container { padding: 20px; }
    .footer .gov-co-footer-auto { flex-wrap: wrap; }
    .footer .gov-co-logo-pie-blanco, .footer .gov-co-logo-pie-mesa { height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button, .topic-card, .topic-window { transition: none; }
}
