/* ============================================
   CUSTOM CSS — Visual upgrade baseado no concorrente
   Importado APÓS style.css (Tailwind)
   ============================================ */

/* Fontes */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,100..1000&display=swap');

/* ---- CSS Variables Override ---- */
:root {
    --vermelho: #ff161f;
    --preto: #000;
}

/* ---- Reset / Base ---- */
html, body {
    font-family: "Raleway", sans-serif !important;
    font-size: 15px;
    scroll-behavior: smooth;
}

* {
    scrollbar-color: rgb(223, 227, 232) rgb(249, 250, 251);
    scrollbar-width: thin;
}

/* ---- Loading Spinner ---- */
.loading__component {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.4s ease;
}

.loading__component.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading__bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--vermelho);
    animation: loading-bar 1.5s ease-in-out infinite;
    z-index: 100000;
}

@keyframes loading-bar {
    0% { width: 0%; left: 0; }
    50% { width: 60%; left: 20%; }
    100% { width: 0%; left: 100%; }
}

.loading__circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading__circle-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--vermelho);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: loading-spin 0.6s linear infinite;
}

.loading__circle-text {
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

/* ---- Header ---- */
.header {
    padding: 25px 0 !important;
    border-bottom: none !important;
}

.header .container {
    max-width: 1200px !important;
}

.logo-img {
    max-width: 260px !important;
    height: auto !important;
}

.header-nav {
    margin-top: 8px !important;
}

.header-nav .nav-link {
    font-weight: 600 !important;
    font-size: 16px !important;
    color: #000 !important;
    padding: 4px 6px !important;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease;
}

.header-nav .nav-link:hover {
    border-bottom: 2px solid var(--vermelho) !important;
}

.header-nav .nav-link .chevron {
    color: var(--vermelho) !important;
    width: 16px;
    height: 16px;
}

.btn-login {
    background: #034EA2 !important;
    color: #fff !important;
    border-radius: 25px !important;
    padding: 8px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: background 0.3s ease !important;
    border: none !important;
}

.btn-login:hover {
    background: #023d80 !important;
}

.btn-login .icon {
    width: 18px;
    height: 18px;
}

/* ---- Search Section ---- */
.search-section input[type="text"],
section input[placeholder="Busque pelo serviço desejado"] {
    height: 48px !important;
    border-radius: 24px !important;
    border: 1px solid #888 !important;
    padding: 8px 48px 8px 24px !important;
    font-size: 18px !important;
    font-style: italic;
    font-weight: 400 !important;
}

.search-section input::placeholder,
section input[placeholder="Busque pelo serviço desejado"]::placeholder {
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #5F6368 !important;
}

.search-section h1,
section h1 {
    font-weight: 600 !important;
    font-size: 24px !important;
    color: #000 !important;
}

/* ---- Section Titles (red left border) ---- */
.section-title-bar,
section h2 {
    font-weight: 600 !important;
    font-size: 24px !important;
}

/* ---- Service Cards ---- */
.card-servico,
section a[href*="servico/"] {
    background-color: #fcfcfc !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

.card-servico:hover,
section a[href*="servico/"]:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
}

/* Card titles */
section a[href*="servico/"] h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* Card descriptions */
section a[href*="servico/"] p {
    font-size: 14px !important;
    color: #666 !important;
    line-height: 20px !important;
}

/* Card action link */
section a[href*="servico/"] span.text-primary,
section a[href*="servico/"] .text-primary {
    color: var(--vermelho) !important;
    font-weight: 600 !important;
}

/* ---- Badges ---- */
/* Online badge (blue) */
span[class*="bg-[hsl(145"][class*="text-[hsl(145"] {
    background-color: #e3f2fd !important;
    color: #0066cc !important;
    border-color: #bbdefb !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Presencial badge (green) */
span[class*="bg-[hsl(210"][class*="text-[hsl(210"] {
    background-color: #e8f5e9 !important;
    color: #00a86b !important;
    border-color: #c8e6c9 !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* ---- Badge color mapping (matching concorrente) ---- */
.badge-online {
    background-color: #e3f2fd;
    color: #0066cc;
}

.badge-presencial {
    background-color: #e8f5e9;
    color: #00a86b;
}

.badge-hibrido {
    background-color: #fff3e0;
    color: #ff9500;
}

/* ---- Stats Section ---- */
section[class*="bg-[hsl(220"] {
    position: relative;
    overflow: hidden;
}

/* ---- Serviços por Assunto Section ---- */
.servicos-assunto {
    background: #ededed;
    margin: 0;
    padding: 50px 0 30px;
}

.servicos-assunto .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.servicos-assunto h3 {
    border-left: 4px solid var(--vermelho);
    font-weight: 600;
    margin-bottom: 36px;
    padding-left: 24px;
    font-size: 24px;
}

.servicos-assunto .grid-assuntos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card-assunto {
    border-radius: 8px;
    text-align: center;
    background: #fff;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
    padding: 30px 20px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.card-assunto i {
    font-size: 36px;
    color: #000;
    margin-bottom: 15px;
}

.card-assunto p {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    line-height: 26px;
    color: #333;
}

.card-assunto .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4F4F4F;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-assunto:hover .overlay {
    opacity: 1;
}

.card-assunto .overlay p {
    color: #fff;
    font-size: 16px;
}

.card-assunto:hover p {
    color: #fff;
}

/* ---- Footer Upgrade ---- */
.footer {
    background: #000 !important;
    color: #999 !important;
    padding: 60px 0 30px !important;
    margin-top: 0 !important;
}

.footer .container {
    max-width: 1200px !important;
}

.footer h3 {
    padding-bottom: 16px !important;
    margin-bottom: 16px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    color: #fff !important;
}

.footer a,
.footer .footer-link {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    display: block !important;
    margin-bottom: 12px !important;
}

.footer .footer-link:hover {
    color: var(--vermelho) !important;
}

.footer .social-icon {
    background: var(--vermelho) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    margin-right: 8px !important;
    margin-bottom: 0 !important;
}

.footer .social-icon svg {
    width: 18px !important;
    height: 18px !important;
    color: #fff !important;
    stroke: #fff !important;
}

.footer .social-icon:hover {
    background: #cc0000 !important;
}

.footer-copyright,
.footer-copyright-desktop {
    border-top: 1px solid #333 !important;
    padding-top: 20px !important;
    margin-top: 30px !important;
}

.footer-copyright p,
.footer-copyright-desktop p {
    font-size: 12px !important;
    color: #fff !important;
    opacity: 0.7;
}

.footer-domain {
    color: #fff !important;
    opacity: 0.5;
}

.footer-logo,
.footer-logo-desktop {
    filter: brightness(0) invert(1) !important;
    max-width: 200px !important;
}

.footer-brand-desktop {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-social-desktop {
    display: flex;
    gap: 4px;
}

.footer-gov {
    color: #fff !important;
}

/* ---- App Download Section ---- */
section:has(.drop-shadow-2xl) {
    padding: 60px 20px !important;
}

/* ---- Form pages (DM Sans) ---- */
.form-box,
main:has(form) {
    font-family: "DM Sans", sans-serif !important;
}

main form label {
    font-weight: 600 !important;
    font-size: 15px !important;
}

main form input,
main form select {
    height: 44px !important;
    border-radius: 0.375rem !important;
}

main form .text-primary {
    color: var(--vermelho) !important;
}

/* ---- Serviços por assunto (Tailwind cards in poupa) ---- */
section:has(.lucide-droplets) {
    background: #ededed !important;
    padding: 50px 0 30px !important;
}

section:has(.lucide-droplets) a {
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

section:has(.lucide-droplets) a:hover {
    background: #4F4F4F !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

section:has(.lucide-droplets) a:hover span {
    color: #fff !important;
}

section:has(.lucide-droplets) a:hover svg {
    color: #fff !important;
    stroke: #fff !important;
}

section:has(.lucide-droplets) a span {
    font-size: 16px !important;
    transition: color 0.3s ease;
}

section:has(.lucide-droplets) a svg {
    transition: all 0.3s ease;
}

/* ---- Órgãos mais solicitados cards ---- */
section:has(.lucide-droplets) ~ section .drop-shadow-2xl,
section img[alt*="Detran"],
section img[alt*="IIRGD"],
section img[alt*="SEFAZ"],
section img[alt*="Sabesp"] {
    border-radius: 12px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .servicos-assunto .grid-assuntos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-assunto {
        height: 160px;
        padding: 20px 15px;
    }

    .card-assunto i {
        font-size: 28px;
    }

    .card-assunto p {
        font-size: 14px;
        line-height: 20px;
    }

    .logo-img {
        max-width: 180px !important;
    }

    .footer .footer-grid {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .servicos-assunto .grid-assuntos {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card-assunto {
        height: 140px;
        padding: 15px 10px;
    }

    .card-assunto i {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .card-assunto p {
        font-size: 13px;
    }
}
