:root {
    /* Color Palette */
    --color-primary: #4a6fa1; /* Azul Base */
    --color-primary-light: #6e8dbf;
    --color-secondary: #7ca2d6; /* Azul Claro */
    --color-secondary-hover: #98b9e6;
    --color-dark: #1e293b; /* Slate Dark */
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-bg: #f8fafc; /* Slate Light */
    --color-bg-alt: #f1f5f9;
    --color-white: #ffffff;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-accent: linear-gradient(135deg, #4a6fa1 0%, #7ca2d6 100%);
    --gradient-glass: rgba(255, 255, 255, 0.7);
    --gradient-glass-border: rgba(255, 255, 255, 0.3);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows (Premium feel) */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(74, 111, 161, 0.2);
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    position: relative;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    /* Smooth scroll implementation for the entire body */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    line-height: 1.2;
    font-weight: 700;
}

.email-wrap {
    word-break: break-all;
    max-width: 100%;
    display: inline-block;
}




a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Premium Background Effects */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 111, 161, 0.05) 0%, rgba(247, 250, 252, 0) 70%);
    top: -200px;
    left: -200px;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    animation: drift 15s infinite alternate ease-in-out;
    will-change: transform;
}

.bg-glow-secondary {
    background: radial-gradient(circle, rgba(124, 162, 214, 0.05) 0%, rgba(247, 250, 252, 0) 70%);
    bottom: -200px;
    right: -200px;
    top: auto;
    left: auto;
    animation: drift 20s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* Custom Cursor */
body, a, button, input, textarea, .nav-link, i, .speaker-card, .mobile-toggle {
    cursor: none !important;
}

@media (max-width: 768px) {
    body, a, button, input, textarea, .nav-link, i, .speaker-card, .mobile-toggle {
        cursor: auto !important; /* Restore default for touch context */
    }
}


.blood-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 17px;
    height: 17px;
    background: radial-gradient(circle at 30% 30%, #E73A5A, #C41E3A);
    border-radius: 0 50% 50% 50%; /* Faz o topo-esquerdo ser bico - Aponta como rato */
    pointer-events: none;
    z-index: 9999;
    box-shadow: 2px 2px 5px rgba(196, 30, 58, 0.4);
    will-change: transform;
    transition: width 0.2s, height 0.2s, background 0.2s;
}

.blood-cursor.cursor-hover {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 30% 30%, #FF6B6B, #E73A5A);
    box-shadow: 3px 3px 15px rgba(231, 58, 90, 0.6);
}

.blood-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background-color: #C41E3A;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
    mix-blend-mode: multiply;
}

/* Dripping Logic */
.blood-drip {
    position: fixed;
    width: 4px;
    height: 10px;
    background: #C41E3A;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    animation: dropFall 0.7s ease-in forwards;
}

@keyframes dropFall {
    0% { transform: scaleY(0); opacity: 0; margin-top: 0; }
    10% { transform: scaleY(1); opacity: 1; margin-top: 5px; }
    100% { transform: scaleY(1.3); opacity: 1; margin-top: 150px; }
}

.blood-splash {
    position: fixed;
    width: 8px; /* Increased from 4px */
    height: 8px; /* Increased from 4px */
    background: #E73A5A; /* More vibrant red */
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001; /* Above the stains */
    opacity: 0;
}

@keyframes splashP1 {
    0% { transform: translate(0, 0) scale(1.5); opacity: 1; }
    100% { transform: translate(-15px, -20px) scale(0); opacity: 0; }
}
@keyframes splashP2 {
    0% { transform: translate(0, 0) scale(1.5); opacity: 1; }
    100% { transform: translate(15px, -15px) scale(0); opacity: 0; }
}
@keyframes splashP3 {
    0% { transform: translate(0, 0) scale(1.5); opacity: 1; }
    100% { transform: translate(5px, -25px) scale(0); opacity: 0; }
}

