/* CaloriesSnap - Professional, Clean, AdSense-Optimized Styles */
/* Color Palette: Modern, Health-Focused */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

html.modal-open {
    overflow: hidden !important;
    height: 100% !important;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* AdSense Container Styles - Strategic Placements */
.ad-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.ad-placeholder {
    width: 100%;
    text-align: center;
}

.ad-top {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: var(--shadow-md);
    margin: 0;
    border-radius: 0;
}

.ad-native {
    margin: 32px auto;
    max-width: 1200px;
}

.ad-in-content {
    margin: 48px auto;
    max-width: 1200px;
}

.ad-sidebar {
    position: sticky;
    top: 120px;
    margin-top: 24px;
}

.ad-sidebar-right {
    position: sticky;
    top: 120px;
    margin-top: 24px;
}

.ad-bottom-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    margin: 0;
    border-radius: 0;
}

@media (max-width: 768px) {
    .ad-bottom-mobile {
        display: flex;
    }
    
    .ad-sidebar,
    .ad-sidebar-right {
        display: none;
    }
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 24px;
    color: var(--primary);
    text-decoration: none;
}

.logo-icon {
    font-size: 32px;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.header-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.stat-item i {
    color: var(--secondary);
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: var(--primary);
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-xl);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Main Content Layout */
.main-content {
    padding: 48px 0;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 280px 1fr 360px;
    gap: 24px;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
    width: 100%;
}

.category-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.category-item.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.category-icon {
    font-size: 20px;
}

/* Calculator Section */
.calculator-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.calculator-header {
    margin-bottom: 32px;
}

.calculator-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Food Grid */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.food-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.food-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.food-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.food-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.food-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
}

.food-tag {
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-weight: 500;
}

.food-quick-cal {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

/* Portion Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(3px);
    overflow: hidden;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: calc(100% - 40px);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
    margin: 20px;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-tertiary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.portion-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.portion-food-emoji {
    font-size: 72px;
    margin-bottom: 16px;
}

.portion-food-name {
    font-size: 28px;
    font-weight: 800;
}

.portion-instruction {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}

.portion-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portion-option {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.portion-option:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    transform: translateX(4px);
}

.portion-visual-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.portion-visual-hint i {
    color: var(--accent);
}

.portion-size {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.portion-calories {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.portion-macros {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Meal Selection */
.meal-selection-header {
    text-align: center;
    margin-bottom: 32px;
}

.meal-selection-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.selected-food-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
}

.preview-emoji {
    font-size: 40px;
}

.preview-details {
    text-align: left;
    flex: 1;
}

.preview-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.preview-portion {
    font-size: 14px;
    color: var(--text-secondary);
}

.meal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.meal-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.meal-button:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    transform: translateY(-2px);
}

.meal-button-icon {
    font-size: 32px;
}

.meal-button-text {
    font-size: 16px;
}

.cancel-button {
    width: 100%;
    padding: 14px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-button:hover {
    background: var(--border);
}

/* Tracker Sidebar */
.tracker-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.tracker-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.tracker-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px;
}

.daily-summary {
    text-align: center;
    margin-bottom: 32px;
}

.calorie-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-background {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 8;
}

.ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 0.5s ease;
}

.ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ring-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.ring-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.calorie-info {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 10px;
}

