/* Global Styles */
:root {
    --color-primary: #6c63ff; /* Purple accent */
    --color-secondary: #00bcd4; /* Cyan accent */
    --color-accent: #f9a03f; /* Orange accent for CTA */
    --color-bg: #0a192f; /* Primary dark background */
    --color-bg-light: #0b2540; /* Slightly lighter dark */
    --color-card: #0f2a45; /* Card background */
    --color-text: #f5f5f5; /* Light text */
    --color-muted: #b0b8c9; /* Muted text */
    --header-height: 72px;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(6px);
    transition: background 0.3s;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo img {
    height: 40px;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav li {
    position: relative;
}

.nav a {
    font-weight: 500;
    color: var(--color-text);
    transition: color 0.3s ease;
}

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

/* Destacar item de menu ativo nas páginas internas */
.nav a.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* Hamburger button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.nav-toggle .hamburger,
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
    position: relative;
}

.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle .hamburger::before {
    top: -8px;
}

.nav-toggle .hamburger::after {
    top: 8px;
}

/* Hamburger animation when open */
.nav-toggle.open .hamburger {
    transform: rotate(45deg);
}
.nav-toggle.open .hamburger::before {
    transform: rotate(90deg);
    top: 0;
}
.nav-toggle.open .hamburger::after {
    opacity: 0;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav ul {
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 200px;
        background: rgba(10, 25, 47, 0.95);
        padding: 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .nav.active ul {
        transform: translateX(0);
    }
    .nav-toggle {
        display: block;
    }
    .nav ul li + li {
        margin-top: 1rem;
    }
}

/* Carousel */
.carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.carousel .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    color: #fff;
    opacity: 0;
    animation: slideShow 14s infinite;
    background-size: cover;
    background-position: center;
}

.carousel .slide-1 {
    background-image: url('assets/slide1-bg.png');
    animation-delay: 0s;
}

.carousel .slide-2 {
    /* Segunda tela do carrossel utiliza uma imagem de fundo semelhante à primeira, reforçando a temática tecnológica */
    background-image: url('assets/slide2-bg.png');
    animation-delay: 7s;
}

.carousel .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.65);
}

.carousel .slide-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.carousel h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.carousel p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-secondary);
}

/* Hero interno utilizado nas páginas secundárias */
.hero-internal {
    position: relative;
    padding: 6rem 1rem;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
}
.hero-internal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.65);
    z-index: 0;
}
.hero-internal h1,
.hero-internal p {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/*
 * Spacing for section headings on internal pages (modelo-inovacao.html
 * e demanda-inovadora.html). Adiciona uma margem superior maior
 * para separar os títulos das seções dos cards da seção anterior.
 */
.container h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}
.container h2:first-of-type {
    margin-top: 2rem;
}

/* Especificar imagens de fundo para cada página */
.hero-modelo {
    background-image: url('assets/slide1-bg.png');
}
.hero-demanda {
    background-image: url('assets/slide2-bg.png');
}

/* Tabela de informação para páginas internas */
.info-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.info-table th,
.info-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-bg-light);
    text-align: left;
}
.info-table th {
    background-color: var(--color-primary);
    color: #fff;
}
.info-table tr:nth-child(even) {
    background-color: var(--color-bg-light);
}

@keyframes slideShow {
    0% { opacity: 1; }
    40% { opacity: 1; }
    50% { opacity: 0; }
    90% { opacity: 0; }
    100% { opacity: 1; }
}

/* Generic Section Styles */
.section {
    padding: 4rem 0;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Cards */
.cards {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background: var(--color-card);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

/* Custom card icons */
.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: block;
    object-fit: contain;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card p {
    font-size: 0.95rem;
    color: var(--color-muted);
}

/* Button for cards (startups and solutions) */
.card-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    transition: background 0.3s ease;
}

.card-btn:hover {
    background: var(--color-secondary);
}

/* Startups Grid */
.startup-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.startup-card {
    background: var(--color-card);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.3s;
    /* Permite que o botão fique alinhado na parte inferior independentemente da quantidade de texto */
    display: flex;
    flex-direction: column;
}

.startup-card img {
    height: 60px;
    margin: 0 auto 1rem;
    object-fit: contain;
}

.startup-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.startup-card p {
    font-size: 0.9rem;
    color: var(--color-muted);
    /* Ocupar o espaço vertical disponível para empurrar o botão para a base do card */
    flex-grow: 1;
}

.startup-card:hover {
    transform: translateY(-5px);
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.solution-card {
    background: var(--color-card);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.3s;
    /* Permite que o botão fique ancorado na parte inferior independentemente da quantidade de texto */
    display: flex;
    flex-direction: column;
}

.solution-card img {
    height: 50px;
    margin: 0 auto 1rem;
    object-fit: contain;
}

.solution-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.solution-card p {
    font-size: 0.9rem;
    color: var(--color-muted);
    /* Expande para ocupar espaço e empurrar o botão ao rodapé do card */
    flex-grow: 1;
}

.solution-card:hover {
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

/* Centraliza o texto introdutório do formulário de contato */
.section.contact p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--color-muted);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full {
    flex: 0 0 100%;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    background: var(--color-bg-light);
    color: var(--color-text);
}

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

.captcha-row {
    align-items: center;
    gap: 1rem;
}

.form-message {
    margin-top: 1rem;
    font-weight: 600;
}

.legal-links {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--color-muted);
}

.legal-links a {
    color: var(--color-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: var(--color-accent);
}

/* Footer */
.footer {
    background: #071423;
    padding: 3rem 0 1rem;
    color: var(--color-muted);
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: start;
    margin-bottom: 2rem;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.footer-contact h4,
.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.footer-contact p,
.footer-links ul li {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: var(--color-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* Responsive Typography */
@media (max-width: 768px) {
    .carousel h1 {
        font-size: 2rem;
    }
    .carousel p {
        font-size: 1rem;
    }
    .section h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   CARROSSEL - Estilos necessários
   ============================================ */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    pointer-events: none; /* Importante: impede cliques em slides ocultos */
}

.carousel .slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Permite cliques apenas no slide ativo */
    z-index: 1;
}

/* Opcional: Botões de navegação (adicione no HTML se quiser) */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: background 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Opcional: Indicadores (dots) */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicator.active {
    background: white;
}