/* Importa a fonte Roboto para a estética */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Reset básico */
* {
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* Body */
body {
    background: #FFFFFF; /* White background */
    color: #0E122B;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header (já estilizado em header.php) */
header {
    background-color: #0E122B;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem 1rem;
}

/* Header Content */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo */
.logo {
    border-radius: 50%;
    object-fit: cover;
    width: 120px;
    height: auto;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #F2F2F2;
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu-toggle:focus {
    outline: none;
    box-shadow: none;
}

.menu-toggle-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background: no-repeat center center;
    background-size: 100% 100%;
    background-image: linear-gradient(
        to bottom,
        #F2F2F2 0%, #F2F2F2 20%,
        transparent 20%, transparent 40%,
        #F2F2F2 40%, #F2F2F2 60%,
        transparent 60%, transparent 80%,
        #F2F2F2 80%, #F2F2F2 100%
    );
    transition: background-image 0.3s ease;
}

.menu-toggle.active .menu-toggle-icon {
    background-image: linear-gradient(
        45deg,
        #6FBF36 0%, #6FBF36 40%,
        transparent 40%, transparent 60%,
        #6FBF36 60%, #6FBF36 100%
    );
}

/* Navegação */
.nav-menu {
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: #F2F2F2 !important;
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.nav-link:hover {
    color: #6FBF36 !important;
    transform: translateY(-2px);
}

/* Botão de logout */
.logout-btn {
    background-color: #FF4D4D;
    color: #F2F2F2 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 77, 77, 0.3);
}

.logout-btn:hover {
    background-color: #FF3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 77, 77, 0.4);
}

/* Menu responsivo */
@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        background: #0E122B;
        padding: 1rem 0;
        margin-top: 0.5rem;
        border-radius: 0 0 10px 10px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .logo-link {
        margin: 0 auto;
    }
}

/* Hero Section */
.hero {
    background: #FFFFFF;
    border-radius: 0 0 50px 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* CTA Buttons (Comece Agora, Saiba Mais, etc.) - Reduced Width */
.cta-button,
#imc-form button,
form button {
    background-color: #6FBF36;
    color: #0E122B;
    padding: 1rem 1.5rem; /* Reduced horizontal padding */
    font-size: 1.25rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(111, 191, 54, 0.3);
    width: auto; /* Changed to auto to reduce width */
    display: inline-block;
    text-align: center;
}

.cta-button:hover,
#imc-form button:hover,
form button:hover {
    background-color: #33A665;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(51, 166, 101, 0.4);
}

/* Enhanced Link (Ainda não tem conta? Cadastre-se) */
a[href="register.php"],
a[href="login.php"] {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1C71A6;
    text-decoration: underline;
    transition: color 0.3s ease, transform 0.3s ease;
}

a[href="register.php"]:hover,
a[href="login.php"]:hover {
    color: #6FBF36;
    transform: translateY(-1px);
}

/* Dicas de Saúde */
.container.max-w-4xl {
    background-color: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 800px;
    animation: slideUp 1s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.grid .p-6 {
    background: linear-gradient(135deg, #E6F0FA, #FFFFFF);
    border: 2px solid #0C1026;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.grid .p-6:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.grid h3 {
    color: #1C71A6;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.grid p {
    color: #666666;
    font-size: 1.1rem;
}

/* Formulários (atualizado para login, register e dashboard) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    border: 2px solid #0E122B;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    border-color: #33A665;
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 166, 101, 0.3);
}

/* Calculadora de IMC (mantém compatibilidade) */
#imc-form input {
    border: 2px solid #0E122B;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#imc-form input:focus {
    border-color: #33A665;
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 166, 101, 0.3);
}

/* Gráfico de Progresso */
#progress-chart {
    border: 1px solid #0E122B;
    border-radius: 10px;
}

/* FAQ */
details summary {
    list-style: none;
    transition: color 0.3s ease;
}

details summary:hover {
    color: #33A665;
}

details[open] summary {
    color: #6FBF36;
}

details p {
    color: #666666;
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background-color: #0E122B;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    color: #F2F2F2;
}

footer p {
    font-weight: 500;
}

footer a {
    color: #F2F2F2;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #6FBF36;
}

.footer-logo {
    width: 100px;
}

/* Responsividade */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .container {
        padding: 1rem;
        margin: 1rem auto;
        max-width: 90%;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    #imc-form input,
    .cta-button,
    form button {
        padding: 0.5rem 1rem; /* Adjusted padding for smaller screens */
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .logo, .footer-logo {
        width: 80px;
    }

    .footer-logo {
        width: 60px;
    }
}

.icons {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icons a {
    padding: 20px;
}