:root {
    --teal:         #64c3c8;
    --teal-dark:    #4a9da1;
    --teal-mid:     #7fd4d8;
    --teal-light:   #e0f5f6;
    --teal-pale:    #f0fafb;
    --red:          #eb505f;
    --red-dark:     #c94451;
    --cream:        #fafaf7;
    --white:        #ffffff;
    --off-white:    #F7FAFA;
    --text-dark:    #1a2e2e;
    --text-mid:     #3a5252;
    --text-light:   #6a8888;
    --border:       rgba(100,195,200,.14);
    --shadow-sm:    0 2px 8px rgba(100,195,200,.08);
    --shadow-md:    0 8px 32px rgba(100,195,200,.14);
    --radius:       10px;
    --radius-lg:    18px;

    /* Cores compatíveis para o Hero */
    --green-deep:   #4a9da1;
    --green-mid:    #64c3c8;
    --green-pale:   #e0f5f6;
    --green-light:  #7fd4d8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; }

/* ══════════════════════════════════
    HEADER — TWO ROWS
══════════════════════════════════ */
header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--white);
    box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

/* Row 1 - Background branco igual ao row 2 */
.header-row1 {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: .55rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.institution-brand {
    display: flex; align-items: center; gap: .7rem;
}

.institution-badge {
    width: 34px; height: 34px; border-radius: 6px;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: .7rem; font-weight: 700;
    letter-spacing: .03em; flex-shrink: 0;
}

.institution-logo {
    height: 34px; width: auto; display: block;
}

.institution-name {
    font-size: .86rem; font-weight: 600; color: var(--text-dark); line-height: 1.2;
}
.institution-name span {
    display: block; font-size: .74rem; font-weight: 400; color: var(--text-mid);
}

.search-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--red); border: none;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: .95rem;
    cursor: pointer; transition: background .2s, transform .15s; flex-shrink: 0;
}
.search-btn:hover { background: var(--red-dark); transform: scale(1.07); }

/* Search bar */
.search-bar {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--red);
    border-bottom: 2px solid var(--teal);
    padding: .7rem 2rem;
    display: none; gap: .7rem; align-items: center;
    box-shadow: var(--shadow-md); z-index: 998;
}
.search-bar input {
    background: rgba(255,255,255,0.95);
    color: var(--text-dark);
}
.search-bar input::placeholder {
    color: var(--text-light);
}
.search-bar.open { display: flex; }
.search-bar input {
    flex: 1; border: 1.5px solid var(--border); border-radius: 8px;
    padding: .5rem .95rem; font-family: inherit; font-size: .92rem;
    color: var(--text-dark); outline: none; transition: border-color .2s;
}
.search-bar input:focus { border-color: var(--teal); }
.search-bar-close {
    background: none; border: none; font-size: 1.15rem; color: var(--text-light);
    cursor: pointer; padding: .25rem .35rem; border-radius: 6px; transition: color .2s;
}
.search-bar-close:hover { color: var(--red); }

/* Row 2 */
.header-row2 {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: .45rem 2rem; gap: 1rem; position: relative;
}

.project-brand { display: flex; align-items: center; flex-shrink: 0; }
.project-brand img { height: 46px; width: auto; }

/* Desktop nav — absolutely centred */
.desktop-nav {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center;
    list-style: none; gap: 0;
}

.desktop-nav > li { position: relative; display: flex; align-items: center; }

.nav-link-main {
    display: inline-flex; align-items: center;
    padding: .45rem .72rem;
    font-size: .878rem; font-weight: 500; color: var(--text-mid);
    border-radius: 7px; white-space: nowrap;
    transition: color .2s, background .2s;
}
.nav-link-main:hover { color: var(--teal-dark); background: var(--teal-light); }

.nav-link-split {
    display: inline-flex; align-items: center;
    padding: .45rem .28rem; font-size: .68rem; color: var(--teal);
    border-radius: 6px; cursor: pointer; user-select: none;
    transition: color .2s, background .2s;
}
.nav-link-split:hover { background: var(--teal-light); color: var(--teal-dark); }

