/* =========================================================
   APPA LICITAÇÕES  TEMA SAAS MODERNO
   Paleta: azul-petróleo + cinza-claro
   ========================================================= */

:root {
    --primary: #0f4c5c;
    --primary-hover: #0b3b47;
    --primary-soft: #dcecef;
    --primary-border: #a9cbd2;

    --background: #f4f6f8;
    --surface: #ffffff;
    --surface-muted: #eef2f4;

    --text: #1f2933;
    --text-muted: #66737d;
    --text-on-primary: #ffffff;

    --border: #d8e0e5;
    --success: #237a57;
    --success-bg: #e8f5ee;
    --danger: #b42318;
    --danger-bg: #fef0ef;

    --shadow-sm: 0 2px 8px rgba(15, 76, 92, 0.08);
    --shadow-md: 0 10px 30px rgba(31, 41, 51, 0.09);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
}

main {
    flex: 1;
    width: 100%;
}

a {
    color: inherit;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 5%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.navbar-brand span {
    color: var(--text);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.navbar-links a {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar-links a:hover,
.navbar-links a:focus-visible {
    color: var(--primary);
}

/* HERO */
.hero-section {
    width: min(900px, calc(100% - 2rem));
    margin: 3.5rem auto 1.75rem;
    padding: 2.5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--primary-soft) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInDown 0.55s ease-out;
}

.hero-section h1 {
    margin-bottom: 0.85rem;
    color: var(--primary);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
}

.hero-section p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.08rem;
}

/* FORMULÁRIO */
.form-container {
    width: min(640px, calc(100% - 2rem));
    margin: 0 auto 3rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.55s ease-out;
}

.form-container h2 {
    margin-bottom: 1.75rem;
    padding-bottom: 0.85rem;
    color: var(--primary);
    font-size: 1.65rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.form-container p {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.form-container label {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    color: var(--text);
    font: inherit;
    background: var(--surface);
    border: 1px solid #c9d2d8;
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-container input::placeholder,
.form-container textarea::placeholder {
    color: #929da5;
}

.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {
    outline: none;
    background: #fbfdfd;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.14);
}

.form-container textarea,
textarea {
    min-height: 110px;
    resize: vertical;
}

.form-container span.helptext {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.errorlist {
    margin: 0.25rem 0;
    color: var(--danger);
    font-size: 0.84rem;
    font-weight: 700;
    list-style: none;
}

/* BOTÕES */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-on-primary);
    font-size: 1rem;
    font-weight: 700;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-primary:focus-visible {
    outline: 3px solid rgba(15, 76, 92, 0.22);
    outline-offset: 2px;
}

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

/* MENSAGENS */
.messages-container {
    width: min(640px, calc(100% - 2rem));
    margin: 1rem auto;
}

.message {
    margin-bottom: 0.75rem;
    padding: 0.9rem 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-sm);
}

.message.success {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid #a9d8c2;
}

.message.error {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #f1b8b3;
}

/* FOOTER COMPACTO */
.main-footer {
    width: 100%;
    margin-top: auto;
    padding: 0.65rem 5%;
    color: #dbe8eb;
    background: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-content {
    width: min(1200px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem 1.25rem;
    min-height: 34px;
    font-size: 0.82rem;
}

.footer-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
    text-decoration: underline;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.7rem;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.whatsapp-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copyright {
    margin: 0;
    color: #c3d5d9;
    font-size: 0.76rem;
}

/* ANIMAÇÕES */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* RESPONSIVIDADE */
@media (max-width: 700px) {
    .navbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.7rem;
        padding: 0.8rem 1rem;
    }

    .navbar-links {
        width: 100%;
        gap: 0.9rem;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.2rem;
    }

    .hero-section {
        margin-top: 1.75rem;
        padding: 1.8rem 1.25rem;
    }

    .form-container {
        padding: 1.4rem 1.1rem;
    }

    .footer-content {
        justify-content: center;
        text-align: center;
    }
}
