/* --- CSS Variables & Reset --- */
:root {
    --bg-dark: #083138;
    --bg-darker: #041c20;
    --bg-light: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-light: #ffffff;
    --text-light-muted: #a1a1a6;
    --accent: #2c2c2c;
    /* Dark gray for contrast */
    --accent-hover: #4a4a4a;
    --border-color: #e5e5ea;
    --border-dark: #333336;
    --font-main: 'DM Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Links Reset --- */
a {
    color: inherit;
    text-decoration: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* --- Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
}

.text-white {
    color: var(--text-light);
}

.text-white p {
    color: var(--text-light-muted);
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.text-center {
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--bg-dark);
    color: var(--text-light);
    border: 2px solid var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.btn-outline:hover {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    /* Ajuste a altura conforme necessário */
    width: auto;
    transition: var(--transition);
}

.navbar:not(.scrolled) .logo img {
    filter: brightness(0) invert(1);
    /* Deixa branco no hero escuro */
}

.logo img:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    text-decoration: none;
    color: var(--bg-dark);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
}

.navbar:not(.scrolled) .nav-links a:not(.btn) {
    color: var(--text-light);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--bg-dark);
    transition: var(--transition);
}

.navbar:not(.scrolled) .nav-links a:not(.btn)::after {
    background-color: var(--text-light);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--bg-dark);
}

.navbar:not(.scrolled) .hamburger {
    color: var(--text-light);
}

.navbar:not(.scrolled) .btn-outline {
    color: var(--text-light);
    border-color: var(--text-light);
}

.navbar:not(.scrolled) .btn-outline:hover {
    background-color: var(--text-light);
    color: var(--bg-dark);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Fix for iOS Safari address bar */
    display: flex;
    align-items: center;
    position: relative;
    background-image: url('assets/b659900d-ddca-45d8-907f-cbdf41cbe5bc.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1140px;
    width: 100%;
    color: var(--text-light);
}

.hero-content h1 {
    color: var(--text-light);
}

.hero-content p {
    color: var(--text-light-muted);
    font-size: 1.25rem;
}

.hero-content .subtext {
    font-size: 1rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
}

.hero-content .btn-primary {
    background-color: var(--text-light);
    color: var(--bg-dark);
    border-color: var(--text-light);
}

.hero-content .btn-primary:hover {
    background-color: transparent;
    color: var(--text-light);
}

/* --- About Section --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.highlight {
    color: var(--bg-dark);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    bottom: 4px;
    left: 0;
    background-color: rgba(10, 10, 10, 0.1);
    /* Marca-texto sutil */
    z-index: -1;
}

.about-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02);
}

/* --- Services Section --- */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.icon-square {
    width: 64px;
    height: 64px;
    background-color: var(--bg-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.icon-square i {
    font-size: 2rem;
    color: var(--bg-dark);
}

.service-card:hover .icon-square {
    background-color: var(--bg-dark);
}

.service-card:hover .icon-square i {
    color: var(--text-light);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Features Section --- */
.features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.features-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-light-muted);
}

.feature-list i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.sub-title-features {
    font-size: 1.5rem;
    border-top: 1px solid var(--border-dark);
    padding-top: 2rem;
}

.small-list li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* --- Public Section --- */
.public-text {
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.audience-card {
    background: #ffffff;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition);
}

.audience-card i {
    font-size: 2.5rem;
    color: var(--bg-dark);
}

.audience-card span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.audience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-color: var(--bg-dark);
}

/* --- Reasons Section --- */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.reason-card {
    background-color: #ffffff;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.reason-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.icon-circle {
    width: 72px;
    height: 72px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2rem;
    transition: var(--transition);
}

.reason-card:hover .icon-circle {
    transform: scale(1.1);
}

.reason-card h3 {
    font-size: 1.25rem;
    color: var(--bg-darker);
}

/* --- Mosaic Section --- */
.mosaic-gallery {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.mosaic-gallery .mosaic-item {
    height: 300px;
    overflow: hidden;
}

/* Row 1: 4 columns */
.mosaic-gallery .mosaic-item:nth-child(-n+4) {
    width: 25%;
}

/* Row 2: 5 columns */
.mosaic-gallery .mosaic-item:nth-child(n+5) {
    width: 20%;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* --- Footer --- */
.footer {
    background-color: var(--bg-darker);
    color: var(--text-light);
    padding: 80px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-dark);
}

.footer-cta h2 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-cta p {
    color: var(--text-light-muted);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-logo {
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
    /* Torna o logo branco para contrastar com fundo escuro, caso o logo original seja escuro */
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light-muted);
    margin-bottom: 0.5rem;
}

.contact-info i {
    font-size: 1.25rem;
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: var(--text-light-muted);
    font-size: 0.875rem;
}

/* --- Animations & Responsive --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {

    .about-container,
    .features-container,
    .footer-container {
        grid-template-columns: 1fr;
    }

    .features-image {
        order: -1;
    }

    .public-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .mobile-carousel {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1.5rem;
        gap: 1rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mosaic-gallery.mobile-carousel {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
        gap: 0;
    }

    .mosaic-gallery.mobile-carousel .mosaic-item {
        height: 250px;
    }

    .mobile-carousel::-webkit-scrollbar {
        display: none;
    }

    .hero {
        background-attachment: scroll; /* Fixes massive zoom bug on iOS Safari */
        align-items: flex-start;
        padding-top: 140px;
        padding-bottom: 60px;
    }

    .mobile-carousel > * {
        flex: 0 0 85% !important;
        width: 85% !important;
        max-width: 85% !important;
        flex-shrink: 0 !important; /* Safari flex squish bug fix */
        scroll-snap-align: center;
        margin-bottom: 0 !important; /* Avoid vertical margins pushing grid up */
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a:not(.btn) {
        font-size: 1.5rem;
    }

    .public-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}