/* Blood Stain remaining on ground */
.blood-stain {
    position: fixed;
    width: 45px; /* Increased from 25px */
    height: 35px; /* Increased from 18px */
    background: radial-gradient(circle, #C41E3A 20%, rgba(196, 30, 58, 0.9) 60%, transparent 100%);
    border-radius: 50% 40% 60% 50%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 2s ease-out, transform 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.blood-stain.show {
    opacity: 0.4; /* Lowered to ensure total opacity doesn't overwhelm the text */
}

.blood-stain.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1) !important;
}
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* Navigation System with Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--gradient-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gradient-glass-border);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.brand-svg {
    height: 64px;
    width: auto;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #4a6fa1;
    font-size: 1.1rem;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #4a6fa1;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark);
    cursor: pointer;
}

/* Main Layout */
main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Footer */
.footer {
    background-color: #5579a3; /* Muted primary blue */
    color: var(--color-white);
    padding: 2rem 0;
    text-align: center;
}

.footer-compact {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 900px;
    gap: 2rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
}

.social-circle {
    width: 36px;
    height: 36px;
    background-color: var(--color-white);
    color: #5579a3;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.social-circle:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: var(--color-primary);
}

.email-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.email-text {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.9;
    word-break: break-all; /* Prevent overflow on small screens */
    display: inline-block;
    max-width: 100%;
}

.email-text:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 900px;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
}

.footer-legal a {
    color: var(--color-white);
    text-decoration: none;
    opacity: 0.7;
}

.footer-legal a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copy {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-top-row, .footer-bottom-row {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .apoio-small-card .logo-display-group {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Responsive Layout */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 1rem; /* Even smaller padding */
        width: 100%;
        box-sizing: border-box;
    }

    .container {
        padding: 0 0.8rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Prevent app-root from creating scroll context */
    #app-root {
        width: 100%;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* Smaller gap */
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-socials {
        justify-content: center;
    }
}

@media (max-width: 1100px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--color-white);
        flex-direction: column;
        padding: 2rem 0;
        gap: 1.5rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-fast);
        display: flex;
        justify-content: flex-start;
        align-items: center; /* keep them centered horizontally */
    }
    
    .nav-links.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-toggle {
        display: block;
    }

    /* Fixed brand scaling for mobile & tablet */
    .brand-svg {
        height: 48px;
    }
    .brand-title {
        font-size: 1rem;
    }
    .brand-subtitle {
        font-size: 0.7rem;
    }

    @media (max-width: 360px) {
        .brand-title {
            font-size: 0.9rem;
        }
        .brand-subtitle {
            font-size: 0.65rem;
        }
    }
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    gap: 0.5rem;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255,255,255,0.2);
    transition: all var(--transition-medium);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn i {
    transition: transform var(--transition-fast);
}

.btn:hover i {
    transform: translateX(4px);
}

.btn-primary {
    background: rgba(74, 111, 161, 0.85); /* Primary Blue Glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(74, 111, 161, 0.2);
    transition: all var(--transition-medium);
}

.btn-primary:hover {
    background: rgba(74, 111, 161, 1);
    box-shadow: 0 10px 20px -10px var(--color-primary), var(--shadow-glow);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.45) !important; /* Elegant Transparency */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--color-dark);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px) scale(1.02);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 4px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    max-width: 600px;
    margin: -3rem auto 4rem auto;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 2rem; /* Reduced default padding */
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 100%; /* Ensure it never exceeds parent */
}

@media (max-width: 768px) {
    .card {
        padding: 1.25rem; /* Even smaller on mobile */
    }
}

@media (max-width: 380px) {
    .card {
        padding: 1rem;
    }
}

.card:hover, .card.is-focused {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(74, 111, 161, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--color-bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
}

.card:hover .card-icon, .card.is-focused .card-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--color-primary);
    color: var(--color-white);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.card-text {
    color: var(--color-text-light);
    flex-grow: 1;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-heading);
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-primary {
    background-color: rgba(74, 111, 161, 0.1);
    color: var(--color-primary);
}

.badge-secondary {
    background-color: rgba(124, 162, 214, 0.2);
    color: #B59700;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 1rem 1.5rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-popup.hidden {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    pointer-events: none;
}

.cookie-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0 !important;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--color-text);
    margin: 0;
    line-height: 1.4;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    white-space: nowrap;
}