/* Dropdown */
.nav-dropdown {
    position: absolute; top: calc(100% + 5px); left: 0;
    background: var(--white);
    border: 1px solid var(--border); border-top: 3px solid var(--teal);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 208px; list-style: none; padding: .35rem 0;
    opacity: 0; visibility: hidden; transform: translateY(-5px);
    transition: opacity .2s, transform .2s, visibility .2s; z-index: 990;
}
.desktop-nav > li:hover > .nav-dropdown,
.desktop-nav > li:focus-within > .nav-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.nav-dropdown li { position: relative; }
.nav-dropdown li a {
    display: block; padding: .42rem 1.1rem;
    font-size: .848rem; color: var(--text-mid);
    transition: background .15s, color .15s;
}
.nav-dropdown li a:hover { background: var(--teal-pale); color: var(--teal-dark); }

/* nested dropdown */
.nav-dropdown li .nav-dropdown { top: 0; left: 100%; border-top: 3px solid var(--teal); }
.nav-dropdown li:hover > .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-sep { height: 1px; background: var(--border); margin: .28rem 0; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: .55rem; flex-shrink: 0; }

.btn-entrar {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .46rem 1.15rem;
    background: var(--teal); color: var(--white);
    font-size: .878rem; font-weight: 600;
    border: none; border-radius: 7px; cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-entrar:hover {
    background: var(--teal-dark); color: var(--white);
    transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,134,138,.3);
}

.btn-hamburger {
    display: none; background: none;
    border: 1.5px solid var(--border); border-radius: 7px;
    padding: .4rem .52rem; color: var(--teal-dark);
    cursor: pointer; font-size: 1.12rem; transition: background .2s;
}
.btn-hamburger:hover { background: var(--teal-light); }

/* ══════════════════════════════════
    MOBILE DRAWER
══════════════════════════════════ */
.mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,95,99,.45); backdrop-filter: blur(3px);
    z-index: 1100; opacity: 0; transition: opacity .3s;
}
.mobile-overlay.open { display: block; opacity: 1; }

.mobile-drawer {
    position: fixed; top: 0; left: 0;
    width: min(295px, 85vw); height: 100%;
    background: var(--white); z-index: 1200;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; display: flex; flex-direction: column;
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.35rem; border-bottom: 3px solid var(--teal);
}
.drawer-header img { height: 36px; }
.drawer-close {
    background: none; border: none; font-size: 1.25rem; color: var(--text-mid);
    cursor: pointer; border-radius: 6px; padding: .2rem .3rem; transition: background .2s;
}
.drawer-close:hover { background: var(--teal-light); }

.drawer-body { padding: .9rem 1.1rem; flex: 1; }

.drawer-section { margin-bottom: .15rem; }

.drawer-toggle-row {
    display: flex; align-items: center; border-radius: 7px; overflow: hidden;
}
.drawer-nav-link {
    flex: 1; padding: .58rem .65rem; font-size: .89rem; font-weight: 600;
    color: var(--teal-dark); text-decoration: none; transition: background .2s;
}
.drawer-nav-link:hover { background: var(--teal-light); }
.drawer-arrow {
    background: none; border: none; border-left: 1px solid var(--border);
    padding: .58rem .7rem; cursor: pointer; color: var(--teal);
    display: flex; align-items: center; transition: background .2s;
}
.drawer-arrow:hover { background: var(--teal-light); }
.drawer-arrow .arrow { font-size: .68rem; transition: transform .25s; }
.drawer-arrow.active .arrow { transform: rotate(180deg); }

.drawer-submenu { list-style: none; padding: .18rem 0 .18rem .55rem; display: none; }
.drawer-submenu.open { display: block; }
.drawer-submenu li a {
    display: block; padding: .4rem .65rem; font-size: .855rem; color: var(--text-mid);
    border-radius: 6px; transition: background .15s;
}
.drawer-submenu li a:hover { background: var(--teal-light); color: var(--teal-dark); }

