/* Portal de entrada GetPublic — complementa system/assets/css/modern.css */

.gp-portal-hero {
    background: linear-gradient(135deg, var(--gp-primary-dark) 0%, var(--gp-primary) 55%, #2d9a4e 100%);
    color: #fff;
    padding: 72px 0 80px;
    position: relative;
    overflow: hidden;
}
.gp-portal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.12) 0%, transparent 45%);
    pointer-events: none;
}
.gp-portal-hero .container { position: relative; z-index: 1; }
.gp-portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}
.gp-portal-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
}
.gp-portal-hero-lead {
    font-size: 1.125rem;
    opacity: .92;
    max-width: 640px;
    line-height: 1.65;
    margin-bottom: 28px;
}
.gp-portal-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.gp-portal-hero-actions .btn-light {
    color: var(--gp-primary-dark);
    font-weight: 600;
}
.gp-portal-hero-actions .btn-outline-light:hover {
    background: rgba(255,255,255,.12);
}
.gp-portal-hero-visual {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--gp-radius);
    padding: 28px;
    backdrop-filter: blur(6px);
}
.gp-portal-hero-visual .gp-portal-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.gp-portal-hero-visual .gp-portal-mini:last-child { border-bottom: none; }
.gp-portal-hero-visual .gp-portal-mini i {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.gp-portal-stats {
    background: #fff;
    padding: 56px 0;
    margin-top: -36px;
    position: relative;
    z-index: 2;
}
.gp-portal-stats .gp-stat-card {
    text-align: center;
    padding: 24px 16px;
}
.gp-portal-stats .gp-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--gp-primary-light);
    color: var(--gp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
    transition: transform .25s ease;
}
.gp-portal-stats .gp-stat-card:hover .gp-stat-icon { transform: scale(1.08); }
.gp-portal-stats .gp-stat-value {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--gp-ink);
    line-height: 1.1;
    margin-bottom: 6px;
}
.gp-portal-stats .gp-stat-counter {
    font-variant-numeric: tabular-nums;
    min-height: 1.1em;
    transition: opacity .2s ease;
}
.gp-portal-stats .gp-stat-counter-animating {
    opacity: .92;
}
.gp-portal-stats .gp-stat-counter-done {
    opacity: 1;
}
.gp-portal-stats .gp-stat-label {
    font-weight: 600;
    color: var(--gp-ink);
    margin-bottom: 4px;
}
.gp-portal-stats .gp-stat-hint {
    font-size: 13px;
    color: var(--gp-muted);
}

/* Carrossel de instituições (brasões) */
.gp-portal-institutions {
    padding-bottom: 64px;
    overflow: hidden;
}
.gp-portal-carousel-outer {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.gp-portal-carousel-track {
    display: flex;
    width: max-content;
    animation: gp-portal-carousel-scroll 110s linear infinite;
}
.gp-portal-carousel-track:hover {
    animation-play-state: paused;
}
.gp-portal-carousel-group {
    display: flex;
    gap: 20px;
    padding: 8px 10px;
}
.gp-portal-institution-card {
    flex: 0 0 188px;
    width: 188px;
    background: var(--gp-card-bg);
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    padding: 18px 14px 14px;
    text-align: center;
    box-shadow: var(--gp-shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.gp-portal-institution-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gp-shadow-hover);
    border-color: rgba(30, 126, 52, .35);
}
.gp-portal-institution-clickable {
    cursor: pointer;
}
.gp-portal-institution-clickable:focus-visible {
    outline: 2px solid rgba(30, 126, 52, .55);
    outline-offset: 2px;
}
.gp-portal-institution-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gp-portal-institution-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.gp-portal-institution-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gp-ink);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.9em;
}
@keyframes gp-portal-carousel-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .gp-portal-carousel-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 16px;
        padding: 0 16px;
    }
    .gp-portal-carousel-group + .gp-portal-carousel-group {
        display: none;
    }
    .gp-portal-carousel-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    .gp-portal-carousel-outer {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

.gp-portal-section { padding: 72px 0; }
.gp-portal-section-alt { background: var(--gp-bg); }
.gp-portal-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}
.gp-portal-kicker {
    color: var(--gp-primary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
    display: block;
}
.gp-portal-section-head h2 {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    margin-bottom: 14px;
}
.gp-portal-section-head p {
    color: var(--gp-muted);
    font-size: 1.05rem;
    margin: 0;
}

.gp-portal-feature {
    background: var(--gp-card-bg);
    border-radius: var(--gp-radius);
    padding: 28px 24px;
    height: 100%;
    box-shadow: var(--gp-shadow);
    border: 1px solid var(--gp-line);
    transition: box-shadow .25s ease, transform .25s ease;
}
.gp-portal-feature:hover {
    box-shadow: var(--gp-shadow-hover);
    transform: translateY(-4px);
}
.gp-portal-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gp-primary-light);
    color: var(--gp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}
