﻿body {
    font-family: 'Montserrat', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.btn-user {
    border-radius: 10px;
}

:root {
    --nav-blue: #004182;
    --nav-blue-10: rgba(0,65,130,0.10);
    --nav-blue-18: rgba(0,65,130,0.18);
    --nav-blue-35: rgba(0,65,130,0.35);
    --nav-blue-85: rgba(0,65,130,0.85);
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    display: none;
}

.section-header {
    border-left: 6px solid rgba(255,255,255,0.7);
    border-bottom: 6px solid rgba(255,255,255,0.7);
}

    .section-header h2 {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
    }

.search-hit {
    background: #ff9000;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: none;
}

    .search-hit.active-hit {
        outline: 2px solid rgba(0,0,0,0.08);
        background: #ffb84d;
        padding: 0 3px;
    }

.norm-search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 1rem;
    justify-content: center;
}


    .norm-search-bar .input-group {
        max-width: 50vw;
        width: 100%;
        background: rgba(245, 247, 250, 0.7);
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        overflow: hidden;
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(6px) saturate(120%);
    }

    .norm-search-bar .form-control {
        min-width: 260px;
    }


.search-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.norm-search-bar .form-control {
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 0.95rem;
}

    .norm-search-bar .form-control:focus {
        box-shadow: none;
        outline: none;
    }


.norm-search-bar #normClearBtn {
    border: none;
    background: transparent;
    color: #999;
    transition: color .2s ease, background .2s ease;
}

    .norm-search-bar #normClearBtn:hover {
        color: #d9534f;
        background: rgba(0,0,0,0.05);
    }

.norm-search-bar .btn-search {
    border: none;
    color: #fff;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .norm-search-bar .btn-search:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,91,187,0.4);
    }

    .norm-search-bar .btn-search:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0,91,187,0.3);
    }

.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 25px;
    line-height: 1;
}

.scroll-top-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    display: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(220, 224, 227, 0.55);
    color: #007268;
    font-size: 25px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    transition: transform .16s ease, box-shadow .16s ease, background .12s ease;
}


    .scroll-top-fab:hover,
    .scroll-top-fab:focus {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.16);
        background: rgba(220,224,227,0.70);
        outline: none;
    }

@supports not ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
    .scroll-top-fab {
        background: rgba(210,214,217,0.78);
    }
}

.search-count-badge {
    background: rgba(0,0,0,0.06);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: .9rem;
    color: #222;
}


:root {
    --scroll-offset: 90;
}

.accordion-item {
    background-color: transparent;
    border: none;
    margin-bottom: 0.5rem;
}

.accordion-body {
    padding: 0;
}

.urna-section {
    width: 100%;
    /*min-height: 100vh;*/
    display: flex;
    justify-content: center;
    align-items: center;
}

.urna-container {
    width: 95%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    color: #333;
    overflow: hidden;
    /*min-height: 80vh;*/
}

.normatividad-section h1 {
    color: #007268;
    font-weight: 500;
    text-align: center;
}

.nav-sections {
    gap: 7px;
}

.nav-sections .nav-link {
    margin-bottom: 6px;
    font-weight: 500;
    text-align: left;
}

.nav-sections .section-btn {
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--nav-blue-10);
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 12px;
    color: var(--nav-blue);
    font-weight: 600;
    cursor: pointer;
    transition: background .14s ease, transform .12s ease, box-shadow .14s ease;
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    box-shadow: 0 1px 8px rgba(4,20,50,0.04);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

    .nav-sections .section-btn:hover {
        background: var(--nav-blue-18);
        box-shadow: 0 4px 18px rgba(0,65,130,0.08);
        transform: translateX(3px);
    }

    .nav-sections .section-btn.active {
        background: var(--nav-blue);
        color: #ffffff;
        transform: translateX(4px);
        box-shadow: 0 6px 22px rgba(0,65,130,0.18);
    }

.nav-sections .section-btn {
    white-space: normal;
    overflow-wrap: break-word;
}

    .nav-sections .section-btn:focus {
        outline: none;
        box-shadow: 0 0 0 0.18rem rgba(0,65,130,0.12), 0 4px 18px rgba(0,65,130,0.08);
    }

.section-body {
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    color: #2B2D45;
    border-left: 4px solid rgba(25, 135, 84, 0.3);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.section-body strong {
    color: #1a1c2e;
    font-weight: 600;
}

.section-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.75rem;
}

.section-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.35rem;
    line-height: 1.5;
    color: #3d3f52;
    margin-top: 10px;
}

.section-body ul li::before {
    font-family: "bootstrap-icons";
    content: "\F26A";
    position: absolute;
    left: 0;
    top: 0.15rem;
    color: #198754;
    font-size: 0.85rem;
}

.norm-resource-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.25rem 1.25rem;
    margin-top: 0.75rem;
    margin-left: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 65, 130, 0.04);
    border-left: 3px solid var(--nav-blue-35);
    border-radius: 0 6px 6px 0;
    width: auto;
}

.norm-resource-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.35rem;
    color: var(--nav-blue);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
    cursor: pointer;
}

.norm-resource-link:hover {
    color: #0d6efd;
    background: rgba(0, 65, 130, 0.06);
    padding-left: 0.7rem;
    text-decoration: none;
}

.norm-resource-link:focus-visible {
    outline: 2px solid var(--nav-blue);
    outline-offset: 2px;
    border-radius: 3px;
}

