/* NutriSense - Educational Nutrition Resource */
/* Main Stylesheet */

:root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --text-dark: #212121;
    --text-medium: #424242;
    --text-light: #757575;
    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Header / Navbar */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
    text-decoration: none;
}

.nav-link {
    color: var(--text-medium) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border-color: var(--border-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(46, 125, 50, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Main Content Spacing */
main {
    margin-top: 80px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.125rem;
    color: var(--text-medium);
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

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

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background-color: var(--bg-light);
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Content Images */
.content-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* Info Cards */
.info-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Infographic Section */
.infographic-section {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 4rem 0;
}

.infographic-section h2,
.infographic-section h3 {
    color: var(--bg-white);
}

.infographic-section p {
    color: rgba(255, 255, 255, 0.9);
}

.infographic-item {
    text-align: center;
    padding: 1.5rem;
}

.infographic-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 0.5rem;
}

.infographic-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

/* FAQ Section */
.faq-section {
    background-color: var(--bg-light);
}

.faq-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

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

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    padding: 0 1.5rem 1.25rem;
    max-height: 500px;
}

/* Scientific Studies Section */
.study-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-light);
    margin-bottom: 1rem;
}

.study-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.study-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    padding: 3rem 0;
    text-align: center;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.btn-outline-custom {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-light);
    padding: 4rem 0;
}

.contact-info {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    height: 100%;
}

.contact-form {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 3rem 0 1.5rem;
}

.footer h5 {
    color: var(--bg-white);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--bg-white);
    text-decoration: none;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 9999;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner p {
    margin-bottom: 1rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Disclaimer Box */
.disclaimer-box {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.disclaimer-box h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.disclaimer-box p {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* Policy Pages */
.policy-page {
    padding: 4rem 0;
}

.policy-page h1 {
    margin-bottom: 2rem;
}

.policy-page h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-page ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-page li {
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

/* About Page */
.about-hero {
    background-color: var(--bg-light);
    padding: 4rem 0;
}

/* Contact Page */
.contact-page {
    padding: 4rem 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-section {
        padding: 3rem 0;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    main {
        margin-top: 70px;
    }
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .content-section {
        padding: 2.5rem 0;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .infographic-number {
        font-size: 2.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .content-section {
        padding: 2rem 0;
    }
    
    .hero-image,
    .content-image {
        margin-bottom: 1.5rem;
    }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.mb-4-custom {
    margin-bottom: 2rem;
}

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

/* Animation for page elements */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