.cookie-link {
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.cookie-link:hover {
    border-color: var(--color-primary);
}

.btn-sm {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .cookie-popup {
        bottom: 16px;
        padding: 1.25rem;
    }
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .cookie-actions {
        width: 100%;
        justify-content: space-between;
    }
}
/* ==============================
   HOME PAGE
============================== */
.hero-section {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .hero-section {
        align-items: flex-start;
        padding-top: 5rem; /* Reduced to bring everything up */
    }
}

/* Castle-specific styles */
.castle-abrantes-wrapper {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    max-width: 800px;
    z-index: 1;
    pointer-events: auto; /* Changed from none to allow mouse interactions */
    opacity: 0.75;
    filter: drop-shadow(0 0 30px rgba(124, 162, 214, 0.2));
}

@media (max-width: 768px) {
    .castle-abrantes-wrapper {
        width: 85%;
        top: 50%;
    }
}

#castle-svg-new {
    width: 100%;
    height: auto;
    display: block;
}

#castle-svg-new path {
    fill: none !important;
    stroke: #4a6fa1 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

/* Lights style override - Higher specificity to win over the global path rule */
#castle-svg-new #castle-lights-layer path {
    fill: #ffd017 !important;
    stroke: none !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

#castle-lights-layer.lights-active {
    visibility: visible !important;
}

#castle-svg-new .st1, #castle-svg-new .st0 {
    stroke-width: 1.2px !important; /* Slightly increased for better visibility */
}

@keyframes drawStroke {
    from { opacity: 1; }
    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}


.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    z-index: 10;
}

.hero-badge {
    margin-bottom: 2rem;
    animation: slideDown 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: #4a6fa1;
}

.title-yellow {
    color: #ffd017;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #7ca2d6 0%, #a5c4f0 50%, #7ca2d6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 8rem; /* Further reduced to ensure zero-scroll on desktop */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Event Info */
.hero-event-footer {
    text-align: center;
    margin-top: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-event-inner {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-loc-text {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    font-family: var(--font-heading);
    line-height: 1;
}

.hero-sep-bullet {
    color: var(--color-text-light);
    font-size: 1.5rem;
    font-weight: 400;
    font-family: var(--font-body);
}

.hero-date-text {
    color: #4a6fa1;
    font-weight: 500;
    font-size: 1.2rem;
    font-family: var(--font-body);
}

@media (max-width: 768px) {
    .hero-loc-text {
        font-size: 1.0rem;
        letter-spacing: -0.5px;
    }
    .hero-date-text {
        font-size: 1.0rem;
    }
    .hero-sep-bullet {
        font-size: 1.0rem;
    }
    .hero-event-footer {
        margin-top: 10px;
    }
    .hero-event-inner {
        gap: 6px;
    }
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem; /* Keep buttons near the bottom edge */
}

.hero-cta .btn {
    padding: 0.8rem 1.8rem; /* Unified smaller size */
    font-size: 0.95rem;
}

.hero-cta .btn-secondary {
    border: none; /* Removed border as requested */
    background: rgba(0, 0, 0, 0.05); /* Minimalist style */
    color: var(--color-dark);
}

.hero-cta .btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.1);
}




.mission-section {
    background-color: var(--color-white);
}

.apoios-container {
    max-width: 1100px;
    margin: 0 auto;
}

.apoio-card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 3rem; /* Narrower vertically */
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all var(--transition-medium);
}

.apoio-card:hover, .apoio-card.is-focused {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(74, 111, 161, 0.1);
}

.apoio-card-title {
    text-align: center;
    color: #4a6fa1;
    font-family: var(--font-heading);
    font-size: 1.5rem; /* Slightly smaller for elegance */
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.apoio-card-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.apoios-sub-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .apoios-sub-grid {
        grid-template-columns: 1fr;
    }
}

.logo-display-group {
    display: flex;
    justify-content: space-around;
    align-items: stretch; /* Change from center to allow margin-top: auto */
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.logo-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    flex: 1;
    min-width: 140px;
    transition: all 0.3s ease;
    padding-bottom: 0.5rem;
}

.logo-wrapper {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1.5rem;
}

.logo-entry img {
    max-height: 60px; /* More compact */
    max-width: 100%;
    object-fit: contain;
    filter: none; /* No more grayscale */
    opacity: 0.95;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-entry:hover img, .logo-entry.is-focused img {
    opacity: 1;
    transform: scale(1.1);
    filter: none;
}

.logo-rank {
    font-size: 0.7rem;
    font-weight: 700;
    color: #7ca2d6;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: auto; /* Alignment to bottom */
}

.apoio-small-card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 1.2rem 2.5rem; /* Narrower vertically */
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all var(--transition-medium);
}

