/* Root Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #22c55e;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

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

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

/* Header Styles */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    position: relative;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Hide logo text when image loads */
.logo-container.loaded .logo-text {
    display: none;
}

/* When logo image is loaded, show it */
.logo-container.loaded {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    min-width: 200px;
}

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

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transition: right 0.3s ease;
    z-index: 200;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    margin-bottom: 2rem;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 1.5rem;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.emergency-notice {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Image Placeholders */
.image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    min-height: 150px;
    text-align: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: attr(data-image);
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Hide text and pseudo-element when image is loaded */
.image-placeholder.loaded::before {
    display: none;
}

.image-placeholder.loaded span {
    display: none !important;
}

.image-placeholder.large {
    min-height: 400px;
}

.image-placeholder.small {
    min-height: 100px;
    margin-top: 1rem;
}

.image-placeholder.chart {
    min-height: 300px;
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px dashed var(--border-color);
}

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

.treatment-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.treatment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.treatment-card h3 {
    margin: 1rem 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.treatment-card ul {
    list-style: none;
    margin: 1rem 0;
}

.treatment-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.treatment-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.note {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

/* Diet Plan Styles */
.diet-principles {
    margin-bottom: 3rem;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.principle-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.principle-card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.principle-card h4 {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.principle-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Meal Cards */
.meal-plan-container {
    margin: 3rem 0;
}

.meal-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.meal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meal-icon {
    font-size: 2rem;
}

.meal-header h4 {
    margin: 0;
    font-size: 1.3rem;
}

.meal-time {
    font-size: 0.875rem;
    opacity: 0.9;
}

.meal-content {
    padding: 1.5rem;
}

.meal-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
}

.option:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-light);
}

.option input[type="radio"] {
    margin-right: 0.5rem;
}

.option label {
    cursor: pointer;
    display: block;
}

.option label strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.option ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.option ul li {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Food Guidelines */
.food-guidelines {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.guideline-box {
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.guideline-box.emphasize {
    background-color: #ecfdf5;
    border-left: 4px solid var(--success-color);
}

.guideline-box.avoid {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger-color);
}

.guideline-box h3 {
    margin-bottom: 1rem;
}

.guideline-box ul {
    list-style: none;
}

.guideline-box ul li {
    padding: 0.5rem 0;
    line-height: 1.6;
}

/* Fitness Plan Styles */
.fitness-notice {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.week-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.week-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.week-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.week-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.week-content {
    display: none;
}

.week-content.active {
    display: block;
}

.week-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.phase-description {
    color: var(--text-light);
    font-size: 1.1rem;
}

.fitness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.fitness-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fitness-card h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.fitness-card ul {
    list-style: none;
}

.fitness-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.fitness-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.fitness-card.highlight ul li::before {
    color: white;
}

.steps-goal {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
}

/* Safety Styles */
.safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.safety-card.critical {
    border: 3px solid var(--danger-color);
}

.safety-card h3 {
    margin: 1rem 0;
    color: var(--text-dark);
}

.critical-list li {
    color: var(--danger-color);
    font-weight: 600;
}

.lifestyle-modifications {
    margin: 3rem 0;
}

.modification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.modification-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.expected-results {
    margin: 3rem 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.result-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.result-card h4 {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.result-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Tracker Styles */
.tracker-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    border-bottom: 2px solid var(--border-color);
}

.tracker-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
    white-space: nowrap;
}

.tracker-tab:hover {
    color: var(--primary-color);
}

.tracker-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tracker-content {
    display: none;
}

.tracker-content.active {
    display: block;
}

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

.input-group {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.input-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.log-entries {
    margin-top: 2rem;
}

.log-entry {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.log-entry .entry-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.log-entry .entry-content {
    color: var(--text-dark);
}

.tracker-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Important Reminders */
.important-reminders {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.important-reminders h2 {
    text-align: center;
    color: var(--danger-color);
    margin-bottom: 2rem;
}

.reminder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.reminder-card {
    background-color: #fef2f2;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.reminder-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .food-guidelines {
        grid-template-columns: 1fr;
    }

    .week-header {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .week-selector {
        flex-wrap: wrap;
    }

    .tracker-tabs {
        flex-wrap: wrap;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .action-buttons,
    .tracker-actions,
    .mobile-menu-btn {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }

    .hero {
        background: var(--bg-white);
        color: var(--text-dark);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.meal-card,
.treatment-card,
.fitness-card,
.safety-card {
    animation: fadeIn 0.5s ease-out;
}
