@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #00CEB1;
    --primary-dark: #00a088;
    --text-dark: #000000;
    --text-muted: rgba(1, 17, 32, 0.75);
    --white: #ffffff;
    --black: #000000;
    --bg-body: #F9F8F8;
    --font-main: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; height: auto; }

/* ===================== HEADER ===================== */
#masthead { position: relative; width: 100%; z-index: 1000; }
.main-header-bar { background: #000; padding: 20px 0; }

.header-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 5px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo img { width: 350px; height: auto; }
.logo { display: flex; flex-direction: column; }
@media (min-width: 1201px) { .logo { margin-left: 25px; } }

.logo-tagline { color: #fff; font-size: 18px; font-weight: 400; margin-top: -5px; }

.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav-list li { margin-bottom: 0; padding: 0; }
.nav-list a { font-size: 18px; font-weight: 400; color: var(--white); padding: 0 18px; transition: transform 0.3s; display: inline-block; }
.nav-list a:hover { transform: scale(1.2); }
.nav-list a.nav-btn-teal { background-color: var(--primary-color); color: #000; padding: 8px 18px; border-radius: 30px; font-weight: 700; }
.nav-list a.nav-btn-teal:hover { transform: scale(1.2); }

.menu-toggle {
    display: none; background-color: var(--primary-color);
    width: 45px; height: 45px; border: none;
    align-items: center; justify-content: center;
    color: #f9f8f8; font-size: 20px; cursor: pointer;
}

/* ===================== LANG SELECT (inside TOC) ===================== */
.lang-select-wrapper {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
}

.lang-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid #ddd;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #fafafa;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300CEB1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.3s ease;
    outline: none;
}

.lang-select:hover {
    border-color: var(--primary-color);
    background-color: #fff;
}

.lang-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,206,177,0.15);
    background-color: #fff;
}

/* ===================== HERO ===================== */
.policy-hero {
    background: #fff;
    padding: 80px 20px 60px; text-align: center; position: relative; overflow: hidden;
    border-bottom: 2px solid #eee;
}

.policy-hero::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(0,206,177,0.05) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 3%); }
}

.policy-hero h1 {
    font-size: 48px; font-weight: 300; color: var(--primary-dark);
    text-transform: uppercase; letter-spacing: 3px; margin-bottom: 15px;
    position: relative;
}

.policy-hero p {
    font-size: 17px; color: #555; max-width: 700px;
    margin: 0 auto; line-height: 1.7; position: relative;
}

/* ===================== LAYOUT ===================== */
.policy-layout {
    max-width: 1300px; margin: 0 auto; padding: 50px 30px;
    display: grid; grid-template-columns: 260px 1fr; gap: 50px;
}

/* ===================== TOC SIDEBAR ===================== */
.policy-toc {
    position: sticky; top: 30px; align-self: start;
    background: #fff; border-radius: 14px; padding: 28px 22px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06); border: 1px solid #eee;
}

.policy-toc h3 {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--primary-color); margin-bottom: 18px;
    padding-bottom: 12px; border-bottom: 2px solid #f0f0f0;
}

.toc-list { list-style: none; margin: 0; padding: 0; }

.toc-list li { margin-bottom: 2px; }

.toc-list a {
    display: block; padding: 7px 12px; font-size: 13px; font-weight: 500;
    color: #555; border-radius: 8px; transition: all 0.2s ease;
    line-height: 1.4; border-left: 2px solid transparent;
}

.toc-list a:hover { background: rgba(0,206,177,0.08); color: var(--primary-dark); border-left-color: var(--primary-color); }
.toc-list a.active { background: rgba(0,206,177,0.12); color: var(--primary-dark); font-weight: 600; border-left-color: var(--primary-color); }

/* ===================== POLICY SECTIONS ===================== */
.policy-content { min-width: 0; }

.policy-section {
    background: #fff; border-radius: 16px; padding: 40px 38px;
    margin-bottom: 28px; box-shadow: 0 3px 20px rgba(0,0,0,0.04);
    border: 1px solid #eee; transition: box-shadow 0.3s ease;
}

.policy-section:hover { box-shadow: 0 6px 30px rgba(0,0,0,0.08); }

.section-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 20px; font-size: 12px;
    font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: 16px;
}

