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

:root {
    --primary-color: #111111;
    --secondary-color: #444444;
    --accent-color: #e0e0e0;
    --background-color: #fcfcfc;
    --card-background: #ffffff;
    --text-color: #1a1a1a;
    --text-light: #555555;
    --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-dark: 0 15px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* ---------- BASE STYLES ---------- */
body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ---------- HEADER ---------- */
header {
    position: relative;
    text-align: left;
    color: white;
    height: 854px;
    overflow: hidden;
}

header video {
    width: 100%;
    height: auto;
}

header iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.header-text {
    position: absolute;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    font-size: 4em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: pre-line;
}

.header-subtext {
    display: inline-block;
    font-size: 1em;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #a3bffa;
}

/* ---------- NAVIGATION ---------- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, opacity 0.3s;
    box-sizing: border-box;
}

nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav img {
    height: 150px;
    transition: height 0.3s;
}

nav.scrolled img {
    height: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 20px;
    margin-right: 40px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: 500;
    transition: color 0.3s, font-size 0.3s;
}

nav.scrolled ul li a {
    color: var(--text-color);
    font-size: 1em;
}

nav ul li a.active {
    color: var(--text-light);
}

nav ul li a:hover {
    opacity: 0.7;
}

nav.hidden {
    background-color: transparent;
    opacity: 0.5;
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 20px;
    margin-right: 40px;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px;
    transition: all 0.3s ease;
}

nav.scrolled .burger div {
    background-color: var(--text-color);
}

/* ---------- SECTION STYLES ---------- */
.modern-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(to bottom, #ffffff, #fcfcfc);
}

.section-title {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.section-title h2 {
    color: var(--primary-color);
    display: inline-block;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 15px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2em;
    color: var(--text-light);
    margin-bottom: 40px;
    font-weight: 400;
}

/* ---------- PROJECTS SECTION ---------- */
.projects, .contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 20px;
}

.projects h2, .contact-form h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.projects h2 {
    margin-top: 100px;
}

/* Project Categories */
.project-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category {
    padding: 8px 20px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-size: 0.9em;
    color: var(--text-light);
    font-weight: 500;
}

.category:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.category.active {
    background-color: var(--primary-color);
    color: white;
}

/* Project Container */
.projects-container {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    overflow: visible;
}

/* Projects Slider */
.projects {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    min-height: 500px;
}

/* Individual Project Card */
.project {
    flex: 0 0 calc(33.333% - 24px);
    width: calc(33.333% - 24px);
    height: 450px;
    min-width: 0;
    max-width: 350px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.project.filtered-out {
    display: none;
}

/* Project Image and Overlay */
.project-image {
    height: 60%;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project:hover .project-overlay {
    opacity: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.project-tags span {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.project-content {
    padding: 20px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
}

.project-content p {
    margin: 0 0 15px;
    font-size: 0.9em;
    color: var(--text-light);
    line-height: 1.5;
    flex-grow: 1;
}

/* Project Navigation */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% - 10px);
    pointer-events: none;
    padding: 0;
    left: 5px;
    z-index: 10;
}

.nav-button {
    background-color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    margin: 0 10px;
}

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

.project-indicators {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
    width: 14px;
    height: 14px;
}

.see-more-button {
    align-self: flex-start;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
    border: none;
}

.see-more-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ---------- METHODOLOGY SECTION (Garante Lado-a-Lado) ---------- */
.team {
    display: flex;
    flex-direction: row;       /* Força a direção em linha */
    flex-wrap: nowrap;         /* Impede que empilhem um em baixo do outro */
    justify-content: center;
    align-items: stretch;      /* Faz com que todos os cartões tenham a mesma altura */
    gap: 30px; 
    max-width: 1200px;
    width: 100%;
    margin: 40px auto 0;
    padding: 20px;
    box-sizing: border-box;
}

.member {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-medium);
    flex: 1 1 0;               /* Divide o espaço exato em 3 partes iguais */
    min-width: 0;              /* Evita overflow que quebre o flexbox */
    margin: 0; 
    box-sizing: border-box;
}

.member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-dark);
}