.apoio-small-card:hover, .apoio-small-card.is-focused {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(74, 111, 161, 0.1);
}

.apoio-small-title {
    text-align: center;
    color: #4a6fa1;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Specific Logo Balance */
.logo-stago { max-height: 80px !important; }
.logo-sobi { max-height: 30px !important; }
.logo-roche { max-height: 40px !important; }
.logo-octapharma { max-height: 45px !important; }
.logo-apih { max-height: 70px !important; }

@media (max-width: 768px) {
    .logo-apih {
        max-height: 45px !important; /* ~35% smaller for better fit */
    }
    
    .logo-sobi {
        max-height: 28px !important; /* ~25% smaller than the desktop's 38px */
    }

    .logo-uls-mt {
        max-height: 30px !important; /* 50% smaller than the 60px base for mobile */
    }
    
    .logo-stago {
        max-height: 65px !important; /* Stago remains dominant */
    }
}


/* ==============================
   PROGRAMA (TIMELINE)
============================== */
.timeline {
    position: relative;
    max-width: 950px; /* Increased from 800px for more horizontal space */
    margin: 4rem auto 0 auto;
}

.typewriter-container {
    display: block;
    width: 100%;
    text-align: center;
    min-height: 1.6em;
    color: #ffd017 !important;
    font-weight: 700;
    font-size: 2.2rem; /* Larger font size */
    margin: -2rem auto 4rem auto;
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: #ffd017;
    margin-left: 5px;
    animation: blinkCursor 0.7s infinite;
    vertical-align: middle;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20%; /* Shifted from 50% to the left */
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--color-bg-alt);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 4rem;
    position: relative;
    width: 100%;
}

.timeline-time {
    width: 20%; /* Reduced from 45% */
    text-align: right;
    padding-right: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    position: relative;
}

.timeline-content {
    width: 80%; /* Increased from 45% for more text room */
    padding-left: 3rem;
    text-align: left;
    transition: all var(--transition-medium);
}

.timeline-item:hover .timeline-content, .timeline-item.is-focused .timeline-content {
    transform: translateX(10px);
}

.timeline-dot {
    position: absolute;
    left: 20%; /* Follows the line at 20% */
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: var(--color-white);
    border: 4px solid var(--color-primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(74, 111, 161, 0.1);
    animation: timelinePulse 2s infinite ease-in-out;
}

@keyframes timelinePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 111, 161, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 111, 161, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 111, 161, 0);
    }
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.timeline-speaker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.timeline-speaker img, .placeholder-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--color-bg-alt);
}

/* ==============================
   COFFEE STEAM ANIMATION
============================== */
.coffee-steam-container {
    position: absolute;
    top: -8px;
    left: 4px;
    display: flex;
    gap: 2px;
}

.steam-line {
    width: 2px;
    height: 8px;
    background: var(--color-text-light);
    border-radius: 2px;
    animation: steamRising 2s infinite ease-in-out;
    opacity: 0;
}

.steam-line:nth-child(2) {
    animation-delay: 0.4s;
    height: 10px;
}

.steam-line:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes steamRising {
    0% {
        transform: translateY(2px) scaleX(1);
        opacity: 0;
    }
    30% {
        opacity: 0.3; /* Desired subtle transparency */
    }
    100% {
        transform: translateY(-12px) scaleX(1.5);
        opacity: 0;
    }
}
.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
}

/* ==============================
   COMISSÃO ORGANIZADORA
============================== */
.comissao-info {
    margin-top: 1.5rem;
    padding: 0 1rem;
    transition: transform var(--transition-medium);
}

.speaker-card:hover .comissao-info {
    transform: translateY(-5px);
}

