:root {
    --navy: #0b2a5c;
    --navy-dark: #081f45;
    --blue: #1a56b0;
    --blue-light: #eaf1fc;
    --bg: #f2f4f8;
    --card: #ffffff;
    --border: #e2e6ee;
    --text: #1c2333;
    --muted: #6b7385;
    --red: #d63b3b;
    --gold: #f2a900;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(20, 30, 60, 0.04), 0 1px 3px rgba(20, 30, 60, 0.06);
    --shadow-md: 0 4px 14px rgba(20, 30, 60, 0.08), 0 2px 4px rgba(20, 30, 60, 0.05);
    --shadow-lg: 0 12px 28px rgba(20, 30, 60, 0.12), 0 4px 10px rgba(20, 30, 60, 0.06);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

header.hub-header {
    background: linear-gradient(90deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    width: 100%;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.sky-route-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.route-path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-dasharray: 4 7;
}

.plane-icon {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px clamp(20px, 4vw, 40px);
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1320px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-mark {
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    padding-right: 15px;
    display: flex;
    align-items: center;
}

.logo-mark img {
    height: 55px;
    width: auto;
    display: block;
}

.brand-title h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.5px;
}

.brand-title p {
    margin: 3px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

.brand-title span.tagline {
    display: block;
    font-size: 12px;
    opacity: 0.65;
    margin-top: 2px;
}



.company-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}

.company-link-btn svg {
    flex-shrink: 0;
}

.company-link-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    filter: brightness(0) invert(1)
}

.company-link-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.company-link-btn:active {
    transform: translateY(0);
}

/* ---------- Main layout ---------- */


main {
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 32px) 48px;
}

.welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
    flex-wrap: wrap;
    animation: fadeSlideUp .5s var(--ease) both;
}

.welcome-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-left h2 {
    margin: 0;
    font-size: 18px;
    color: var(--navy);
}

.welcome-left p {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.search-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    padding: 11px 8px 11px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    flex: 0 1 360px;
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.search-wrap:focus-within {
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}

.search-wrap input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
    color: var(--text);
}

.search-wrap button {
    border: none;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: background .2s var(--ease), transform .15s var(--ease);
}

.search-wrap button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* deixa o ícone branco, já que o fundo do botão é azul */
    filter: brightness(0) invert(1);
}

.search-wrap button:hover {
    background: var(--navy);
    transform: scale(1.05);
}

.clear-search-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s var(--ease), color .15s var(--ease);
}

.clear-search-btn:hover {
    background: var(--blue-light);
    color: var(--navy);
}

/* ---------- Grid ---------- */

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    align-items: start;
}

.category {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px 22px 24px;
    transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
    opacity: 0;
    animation: fadeSlideUp .5s var(--ease) both;
    width: 380px;
    height: 340px;
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
}

.category:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* staggered entrance for each category card */
.grid .category:nth-child(1) {
    animation-delay: .02s;
}

.grid .category:nth-child(2) {
    animation-delay: .06s;
}

.grid .category:nth-child(3) {
    animation-delay: .10s;
}

.grid .category:nth-child(4) {
    animation-delay: .14s;
}

.grid .category:nth-child(5) {
    animation-delay: .18s;
}

.grid .category:nth-child(6) {
    animation-delay: .22s;
}

.grid .category:nth-child(7) {
    animation-delay: .26s;
}

.grid .category:nth-child(8) {
    animation-delay: .30s;
}

.category.emergency {
    border-color: #e49b9b;
}

.category h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 13.5px;
    letter-spacing: 0.6px;
    color: var(--navy);
    text-transform: uppercase;
    font-weight: 700;
}

.category.emergency h3 {
    color: var(--red);
}

.cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transform: translateY(-1px);
}

.cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Alguns ícones (como o de carro, mais largo que alto) ficam visualmente
   menores dentro da caixa quadrada — compensamos aumentando um pouco */
.category[data-cat="veiculos"] .cat-icon img {
    transform: scale(1.35);
}

.items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    align-items: center;
    gap: 14px;
    flex: 1;
}

/* ---------- Item cards ---------- */

.item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 8px 14px;
    background: #fff;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
    cursor: pointer;
    width: 92px;
    flex-shrink: 0;
    text-align: center;
}