.drawer-footer { padding: 1rem 1.1rem; border-top: 1px solid var(--border); }

/* ══════════════════════════════════
    HERO
══════════════════════════════════ */
.hero {
    position: relative; min-height: 82vh;
    display: flex; align-items: center;
    overflow: hidden;
    background: var(--cream);
}

.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 70% at 15% 50%, rgba(239, 243, 241, 0.9) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 85% 80%, rgba(173, 224, 194, 0.08) 0%, transparent 60%);
}

.hero-pattern {
    position: absolute; inset: 0;
    opacity: .06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600'%3E%3Crect x='30' y='60' width='180' height='90' rx='22' fill='none' stroke='%232d7a4f' stroke-width='2.5'/%3E%3Cpolygon points='60,150 45,175 90,150' fill='none' stroke='%232d7a4f' stroke-width='2.5' stroke-linejoin='round'/%3E%3Cline x1='60' y1='95' x2='160' y2='95' stroke='%232d7a4f' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='60' y1='115' x2='140' y2='115' stroke='%232d7a4f' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='60' y1='135' x2='120' y2='135' stroke='%232d7a4f' stroke-width='2' stroke-linecap='round'/%3E%3Crect x='620' y='30' width='140' height='70' rx='18' fill='none' stroke='%232d7a4f' stroke-width='2'/%3E%3Cpolygon points='710,100 730,122 720,100' fill='none' stroke='%232d7a4f' stroke-width='2' stroke-linejoin='round'/%3E%3Cline x1='645' y1='58' x2='735' y2='58' stroke='%232d7a4f' stroke-width='1.8' stroke-linecap='round'/%3E%3Cline x1='645' y1='74' x2='715' y2='74' stroke='%232d7a4f' stroke-width='1.8' stroke-linecap='round'/%3E%3Crect x='700' y='420' width='110' height='55' rx='14' fill='none' stroke='%232d7a4f' stroke-width='1.8'/%3E%3Cpolygon points='720,475 705,495 730,475' fill='none' stroke='%232d7a4f' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cline x1='718' y1='442' x2='788' y2='442' stroke='%232d7a4f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cline x1='718' y1='456' x2='775' y2='456' stroke='%232d7a4f' stroke-width='1.6' stroke-linecap='round'/%3E%3Crect x='80' y='340' width='85' height='44' rx='11' fill='none' stroke='%232d7a4f' stroke-width='1.6'/%3E%3Cpolygon points='100,384 88,400 108,384' fill='none' stroke='%232d7a4f' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cline x1='96' y1='356' x2='145' y2='356' stroke='%232d7a4f' stroke-width='1.4' stroke-linecap='round'/%3E%3Cline x1='96' y1='368' x2='135' y2='368' stroke='%232d7a4f' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M420 80 Q430 65 440 80 Q450 95 460 80' fill='none' stroke='%232d7a4f' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M408 80 Q418 55 428 80 Q438 105 448 80 Q458 55 468 80' fill='none' stroke='%232d7a4f' stroke-width='1.6' stroke-linecap='round' opacity='.7'/%3E%3Crect x='420' y='320' width='68' height='32' rx='16' fill='none' stroke='%232d7a4f' stroke-width='1.6'/%3E%3Ccircle cx='438' cy='336' r='3.5' fill='%232d7a4f'/%3E%3Ccircle cx='454' cy='336' r='3.5' fill='%232d7a4f'/%3E%3Ccircle cx='470' cy='336' r='3.5' fill='%232d7a4f'/%3E%3C/svg%3E");
    background-size: cover; background-position: center; pointer-events: none;
}

.hero-img-wrap {
    position: absolute; right: 0; top: 0; bottom: 0; width: 48%; overflow: hidden;
}
.hero-img-wrap::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--cream) 0%, rgba(250,250,247,.5) 35%, transparent 100%);
    z-index: 1;
}
.hero-img-wrap img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    filter: brightness(.85) saturate(.8) opacity(.55);
}

