/* --- Estilos da Landing Page - FitTrack --- */

/* Reset e Configurações Globais */
:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --dark-blue: #2c3e50;
    --light-gray: #f8f9fa;
    --text-color: #5a6e83;
    --heading-color: #343a40;
    --white: #ffffff;
    --border-color: #eef2f6;
}

html {
    scroll-behavior: smooth;
}

body.landing-page-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
    padding-top: 70px; /* Espaço para o header fixo */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.landing-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: box-shadow 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid transparent;
}

/* ==========================================
   AJUSTE HOVER DO BOTÃO SECUNDÁRIO (LOGIN)
   ========================================== */

.btn.btn-secondary:hover,
.btn.btn-secondary:focus-visible {
    color: #ffffff;
}

/* Regra com maior especificidade caso o header esteja forçando outra cor */
.landing-header .btn.btn-secondary:hover,
.landing-header .btn.btn-secondary:focus-visible {
    color: #ffffff;
}

.landing-header.scrolled {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid var(--border-color);
}

.landing-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav {
    display: flex; /* Adicionado para garantir o layout em desktop */
    align-items: center;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.main-nav a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.main-nav a:hover:not(.btn)::after {
    width: 100%;
}
.main-nav a:hover {
    color: var(--primary-color);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Seção Hero */
.hero {
    background: var(--light-gray);
    text-align: center;
    padding: 120px 0;
    border-bottom: 1px solid var(--border-color);
}
.hero h1 { font-size: 3.5rem; color: var(--heading-color); margin-bottom: 20px; line-height: 1.2; font-weight: 800; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 40px auto; }

/* Seções Gerais */
.features-section, .levels-section { padding: 100px 0; text-align: center; }
.levels-section { background-color: var(--light-gray); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
h2 { font-size: 2.8rem; margin-bottom: 20px; color: var(--heading-color); font-weight: 700; }
.section-subtitle { max-width: 650px; margin: 0 auto 60px auto; font-size: 1.1rem; }

/* Grid de Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; }
.feature-card { background: var(--white); padding: 40px; border-radius: 12px; border: 1px solid var(--border-color); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(44, 62, 80, 0.1); }
.feature-card i { width: 48px; height: 48px; color: var(--primary-color); margin-bottom: 25px; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--heading-color); }

/* Grid de Níveis */
.levels-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.level-card { background: var(--white); padding: 30px; border-radius: 10px; border: 1px solid var(--border-color); border-top: 4px solid var(--primary-color); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.level-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(44, 62, 80, 0.08); }
.level-card h3 { font-size: 1.4rem; color: var(--dark-blue); margin-bottom: 5px; }
.level-card .level-range { font-size: 0.9rem; font-weight: 600; color: var(--primary-color); margin-bottom: 15px; display: block; }

/* Seção CTA */
.cta-section { background-color: var(--dark-blue); color: var(--white); padding: 80px 0; text-align: center; }
.cta-section h2 { color: var(--white); }
.cta-section p { margin-bottom: 30px; opacity: 0.8; }

/* Rodapé */
.landing-footer { background-color: var(--dark-blue); color: rgba(255, 255, 255, 0.7); padding: 40px 0; text-align: center; }
.landing-footer .container { display: block; }
.copyright-text { margin: 0; font-size: 0.9rem; }
.dev-credit { margin-top: 15px; }
.dev-credit a { display: inline-flex; align-items: center; color: inherit; text-decoration: none; transition: color 0.3s ease; font-size: 0.9rem; }
.dev-credit a:hover { color: var(--white); }
.dev-logo { height: 22px; width: auto; margin: 0 8px; position: relative; top: -1px; }

/* --- Estilos para Animações com JavaScript --- */

@keyframes click-feedback { 0% { transform: scale(1); } 50% { transform: scale(0.95); box-shadow: 0 0 20px rgba(52, 152, 219, 0.5); } 100% { transform: scale(1); } }
.btn.is-clicked { animation: click-feedback 0.4s ease-out; }
.fade-in-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.levels-grid .level-card { transition-delay: calc(0.05s * var(--card-index, 1)); }

/* --- Estilos para o Menu Mobile --- */

.hamburger-btn { display: none; background: transparent; border: none; cursor: pointer; padding: 10px; z-index: 1001; position: relative; width: 40px; height: 40px; }
.hamburger-btn span { display: block; width: 24px; height: 3px; background-color: var(--dark-blue); margin: 5px 0; border-radius: 3px; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); }
.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 998; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }

/* Responsividade para telas médias */
@media (max-width: 992px) {
    .features-grid { grid-template-columns: 1fr; }
}

/* Responsividade para telas pequenas (Mobile) */
@media (max-width: 768px) {
    .landing-page-body { padding-top: 60px; }
    .hero h1 { font-size: 2.5rem; }
    h2 { font-size: 2.2rem; }
    .landing-footer .container { flex-direction: column; gap: 10px; }

    /* AQUI ESTÁ A CORREÇÃO PRINCIPAL */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        padding-top: 60px;
        /* O antigo 'display: none;' foi REMOVIDO daqui para permitir que o menu lateral funcione */
    }

    .main-nav a { margin-left: 0; font-size: 1.2rem; padding: 10px 20px; }
    .main-nav a:not(.btn)::after { bottom: 0; }
    .hamburger-btn { display: block; }

    /* ESTADO ATIVO DO MENU (controlado por JS) */
    body.menu-open { overflow: hidden; }
    body.menu-open .main-nav { transform: translateX(0); }
    body.menu-open .menu-overlay { opacity: 1; visibility: visible; }

    /* Animação do Hambúrguer para X */
    body.menu-open .hamburger-btn span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    body.menu-open .hamburger-btn span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
    body.menu-open .hamburger-btn span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
}