.comissao-name {
    font-size: 1.25rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.comissao-role {
    font-size: 0.95rem;
    color: var(--color-primary);
    font-weight: 500;
}

.speakers-grid .speaker-img, .comissao-grid .speaker-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 15%;
}
.comissao-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.speakers-grid .speaker-card, .comissao-grid .speaker-card {
    background: var(--color-white);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.speakers-grid .speaker-card:hover, .comissao-grid .speaker-card:hover,
.speakers-grid .speaker-card.is-focused, .comissao-grid .speaker-card.is-focused {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.speakers-grid .speaker-card:hover .speaker-img-wrapper, .comissao-grid .speaker-card:hover .speaker-img-wrapper,
.speakers-grid .speaker-card.is-focused .speaker-img-wrapper, .comissao-grid .speaker-card.is-focused .speaker-img-wrapper {
    transform: scale(1.02);
    filter: none;
}

.speakers-grid .speaker-card:hover .comissao-info, .comissao-grid .speaker-card:hover .comissao-info,
.speakers-grid .speaker-card.is-focused .comissao-info, .comissao-grid .speaker-card.is-focused .comissao-info {
    transform: none;
}

@media (max-width: 768px) {
    .comissao-grid {
        grid-template-columns: 1fr;
    }
}

.speaker-card {
    text-align: center;
    background: transparent;
    border-radius: var(--border-radius-lg);
    padding: 0;
    box-shadow: none;
    transition: all var(--transition-medium);
    overflow: visible;
    position: relative;
    cursor: pointer;
    will-change: transform, opacity;
}

.speaker-card:hover {
    z-index: 10;
}

.speaker-img-wrapper {
    width: 100%;
    height: auto;
    margin: 0;
    position: relative;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-slow);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    will-change: transform, filter;
}

.speaker-card:hover .speaker-img-wrapper, .speaker-card.is-focused .speaker-img-wrapper {
    transform: translateY(-15px) scale(1.03);
    filter: brightness(1.1) drop-shadow(0 20px 30px rgba(74, 111, 161, 0.4)); /* Sombra azul escuro #4a6fa1 */
}

.speaker-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-medium);
}


/* ==============================
   CONTACTOS (FORM)
============================== */
.contact-wrapper {
    background: transparent;
    gap: 3rem;
}

.contact-info {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--color-white);
    transition: all var(--transition-medium);
}

.social-link-item i {
    font-size: 2rem; /* Ícones maiores */
    color: var(--color-white);
    transition: transform var(--transition-medium), color var(--transition-medium);
}

.social-link-item span {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.social-link-item:hover {
    transform: translateX(10px);
}

.social-link-item:hover i {
    transform: scale(1.2) rotate(-5deg);
    color: var(--color-secondary);
}

.social-link-item:hover span {
    opacity: 1;
}

/* ==============================
   INSCRIÇÃO (ANIMATIONS)
============================== */
.event-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all var(--transition-medium);
    padding: 0.5rem;
    border-radius: var(--border-radius-md);
}

.event-detail-item:hover {
    transform: translateX(10px);
}

.event-detail-item .info-icon-small {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-medium);
}

.event-detail-item:hover .info-icon-small {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    color: var(--color-secondary);
}

 .contact-form {
    background: var(--color-white);
    padding: 3.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(74, 111, 161, 0.1);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-dark);
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1.5px solid #edf2f7;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    background: #f8fafc;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(74, 111, 161, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 7rem;
        padding-bottom: 4rem;
        min-height: auto;
        align-items: flex-start;
    }

    .hero-title {
        font-size: 1.8rem; /* Smaller for mobile */
        margin-top: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 15rem;
        opacity: 0.9;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-top: -1.5rem;
        margin-bottom: 3rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
        padding: 0 1rem;
    }

    .hero-cta .btn {
        width: 100%;
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .typewriter-container {
        font-size: 1.25rem; /* Shrunk even more */
        margin-top: -1rem;
        padding: 0 10px;
    }

    /* Timeline Mobile Adjustments - Fixed Overlap & Scaling */
    .timeline::before {
        left: 15px; /* Moved further left */
        transform: none;
    }

    .timeline-dot {
        left: 15px;
        transform: translateX(-50%);
        width: 16px;
        height: 16px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 35px; /* Adjusted gap */
        margin-bottom: 2.5rem;
    }

    .timeline-time {
        width: auto;
        padding-right: 0;
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
        text-align: left;
        color: var(--color-primary);
        font-weight: 700;
    }

    .timeline-content {
        padding-left: 0;
        width: 100%;
    }

    .timeline-title {
        font-size: 1rem;
        line-height: 1.4;
    }

    .timeline-speaker {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }


    .comissao-grid, .speakers-grid {
        gap: 1.5rem;
    }

    .speaker-card {
        padding: 1rem;
    }

    /* Contacts Mobile Shrink */
    .contact-info {
        padding: 2rem 1.5rem !important;
    }

    .social-link-item {
        gap: 1rem;
    }

    .social-link-item i {
        font-size: 1.5rem;
    }

    .social-link-item span {
        font-size: 0.85rem;
    }

    .event-detail-item {
        gap: 1rem;
    }

    .event-detail-item .info-icon-small {
        width: 32px;
        height: 32px;
    }
}

