/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

/**
 * =====================================================================
 * FRESH - FRUIT FACTS STYLESHEET
 * =====================================================================
 *
 * Purpose: Styling for the Fresh - Fruit Facts landing page
 * Architecture: Mobile-first responsive design with CSS custom properties
 * Browser Support: Modern browsers with CSS Grid and Flexbox support
 *
 * @author Ingredients2Meals Development Team
 * @version 1.0
 * @since 2025
 */

/* =====================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Fresh-specific color system with green as primary
   ===================================================================== */
:root {
    /* Fresh Brand Colors */
    --color-fresh-primary: #4CAF50;        /* Primary green - main brand color */
    --color-fresh-secondary: #45A049;      /* Secondary green - darker shade */
    --color-fresh-accent: #81C784;         /* Accent green - lighter shade */
    --color-fresh-dark: #2E7D32;           /* Dark green - text and borders */

    /* Background Colors */
    --color-bg-main: #FFFFFF;              /* Main background - white */
    --color-bg-card: #FFFFFF;              /* Card backgrounds - pure white */
    --color-bg-alt: #F5F5F5;               /* Alternative background - light gray */

    /* Typography Colors */
    --color-text-primary: #000000;         /* Primary text - black */
    --color-text-secondary: #555555;       /* Secondary text - gray */
    --color-text-caption: #888888;         /* Caption text - light gray */

    /* Button Colors */
    --color-btn-primary: var(--color-fresh-primary);
    --color-btn-primary-hover: var(--color-fresh-secondary);
    --color-btn-secondary: transparent;
    --color-btn-secondary-border: var(--color-fresh-primary);

    /* Brand compatibility - black for Ingredients2Meals consistency */
    --color-primary: #000000;              /* Black for main brand */
}

/* =====================================================================
   GLOBAL RESET AND BASE STYLES
   ===================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, serif;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-main);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =====================================================================
   HEADER AND NAVIGATION
   ===================================================================== */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link.active {
    opacity: 1;
}

.logo-link.active .logo {
    color: #000000;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000; /* Ingredients2Meals black */
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'San Francisco', 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
}

.smartcart-logo {
    color: #007AFF !important; /* SmartCart blue */
}

.recyclr-logo {
    color: #000000 !important; /* Recyclr+ black */
}

.expressive-logo {
    color: #000000 !important; /* Expressive black */
    font-weight: 700;
    font-family: Georgia, serif;
}

.fresh-logo {
    color: #000000 !important; /* Fresh black */
}

.nav-divider {
    width: 1px;
    height: 32px;
    background-color: #E5E5E7;
    margin: 0 1rem;
}

.app-store-badge {
    height: 40px;
    width: auto;
    display: block;
}

.nav-download {
    display: flex;
    align-items: center;
    align-self: center;
}

/* =====================================================================
   FRESH HERO SECTION
   Primary landing area with Fresh branding
   ===================================================================== */

/* Fresh hero container */
.fresh-hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
    background: var(--color-bg-main);
}

/* Fresh hero content (left side) */
.fresh-hero-content {
    flex: 1;
    text-align: left;
}

/* Fresh description section */
.fresh-description h2 {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

/* Fresh lead text */
.fresh-lead {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0;
    margin-bottom: 2.5rem;
}

/* Fresh hero image (right side) */
.fresh-hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fresh hero buttons */
.fresh-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

/* Fresh primary button */
.btn-fresh-primary {
    padding: 1rem 3rem;
    border: none;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-fresh-primary);
    color: #FFFFFF;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

/* Fresh primary button hover */
.btn-fresh-primary:hover {
    background-color: var(--color-fresh-secondary);
    transform: translateY(-2px);
}

/* Phone mockup container with realistic proportions */
.phone-mockup {
    width: 500px;
    height: 1000px;
    background: var(--color-bg-main);
    border-radius: 30px;
    padding: 20px;
    max-width: 100%;
}

/* Phone screen area with overflow management */
.phone-screen {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-main);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

/* Fresh hero image container for rotating images */
.fresh-hero-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Individual Fresh rotating image */
.fresh-rotating-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Active Fresh rotating image state */
.fresh-rotating-image.active {
    opacity: 1;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--color-btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background-color: var(--color-btn-secondary);
    color: var(--color-fresh-primary);
    border: 2px solid var(--color-btn-secondary-border);
}

.btn-secondary:hover {
    background-color: var(--color-fresh-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* =====================================================================
   LEARN SECTION
   ===================================================================== */
.learn-section {
    background: var(--color-bg-main);
    padding: 8rem 2rem;
}

.learn-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
    width: 100%;
}

/* Learn image (left side) */
.learn-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.learn-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 20px;
}

/* Learn content (right side) */
.learn-content {
    flex: 1;
    text-align: left;
}

#learnContent {
    min-height: 200px;
}

