:root {
    --c3l-green-dark: #14401f;
    --c3l-green-mid: #1a5c2e;
    --c3l-green-accent: #6abf7b;
    --c3l-white: #ffffff;
    --c3l-bg-light: #f5f5f2;
    --c3l-text-gray: #4a4a48;
    --c3l-black: #1a1a18;
    --gas-color: #247cc4;
    --gas-accent: #5cd9ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--c3l-bg-light);
    color: var(--c3l-text-gray);
}

/* ══════════════════════════════════════════
   INTRO / TITLE
══════════════════════════════════════════ */

.gas-factura-intro {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.gas-factura-intro h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    color: var(--c3l-black);
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    line-height: 1.2;
}

.gas-factura-divider {
    width: 60px;
    height: 4px;
    background: var(--gas-color);
    border-radius: 2px;
    margin: 16px auto 20px;
}

.gas-factura-intro p {
    font-size: 16px;
    color: var(--c3l-text-gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ══════════════════════════════════════════
   LAYOUT PRINCIPAL
══════════════════════════════════════════ */

.wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
    align-items: start;
}

@media (max-width: 1024px) {
    .wrap {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px 48px;
    }
}

/* ══════════════════════════════════════════
   FACTURA - INVOICE BOX
══════════════════════════════════════════ */

.invoice-box {
    background: var(--c3l-white);
    border: 1px solid #e8e8e4;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.invoice-rel {
    position: relative;
    display: block;
    aspect-ratio: 588 / 822;
    width: 100%;
}

.invoice-rel img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

/* ══════════════════════════════════════════
   DOTS - PUNTOS INTERACTIVOS
══════════════════════════════════════════ */

.dot {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gas-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2.5px solid var(--c3l-white);
    box-shadow: 0 2px 8px rgba(36, 124, 196, 0.3);
    transform: translate(-50%, -50%);
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
    z-index: 5;
    padding: 0;
    outline: none;
    line-height: 1;
    white-space: nowrap;
}

.dot:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 0 4px rgba(36, 124, 196, 0.2), 0 4px 12px rgba(36, 124, 196, 0.4);
    z-index: 10;
}

.dot.is-active {
    background: #1a4f7d;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 0 4px rgba(36, 124, 196, 0.25), 0 4px 14px rgba(36, 124, 196, 0.45);
    z-index: 10;
}

.dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--gas-color);
    animation: pulse 2.4s infinite;
    opacity: 0;
}

.dot.is-active::after {
    animation: none;
}

@keyframes pulse {
    0% { opacity: 0.55; transform: scale(1); }
    70% { opacity: 0; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(1); }
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */

.sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .sidebar {
        position: static;
    }
}

.panel {
    background: var(--c3l-white);
    border: 1px solid #e8e8e4;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 28px 24px;
}

/* ── PANEL EMPTY ── */

.panel-empty {
    text-align: center;
}

.panel-empty .icon {
    width: 54px;
    height: 54px;
    background: rgba(36, 124, 196, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 14px;
}

.panel-empty strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--c3l-black);
    margin-bottom: 6px;
}

.panel-empty p {
    font-size: 13px;
    color: var(--c3l-text-gray);
    line-height: 1.6;
}

/* ── PANEL DETAIL ── */

.panel-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-detail {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel-detail.show {
    display: block;
    opacity: 1;
}

.pd-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gas-color);
    margin-bottom: 8px;
}

.pd-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--c3l-black);
    margin-bottom: 12px;
}

.pd-body {
    font-size: 14px;
    color: var(--c3l-text-gray);
    line-height: 1.7;
}

.pd-body h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--c3l-black);
    margin: 0 0 10px;
}

.pd-body p {
    margin-bottom: 12px;
}

.pd-body p:last-child {
    margin-bottom: 0;
}

.pd-body b {
    color: var(--c3l-black);
    font-weight: 600;
}

.pd-body a {
    color: var(--gas-color);
    font-weight: 600;
    text-decoration: none;
}

.pd-body a:hover {
    text-decoration: underline;
}

.pd-body img {
    width: 100%;
    height: auto;
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid #e8e8e4;
}

/* ══════════════════════════════════════════
   NAVEGACIÓN LATERAL
══════════════════════════════════════════ */

#itemsNav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

#itemsNav::-webkit-scrollbar {
    width: 6px;
}

#itemsNav::-webkit-scrollbar-track {
    background: transparent;
}

#itemsNav::-webkit-scrollbar-thumb {
    background: #d0d0cc;
    border-radius: 3px;
}

#itemsNav::-webkit-scrollbar-thumb:hover {
    background: var(--gas-color);
}

.nav-item {
    background: var(--c3l-white);
    border: 1px solid #e8e8e4;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--c3l-text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-item:hover {
    background: #fafbfc;
    border-color: var(--gas-color);
    color: var(--gas-color);
}

.nav-item.is-active {
    background: rgba(36, 124, 196, 0.1);
    border-color: var(--gas-color);
    color: var(--gas-color);
    font-weight: 600;
}

.nav-num {
    width: 24px;
    height: 24px;
    background: var(--gas-color);
    color: var(--c3l-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-item.is-active .nav-num {
    background: #1a4f7d;
}

.nav-lbl {
    flex: 1;
    line-height: 1.3;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media (max-width: 768px) {
    .gas-factura-intro {
        padding: 40px 16px 32px;
    }

    .gas-factura-intro h1 {
        font-size: 32px;
    }

    .wrap {
        gap: 20px;
    }

    #itemsNav {
        max-height: 200px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
    }

    .nav-item {
        padding: 8px 10px;
        font-size: 12px;
    }

    .nav-lbl {
        display: none;
    }

    .nav-num {
        width: 100%;
        height: 36px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .gas-factura-intro {
        padding: 32px 12px 24px;
    }

    .gas-factura-intro h1 {
        font-size: 28px;
    }

    .wrap {
        padding: 0 12px 40px;
    }

    .dot {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .panel {
        padding: 20px 16px;
    }

    .pd-title {
        font-size: 16px;
    }

    .pd-body {
        font-size: 13px;
    }

    #itemsNav {
        grid-template-columns: repeat(3, 1fr);
        max-height: 150px;
    }
}