.hero-content {
    position: relative; z-index: 2;
    max-width: 1280px; margin: 0 auto;
    padding: 4rem 2rem; width: 100%;
    display: flex; flex-direction: column; align-items: flex-start;
}

.hero-logo {
    width: clamp(260px, 38vw, 480px);
    height: auto;
    margin-bottom: 1.75rem;
    animation: fadeUp .6s ease both;
    filter: none;
}

.hero-label {
    display: inline-block; padding: .35rem 1rem;
    background: rgba(45,122,79,.1); border: 1px solid rgba(45,122,79,.25);
    border-radius: 50px; font-size: .78rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--green-mid);
    margin-bottom: 1.25rem; animation: fadeUp .65s .05s ease both;
}

.hero-sub {
    font-size: 1.08rem; color: var(--text-mid);
    max-width: 500px; margin-bottom: 2.25rem;
    animation: fadeUp .7s .15s ease both;
}

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeUp .7s .25s ease both; }

.btn-primary-hero {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8rem 1.75rem; background: var(--green-deep); color: var(--white);
    font-weight: 600; font-size: .95rem; border-radius: 50px;
    border: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary-hero:hover {
    background: var(--green-mid); transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,74,46,.25);
}

.btn-secondary-hero {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8rem 1.75rem; background: transparent;
    color: var(--green-deep); font-weight: 500; font-size: .95rem;
    border-radius: 50px; border: 1.5px solid rgba(26,74,46,.35);
    transition: background .2s, border-color .2s; cursor: pointer;
}
.btn-secondary-hero:hover {
    background: var(--green-pale); border-color: var(--green-mid); color: var(--green-deep);
}

.hero-scroll {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .5rem;
    color: var(--text-light); font-size: .75rem; letter-spacing: .05em;
    animation: fadeUp 1s .6s ease both;
}
.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--green-light), transparent);
    animation: scrollPulse 2s infinite;
}

/* ══════════════════════════════════
    STATS BAR
══════════════════════════════════ */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid rgba(45,122,79,.1);
    padding: 1.75rem 2rem;
}

.stats-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; justify-content: space-around; align-items: center;
    gap: 1rem; flex-wrap: wrap;
}

.stat-item { text-align: center; padding: .5rem 1.5rem; }

.stat-item + .stat-item { border-left: 1px solid rgba(45,122,79,.12); }

.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; font-weight: 700; color: var(--green-mid);
    display: block; line-height: 1;
}

.stat-label {
    font-size: .8rem; color: var(--text-light); margin-top: .35rem;
    display: block; text-transform: uppercase; letter-spacing: .06em;
}

/* ══════════════════════════════════
    CONTENT LAYOUT
══════════════════════════════════ */
.content-wrap {
    max-width: 1280px; margin: 0 auto;
    padding: 4.5rem 2rem;
    display: grid; grid-template-columns: 1fr 310px;
    gap: 3.25rem; align-items: start;
}

.sections-main { display: flex; flex-direction: column; gap: 3.25rem; }

.section-block {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 2.2rem 2.4rem; box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative; overflow: hidden;
    transition: box-shadow .3s, transform .3s;
}
.section-block:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.section-block::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(to bottom, var(--teal), var(--teal-mid));
}

.section-block h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; font-weight: 700; color: var(--teal-dark);
    margin-bottom: 1.05rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border);
}
.section-block p { color: var(--text-mid); font-size: .935rem; margin-bottom: .85rem; }
.section-block p:last-child { margin-bottom: 0; }
.section-block strong { color: var(--teal-dark); }

.section-block ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.section-block ul li {
    padding: .58rem 0; border-bottom: 1px solid rgba(0,134,138,.07);
    font-size: .92rem; color: var(--text-mid);
    display: flex; align-items: center; gap: .45rem;
}
.section-block ul li:last-child { border-bottom: none; }
.section-block ul li::before { content: '→'; color: var(--teal); font-size: .78rem; flex-shrink: 0; }
.section-block ul li a { color: var(--teal); font-weight: 500; }
.section-block ul li a:hover { color: var(--teal-dark); text-decoration: underline; }

