/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: #2563eb;
    font-size: 24px;
    font-weight: 700;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #2563eb;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
    background: #f8fafc;
}

.calculator-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #1e293b;
}

.calculator {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.calculator button {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.calculator button:hover {
    background: #1d4ed8;
}

.result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.result.show {
    display: block;
}

.result.normal {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #bbf7d0;
}

.result.overweight {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #fde68a;
}

.result.obese {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #fecaca;
}

.result.underweight {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #93c5fd;
}

/* Main Article */
.main-article {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.main-article h2 {
    font-size: 42px;
    color: #1e293b;
    margin-bottom: 25px;
    line-height: 1.3;
}

.main-article h3 {
    font-size: 28px;
    color: #374151;
    margin: 40px 0 20px;
    line-height: 1.4;
}

.main-article h4 {
    font-size: 22px;
    color: #4b5563;
    margin: 30px 0 15px;
}

.article-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    color: #6b7280;
    font-size: 14px;
}

.main-article p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #374151;
}

.main-article ul, .main-article ol {
    margin: 25px 0;
    padding-left: 30px;
}

.main-article li {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.7;
}

.main-article a {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.main-article a:hover {
    color: #1d4ed8;
}

/* Blockquotes */
blockquote {
    background: #f1f5f9;
    border-left: 5px solid #2563eb;
    padding: 25px 30px;
    margin: 35px 0;
    font-style: italic;
    font-size: 19px;
    color: #1e293b;
    border-radius: 0 8px 8px 0;
}

/* Highlight Boxes */
.highlight-box {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
}

.highlight-box.warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.highlight-box.danger {
    background: #fef2f2;
    border-color: #ef4444;
}

.highlight-box h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 20px;
}

.highlight-box p, .highlight-box ul {
    margin-bottom: 15px;
}

.highlight-box ul {
    padding-left: 25px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f8fafc;
    font-weight: 700;
    color: #374151;
    font-size: 16px;
}

td {
    font-size: 15px;
    color: #4b5563;
}

tr:hover {
    background: #f9fafb;
}

.ideal-weight {
    background: #dcfce7 !important;
}

.ideal-weight:hover {
    background: #bbf7d0 !important;
}

/* Sources */
.sources {
    background: #f8fafc;
    padding: 30px;
    border-radius: 10px;
    margin: 50px 0;
    border-left: 5px solid #16a34a;
}

.sources h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 20px;
}

.sources ol {
    padding-left: 25px;
}

.sources li {
    margin-bottom: 10px;
    color: #4b5563;
}

/* Articles Section */
.articles-section {
    padding: 80px 0;
    background: #f8fafc;
}

.articles-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #1e293b;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.article-card h3 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card h3 a:hover {
    color: #2563eb;
}

.article-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #2563eb;
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-section h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #2563eb;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
    color: #94a3b8;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}

/* GDPR Notice */
.gdpr-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #1e293b;
    color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.gdpr-notice.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.gdpr-notice p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.gdpr-notice a {
    color: #60a5fa;
    text-decoration: underline;
}

.gdpr-notice button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.gdpr-notice button:hover {
    background: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu {
        display: flex;
    }
    
    .nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .main-article h2 {
        font-size: 32px;
    }
    
    .main-article h3 {
        font-size: 24px;
    }
    
    .calculator {
        padding: 25px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .gdpr-notice {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .calculator-section, .main-article, .articles-section {
        padding: 60px 0;
    }
    
    .main-article p, .main-article li {
        font-size: 16px;
    }
    
    blockquote {
        padding: 20px;
        font-size: 17px;
    }
    
    .highlight-box {
        padding: 20px;
    }
}

/* Performance Optimizations */
.header, .hero, .calculator-section, .articles-section, .footer {
    will-change: transform;
}

img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Print Styles */
@media print {
    .header, .footer, .back-to-top, .gdpr-notice, .calculator-section {
        display: none;
    }
    
    .main-article {
        padding: 20px 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4 {
        break-after: avoid;
    }
    
    table, blockquote, .highlight-box {
        break-inside: avoid;
    }
}