.item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}

.item:active {
    transform: translateY(-1px);
}

.item:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.badge {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: var(--navy);
    background: var(--blue-light);
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease);
    overflow: hidden;
}

.badge img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
}

.item:hover .badge {
    transform: scale(1.06);
}

.item span.label {
    font-size: 12px;
    text-align: center;
    line-height: 1.25;
    color: var(--text);
    font-weight: 600;
}

.item.item-more {
    cursor: pointer;
}

.item.item-more .badge {
    background: var(--bg);
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.item.item-more:hover .badge {
    background: var(--blue-light);
    color: var(--navy);
}

/* ---------- Modal de grupo (Outros) ---------- */

.group-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 21, 48, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
    animation: fadeSlideUp .2s var(--ease) both;
}

body.modal-open {
    overflow: hidden;
}

.group-modal {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: min(80vh, 560px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.group-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.group-modal-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.group-modal-close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s var(--ease), color .15s var(--ease);
}

.group-modal-close:hover {
    background: var(--blue-light);
    color: var(--navy);
}

.group-modal-items {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px;
    overflow-y: auto;
}



.news-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeSlideUp .5s var(--ease) both;
    animation-delay: .04s;
}

.search-results-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    padding: 18px 22px 22px;
    animation: fadeSlideUp .35s var(--ease) both;
}

.search-results-title {
    margin: 0 0 14px;
    font-size: 13.5px;
    letter-spacing: 0.6px;
    color: var(--navy);
    text-transform: uppercase;
    font-weight: 700;
}

.search-results-items {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.no-results {
    margin: 4px 0;
    font-size: 13px;
    color: var(--muted);
}

.news-carousel {
    position: relative;
}

.news-slide {
    min-height: 64px;
    animation: fadeSlideUp .35s var(--ease) both;
}

/* variante banner de imagem — ocupa a largura toda, sem padding */
.news-banner {
    display: block;
    line-height: 0;
}

.news-banner img {
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
}

/* variante texto */
.news-text-wrap {
    padding: 4px 56px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 64px;
    justify-content: center;
}

.news-date {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.news-title {
    font-size: 14px;
    color: var(--navy);
}

.news-text {
    margin: 0;
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
}

.news-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(3px);
    color: var(--navy);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}

.news-nav.prev {
    left: 12px;
    transform: translateY(-50%);
}

.news-nav.next {
    right: 12px;
    transform: translateY(-50%);
}

.news-nav:hover {
    background: #fff;
    border-color: var(--blue);
    transform: translateY(-50%) scale(1.08);
}

.news-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0;
}

.news-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, transform .15s ease;
}

.news-dot.active {
    background: #fff;
    transform: scale(1.25);
}

/* ---------- Footer ---------- */

footer {
    width: 100%;
    background: linear-gradient(90deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: rgba(255,255,255,.9);
    margin-top: 40px;
    box-shadow: 0 -4px 14px rgba(20,30,60,.08);
}

.footer-content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px clamp(20px,4vw,40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand img {
    height: 42px;
    width: auto;
}

.footer-text {
    display: flex;
    flex-direction: column;
}

.footer-text strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.footer-text span {
    color: rgba(255,255,255,.7);
    font-size: 10px;
}

footer #updatedAt {
    color: rgba(255,255,255,.75);
    white-space: nowrap;
    font-size: 11px;
}

footer #duvida {
    color: rgba(255,255,255,.75);
    white-space: nowrap;
    font-size: 11px;
}

.hidden {
    display: none !important;
}

/* ---------- Animations ---------- */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive refinements ---------- */

@media (max-width: 640px) {
    .header-inner {
        padding: 18px 20px;
    }

    .brand {
        gap: 12px;
    }

    .logo-mark {
        padding-right: 14px;
    }

    .logo-mark img {
        height: 30px;
    }

    .brand-title h1 {
        font-size: 18px;
    }

    .sky-route-full {
        display: none;
    }

    .welcome {
        align-items: flex-start;
    }

    .search-wrap {
        flex: 1 1 100%;
        min-width: 0;
    }

    .items {
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .category {
        width: 100%;
        flex: 0 0 100%;
        height: 340px;
    }
}