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

:root {
    /* Color Palette - Premium HSL System */
    --h-primary: 135; /* Emerald/Forest base */
    --s-primary: 60%;
    --l-primary: 35%;
    
    --primary: hsl(var(--h-primary), var(--s-primary), var(--l-primary));
    --primary-light: hsl(var(--h-primary), var(--s-primary), 50%);
    --primary-dark: hsl(var(--h-primary), var(--s-primary), 20%);
    
    --h-secondary: 215; /* Royal Blue base */
    --s-secondary: 85%;
    --l-secondary: 35%;
    
    --secondary: hsl(var(--h-secondary), var(--s-secondary), var(--l-secondary));
    --secondary-light: hsl(var(--h-secondary), var(--s-secondary), 50%);
    --secondary-dark: hsl(var(--h-secondary), var(--s-secondary), 15%);
    
    --accent: #ff6f00;
    --accent-rgb: 255, 111, 0;

    /* Semantic Colors */
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-on-brand: #ffffff;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--primary), var(--primary-light));
    --grad-secondary: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    --grad-brand: linear-gradient(135deg, var(--primary), var(--secondary));
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));

    /* Effects */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -2px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -1px; }
h3 { font-size: 1.75rem; }

p { font-size: 1.1rem; color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 10px 20px -10px hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px -10px hsla(var(--h-primary), var(--s-primary), var(--l-primary), 0.7);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-up {
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

/* Sections */
section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.text-accent {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Background Blobs */
.bg-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(var(--h-primary), 50%, 50%, 0.1) 0%, transparent 70%);
    z-index: -1;
    filter: blur(60px);
}

/* Header Redesign */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

#main-header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.98);
}

.main-nav-container .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-base);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-primary);
    transition: var(--transition-base);
}

.main-nav a:hover::after, .main-nav li.active a::after {
    width: 100%;
}

.main-nav a:hover { color: var(--primary); }

/* Footer */
.main-footer {
    background: var(--secondary-dark);
    color: #fff;
    padding: 100px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.25rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a, .footer-col p {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-col a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

/* Accessibility & Utils */
#fixed-accessibility-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
}

#accessibility-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
}

.tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--surface-alt);
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(15deg) scale(1.1);
}

.high-contrast {
    filter: contrast(1.2) brightness(1.1);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    #main-header { width: 95%; }
}

/* --- ESTILOS PARA O MODAL (POPUP) --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--secondary-dark);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
    transition: var(--transition-base);
}
.modal-close-btn:hover {
    color: var(--accent);
}

.modal-body h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-body p, .modal-body li {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

.modal-body ul {
    list-style: disc;
    padding-left: 20px;
}

.modal-body a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.modal-body a:hover {
    text-decoration: none;
}

/* Accessibility Toolbar */
#fixed-accessibility-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1500;
}

#accessibility-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

.tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.tool-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* --- FLOATING WHATSAPP BUTTON --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff !important;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(18, 140, 126, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.whatsapp-float i {
    transition: transform 0.3s ease;
}

/* Pulse animation around the button */
.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(37, 211, 102, 0.4);
    border-radius: 50%;
    z-index: -1;
    animation: whatsapp-ripple 2s infinite;
}

@keyframes whatsapp-ripple {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Hover effects */
.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.6);
    background: linear-gradient(135deg, #20ba5a 0%, #0e7065 100%);
}

.whatsapp-float:hover i {
    transform: scale(1.1);
}

/* Tooltip/Pill text */
.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background-color: #1e293b; /* Sleek dark color consistent with modern theme */
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* Tooltip arrow */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1e293b;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 70px;
}

/* Responsiveness: Adjust position if it conflicts with accessibility panel on mobile */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
    
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on small mobile screens to prevent clutter */
    }
}