/* ══════════════════════════════════
    SIDEBAR
══════════════════════════════════ */
.sidebar { position: sticky; top: 110px; }

.sidebar-card {
    background: var(--white); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm);
    border: 1px solid var(--border); margin-bottom: 1.2rem;
}
.sidebar-card-header { background: var(--teal-dark); padding: 1rem 1.35rem; }
.sidebar-card-header.red { background: var(--red); }
.sidebar-card-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: .97rem; color: var(--white); margin: 0;
}
.sidebar-card-body { padding: 1rem 1.35rem; }

.sidebar-nav { list-style: none; padding: 0; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: .5rem;
    padding: .52rem .6rem; font-size: .87rem; color: var(--text-mid);
    border-radius: 7px; transition: background .15s, color .15s;
}
.sidebar-nav li a:hover { background: var(--teal-light); color: var(--teal-dark); }
.sidebar-nav li a i { color: var(--teal); font-size: .87rem; }
.sidebar-badge {
    margin-left: auto; padding: .1rem .42rem;
    background: var(--teal-light); color: var(--teal-dark);
    font-size: .68rem; font-weight: 600; border-radius: 50px;
}

/* ══════════════════════════════════
    TOPICS GRID
══════════════════════════════════ */
.topics-section { background: var(--teal-light); padding: 4.25rem 2rem; }
.topics-inner { max-width: 1280px; margin: 0 auto; }

.section-eyebrow {
    font-size: .76rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .1em; color: var(--teal); display: inline-block; margin-bottom: .55rem;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 700;
    color: var(--teal-dark); margin-bottom: .85rem;
}
.section-desc { color: var(--text-mid); max-width: 530px; margin-bottom: 2.6rem; font-size: .94rem; }

.topics-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.05rem;
}

.topic-card {
    background: var(--white); border-radius: var(--radius);
    padding: 1.55rem; border: 1px solid rgba(0,134,138,.12);
    display: flex; flex-direction: column; gap: .6rem;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal); }