/* Inscription page mobile override - force proper box sizing */
@media (max-width: 768px) {
    .grid-2 {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .grid-2 > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .grid-2 .card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }
}

/* Registration Page Specifics */
.registration-card {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.registration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.registration-column {
    background: rgba(255,255,255,0.1);
    padding: 2.5rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
}

.registration-column.accent {
    border-left: 5px solid white;
}

.registration-form {
    max-width: 100%;
    margin: 0 auto;
    padding: 3.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .registration-card {
        padding: 1.2rem;
    }

    .registration-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .registration-column {
        padding: 1.5rem;
    }

    .registration-column.accent {
        border-left: none;
        border-top: 3px solid white;
    }

    .registration-form {
        padding: 2.5rem 1.5rem;
    }
}

.hidden {
    display: none !important;
}

.form-group.hidden {
    display: none;
}

#registration-form {
    transition: all 0.4s ease;
}

.checkbox-option a {
    transition: opacity 0.3s;
}

.checkbox-option a:hover {
    opacity: 0.7;
}

/* Animations for form transitions */
.reveal-up {
    animation: revealUp 0.6s ease-out forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Select styling to match inputs */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a6fa1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

/* Responsive adjustments for the new form */
@media (max-width: 768px) {
    #inscricaoForm {
        padding: 2rem !important;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
/* Scroll Animations Classes (Triggered by JS Intersection Observer) */
.reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-zoom {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}

.reveal.is-visible {
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up {
    transform: translateY(40px);
}
.reveal-up.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left {
    transform: translateX(-40px);
}
.reveal-left.is-visible {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right {
    transform: translateX(40px);
}
.reveal-right.is-visible {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-zoom {
    transform: scale(0.95);
}
.reveal-zoom.is-visible {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

/* Staggered Children Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }


/* Keyframes for Continuous elements */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Page Transition Effects for Router */
.page-transition {
    animation: fadeIn 0.4s ease-in-out;
}

.is-exiting {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* ==============================
   SITE LOADER (Logo Drawing)
============================== */
#site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #5579a3; /* Restored footer blue */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1), visibility 1.5s;
    gap: 1.5rem;
}

#site-loader.loader-hidden {
    transform: translateX(-100%); /* Slides out to the left */
    visibility: hidden;
}

#loader-text {
    font-family: var(--font-heading);
    /* Increased by 20% (approx 3vw instead of 2.5vw, max 50px instead of 42px) */
    font-size: clamp(1.2rem, 3vw, 50px); 
    line-height: 1.2;
    color: var(--color-white); /* Restored white */
    font-weight: 300; /* Thinner and more elegant */
    letter-spacing: 1px; /* Added spacing for elegance */
    text-align: center;
    width: 50%; /* Matches logo width */
    max-width: 800px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#loader-text.text-visible {
    opacity: 1;
    transform: translateY(0);
}

#loader-svg {
    width: 50%;
    max-width: 800px;
    height: auto;
    display: block;
}

.loader-path {
    fill: none;
    stroke: var(--color-white); /* Restored white */
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 8px;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: desenharSincronizado 4s ease-in-out forwards;
}

@media (max-width: 768px) {
    #loader-svg {
        width: 85%;
    }
    #loader-text {
        width: 85%;
        font-size: clamp(0.9rem, 4.5vw, 1.6rem);
    }
    .loader-path {
        stroke-width: 12px;
    }
}

@keyframes desenharSincronizado {
    from {
        stroke-dashoffset: 1;
    }
    to {
        stroke-dashoffset: 0;
    }
}