.learn-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.learn-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* Learn navigation controls */
.learn-nav-controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.learn-nav-btn {
    background: var(--color-fresh-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.learn-nav-btn:hover {
    background: var(--color-fresh-secondary);
    transform: scale(1.1);
}

.learn-nav-btn:active {
    transform: scale(0.95);
}

.learn-nav-btn svg {
    width: 24px;
    height: 24px;
}

.learn-img {
    transition: opacity 0.3s ease;
}

/* Learn progress indicators */
.learn-indicators {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.learn-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E0E0E0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.learn-indicator:hover {
    background: #BDBDBD;
    transform: scale(1.2);
}

.learn-indicator.active {
    background: var(--color-fresh-primary);
    width: 32px;
    border-radius: 6px;
}

/* =====================================================================
   CTA SECTION
   ===================================================================== */

/* CTA section specific phone mockup styling */
.cta .phone-mockup {
    background: var(--color-bg-main);
    width: 500px;
    height: 1000px;
}

.cta .phone-screen {
    background-color: var(--color-bg-main);
}

.cta {
    background: var(--color-bg-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
}

/* CTA container matching hero layout */
.cta-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
    width: 100%;
}

/* CTA content (left side) */
.cta-content {
    flex: 1;
    text-align: left;
}

.cta-title {
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.cta-description {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* CTA download section */
.cta-download {
    margin-top: 2rem;
}

.cta-download .app-store-badge {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.cta-download .app-store-badge:hover {
    transform: translateY(-2px);
}

/* CTA image (right side) */
.cta-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CTA image container */
.cta-image-container {
    width: 100%;
    max-width: 900px;
    position: relative;
}

/* CTA image styling */
.cta-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* =====================================================================
   FOOTER SECTION
   ===================================================================== */
.footer {
    background-color: #F5F5F5;
    color: #333333;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--color-fresh-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-fresh-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(76, 175, 80, 0.2);
    padding-top: 1rem;
    text-align: center;
    opacity: 0.7;
}

/* =====================================================================
   MOBILE NAVIGATION IMPROVEMENTS
   ===================================================================== */

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text-primary);
    z-index: 1001;
}

.mobile-menu-btn:focus {
    outline: 2px solid var(--color-fresh-primary);
    border-radius: 4px;
}

/* Hamburger icon */
.hamburger {
    width: 25px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Hamburger animation when menu is open */
.mobile-menu-btn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile navigation overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-nav-overlay.active {
    display: block;
}

/* Mobile navigation menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background-color: #F5F5F5;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
}

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

/* Mobile navigation links */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    text-decoration: none;
    border-radius: 12px;
    transition: background-color 0.3s ease;
    border: 2px solid transparent;
}

.mobile-nav-link:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

.mobile-nav-link.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.mobile-nav-link.active .logo {
    color: #FFFFFF;
}

.mobile-nav-link .logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.mobile-nav-link .logo {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Mobile app store section */
.mobile-app-store {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
}

.mobile-app-store .app-store-badge {
    height: 50px;
    width: auto;
}

/* Hide mobile-specific elements on desktop */
.mobile-current-brand {
    display: none;
}

/* =====================================================================
   RESPONSIVE DESIGN
   ===================================================================== */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Navigation adjustments */
    .nav-brand {
        display: none;
    }

    .mobile-current-brand {
        display: flex !important;
        align-items: center;
        gap: 10px;
        text-decoration: none;
    }

    .mobile-current-brand .logo {
        color: #000000;
    }

    .nav-download {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Hero section stacks vertically */
    .fresh-hero {
        flex-direction: column-reverse;
        padding: 6rem 2rem 2rem;
        gap: 3rem;
        text-align: center;
    }

    .fresh-hero-content {
        text-align: center;
    }

    .fresh-description h2 {
        font-size: 2.5rem;
    }

    .fresh-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .fresh-hero-buttons {
        justify-content: center;
    }

    .phone-mockup {
        width: 320px;
        height: 640px;
    }

    /* Footer stacks on mobile */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Learn section mobile adjustments */
    .learn-section {
        padding: 6rem 2rem;
    }

    .learn-container {
        flex-direction: column;
        gap: 3rem;
    }

    .learn-content {
        text-align: center;
    }

    .learn-title {
        font-size: 2.2rem;
    }

    .learn-description {
        font-size: 1.1rem;
    }

    .learn-img {
        max-width: 100%;
    }

    /* CTA section mobile adjustments */
    .cta {
        flex-direction: column-reverse;
        padding: 6rem 2rem 4rem;
        min-height: auto;
    }

    .cta-container {
        flex-direction: column-reverse;
        gap: 3rem;
    }

    .cta-content {
        text-align: center;
    }

    .cta-download {
        display: flex;
        justify-content: center;
    }

    .cta-title {
        font-size: 2.5rem;
    }

    .cta .phone-mockup {
        width: 320px;
        height: 640px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    .fresh-description h2 {
        font-size: 2rem;
    }

    .fresh-lead {
        font-size: 1.1rem;
    }

    .phone-mockup {
        width: 280px;
        height: 560px;
    }

    .btn-fresh-primary {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .nav {
        padding: 0.75rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* CTA section mobile adjustments */
    .cta {
        padding: 4rem 1rem 3rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta .phone-mockup {
        width: 280px;
        height: 560px;
    }

    .cta-download .app-store-badge {
        height: 50px;
    }
}

/* Home button in header */
.home-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-right: 1rem;
    text-decoration: none;
}

.home-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

.home-btn svg {
    width: 24px;
    height: 24px;
}

.home-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .home-btn {
        margin-right: 0.5rem;
    }
}