.norm-link-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.norm-resource-link:hover .norm-link-icon {
    opacity: 1;
    transform: translateX(2px);
}

.norm-icon-pdf {
    color: #dc3545;
}

.norm-icon-web {
    color: #0d6efd;
}

.norm-icon-dl {
    color: #198754;
}

.norm-resource-link span {
    position: relative;
}

.norm-resource-link span::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: #0d6efd;
    transition: width 0.25s ease;
}

.norm-resource-link:hover span::after {
    width: 100%;
}

@media (max-width: 767.98px) {
    .nav-sections .section-btn {
        padding: 8px 10px;
        border-radius: 6px;
        backdrop-filter: blur(4px);
    }
}

.norm-nav-wrapper {
    position: sticky;
    top: 1rem;
}

.norm-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.norm-nav-toggle:hover {
    background: #157347;
}

.norm-nav-toggle i {
    transition: transform 0.3s ease;
}

.norm-nav-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.norm-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0;
}

.norm-nav-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.75rem;
    border: none;
    background: var(--nav-blue-10);
    color: var(--nav-blue);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.norm-nav-btn i {
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.norm-nav-btn:hover {
    background: var(--nav-blue-18);
    color: var(--nav-blue);
}

.norm-nav-btn:hover i {
    opacity: 0.8;
}

.norm-nav-btn.active {
    background: var(--nav-blue);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 65, 130, 0.25);
}

.norm-nav-btn.active i {
    opacity: 1;
    color: #fff;
}

.norm-nav-btn.active:hover {
    background: var(--nav-blue-85);
    color: #fff;
}

.norm-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.norm-nav-parent span {
    flex: 1;
}

.norm-nav-chevron {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.norm-nav-parent[aria-expanded="true"] .norm-nav-chevron {
    transform: rotate(180deg);
}

.norm-nav-parent.active .norm-nav-chevron {
    color: #fff;
    opacity: 1;
}

.norm-subnav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 2px solid var(--nav-blue-35);
    margin-left: 0.5rem;
}

.norm-nav-sub {
    font-size: 0.76rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.4rem;
    font-weight: 400;
}

.norm-nav-sub::before {
    content: "\F138";
    font-family: "bootstrap-icons";
    font-size: 0.6rem;
    margin-right: 0.4rem;
    opacity: 0.5;
    flex-shrink: 0;
}

.norm-nav-sub:hover::before,
.norm-nav-sub.active::before {
    opacity: 1;
}

.norm-nav-sub.active {
    background: var(--nav-blue);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 65, 130, 0.2);
}

.norm-nav-sub.active:hover {
    background: var(--nav-blue-85);
    color: #fff;
    transform: none;
}


@media (max-width: 767.98px) {
    .norm-nav-wrapper {
        display: none;
    }

    #normAccordion .accordion-item {
        margin-bottom: 0.35rem;
        border: none;
        border-radius: 0;
        background-color: transparent;
    }

    #normAccordion .accordion-header {
        margin-bottom: 0;
    }

    #normAccordion .accordion-button {
        font-family: 'Montserrat', sans-serif;
        font-size: 0.82rem;
        font-weight: 500;
        line-height: 1.3;
        color: #2B2D45;
        background: transparent;
        padding: 0.65rem 0.85rem;
        border: none;
        border-radius: 0.5rem;
        box-shadow: none;
        transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    #normAccordion .accordion-button:hover {
        background: rgba(25, 135, 84, 0.08);
        color: #198754;
    }

    #normAccordion .accordion-button:not(.collapsed) {
        background: #198754;
        color: #fff;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(25, 135, 84, 0.25);
    }

    #normAccordion .accordion-button:focus {
        box-shadow: 0 0 0 0.18rem rgba(25, 135, 84, 0.25);
        border-color: transparent;
        outline: none;
    }

    #normAccordion .accordion-button::after {
        background-size: 0.85rem;
        width: 0.85rem;
        height: 0.85rem;
        transition: transform 0.3s ease;
    }

    #normAccordion .accordion-button:not(.collapsed)::after {
        filter: brightness(0) invert(1);
    }

    #normAccordion .accordion-button-sub {
        font-size: 0.76rem;
        font-weight: 400;
        padding-left: 1.75rem;
    }

    #normAccordion .accordion-button-sub::before {
        content: "\F138";
        font-family: "bootstrap-icons";
        font-size: 0.6rem;
        margin-right: 0.45rem;
        opacity: 0.5;
        flex-shrink: 0;
    }

    #normAccordion .accordion-button-sub:not(.collapsed)::before {
        opacity: 1;
    }

    #normAccordion .accordion-body {
        padding: 0.5rem 0.85rem 0.85rem;
    }

    .section-body {
        padding: 0.75rem 0.5rem;
        border-left-width: 3px;
    }

    .norm-resource-links {
        grid-template-columns: 1fr;
        margin-left: 0;
        padding: 0.6rem 0.75rem;
        gap: 0.15rem 0;
    }

    .norm-resource-link {
        font-size: 0.84rem;
        padding: 0.5rem 0.15rem;
    }

    .norm-link-icon {
        font-size: 0.88rem;
    }

    .norm-nav {
        padding: 0.25rem 0;
    }

    .norm-nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }

    .norm-nav-sub {
        font-size: 0.74rem;
        padding: 0.4rem 0.6rem;
    }

    .norm-subnav {
        margin-left: 0.25rem;
        padding-left: 0.75rem;
    }

    #normAccordion .accordion-header {
        scroll-margin-top: 1rem;
    }
}
