/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9f9f9;
    color: #555;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 45px;
    height: auto;
    margin-right: 0px;
}

.logo-estilo {
    line-height: 0.8;
}

.logo-estilo .linha1,
.logo-estilo .linha2 {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-estilo .linha1 {
    color: #2196f3;
}

.logo-estilo .linha2 {
    color: #2f3b43;
}

/* Header Navigation */
.header-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background-color: #fff;
    flex-direction: column;
    padding: 60px 20px 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
}

.header-nav.active {
    display: flex;
    right: 0;
}

.header-nav a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.header-nav a:hover {
    background-color: #f0f0f0;
    color: #2196f3;
}

.header-nav a.active {
    background-color: #2196f3;
    color: #fff;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.4s;
}

.close-menu {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 20px;
}

/* Loader */
#loader {
    padding: 50px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

#loader h2 {
    color: #0047ab;
}

/* Upload Container */
#upload-container {
    width: 100%;
    max-width: 900px; /* Adjust as needed */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area {
    border: 3px dashed #ccc;
    border-radius: 15px;
    padding: 50px;
    width: 100%;
    max-width: 600px;
    margin-top: 40px;
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out;
}

.privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eaf5ff;
    border: 1px solid #bde0ff;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    max-width: 600px;
    animation: fadeIn 0.8s ease-out 0.2s;
    animation-fill-mode: backwards;
}

.privacy-note .icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.privacy-note p {
    margin: 0;
    color: #0047ab;
    text-align: left;
    font-size: 0.9rem;
}

.ad-rectangle-center {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border: 1px solid #ddd;
    margin-top: 40px;
    animation: fadeIn 0.8s ease-out 0.4s;
    animation-fill-mode: backwards;
}

.upload-area.dragover {
    border-color: #2196f3;
    background-color: #f0f8ff;
}

.upload-area h2 {
    margin-top: 0;
    font-size: 2rem;
    color: #0047ab;
}

.upload-area p {
    font-size: 1.1rem;
    color: #666;
}

.upload-label {
    display: inline-block;
    padding: 12px 25px;
    background-color: #2196f3;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.info-section {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 900px;
    margin-top: 40px;
    gap: 30px;
    animation: fadeIn 0.8s ease-out 0.6s;
    animation-fill-mode: backwards;
}

.info-block {
    text-align: left;
    padding: 25px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex: 1;
}

.info-block h3 {
    margin-top: 0;
    color: #0047ab;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.info-block .icon {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #2196f3;
}

.tutorial p {
    margin-bottom: 15px;
}

.attention-note {
    margin-top: 20px;
    padding: 10px;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
}

.tutorial-container,
.contact-container,
.legal-container,
.blog-container {
    animation: fadeIn 0.8s ease-out;
}

/* Results Page */
#results-container {
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.8s ease-out;
}

.results-summary {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 30px;
}

.results-summary h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #555;
}

.results-summary .total-balance {
    font-size: 3.5rem;
    font-weight: bold;
    color: #0047ab;
    margin: 10px 0;
}

.contract-list {
    display: grid;
    gap: 20px;
}

.contract-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: left;
}

.contract-card p {
    margin: 8px 0;
    font-size: 1rem;
}

.contract-card p strong {
    color: #333;
}

.results-actions {
    text-align: center;
    margin-top: 40px;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #888;
    background-color: #fff;
    border-top: 1px solid #ddd;
    animation: fadeIn 0.8s ease-out 0.8s;
    animation-fill-mode: backwards;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #555;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

footer p {
    margin: 0;
    padding-bottom: 10px;
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2f3b43;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner p {
    margin: 0;
    margin-right: 20px;
}

.cookie-consent-banner a {
    color: #2196f3;
    text-decoration: underline;
}

.cookie-consent-button {
    background-color: #2196f3;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Theme Toggle Button */
.theme-toggle {
    margin-left: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #555;
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: #2196f3;
}

.main-title {
    font-size: 2.3rem;
    color: #2196f3;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.2;
}

/* Tablet and Desktop */
@media (min-width: 769px) {
    .header-nav {
        display: flex;
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        gap: 20px;
        margin-left: auto;
    }

    .header-nav a {
        padding: 10px 15px;
    }

    .menu-toggle,
    .close-menu,
    .overlay {
        display: none !important;
    }

    body.menu-open {
        overflow: auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    main {
        padding: 15px;
    }

    .upload-area {
        padding: 30px;
        margin-top: 20px;
    }

    .upload-area h2 {
        font-size: 1.8rem;
    }

    .info-section {
        flex-direction: column;
        gap: 20px;
        margin-top: 30px;
    }

    .info-block {
        padding: 20px;
    }

    .results-summary {
        padding: 20px;
    }

    .results-summary .total-balance {
        font-size: 2.8rem;
    }

    .cookie-consent-banner {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-banner p {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .logo-estilo .linha1,
    .logo-estilo .linha2 {
        font-size: 1.5rem;
    }

    .main-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .upload-area h2 {
        font-size: 1.5rem;
    }

    .upload-area p {
        font-size: 1rem;
    }

    .upload-label {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .privacy-note p {
        font-size: 0.8rem;
    }

    .info-block h3 {
        font-size: 1.2rem;
    }

    .results-summary h3 {
        font-size: 1.2rem;
    }

    .results-summary .total-balance {
        font-size: 2.2rem;
    }

    .contract-card p {
        font-size: 0.9rem;
    }

    footer {
        font-size: 0.8rem;
    }
}

.example-section {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
}
.example-section h2 {
    color: #0047ab;
    margin-bottom: 20px;
}
.example-section .results-summary {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto 30px auto;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.example-section .total-balance {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0047ab;
    margin: 10px 0;
}
.example-section .contract-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.example-section .contract-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: left;
    width: 100%;
    max-width: 350px;
}
.example-section .contract-card h4 {
    color: #2f3b43;
    margin-top: 0;
}

.example-section details {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 900px;
    margin: 0 auto;
}

.example-section summary {
    padding: 20px;
    cursor: pointer;
    outline: none;
    list-style: none; /* Remove default marker */
}

.example-section summary::-webkit-details-marker {
    display: none; /* Hide marker for Chrome/Safari */
}

.example-section summary h2 {
    display: inline;
    font-size: 1.5rem;
}

.example-section summary:after {
    content: '▼';
    float: right;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.example-section details[open] summary:after {
    transform: rotate(180deg);
}

.example-content {
    padding: 0 20px 20px;
}