/* ═══════════════════════════════════════════════
   DESIGN SYSTEM — Representantes RI UÉvora
   Estilo institucional/académico inspirado na UÉ
   ═══════════════════════════════════════════════ */

:root {
    /* ── Palette UÉ institucional ── */
    --bordeaux: #8B1A2B;
    --bordeaux-dark: #6A1423;
    --bordeaux-light: #A8293E;
    --bordeaux-pale: rgba(139, 26, 43, 0.08);
    --gold: #C9A84C;

    /* ── Tons claros institucionais ── */
    --bg-white: #FFFFFF;
    --bg-light: #F5F6FA;
    --bg-grey: #EEF0F5;
    --bg-header: #3C3C3C;
    --bg-header-top: #2B2B2B;
    
    /* ── Texto ── */
    --text-dark: #1D1D1D;
    --text-body: #4A4A4A;
    --text-secondary: #6E7180;
    --text-muted: #9DA2B0;
    --text-light: #FFFFFF;

    /* ── Bordas e sombras ── */
    --border: #E0E3EA;
    --border-light: #ECEEF3;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);

    /* ── Spacing / Layout ── */
    --container-width: 1100px;
    --section-padding: 72px;
    --radius: 4px;
    --radius-md: 8px;

    /* ── Transitions ── */
    --transition-fast: 180ms ease;
    --transition: 300ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-white);
    color: var(--text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ═══════════════ UTILITIES ═══════════════ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding) 0;
}

.section--grey {
    background: var(--bg-light);
}

.text-accent {
    color: var(--bordeaux);
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideRight {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity var(--transition-fast);
}

.nav-logo:hover {
    opacity: 0.85;
}

.ue-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.logo-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.logo-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    border-bottom: 2px solid var(--bordeaux-light);
}

/* ── Hamburger ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 2000;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════ PAGE BANNER ═══════════════ */
.page-banner {
    background: linear-gradient(135deg, var(--bordeaux-dark) 0%, var(--bordeaux) 60%, var(--bordeaux-light) 100%);
    padding: 48px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
}

.page-banner h1 {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.page-banner p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}

.breadcrumb a {
    color: rgba(255,255,255,0.6);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .sep {
    opacity: 0.4;
}

/* ═══════════════ HERO (Index only) ═══════════════ */
.hero {
    background: var(--bordeaux-dark);
    padding: 80px 0 72px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
    z-index: 3;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bordeaux-dark);
}

.hero-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-carousel img.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(80, 15, 25, 0.85) 0%, rgba(139, 26, 43, 0.70) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-text {
    color: #fff;
}

.hero-content--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content--centered .hero-ctas {
    justify-content: center;
}

.hero-content--centered .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
    letter-spacing: 0.03em;
}

.hero h1 {
    font-family: 'Merriweather', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.hero h1 span {
    color: var(--gold-light, #E0C97A);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 28px;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-info-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 32px;
    backdrop-filter: blur(10px);
}

.hero-info-card h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: #fff;
    color: var(--bordeaux);
}

.btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-bordeaux {
    background: var(--bordeaux);
    color: #fff;
}

.btn-bordeaux:hover {
    background: var(--bordeaux-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.btn-outline-dark {
    background: transparent;
    color: var(--bordeaux);
    border: 1.5px solid var(--bordeaux);
}

.btn-outline-dark:hover {
    background: var(--bordeaux);
    color: #fff;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn:hover svg {
    transform: translateX(2px);
}

/* ═══════════════ SECTION HEADER ═══════════════ */
.section-header {
    margin-bottom: 48px;
}

.section-header.center {
    text-align: center;
}

.section-line {
    display: block;
    width: 50px;
    height: 3px;
    background: var(--bordeaux);
    margin-bottom: 16px;
    border-radius: 2px;
}

.section-header.center .section-line {
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bordeaux);
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
}

.section-header.center .section-subtitle {
    margin: 0 auto;
}

/* ═══════════════ CARDS (Proposals style) ═══════════════ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    transition: all var(--transition);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bordeaux);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

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

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bordeaux-pale);
    border-radius: var(--radius);
    color: var(--bordeaux);
    margin-bottom: 16px;
}

.card-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-grey);
    line-height: 1;
    pointer-events: none;
}

.card:hover .card-number {
    color: var(--bordeaux-pale);
}

.card h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ═══════════════ TEAM SECTION ═══════════════ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.team-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}

.team-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.team-photo {
    aspect-ratio: 4 / 3;
    background: var(--bg-grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    border-bottom: 3px solid var(--bordeaux);
}

.team-photo svg {
    opacity: 0.3;
}

.team-photo span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.team-info {
    padding: 24px;
}

.team-role {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--bordeaux);
    padding: 3px 10px;
    background: var(--bordeaux-pale);
    border-radius: 100px;
    margin-bottom: 10px;
}

.team-name {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ═══════════════ CTA BAND ═══════════════ */
.cta-band {
    background: var(--bordeaux);
    padding: 48px 0;
    text-align: center;
    position: relative;
}

.cta-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
}

.cta-band h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.cta-band p {
    color: rgba(255,255,255,0.75);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ═══════════════ FORM PAGE ═══════════════ */
.form-container {
    max-width: 620px;
    margin: 0 auto;
}

.form-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    position: relative;
    box-shadow: var(--shadow);
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bordeaux);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--bordeaux);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139, 26, 43, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 0.95rem;
    margin-top: 8px;
}

/* Submit states */
.btn-loading, .btn-success { display: none; align-items: center; gap: 8px; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: inline-flex; }
.btn-submit.success { background: #27ae60; }
.btn-submit.success .btn-text { display: none; }
.btn-submit.success .btn-success { display: inline-flex; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; }

.form-success {
    display: none;
    text-align: center;
    padding: 32px 16px;
}

.form-success.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.form-success .success-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.form-success h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ═══════════════ INFO CARDS GRID (Form page) ═══════════════ */
.info-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

/* ═══════════════ QUICK LINKS (Index) ═══════════════ */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    text-decoration: none;
}

.quick-link:hover {
    box-shadow: var(--shadow);
    border-color: var(--bordeaux);
    transform: translateY(-2px);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bordeaux-pale);
    border-radius: var(--radius);
    color: var(--bordeaux);
}

.quick-link h3 {
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.quick-link p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.quick-link .arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.quick-link:hover .arrow {
    color: var(--bordeaux);
    transform: translateX(3px);
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
    background: var(--bg-header-top);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-brand h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom a {
    color: rgba(255,255,255,0.4);
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--gold);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        background: var(--bg-header);
        padding: 80px 24px 24px;
        gap: 4px;
        transition: right var(--transition);
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    }

    .nav-menu.active {
        right: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .form-card {
        padding: 28px 20px;
    }

    .info-cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-ctas {
        flex-direction: column;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    .page-banner h1 {
        font-size: 1.5rem;
    }
}