.member h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* ---------- CONTACT SECTION ---------- */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.contact-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    margin: 0 auto 40px;
    max-width: 1200px;
    width: 90%;
    box-sizing: border-box;
}

.contact-form, .contact-info {
    flex: 1;
    margin: 10px;
}

.contact-form {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: none;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.2);
    outline: none;
}

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

.submit-btn {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 1em;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
    display: block;
    margin: 0 auto;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px; 
}

.info-text {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-text h3 {
    margin: 0 0 15px;
    font-size: 1.8em;
    color: var(--primary-color);
}

.info-text p {
    margin: 8px auto;
    font-size: 1.1em;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-icon::before { content: "📍"; margin-right: 8px; }
.email-icon::before { content: "✉️"; margin-right: 8px; }

.social-links, .reclamacoes-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    width: 100%;
}

.info-image {
    flex: 1;
    width: 100%;
    height: 300px;
    min-height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

#map {
    width: 100%;
    height: 300px;
    min-height: 300px;
    border-radius: var(--border-radius);
    position: relative;
    z-index: 1;
}

.reclamacoes-img {
    width: 70%;
    height: auto;
    transition: transform var(--transition-speed);
}

.reclamacoes-img:hover {
    transform: scale(1.05);
}

.validation-message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
}

.validation-message.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.validation-message.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

/* ---------- ANIMATIONS & EFFECTS ---------- */
.circle-background {
    width: 400px;
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 75px;
    margin-bottom: 75px;
}

.animated-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite, rainbowFade 10s ease infinite, fadeOut 10s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