.badge-ethics { background: rgba(0,206,177,0.12); color: var(--primary-dark); }
.badge-review { background: rgba(99,102,241,0.1); color: #4f46e5; }
.badge-access { background: rgba(16,185,129,0.1); color: #059669; }
.badge-legal { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-archive { background: rgba(59,130,246,0.1); color: #2563eb; }
.badge-ai { background: rgba(168,85,247,0.1); color: #7c3aed; }

.section-summary {
    font-size: 15px; line-height: 1.7; color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(0,206,177,0.06) 0%, rgba(0,206,177,0.02) 100%);
    border-left: 3px solid var(--primary-color); padding: 14px 18px;
    border-radius: 0 10px 10px 0; margin-bottom: 24px; font-weight: 500;
}

.policy-section h2 {
    font-size: 28px; font-weight: 700; color: #000; margin-bottom: 8px;
    line-height: 1.3;
}

.policy-section h3 {
    font-size: 21px; font-weight: 700; color: #1a1a1a;
    margin-top: 28px; margin-bottom: 12px; line-height: 1.4;
}

.policy-section h4 {
    font-size: 18px; font-weight: 600; color: #555;
    margin-top: 20px; margin-bottom: 8px;
}

.policy-section p {
    font-size: 16.5px; line-height: 1.85; color: var(--text-muted); margin-bottom: 1.2em;
}

.policy-section strong, .policy-section b { font-weight: 700; color: rgba(1,17,32,0.85); }
.policy-section em { font-style: italic; }

.policy-section ul {
    list-style: disc; margin-left: 2em; margin-bottom: 1.2em; padding-left: 0;
}

.policy-section li {
    font-size: 16.5px; line-height: 1.85; color: var(--text-muted); margin-bottom: 5px;
}

.policy-section hr {
    background-color: #e5e5e5; height: 1px; border: 0;
    margin: 25px 0;
}

/* COPE reference box */
.cope-box {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #c7d2fe; border-radius: 12px;
    padding: 20px 24px; margin-top: 20px;
}

.cope-box p { font-size: 15px; color: #4338ca; margin-bottom: 0.5em; }
.cope-box a { color: #4f46e5; text-decoration: underline; font-weight: 600; }

/* Lang visibility — JS handles display via switchLang() */
.lang-en { display: none; }
.lang-pt { display: block; }

/* ===================== FOOTER ===================== */
#main-footer { background-color: #000; color: var(--white); padding: 100px 30px 45px; margin-top: 0; }

.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px;
}

.footer-col .footer-title { font-size: 25px; font-weight: 400; margin-bottom: 25px; line-height: 1.5; color: #f9f8f8; display: block; }
.footer-col p { font-size: 18px; line-height: 1.85; color: var(--white); margin-bottom: 1.75em; text-align: left; }
.footer-col p:last-child { margin-bottom: 0; }
.footer-col b, .footer-col strong { font-weight: 700; color: white; }
.teal-link { color: var(--primary-color) !important; text-decoration: underline; }

/* ===================== UPDATE DATE ===================== */
.update-date {
    text-align: center; padding: 30px 20px; font-size: 14px;
    color: #888; font-style: italic;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .policy-layout { grid-template-columns: 1fr; padding: 30px 20px; }
    .policy-toc { position: static; order: -1; }
}

@media (max-width: 920px) {
    .menu-toggle { display: flex; flex-shrink: 0; }

    .header-inner {
        padding: 0 20px; display: flex;
        flex-direction: row !important; flex-wrap: nowrap !important;
        justify-content: space-between !important; align-items: center;
    }

    .logo img { width: 253px !important; max-width: 80vw !important; height: auto !important; }

    .main-nav {
        position: absolute; top: 100%; left: 0; width: 100%;
        background-color: #f9f8f8; flex-direction: column;
        display: none; border-top: 1px solid #ddd; z-index: 999;
    }

    .main-nav.active { display: flex; }
    .nav-list { flex-direction: column; width: 100%; gap: 0; }
    .nav-list li { width: 100%; padding: 0; }
    .nav-list a {
        display: block; width: 100%; padding: 0 20px;
        height: 50px; line-height: 50px; border-bottom: 1px solid #ddd;
        color: rgba(1,17,32,0.75); font-size: 16.4px; text-align: left;
    }
    .nav-list a.nav-btn-teal { background-color: transparent; color: rgba(1,17,32,0.75); padding: 0 20px; border-radius: 0; font-weight: 400; }
    .nav-list a.nav-btn-teal:hover { background-color: transparent; transform: none; color: var(--primary-color); }
    .nav-list a:hover { color: var(--primary-color); transform: none; }

    .footer-inner { grid-template-columns: 1fr; }
    #main-footer { padding: 75px 25px 25px; }

    .policy-hero { padding: 60px 20px 40px; }
    .policy-hero h1 { font-size: 34px; letter-spacing: 1px; }
    .policy-section { padding: 28px 22px; }
    .policy-section h2 { font-size: 23px; }
}

@media (max-width: 480px) {
    .policy-hero h1 { font-size: 28px; }
    .policy-section { padding: 22px 18px; border-radius: 12px; }
    .policy-section h2 { font-size: 20px; }
}