/* Custom CSS for the new Ipê Theme */
:root {
    /* Light Mode (Default) */
    --bg-primary: #F9FAFB;
    --bg-secondary: #FFFFFF;
    --bg-accent: #E5E7EB;
    --bg-dark: #1F2937;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-on-dark: #FFFFFF;
    --ipe-yellow: #FFC700;
    --ipe-pink: #E573B4;
    --tech-blue: #0A74DA;
    --border-color: #D1D5DB;
}

html.dark {
    --bg-primary: #121826;
    --bg-secondary: #1F2937;
    --bg-accent: #374151;
    --bg-dark: #121826;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-on-dark: #FFFFFF;
    --border-color: #4B5563;
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

/* Preloader styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121826; /* Using a fixed color for preloader */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.75s ease;
    opacity: 1;
}
#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
.branch-container {
    position: relative;
    text-align: center;
}
#preloader-logo {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInLogo 1s forwards;
}
@keyframes fadeInLogo {
    to { opacity: 1; }
}
.branch {
    width: 300px;
    height: 2px;
    background-color: white;
    transform: scaleX(0);
    transform-origin: left;
    animation: growBranch 1s 0.5s forwards;
}
@keyframes growBranch {
    to { transform: scaleX(1); }
}
.leaf {
    position: absolute;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transform-origin: bottom center;
}
.leaf1 { top: -20px; left: 10%; animation: growAndFall 2s 1.5s forwards; }
.leaf2 { top: -20px; left: 30%; animation: growAndFall 2s 1.7s forwards; }
.leaf3 { top: -20px; left: 50%; animation: growAndFall 2s 1.9s forwards; }
.leaf4 { top: -20px; left: 70%; animation: growAndFall 2s 2.1s forwards; }
.leaf5 { top: -20px; left: 85%; animation: growAndFall 2s 2.3s forwards; }
.leaf6 { top: -20px; left: 25%; animation: growAndFall 2s 2.5s forwards; }
@keyframes growAndFall {
    0% { transform: scale(0); opacity: 0; }
    25% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5) translateY(150px) translateX(50px) rotate(360deg); opacity: 0; }
}

/* Dynamic components */
.bg-theme-primary { background-color: var(--bg-primary); }
.bg-theme-secondary { background-color: var(--bg-secondary); }
.bg-theme-accent { background-color: var(--bg-accent); }
.bg-theme-dark { background-color: var(--bg-dark); }
.text-theme-primary { color: var(--text-primary); }
.text-theme-secondary { color: var(--text-secondary); }
.text-theme-on-dark { color: var(--text-on-dark); }
.border-theme { border-color: var(--border-color); }

/* Header styles */
.header {
    transition: background-color 0.3s ease-in-out;
}
.header-scrolled {
    background-color: #121826;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.hero-gradient {
    background: linear-gradient(135deg, var(--tech-blue), #121826);
}

.animated-gradient-text {
    background: linear-gradient(to right, var(--ipe-yellow), #fff, var(--ipe-yellow));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-icon {
    transition: transform 0.4s ease-in-out;
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.reveal {
    position: relative;
    transform: translateY(100px);
    opacity: 0;
    transition: 1s all ease;
}
.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

.carousel-container {
    position: relative;
    overflow: hidden; /* Hide scrollbar visually but allow JS scroll */
    cursor: grab;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.carousel-container.active {
    cursor: grabbing;
}

.carousel-track {
    user-select: none; /* Prevent text selection while dragging */
}

.carousel-track img {
    transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
    filter: grayscale(100%);
    opacity: 0.6;
}

.carousel-container:hover .carousel-track img {
    filter: grayscale(0%);
    opacity: 1;
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#gestao-image {
    transition: opacity 0.5s ease-in-out;
}

.parallax-section {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDIwIDEyIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJjaXJjdWl0cyIgZmlsbD0iIzljOWM5YyI+PHBhdGggaWQ9InBhdGgtMSIgZD0iTTIwIDEySDBWMGgyMHYxMmAwek01LjUgMTAuNWMwIC4yNzYtLjIyNC41LS41LjVzLS41LS4yMjQtLjUtLjVWMjlzLjIyNC0uNS41LS41LjUuMjI0LjUuNXYxLjV6bTQgMGMwIC4yNzYtLjIyNC41LS41LjVzLS41LS4yMjQtLjUtLjVWMjlzLjIyNC0uNS41LS41LjUuMjI0LjUuNXYxLjV6bS04IDBjMCAuMjc2LS4yMjQuNS0uNS41cy0uNS0uMjI0LS41LS41VjZzLjIyNC0uNS41LS41LjUuMjI0LjUuNXY0LjV6bTggMGMwIC4yNzYtLjIyNC41LS41LjVzLS41LS4yMjQtLjUtLjVWMjhzLjIyNC0uNS41LS41LjUuMjI0LjUuNXYyLjV6bS00IDBjMCAuMjc2LS4yMjQuNS0uNS41cy0uNS0uMjI0LS41LS41VjhzLjIyNC0uNS41LS41LjUuMjI0LjUuNXYyLjV6bS00IDBjMCAuMjc2LS4yMjQuNS0uNS41cy0uNS0uMjI0LS41LS41VjRzLjIyNC0uNS41LS41LjUuMjI0LjUuNXY2LjV6bTggMGMwIC4yNzYtLjIyNC41LS41LjVzLS41LS4yMjQtLjUtLjVWMjhzLjIyNC0uNS41LS41LjUuMjI0LjUuNXYyLjV6bS00IDBjMCAuMjc2LS4yMjQuNS0uNS41cy0uNS0uMjI0LS41LS41VjVzLjIyNC0uNS41LS41LjUuMjI0LjUuNXY1LjV6bS00IDBjMCAuMjc2LS4yMjQuNS0uNS41cy0uNS0uMjI0LS41LS41VjJzLjIyNC0uNS41LS41LjUuMjI0LjUuNXY4LjV6Ii8+PC9nPjwvZz48L3N2Zz4=');
    background-attachment: fixed;
    background-position: center;
    background-repeat: repeat;
    position: relative;
}
.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 24, 38, 0.9);
}

#form-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-accent);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
#form-progress {
    width: 0%;
    height: 100%;
    background-color: var(--tech-blue);
    transition: width 0.4s ease-in-out;
}

.form-error {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    transition: transform 0.5s ease-in-out;
    transform: translateY(100%);
}
#cookie-banner.visible {
    transform: translateY(0);
}

/* Modal Styles */
#privacy-modal-overlay {
    transition: opacity 0.3s ease-in-out;
}
#privacy-modal-overlay.hidden {
    display: none;
}
#privacy-modal-overlay:not(.hidden) {
    display: flex;
}
#privacy-modal-content {
    animation: slideIn 0.4s ease-out;
}
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Prose styles for modal content */
.prose h3 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}
.prose h4 {
    color: var(--text-primary);
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
}
.prose p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}
.prose strong {
    color: var(--text-primary);
}

/* Toast Notification Styles */
#toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}