﻿/* ===================================== */
/* BASE                                  */
/* ===================================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
}

.font-heading {
    font-family: 'Outfit', sans-serif;
}

/* ===================================== */
/* NAVBAR LINKS                          */
/* ===================================== */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 2rem 1rem;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .nav-link:hover {
        color: #1e3a8a;
        transform: translateY(-1px);
    }

/* ===================================== */
/* DROPDOWN                              */
/* ===================================== */
.dropdown {
    position: relative;
    display: inline-block;
    height: 100%;
}

.dropdown-content {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    padding: 0.75rem 0;
    z-index: 100;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dropdown:hover .dropdown-content,
.dropdown.dropdown--active .dropdown-content {
    display: block !important;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: #475569;
    margin: 0 0.5rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

    .dropdown-item:hover {
        background-color: #eff6ff;
        color: #1e40af;
        padding-left: 1.5rem;
    }

/* ===================================== */
/* NAV LINK HIGHLIGHT                    */
/* ===================================== */
.nav-link-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    color: #1d4ed8 !important;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

    .nav-link-highlight:hover {
        background-color: #1d4ed8;
        color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(29, 78, 216, 0.3);
    }

/* ===================================== */
/* HEADER GLASS                          */
/* ===================================== */
.header-glass {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ===================================== */
/* MOBILE / TABLET                       */
/* ===================================== */
@media (max-width: 1023px) {

    #mobileMenu {
        width: 220px !important;
    }

    .dropdown-content {
        width: 220px !important;
        margin-top: 5px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .dropdown-item {
        padding: 0.6rem 0.75rem !important;
        gap: 0.75rem !important;
        margin: 0 0.4rem !important;
    }

        .dropdown-item .w-10 {
            width: 2.25rem !important;
            height: 2.25rem !important;
            flex-shrink: 0;
        }

        .dropdown-item span.font-bold {
            font-size: 0.8rem !important;
            line-height: 1.2;
        }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }

        .nav-link:hover,
        .nav-link:active {
            background-color: #eff6ff !important;
            color: #2563eb !important;
            transform: translateX(4px);
            border-radius: 12px;
        }

    .nav-link-highlight {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        justify-content: space-between !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #475569 !important;
        font-weight: 600 !important;
    }

        .nav-link-highlight:hover {
            background-color: #eff6ff !important;
            color: #2563eb !important;
            transform: translateX(4px);
            border-radius: 12px;
        }
}


@media (max-width: 320px) {
    .logo-full {
        display: none;
    }

    .logo-mobile {
        display: block;
    }
}

@media (min-width: 321px) {
    .logo-full {
        display: block;
    }

    .logo-mobile {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-mobile {
        gap: 12px;
    }

        .header-mobile .logo-title {
            font-size: 13px !important;
            line-height: 1.2;
            max-width: 220px;
            white-space: normal;
        }

        .header-mobile .logo-icon {
            width: 52px;
            height: 52px;
        }

            .header-mobile .logo-icon i {
                width: 24px;
                height: 24px;
            }
}

/* ===================================== */
/* TOAST / ALERTAS                */
/* ===================================== */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
    width: calc(100vw - 2rem);
}

.toast-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    border-radius: 1rem;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}


    .toast-item.toast-success {
        background: #f0fdf4;
        border-color: #86efac;
        color: #166534;
    }

        .toast-item.toast-success::before {
            background: #22c55e;
        }

    .toast-item.toast-error {
        background: #fef2f2;
       border-color: #fca5a5;
       color: #991b1b;
    }

        .toast-item.toast-error::before {
            background: #ef4444;
        }

    .toast-item.toast-warning {
        background: #fffbeb;
        border-color: #fcd34d;
        color: #92400e;
    }

        .toast-item.toast-warning::before {
            background: #f59e0b;
        }

    .toast-item.toast-info {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #1e3a8a;
    }

        .toast-item.toast-info::before {
            background: #1e3a8a;
        }

.toast-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.toast-msg {
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    opacity: 0.5;
    flex-shrink: 0;
    transition: opacity 0.2s;
    line-height: 1;
}

    .toast-close:hover {
        opacity: 1;
    }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 4px 4px;
    animation: toastProgress 4s linear forwards;
}

.toast-success .toast-progress {
    background: #22c55e;
}

.toast-error .toast-progress {
    background: #ef4444;
}

.toast-warning .toast-progress {
    background: #f59e0b;
}

.toast-info .toast-progress {
    background: #1e3a8a;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 1.5rem)) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 120px;
        margin-bottom: 0;
    }

    to {
        opacity: 0;
        transform: translateX(calc(100% + 1.5rem)) scale(0.9);
        max-height: 0;
        margin-bottom: -0.75rem;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast-item.removing {
    animation: toastSlideOut 0.3s ease forwards;
}

/* ===================================== */
/* RESPONSIVIDADE GERAL 320px            */
/* ===================================== */
@media (max-width: 400px) {
    /* Container padding mínimo */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Footer */
    footer .grid {
        gap: 1.5rem !important;
    }

    footer p, footer span, footer li {
        font-size: 0.75rem;
    }

    footer .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    footer h4 {
        font-size: 0.9rem !important;
    }

    /* Seções gerais */
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-20 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Cards de serviços */
    .p-8 {
        padding: 1.25rem !important;
    }

    .p-10 {
        padding: 1.5rem !important;
    }

    .p-12 {
        padding: 1.25rem !important;
    }

    /* Títulos hero */
    h1.text-4xl, h1.text-5xl {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }

    h2.text-4xl, h2.text-3xl {
        font-size: 1.5rem !important;
    }

    h2.text-5xl {
        font-size: 1.75rem !important;
    }

    /* Botões hero em coluna */
    .flex-wrap.gap-6 {
        gap: 0.75rem !important;
    }

        .flex-wrap.gap-6 a, .flex-wrap.gap-6 span {
            width: 100% !important;
            text-align: center;
            justify-content: center;
        }

    /* Botões de consulta */
    .flex.gap-3 {
        gap: 0.5rem !important;
    }

    /* Stats cards */
    .grid.grid-cols-1.md\:grid-cols-3 {
        gap: 0.75rem !important;
    }

    /* Toast no mobile */
    #toast-container {
        right: 0.75rem;
        left: 0.75rem;
        max-width: 100%;
        width: auto;
    }
}

@media (max-width: 360px) {
    /* Botões lado-a-lado viram coluna */
    .flex.gap-3 > * {
        flex: 1 1 100% !important;
    }

    .flex.gap-3 button, .flex.gap-3 input[type=submit] {
        width: 100% !important;
    }
}