.topic-icon {
    width: 40px; height: 40px; border-radius: 9px;
    background: var(--teal-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.topic-name { font-size: .94rem; font-weight: 600; color: var(--teal-dark); }
.topic-desc { font-size: .8rem; color: var(--text-light); line-height: 1.5; }
.topic-arrow { margin-top: auto; color: var(--teal); font-size: .86rem; transition: transform .2s; }
.topic-card:hover .topic-arrow { transform: translateX(4px); }

/* ══════════════════════════════════
    FOOTER - ATUALIZADO
══════════════════════════════════ */
footer { background: var(--red); color: rgba(255,255,255,.85); padding: 3.25rem 2rem 1.6rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; }

.footer-grid {
    display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: 2.4rem; padding-bottom: 2.4rem;
    border-bottom: 1px solid rgba(255,255,255,.2); margin-bottom: 1.6rem;
}

.footer-brand img { height: 48px; margin-bottom: .85rem; filter: brightness(0) invert(1) opacity(.95); }
.footer-brand p { font-size: .85rem; line-height: 1.7; color: rgba(255,255,255,.75); }

.footer-col h5 {
    font-family: 'Playfair Display', serif; font-size: .95rem;
    font-weight: 600; color: var(--white); margin-bottom: .85rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .42rem; }
.footer-links li a { font-size: .85rem; color: rgba(255,255,255,.75); transition: color .2s; }
.footer-links li a:hover { color: var(--white); text-decoration: underline; }

.footer-contact p { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: .38rem; }
.footer-contact a { color: var(--white); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .79rem;
    color: rgba(255,255,255,.6);
}
.footer-bottom a { color: rgba(255,255,255,.75); }
.footer-bottom a:hover { color: var(--white); }

/* ══════════════════════════════════
    ANIMATIONS
══════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
    0%, 100% { opacity: .4; } 50% { opacity: .9; }
}

/* ══════════════════════════════════
    RESPONSIVE
══════════════════════════════════ */
@media (max-width: 1060px) {
    .desktop-nav { display: none; }
    .btn-hamburger { display: flex; align-items: center; justify-content: center; }
    .content-wrap { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.65rem; }
}

@media (max-width: 640px) {
    .hero-img-wrap { display: none; }
    .hero-content { padding: 2.75rem 1.2rem; }
    .hero { min-height: 65vh; }
    .header-row1, .header-row2 { padding-left: 1.2rem; padding-right: 1.2rem; }
    .content-wrap { padding: 2.5rem 1.2rem; }
    .topics-section { padding: 2.75rem 1.2rem; }
    .section-block { padding: 1.55rem 1.4rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    footer { padding: 2.1rem 1.2rem 1.2rem; }
}

/* ═══════════════════════════════════════════════════════
    PÁGINAS INTERNAS — LAYOUT SEM BOOTSTRAP
═══════════════════════════════════════════════════════ */

/* Container principal */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    min-height: calc(100vh - 300px);
}

/* Menu lateral */
.sidebar-menu {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-menu-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-mid);
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-menu-item:hover {
    background: var(--teal-pale);
    border-left-color: var(--teal);
    color: var(--teal-dark);
}

.sidebar-menu-item.active {
    background: var(--teal-light);
    border-left-color: var(--teal-dark);
    color: var(--teal-dark);
    font-weight: 600;
}

.sidebar-menu-section {
    background: var(--teal-dark);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-menu-section:hover {
    background: var(--teal);
}

.sidebar-submenu {
    padding-left: 1rem;
}

.sidebar-submenu-item {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-left: 2px solid transparent;
}

.sidebar-submenu-item:hover {
    background: var(--teal-pale);
    border-left-color: var(--teal-mid);
    color: var(--teal-dark);
}

/* Conteúdo principal */
.content-main {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.content-main h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--teal);
}

.content-main h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--teal-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content-main h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--teal);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-main h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-main p {
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 1rem;
    text-align: justify;
}

.content-main ul, .content-main ol {
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-main li {
    margin-bottom: 0.5rem;
}

.content-main strong {
    color: var(--teal-dark);
}

.content-main em, .content-main i {
    color: var(--teal);
}

/* Texto verde (destaque) */
.texto-verde {
    color: var(--teal);
    font-weight: 500;
}

/* Citações */
.citacao {
    background: var(--teal-pale);
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--teal);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-dark);
    margin: 1.5rem 0;
}