.gp-portal-feature h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.gp-portal-feature p {
    color: var(--gp-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.gp-portal-reseller {
    background: linear-gradient(160deg, var(--gp-primary-dark), var(--gp-primary));
    color: #fff;
    border-radius: var(--gp-radius);
    padding: 48px 40px;
}
.gp-portal-reseller-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
    margin-bottom: 10px;
}
.gp-portal-reseller h2 { font-weight: 800; margin-bottom: 12px; }
.gp-portal-reseller-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    opacity: .94;
    margin-bottom: 24px;
}
.gp-portal-reseller-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.gp-portal-reseller-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.55;
    opacity: .94;
}
.gp-portal-reseller-benefits li i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.gp-portal-reseller p { opacity: .9; margin-bottom: 24px; }
.gp-portal-reseller-card {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--gp-radius-sm);
    padding: 20px;
    height: 100%;
}
.gp-portal-reseller-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.gp-portal-reseller-card p { font-size: 14px; opacity: .92; margin: 0; color: rgba(255, 255, 255, .95); }
.gp-portal-reseller .gp-portal-reseller-card > p.mb-2 { color: rgba(255, 255, 255, .92); }
.gp-portal-contact-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}
.gp-portal-contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, .92);
}
.gp-portal-contact-list li i {
    color: rgba(255, 255, 255, .95);
    flex-shrink: 0;
}
/* modern.css define links verdes globalmente — forçar contraste no card */
body.gp-modern .gp-portal-reseller .gp-portal-contact-list a,
body.gp-modern .gp-portal-reseller .gp-portal-contact-list a:hover,
body.gp-modern .gp-portal-reseller .gp-portal-contact-list a:focus {
    color: #fff !important;
    text-decoration: none;
}
body.gp-modern .gp-portal-reseller .gp-portal-contact-list a:hover,
body.gp-modern .gp-portal-reseller .gp-portal-contact-list a:focus {
    text-decoration: underline;
    opacity: .92;
}

.gp-portal-access {
    background: #fff;
    border-radius: var(--gp-radius);
    box-shadow: var(--gp-shadow);
    border: 1px solid var(--gp-line);
    padding: 36px;
}
.gp-portal-access .form-label { font-weight: 600; font-size: 14px; }
.gp-portal-cidade-field .gp-portal-cidade-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gp-muted);
    margin-bottom: 8px;
}
.gp-portal-access-row {
    min-height: 0;
}
.gp-portal-access-row > [class*='col'] {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
@media (min-width: 992px) {
    .gp-portal-access-row {
        align-items: flex-start;
    }
    .gp-portal-access-row > [class*='col'] {
        min-height: 0;
    }
    .gp-portal-access-row .gp-portal-access-map {
        width: 100%;
    }
    .gp-portal-access-row .gp-portal-access-form {
        width: 100%;
        overflow: hidden;
    }
}
.gp-portal-access-form {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.gp-portal-access-form .gp-portal-estado-field {
    flex-shrink: 0;
    margin-bottom: 16px;
}
.gp-portal-access-form .gp-portal-cidade-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}
.gp-portal-cidade-field > .form-label,
.gp-portal-cidade-field > .gp-portal-cidade-loading {
    flex-shrink: 0;
}
.gp-portal-cidades-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    margin-top: 8px;
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    background: linear-gradient(180deg, #fafcfb 0%, #fff 100%);
    padding: 16px;
    overflow: hidden;
}
.gp-portal-cidades-placeholder {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 24px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-muted);
    min-height: 0;
}
.gp-portal-cidades-placeholder i {
    font-size: 28px;
    color: var(--gp-primary);
    opacity: .75;
}
.gp-portal-cidades-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gp-primary-dark);
    margin: 0 0 10px;
    flex-shrink: 0;
}
.gp-portal-cidades-hint {
    margin-bottom: 8px !important;
    flex-shrink: 0;
}
.gp-portal-cidade-search-wrap {
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.gp-portal-cidade-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gp-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}
.gp-portal-cidade-search {
    padding-left: 36px;
    padding-right: 36px;
    border-color: var(--gp-line);
    border-radius: var(--gp-radius-sm);
    font-size: 14px;
    min-height: 40px;
}
.gp-portal-cidade-search:focus {
    border-color: rgba(30, 126, 52, .45);
    box-shadow: 0 0 0 .2rem rgba(30, 126, 52, .12);
}
.gp-portal-cidade-search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gp-muted);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.gp-portal-cidade-search-clear:hover,
.gp-portal-cidade-search-clear:focus {
    background: var(--gp-primary-light);
    color: var(--gp-primary-dark);
}
.gp-portal-cidades-no-match {
    padding: 8px 0 4px;
    flex-shrink: 0;
}
.gp-portal-cidades-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--gp-primary-light) transparent;
}
.gp-portal-cidades-grid::-webkit-scrollbar {
    width: 6px;
}
.gp-portal-cidades-grid::-webkit-scrollbar-thumb {
    background: var(--gp-primary-light);
    border-radius: 999px;
}
.gp-portal-cidade-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    background: #fff;
    color: var(--gp-ink);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.gp-portal-cidade-item > i:first-child {
    color: var(--gp-primary);
    font-size: 15px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}
