/* ==========================================================================
   Instituto Economia ao Natural - Design System & Custom Styles (Soft & Modern)
   ========================================================================== */

/* Fontes carregadas via <link> no base.html (Quicksand + Nunito Sans — padrão Handoff UI) */

:root {
    --color-teal-dark: #236B86;
    --color-cyan-light: #51B0C4;
    --color-orange-vibrant: #F3913A;
    --color-orange-hover: #E07D26;
    --color-bg-soft: #FBF8F2;
    --color-card-bg: #FFFFFF;
    --color-text-dark: #123047;
    --color-text-muted: #4A5A66;

    /* Aliases para compatibilidade com classes Handoff */
    --blue-700: #1B769C;
    --blue-500: #308EB7;
    --blue-900: #123047;
    --cyan-400: #60C7D0;
    --orange: #F99732;
    --sand-50: #FBF8F2;
    --sand-100: #F2EDE3;
    --ink: #123047;
    --ink-soft: #4A5A66;
    --ink-mute: #6B7A85;

    --font-heading: 'Quicksand', 'Trebuchet MS', sans-serif;
    --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
    /* Compatibilidade com tokens Handoff */
    --font-display: 'Quicksand', 'Trebuchet MS', sans-serif;
    --font-text:    'Nunito Sans', 'Segoe UI', sans-serif;

    --gradient-hero: linear-gradient(135deg, var(--color-teal-dark) 0%, var(--color-cyan-light) 100%);
    --gradient-soft: linear-gradient(180deg, rgba(81, 176, 196, 0.08) 0%, rgba(248, 250, 249, 0) 100%);
    
    --shadow-soft: 0 10px 30px rgba(35, 107, 134, 0.06);
    --shadow-hover: 0 18px 40px rgba(35, 107, 134, 0.12);
    --radius-soft: 20px;
    --radius-pill: 50px;
    --radius-card: 24px;
    --radius-field: 10px;
    --container: 1312px;
    --gutter: 64px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-soft);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    letter-spacing: 1.5px;
    font-weight: 400;
}

.text-teal {
    color: var(--color-teal-dark) !important;
}

.text-cyan {
    color: var(--color-cyan-light) !important;
}

.text-orange {
    color: var(--color-orange-vibrant) !important;
}

/* Buttons & CTAs */
.btn-cta-orange {
    background-color: var(--color-orange-vibrant);
    color: #FFFFFF !important;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.85rem 2.2rem;
    border: none;
    box-shadow: 0 8px 20px rgba(243, 145, 58, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-cta-orange:hover {
    background-color: var(--color-orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(243, 145, 58, 0.45);
}

.btn-outline-custom {
    border: 2px solid #FFFFFF;
    color: #FFFFFF !important;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.8rem 2rem;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Navbar */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-teal-dark);
    letter-spacing: 1px;
}

.navbar-custom .nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-text-dark);
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--color-teal-dark);
    background-color: rgba(81, 176, 196, 0.1);
}

/* Cards & Containers */
.card-soft {
    background: var(--color-card-bg);
    border-radius: var(--radius-soft);
    border: 1px solid rgba(81, 176, 196, 0.12);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-soft:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* Organic Shapes & Badges */
.badge-soft {
    background-color: rgba(81, 176, 196, 0.15);
    color: var(--color-teal-dark);
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
}

/* Footer */
.footer-custom {
    background: linear-gradient(180deg, var(--color-teal-dark) 0%, #17485B 100%);
    color: #E2E8F0;
    padding: 4rem 0 2rem 0;
}

.footer-custom h5 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-cyan-light);
    letter-spacing: 1px;
}

.footer-custom a {
    color: #CBD5E1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-custom a:hover {
    color: var(--color-orange-vibrant);
}

/* ==========================================================================
   IEN HEADER — padrão Handoff UI (todas as páginas que herdam de base.html)
   ========================================================================== */

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-soft);
    color: var(--color-text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Header principal */
.ien-site-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(18, 48, 71, 0.07);
    border-bottom: 1px solid rgba(81, 176, 196, 0.12);
}

.ien-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 16px;
}

/* Logo / marca */
.ien-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Nav desktop */
.ien-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
}

.ien-nav-link {
    color: var(--color-text-dark);
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.18s, border-color 0.18s;
}

.ien-nav-link:hover,
.ien-nav-link--active {
    color: var(--color-teal-dark);
    border-bottom-color: var(--color-teal-dark);
}

/* User badge (botão com nome do usuário) */
.ien-user-menu {
    position: relative;
}

.ien-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(81, 176, 196, 0.12);
    color: var(--color-teal-dark);
    border: 1.5px solid rgba(35, 107, 134, 0.2);
    border-radius: 50px;
    padding: 8px 18px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.ien-user-badge:hover {
    background: rgba(81, 176, 196, 0.22);
}

.ien-chevron {
    font-size: 11px;
    transition: transform 0.2s;
}

.ien-user-badge[aria-expanded="true"] .ien-chevron {
    transform: rotate(180deg);
}

/* Dropdown do usuário */
.ien-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(18, 48, 71, 0.14);
    border: 1px solid rgba(81, 176, 196, 0.12);
    list-style: none;
    padding: 8px 0;
    z-index: 200;
}

.ien-dropdown--open {
    display: block;
    animation: ienFadeIn 0.15s ease;
}

@keyframes ienFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ien-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--color-text-dark);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ien-dropdown-item:hover {
    background: rgba(81, 176, 196, 0.10);
    color: var(--color-teal-dark);
}

.ien-dropdown-danger {
    color: #dc3545;
}

.ien-dropdown-danger:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.ien-dropdown-divider {
    height: 1px;
    background: rgba(81, 176, 196, 0.15);
    margin: 6px 12px;
}

/* Botões para não autenticados no header */
.ien-site-header .btn-ghost {
    background: transparent;
    color: var(--color-text-dark);
    border: 2px solid var(--color-text-dark);
    border-radius: 50px;
    padding: 8px 20px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
}

.ien-site-header .btn-ghost:hover {
    background: var(--color-text-dark);
    color: #fff;
}

.ien-site-header .btn-orange {
    background: var(--color-orange-vibrant);
    color: #fff;
    border-radius: 50px;
    padding: 8px 22px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: none;
    transition: background 0.18s, transform 0.12s;
    box-shadow: 0 4px 14px rgba(243, 145, 58, 0.3);
}

.ien-site-header .btn-orange:hover {
    background: var(--color-orange-hover);
    transform: translateY(-2px);
}

/* Botão hamburguer (mobile) */
.ien-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.ien-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-dark);
    border-radius: 2px;
    transition: transform 0.2s;
}

/* Responsivo */
@media (max-width: 900px) {
    .ien-nav-toggle {
        display: flex;
    }

    .ien-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 16px 24px 24px;
        box-shadow: 0 8px 24px rgba(18, 48, 71, 0.10);
        border-top: 1px solid rgba(81, 176, 196, 0.15);
    }

    .ien-nav--open {
        display: flex;
    }

    .ien-site-header {
        position: relative;
    }

    .ien-user-menu {
        width: 100%;
    }

    .ien-dropdown {
        position: static;
        box-shadow: none;
        border: 1px solid rgba(81, 176, 196, 0.15);
        margin-top: 8px;
    }

    .ien-nav .btn-ghost,
    .ien-nav .btn-orange {
        width: 100%;
        text-align: center;
        justify-content: center;
        margin-top: 4px;
    }
}