.circle-text {
    position: absolute;
    font-size: 10em;
    color: white;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    font-weight: 100;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.circle-text:nth-child(1) { animation: rotateClockwise1 5s infinite; }
.circle-text:nth-child(2) { animation: rotateCounterClockwise1 5s infinite; }
.circle-text:nth-child(3) { animation: rotateClockwise2 5s infinite; }
.circle-text:nth-child(4) { animation: rotateCounterClockwise2 5s infinite; }
.circle-text:nth-child(5) { animation: rotateClockwise3 5s infinite; }
.circle-text:nth-child(6) { animation: rotateCounterClockwise3 5s infinite; }

@keyframes gradientAnimation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes rainbowFade { 0% { background-color: red; } 14% { background-color: orange; } 28% { background-color: yellow; } 42% { background-color: green; } 57% { background-color: blue; } 71% { background-color: indigo; } 85% { background-color: violet; } 100% { background-color: red; } }
@keyframes fadeOut { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes rotateClockwise1 { 0% { transform: rotate(0deg); } 50% { transform: rotate(360deg); } 100% { transform: rotate(0deg); } }
@keyframes rotateCounterClockwise1 { 0% { transform: rotate(45deg); } 50% { transform: rotate(-315deg); } 100% { transform: rotate(45deg); } }
@keyframes rotateClockwise2 { 0% { transform: rotate(90deg); } 50% { transform: rotate(450deg); } 100% { transform: rotate(90deg); } }
@keyframes rotateCounterClockwise2 { 0% { transform: rotate(135deg); } 50% { transform: rotate(-225deg); } 100% { transform: rotate(135deg); } }

/* ---------- BACK TO TOP BUTTON ---------- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#back-to-top::before {
    content: '↑';
    font-size: 1.5em;
}

#back-to-top:hover::before {
    content: 'Back to Top';
    font-size: 0.8em;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
}

/* ---------- FOOTER ---------- */
footer {
    background-color: rgba(51, 51, 51, 0.9);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    position: relative;
}

footer p {
    margin: 0;
    color: rgba(222, 222, 222, 0.7);
}

/* ---------- MEDIA QUERIES ---------- */
@media (max-width: 1200px) {
    .project {
        flex: 0 0 calc(33.333% - 24px);
        width: calc(33.333% - 24px);
    }
    
    .projects-container {
        padding: 0 30px;
    }
}

@media (max-width: 1100px) {
    .project {
        flex: 0 0 calc(50% - 20px);
        width: calc(50% - 20px);
    }
}

@media (max-width: 992px) {
    .project {
        flex: 0 0 calc(50% - 20px);
        width: calc(50% - 20px);
    }
    
    .projects {
        justify-content: center;
        gap: 20px;
    }
    
    .projects-container {
        padding: 0 20px;
        padding-bottom: 20px;
    }
    
    .nav-button {
        width: 45px;
        height: 45px;
    }
    
    .navigation-buttons {
        position: relative;
        top: auto;
        transform: none;
        margin: 15px auto 0;
        width: 100%;
        max-width: 200px;
        left: 0;
    }
    
    /* Faz a Metodologia ganhar scroll horizontal suave em Tablets */
    .team {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }
    .member {
        flex: 0 0 calc(50% - 15px);
        scroll-snap-align: start;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: rgba(255, 255, 255, 0.95);
        align-items: flex-end;
    }

    nav ul.show {
        display: flex;
    }

    nav.scrolled ul li a {
        color: var(--text-color);
        font-size: 1.5em; 
    }

    .burger {
        display: flex;
    }

    /* Project Layout */
    .projects {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 20px;
        gap: 15px;
        min-height: 480px;
    }

    .project {
        flex: 0 0 calc(100% - 30px);
        width: calc(100% - 30px);
        min-width: 260px;
        max-width: 320px;
        margin: 0;
    }
    
    .projects-container {
        padding: 0 15px;
    }

    /* Methodology Layout Mobile (Scroll Horizontal) */
    .team {
        gap: 20px;
    }
    .member {
        flex: 0 0 calc(85% - 20px); 
        scroll-snap-align: center;
    }

    /* Project Components */
    .project-categories {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px 5px;
        white-space: nowrap;
        margin-bottom: 20px;
    }
    
    .category {
        flex: 0 0 auto;
        white-space: nowrap;
        margin: 0 5px;
        padding: 6px 15px;
    }
    
    .project-indicators {
        margin: 25px 0 10px;
        gap: 10px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .navigation-buttons {
        position: relative;
        top: auto;
        transform: none;
        margin: 15px auto 0;
        width: 100%;
        max-width: 200px;
    }
    
    .nav-button {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    /* Contact Section */
    .contact-card {
        flex-direction: column;
        width: 95%;
        padding: 20px;
    }

    .contact-info {
        flex-direction: column;
        width: 100%;
        margin: 30px 0 0;
    }

    .info-text {
        padding-right: 0;
        margin-bottom: 30px;
        width: 100%;
    }

    .submit-btn {
        width: 100%; 
    }

    #map {
        width: 100%;
        height: 250px;
        min-height: 250px;
    }
    
    .reclamacoes-img {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .header-text {
        font-size: 2.5em;
        left: 20px;
    }
    
    .section-title h2 {
        font-size: 2em;
    }
    
    .contact-card {
        padding: 15px;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 10px;
    }
    
    #map {
        height: 200px;
        min-height: 200px;
    }

    .project {
        flex: 0 0 calc(100% - 20px);
        width: calc(100% - 20px);
        min-width: 250px;
        max-width: 300px;
        margin: 0;
        height: 420px;
    }
    
    .projects-container {
        padding: 0 10px;
    }
    
    .project-image {
        height: 55%;
    }
    
    .project-content {
        height: 45%;
        padding: 15px;
    }
    
    .see-more-button {
        padding: 8px 20px;
        font-size: 0.85em;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }
    
    .project-indicators {
        margin-top: 20px;
        gap: 8px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}