.gp-portal-cidade-item span {
    flex: 1;
    line-height: 1.35;
}
.gp-portal-cidade-arrow {
    color: var(--gp-muted);
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s ease, transform .2s ease, color .2s ease;
}
.gp-portal-cidade-item:hover,
.gp-portal-cidade-item:focus {
    background: var(--gp-primary-light);
    border-color: rgba(30, 126, 52, .35);
    color: var(--gp-primary-dark);
    text-decoration: none;
}
.gp-portal-cidade-item:hover .gp-portal-cidade-arrow,
.gp-portal-cidade-item:focus .gp-portal-cidade-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--gp-primary);
}
.gp-portal-cidade-item:focus-visible {
    outline: 2px solid var(--gp-primary);
    outline-offset: 2px;
}
.gp-portal-cidades-empty {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 12px 0;
    margin: 0;
}
.gp-portal-access-map {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.gp-portal-map-hint {
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gp-portal-map-hint i { color: var(--gp-primary); }
.gp-portal-map-selected {
    min-height: 1.25rem;
    font-weight: 600;
    color: var(--gp-primary-dark) !important;
}
.gp-portal-access .gp-portal-map-wrap {
    border-radius: var(--gp-radius-sm);
    overflow: hidden;
    background: linear-gradient(180deg, #f4faf6 0%, var(--gp-bg) 100%);
    padding: 12px;
    flex: 1;
}
.gp-portal-access #svg-map {
    display: block;
    max-height: 460px;
}
.gp-portal-access #svg-map a {
    text-decoration: none;
    cursor: pointer;
}
.gp-portal-access #svg-map path,
.gp-portal-access #svg-map .circle {
    fill: var(--gp-primary-dark);
    transition: fill .25s ease;
}
.gp-portal-access #svg-map text {
    fill: #fff;
    font: 12px sans-serif;
    pointer-events: none;
}
.gp-portal-access #svg-map a:hover path,
.gp-portal-access #svg-map a:hover .circle,
.gp-portal-access #svg-map a.is-selected path,
.gp-portal-access #svg-map a.is-selected .circle {
    fill: var(--gp-primary) !important;
}
.gp-portal-access #svg-map a.is-selected path,
.gp-portal-access #svg-map a.is-selected .circle {
    filter: drop-shadow(0 0 4px rgba(55, 74, 11, .35));
}

.gp-portal-navbar .gp-brand-city { color: var(--gp-primary); }
.gp-portal-navbar .gp-brand-sub { font-size: 12px; color: var(--gp-muted); display: block; }

@media (max-width: 991.98px) {
    .gp-portal-hero { padding: 56px 0 64px; }
    .gp-portal-stats { margin-top: 0; padding-top: 40px; }
    .gp-portal-reseller { padding: 32px 24px; }
    .gp-portal-access-form {
        min-height: 0;
    }
    .gp-portal-cidades-panel {
        min-height: 280px;
    }
    .gp-portal-institution-card {
        flex: 0 0 156px;
        width: 156px;
        padding: 14px 10px 12px;
    }
    .gp-portal-institution-logo {
        width: 72px;
        height: 72px;
    }
}