/* Bloco de exemplo */
.exemplo-ato {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--teal-pale) 0%, var(--white) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.exemplo-ato img {
    max-width: 200px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.exemplo-texto {
    flex: 1;
}

.explicacao {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Exemplo com imagem */
.exemplo-img-texto {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.exemplo-img-texto img {
    max-width: 250px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.texto-direita {
    flex: 1;
}

/* Respostas / Blocos de atividade */
.respostas {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--off-white);
    border-radius: var(--radius);
}

.bloco {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.caixa {
    background: var(--white);
    border: 2px solid var(--teal);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.seta {
    color: var(--teal);
    font-size: 1.2rem;
    font-weight: bold;
}

.legenda {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

/* Linha divisória */
.linha-grande {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--teal), transparent);
    margin: 2.5rem 0;
}

/* Listas customizadas */
.list-unstyled {
    list-style: none;
    padding-left: 0;
}

.fst-italic { font-style: italic; }
.fw-semibold { font-weight: 600; }
.ms-3 { margin-left: 1rem; }
.ms-4 { margin-left: 1.5rem; }
.ms-5 { margin-left: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }

/* Responsivo páginas internas */
@media (max-width: 991px) {
    .page-container {
        flex-direction: column;
    }

    .sidebar-menu {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }

    .content-main {
        padding: 1.5rem;
        max-width: 100%;
    }

    .exemplo-ato,
    .exemplo-img-texto {
        flex-direction: column;
        align-items: center;
    }

    .exemplo-ato img,
    .exemplo-img-texto img {
        max-width: 100%;
        width: 100%;
    }

    .content-main h2 {
        font-size: 1.6rem;
    }

    .content-main h3 {
        font-size: 1.2rem;
    }

    .content-main h4 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .respostas {
        flex-direction: column;
        align-items: center;
    }

    .content-main {
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════
    PÁGINAS DE CONTEÚDO COM SIDEBAR BOOTSTRAP
═══════════════════════════════════════════════════════ */

/* Container principal das páginas de conteúdo - max-width definido */
.container-width {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Esconder scrollbar webkit em todos os elementos */
*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Layout de grid para sidebar e conteúdo */
.container-width > .row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
}

/* Coluna do menu lateral */
.container-width > .row > .col-lg-2 {
    flex: 0 0 240px;
    max-width: 240px;
    background: transparent;
    border-right: 1px solid var(--border);
    padding: 2rem 0.75rem 2rem 0;
    position: sticky;
    top: 110px;
    align-self: flex-start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ajuste responsivo para telas médias */
@media (max-width: 1200px) {
    .container-width > .row > .col-lg-2 {
        flex: 0 0 210px;
        max-width: 210px;
        padding: 1.5rem 0.5rem 1.5rem 0;
    }
    .container-width > .row > .col-lg-10 {
        max-width: calc(100% - 210px);
        padding: 0 1rem;
    }
}

/* Ajuste para telas menores - menu lateral oculto */
@media (max-width: 1060px) {
    .container-width > .row > .col-lg-2 {
        display: none !important;
    }
    .container-width > .row > .col-lg-10 {
        max-width: 100% !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 1rem;
    }
}


.container-width > .row > .col-lg-10 {
    flex: 1;
    min-width: 0;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
}

/* Menu lateral container */
#menu-lateral {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

#menu-lateral .list-group-item {
    border: none;
    background: transparent;
    margin-bottom: 0.25rem;
}

/* Sidebar estilizado - links */
.sidebar-link {
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
    padding: 0.75rem 1rem;
    color: var(--text-mid);
    font-size: 0.9rem;
    border-radius: 0 8px 8px 0;
    display: block;
    text-decoration: none;
}

.sidebar-link:hover {
    background: linear-gradient(90deg, var(--teal-pale) 0%, transparent 100%);
    border-left-color: var(--teal);
    color: var(--teal-dark);
    padding-left: 1.25rem;
}

.sidebar-link.active {
    background: linear-gradient(90deg, var(--teal-light) 0%, transparent 100%);
    border-left-color: var(--teal-dark);
    color: var(--teal-dark);
    font-weight: 600;
}

/* Sidebar títulos de secção */
.sidebar-title {
    border-left: 3px solid transparent;
    color: var(--text-mid) !important;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title:hover {
    background: var(--teal);
    color: var(--teal-dark) !important;
}

.sidebar-title i {
    color: var(--white) !important;
}

/* Submenu items */
.sidebar-subitem {
    display: block;
    padding: 0.6rem 1rem 0.6rem 1.25rem;
    color: var(--text-mid) !important;
    font-size: 0.85rem;
    border-left: 2px solid var(--border);
    margin-left: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-subitem:hover {
    color: var(--teal-dark) !important;
    border-left-color: var(--teal);
    background: var(--teal-pale);
    padding-left: 1.5rem;
}

.sidebar-subitem.active {
    color: var(--teal-dark) !important;
    font-weight: 600;
    border-left-color: var(--teal-dark);
    background: linear-gradient(90deg, var(--teal-light) 0%, transparent 100%);
}

/* Conteúdo principal estilizado */
.main-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0;
    padding: 3rem 4rem;
    min-height: calc(100vh - 300px);
    max-width: 1200px;
}

/* Centralizar conteúdo em ecrãs grandes */
@media (min-width: 1400px) {
    .main-content {
        margin: 1.5rem auto;
    }
}

.main-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--teal);
    position: relative;
}

.main-content h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--coral);
}

.main-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--teal);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--coral);
}