.calorie-goal,
.calorie-remaining {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.edit-goal-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.edit-goal-btn:hover {
    background: rgba(79, 70, 229, 0.1);
}

/* Meal Sections */
.meal-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.meal-section {
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.meal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    font-weight: 700;
}

.meal-icon {
    font-size: 20px;
}

.meal-name {
    flex: 1;
    margin-left: 8px;
}

.meal-calories {
    color: var(--primary);
    font-size: 14px;
}

.meal-items {
    padding: 8px;
}

.meal-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.meal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.meal-item-emoji {
    font-size: 24px;
}

.meal-item-details {
    flex: 1;
}

.meal-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.meal-item-portion {
    font-size: 12px;
    color: var(--text-secondary);
}

.meal-item-calories {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.meal-item-delete {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.meal-item-delete:hover {
    background: var(--danger);
    color: white;
}

.clear-day-btn,
.share-progress-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.clear-day-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

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

.share-progress-btn {
    background: var(--secondary);
    color: white;
}

.share-progress-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Popular Searches */
.popular-searches {
    padding: 48px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.search-tag {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.2s;
}

.search-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

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

.feature-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Share Section */
.share-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 48px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.share-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
}

.share-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.share-facebook {
    background: #1877f2;
}

.share-facebook:hover {
    background: #0c5dcc;
    transform: translateY(-2px);
}

.share-twitter {
    background: #1da1f2;
}

.share-twitter:hover {
    background: #0c85d0;
    transform: translateY(-2px);
}

.share-whatsapp {
    background: #25d366;
}

.share-whatsapp:hover {
    background: #1ab152;
    transform: translateY(-2px);
}

.share-copy {
    background: var(--text-secondary);
}

.share-copy:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

.share-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.share-stat {
    text-align: center;
    color: var(--text-secondary);
}

.share-stat strong {
    color: var(--primary);
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 60px 0 24px;
    position: relative;
}

/* Newsletter Section */
.footer-newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 48px 0;
    margin-bottom: 48px;
}

.newsletter-content {
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-text {
    text-align: center;
    margin-bottom: 24px;
}

.newsletter-text h3 {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 800;
}

.newsletter-text h3 i {
    margin-right: 12px;
    color: #fbbf24;
}

.newsletter-text p {
    font-size: 16px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
}

.newsletter-btn {
    padding: 16px 32px;
    background: var(--secondary);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #059669;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.newsletter-benefits {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
}

.newsletter-benefits span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-benefits i {
    color: #10b981;
}

/* Footer Main Content */
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.footer-brand {
    max-width: 100%;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.8);
    margin: 16px 0 24px;
    line-height: 1.7;
    font-size: 15px;
}

.footer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.social-heading {
    margin: 20px 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 18px;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.social-icon.facebook:hover { background: #1877f2; }
.social-icon.instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icon.twitter:hover { background: #1da1f2; }
.social-icon.youtube:hover { background: #ff0000; }
.social-icon.pinterest:hover { background: #e60023; }
.social-icon.tiktok:hover { background: #000000; }

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links h4 i {
    color: var(--accent);
}

.footer-links a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 0;
}

.footer-links a:hover {
    color: white;
    transform: translateX(6px);
}

.footer-links a i {
    margin-right: 10px;
    width: 18px;
    font-size: 14px;
    color: var(--accent);
}

/* Trust Badges */
.footer-trust {
    padding: 32px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
}

.trust-badge i {
    font-size: 24px;
    color: var(--secondary);
}

/* Footer Bottom */
.footer-bottom {
    padding: 0 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-legal-links {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.footer-legal-links a:hover {
    color: white;
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

.disclaimer {
    margin-top: 20px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.disclaimer strong {
    color: rgba(255, 255, 255, 0.9);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transition: all 0.3s;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

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

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
}

/* Footer Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-brand {
        grid-column: span 3;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .footer-newsletter {
        padding: 32px 20px;
    }
    
    .newsletter-text h3 {
        font-size: 24px;
    }
    
    .newsletter-text p {
        font-size: 14px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-btn {
        width: 100%;
    }
    
    .newsletter-benefits {
        font-size: 12px;
        gap: 12px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    .footer-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trust-badges {
        gap: 20px;
    }
    
    .trust-badge {
        font-size: 12px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 24px;
        right: 24px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 16px;
    }
    
    .stat-item strong {
        font-size: 20px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
}

/* Toggle Buttons for Gender Selection */
.toggle-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
}

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

.toggle-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Sitemap Styles */
.sitemap-section {
    margin-bottom: 24px;
}

.sitemap-section h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 18px;
}

.sitemap-section ul {
    list-style: none;
    padding-left: 0;
}

.sitemap-section ul li {
    margin-bottom: 8px;
}

.sitemap-section ul li a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.sitemap-section ul li a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* Secondary Button Style */
.cta-button.secondary {
    background: var(--text-secondary);
}

.cta-button.secondary:hover {
    background: var(--text-primary);
}

/* Success Toast */
.success-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    z-index: 9999;
    transition: all 0.3s ease;
}

.success-toast.show {
    bottom: 32px;
}

.success-toast i {
    font-size: 20px;
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.blog-card.featured-card {
    grid-column: span 2;
    grid-row: span 2;
    border: 3px solid var(--primary);
}

.featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    z-index: 10;
    text-transform: uppercase;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.featured-card .blog-card-image {
    height: 300px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-content {
    padding: 24px;
}

.blog-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.blog-card-content h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.featured-card .blog-card-content h3 {
    font-size: 28px;
}

.blog-card-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.read-more {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}

.read-more:hover {
    gap: 8px;
}

.view-all-blogs {
    text-align: center;
}

.btn-view-all {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-view-all:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Portion Guide Section */
.portion-guide-section {
    padding: 80px 0;
    background: white;
}

.portion-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.portion-guide-card {
    text-align: center;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: 16px;
    transition: all 0.3s;
}

.portion-guide-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portion-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.portion-guide-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.portion-measurement {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.portion-guide-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.portion-examples {
    background: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.portion-examples strong {
    color: var(--text-primary);
}

.portion-guide-benefits {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px;
    border-radius: 24px;
    color: white;
}

.portion-guide-benefits h3 {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.benefit-item {
    text-align: center;
}

.benefit-item i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.benefit-item p {
    opacity: 0.95;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-story {
    background: white;
    padding: 48px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.about-story h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
}

.lead-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.about-story p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 17px;
}

.about-mission {
    margin-bottom: 40px;
}

.mission-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 48px;
    border-radius: 16px;
    text-align: center;
}

.mission-box h3 {
    font-size: 28px;
    margin-bottom: 16px;
}

.mission-box p {
    font-size: 20px;
    opacity: 0.95;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-box {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.about-values {
    background: white;
    padding: 48px;
    border-radius: 16px;
}

.about-values h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.value-item {
    text-align: center;
}

.value-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.value-item h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.value-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: white;
}

.contact-grid-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.contact-form-wrapper,
.contact-info-wrapper {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
}

.contact-form-wrapper h3,
.contact-info-wrapper h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
}

.inline-contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group-inline input,
.form-group-inline select,
.form-group-inline textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.form-group-inline input:focus,
.form-group-inline select:focus,
.form-group-inline textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.submit-btn-inline {
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.submit-btn-inline:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-method-inline {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
}

.contact-method-inline i {
    font-size: 28px;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-method-inline strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.contact-method-inline p {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-method-inline small {
    color: var(--text-secondary);
    font-size: 13px;
}

.social-links-contact {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

.social-links-contact h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-btn.facebook { background: #1877f2; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.social-btn.twitter { background: #1da1f2; }
.social-btn.youtube { background: #ff0000; }

.faq-inline {
    background: var(--bg-secondary);
    padding: 48px;
    border-radius: 16px;
}

.faq-inline h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.faq-item-inline {
    background: white;
    padding: 24px;
    border-radius: 12px;
}

.faq-item-inline strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.faq-item-inline p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .calculator-layout {
        grid-template-columns: 240px 1fr 320px;
    }
}

@media (max-width: 992px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar,
    .tracker-sidebar {
        position: static;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .food-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    body {
        padding-bottom: 60px;
    }
    
    /* Blog Section Responsive */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card.featured-card {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Portion Guide Responsive */
    .portion-guide-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .portion-guide-benefits {
        padding: 40px 24px;
    }
    
    /* About Section Responsive */
    .about-story {
        padding: 32px 24px;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Section Responsive */
    .contact-grid-inline {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 32px;
    }
}

/* Info Modal Styles */
.info-modal {
    padding: 20px 0;
}

.info-modal h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
}

.info-content {
    margin-top: 24px;
}

.info-step {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.portion-guide-item {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.guide-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.guide-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.guide-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.guide-tip {
    background: rgba(79, 70, 229, 0.1);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
}

.success-story {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.story-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.story-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.story-meta {
    color: var(--secondary);
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.story-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    margin-top: 24px;
}

.cta-box h3 {
    margin-bottom: 8px;
}

.cta-box p {
    opacity: 0.95;
}

.blog-post {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.blog-post:last-of-type {
    border-bottom: none;
}

.blog-date {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-post h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.blog-post p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.blog-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-link:hover {
    color: var(--primary-dark);
}

.contact-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.contact-method {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.contact-method i {
    font-size: 32px;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-method h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-method p {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-method small {
    color: var(--text-secondary);
    font-size: 13px;
}

.info-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.info-content li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-brand {
        max-width: 100%;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .meal-buttons {
        grid-template-columns: 1fr;
    }
    
    .info-step {
        flex-direction: column;
        gap: 12px;
    }
    
    .portion-guide-item {
        flex-direction: column;
        gap: 12px;
    }
}

/* ============================================ */
/*     ENHANCED MOBILE RESPONSIVENESS           */
/* ============================================ */

/* Extra Large Mobile (425px) */
@media (max-width: 425px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    /* Header */
    .header {
        padding: 12px 0;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .nav {
        display: none; /* Hide desktop nav on very small screens */
    }
    
    .header-stats {
        font-size: 12px;
    }
    
    /* Hero Section */
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .cta-button {
        padding: 14px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }
    
    /* Calculator Layout */
    .calculator-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar,
    .tracker-sidebar {
        order: 2; /* Move sidebars below main content */
    }
    
    .calculator-section {
        order: 1;
    }
    
    /* Search Box */
    .search-box input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }
    
    /* Food Grid */
    .food-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .food-card {
        padding: 16px;
    }
    
    .food-name {
        font-size: 16px;
    }
    
    .food-calories {
        font-size: 18px;
    }
    
    /* Portion Sizes */
    .portion-sizes {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .portion-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Tracker */
    .tracker-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    /* Meal Log */
    .meal-header {
        font-size: 16px;
        padding: 12px;
    }
    
    .meal-item {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Modal */
    .modal-content {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
        max-height: calc(100vh - 40px);
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    /* Footer Newsletter */
    .newsletter-text h3 {
        font-size: 20px;
    }
    
    .newsletter-form input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .newsletter-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Footer Stats */
    .footer-stats {
        gap: 8px;
        padding: 16px;
    }
    
    .stat-item strong {
        font-size: 18px;
    }
    
    .stat-item span {
        font-size: 11px;
    }
}

/* Small Mobile (375px) - iPhone SE, Galaxy S8 */
@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .hero-subtitle {
        font-size: 13px;
    }
    
    .food-card {
        padding: 12px;
    }
    
    .food-name {
        font-size: 15px;
    }
    
    .food-calories {
        font-size: 16px;
    }
    
    .portion-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .modal-content {
        padding: 16px;
        margin: 16px;
        width: calc(100% - 32px);
    }
    
    .cta-button {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Extra Small Mobile (320px) - Smallest common screen */
@media (max-width: 320px) {
    body {
        font-size: 13px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .hero {
        padding: 30px 0;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .food-card {
        padding: 10px;
    }
    
    .food-name {
        font-size: 14px;
    }
    
    .food-calories {
        font-size: 15px;
    }
    
    .portion-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .newsletter-text h3 {
        font-size: 18px;
    }
    
    .newsletter-benefits {
        font-size: 11px;
        gap: 8px;
    }
    
    .footer-stats {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ============================================ */
/*     MOBILE-SPECIFIC IMPROVEMENTS             */
/* ============================================ */

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .portion-btn,
    .cta-button,
    .meal-btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .food-card:hover,
    .portion-btn:hover,
    .cta-button:hover {
        transform: none;
    }
    
    /* Increase spacing for fat fingers */
    .portion-sizes {
        gap: 12px;
    }
    
    /* Make inputs easier to tap */
    input,
    select,
    textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }
    
    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

/* Print styles for mobile */
@media print {
    .ad-container,
    .header,
    .footer,
    .cta-button,
    .back-to-top,
    .share-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (if device prefers) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded if you want dark mode support */
    /* Currently keeping light theme for food/health context */
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
    button,
    .cta-button,
    .portion-btn {
        border: 2px solid currentColor;
    }
    
    .food-card {
        border: 2px solid var(--border);
    }
}

/* ============================================ */
/*     MOBILE PERFORMANCE OPTIMIZATIONS         */
/* ============================================ */

@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Simplify shadows on mobile */
    .food-card,
    .stat-card,
    .modal-content {
        box-shadow: var(--shadow-sm);
    }
    
    /* Optimize images (if any are added later) */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ============================================ */
/*     MOBILE NAVIGATION MENU (HAMBURGER)       */
/* ============================================ */

@media (max-width: 768px) {
    /* Mobile menu button */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
    }
    
    /* Mobile navigation */
    .nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 20px;
        z-index: 999;
    }
    
    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        text-align: center;
    }
}

/* ============================================ */
/*     FLOATING QUICK ADD WIDGET                */
/* ============================================ */

.floating-quick-add {
    position: fixed;
    bottom: 100px;
    right: 32px;
    z-index: 998;
    animation: fadeInScale 0.3s ease;
}

.quick-add-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.quick-add-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.quick-add-btn i {
    font-size: 20px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Quick Add Modal */
.quick-add-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 0;
    overflow: hidden;
}

.quick-add-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.quick-add-content {
    background: white;
    border-radius: 20px;
    width: calc(100% - 40px);
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    pointer-events: auto;
    margin: 20px;
    touch-action: pan-y;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.quick-add-header h3 {
    font-size: 24px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.quick-search-box {
    padding: 24px 28px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.quick-search-box i {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
}

.quick-search-box input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.quick-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.quick-search-hint {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
}

.quick-results {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: 50vh;
}

.quick-popular h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.quick-popular-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-food-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-food-item:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-food-name {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-food-calories {
    font-size: 18px;
    color: var(--primary);
    font-weight: 700;
}

.quick-food-portion {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================ */
/*     FLOATING TRACKER SUMMARY                 */
/* ============================================ */

.floating-tracker {
    position: fixed;
    top: 80px;
    right: 32px;
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-tracker.visible {
    opacity: 1;
    visibility: visible;
}

.floating-tracker-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.floating-tracker-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.floating-tracker-toggle:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.floating-tracker-toggle i {
    font-size: 18px;
}

.floating-tracker-details {
    display: none;
    padding: 16px 20px;
    border-top: 2px solid var(--border);
    min-width: 240px;
}

.floating-tracker-details.expanded {
    display: block;
}

.floating-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.floating-stat.remaining {
    font-weight: 700;
    color: var(--secondary);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.floating-label {
    color: var(--text-secondary);
}

.floating-value {
    color: var(--text-primary);
    font-weight: 600;
}

.floating-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0;
}

.floating-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.floating-view-full {
    width: 100%;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.floating-view-full:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}



/* Mobile Responsive for Floating Elements */
@media (max-width: 768px) {
    .floating-quick-add {
        bottom: 80px;
        right: 20px;
    }
    
    .quick-add-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .quick-add-text {
        display: none;
    }
    
    .quick-add-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
    
    .quick-add-content {
        width: calc(100% - 32px);
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .quick-popular-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-tracker {
        top: auto;
        bottom: 150px;
        right: 20px;
    }
    
    .floating-tracker-toggle {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .floating-tracker-details {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .quick-add-header {
        padding: 20px;
    }
    
    .quick-add-header h3 {
        font-size: 20px;
    }
    
    .quick-search-box {
        padding: 20px;
    }
    
    .quick-results {
        padding: 20px;
    }
    
    .quick-search-hint {
        display: none;
    }
}

/* ============================================ */
/*     MOBILE UTILITY CLASSES                   */
/* ============================================ */

/* Show only on mobile */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none !important;
    }
}

/* Mobile text sizes */
@media (max-width: 768px) {
    .text-mobile-sm {
        font-size: 12px;
    }
    
    .text-mobile-md {
        font-size: 14px;
    }
    
    .text-mobile-lg {
        font-size: 16px;
    }
}

/* ============================================ */
/*     MOBILE-FRIENDLY TABLES                   */
/* ============================================ */

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    th, td {
        padding: 8px;
        font-size: 13px;
    }
}

/* ============================================ */
/*     BLOG NAVIGATION STYLES                   */
/* ============================================ */

/* Navigation container for blog pages */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation menu list */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 16px;
        gap: 4px;
        z-index: 100;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li a {
        padding: 14px 20px;
        text-align: center;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-menu li a {
        padding: 12px 16px;
        font-size: 15px;
    }
}