.main-content h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.main-content p {
    color: var(--text-mid);
    line-height: 1.9;
    margin-bottom: 1.25rem;
    text-align: justify;
}

.main-content ul, .main-content ol {
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

.main-content li {
    margin-bottom: 0.6rem;
}

.main-content strong {
    color: var(--teal-dark);
    font-weight: 600;
}

.main-content em, .main-content i {
    color: var(--coral);
}

/* Exemplos em destaque */
.main-content .exemplo-ato,
.main-content .exemplo-img-texto {
    background: linear-gradient(135deg, var(--teal-pale) 0%, var(--white) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 1.75rem 0;
    box-shadow: var(--shadow-sm);
}

/* Blocos de resposta/análise */
.main-content .respostas {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--off-white);
    border-radius: var(--radius);
}

.main-content .bloco {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.main-content .caixa {
    background: var(--white);
    border: 2px solid var(--teal);
    border-radius: var(--radius);
    padding: 0.85rem 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.main-content .seta {
    color: var(--coral);
    font-size: 1.3rem;
    font-weight: bold;
}

.main-content .legenda {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

/* Linha divisória */
.main-content hr.linha-grande {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--teal), transparent);
    margin: 2.5rem 0;
}

/* Textos verdes (destaque) */
.main-content .texto-verde {
    color: var(--teal-dark);
    font-weight: 500;
}

/* Citacoes */
.main-content .citacao {
    background: var(--teal-pale);
    padding: 1.25rem 1.75rem;
    border-left: 4px solid var(--coral);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-dark);
    margin: 1.5rem 0;
}

/* Atividades/Exercícios */
.main-content ol li strong {
    color: var(--teal-dark);
    display: block;
    margin-bottom: 0.5rem;
}

/* Responsivo para páginas de conteúdo */
@media (max-width: 991px) {
    .main-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .main-content h2 {
        font-size: 1.8rem;
    }

    .sidebar-link {
        margin-right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: var(--radius);
    }

    .main-content h2 {
        font-size: 1.5rem;
    }

    .main-content h4 {
        font-size: 1.1rem;
    }

    .main-content .exemplo-ato,
    .main-content .exemplo-img-texto {
        padding: 1rem;
    }
}


/* ══════════════════════════════════════════
    RESULTADOS DE PESQUISA
══════════════════════════════════════════ */

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.search-results.open {
    max-height: 70vh;
    opacity: 1;
    overflow-y: auto;
}

.search-results-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.8rem;
    color: var(--text-mid, #6c757d);
}

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

.search-results-list li {
    border-bottom: 1px solid #f0f0f0;
}

.search-results-list li:last-child {
    border-bottom: none;
}

.search-result-item {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark, #1a1a2e);
    margin-bottom: 4px;
}

.search-result-desc {
    font-size: 0.85rem;
    color: var(--text-mid, #6c757d);
    line-height: 1.4;
}

.search-result-item mark {
    background-color: rgba(0, 128, 128, 0.2);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Mensagem para nenhum resultado */
.search-no-results {
    padding: 32px 20px;
    text-align: center;
}

.search-no-results i {
    font-size: 2.5rem;
    color: #dee2e6;
    margin-bottom: 12px;
}

.search-no-results p {
    font-size: 0.95rem;
    color: var(--dark, #1a1a2e);
    margin-bottom: 8px;
}

.search-no-results span {
    font-size: 0.8rem;
    color: var(--text-mid, #6c757d);
}

/* Barra de pesquisa */
.search-bar {
    position: relative;
}

/* Scrollbar para resultados */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}


/* ══════════════════════════════════
   SCROLL TO TOP
══════════════════════════════════ */
.scroll-top {
    position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--teal); color: #fff; border: none;
    font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(100,195,200,.45);
    opacity: 0; pointer-events: none;
    transform: translateY(12px);
    transition: opacity .3s, transform .3s, background .2s;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { background: var(--teal-dark); }
