:root {
    --primary: #21734d;
    --primary-dark: #1a5a3d;
    --primary-light: #2d8f5f;
    --accent: #4CAF50;
    --gradient-primary: linear-gradient(135deg, #21734d 0%, #4CAF50 100%);
    --gradient-hero: linear-gradient(135deg, rgba(33, 115, 77, 0.05) 0%, rgba(76, 175, 80, 0.05) 100%);
    --shadow-soft: 0 10px 40px rgba(33, 115, 77, 0.1);
    --shadow-hover: 0 20px 60px rgba(33, 115, 77, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, rgba(33, 115, 77, 0.02), rgba(76, 175, 80, 0.02));
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.1;
    animation: float1 20s infinite ease-in-out;
    top: 10%;
    left: 10%;
}

.animated-bg::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.08;
    animation: float2 15s infinite ease-in-out;
    bottom: 10%;
    right: 10%;
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(100px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-50px, 100px) rotate(240deg);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-80px, -80px) rotate(180deg);
    }
}

/* Navigation */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(33, 115, 77, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-soft);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.03;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    display: block;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(33, 115, 77, 0.2));
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #666;
    font-weight: 400;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn-primary-gradient i {
    font-size: 1.2rem;
}

/* Features Section */
.features {
    padding: 6rem 0;
    position: relative;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(33, 115, 77, 0.1);
    height: 100%;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-card h5 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Articles Section */
.articles {
    padding: 6rem 0;
    background: rgba(33, 115, 77, 0.02);
}

.section-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(33, 115, 77, 0.1);
    height: 100%;
}

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

.article-image {
    height: 220px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.article-image.no-image {
    background: var(--gradient-primary);
}

.article-image.no-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(33, 115, 77, 0.8), rgba(76, 175, 80, 0.6));
}

.article-image.no-image .nutrismart-logo {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-image.no-image .nutrismart-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.article-image::after {
    /* content: '\f1ea'; */
    /* font-family: 'Font Awesome 6 Free'; */
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    opacity: 0.7;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.article-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1), transparent);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 2rem 0;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .btn-primary-gradient {
        width: 100%;
        justify-content: center;
        padding: 1.2rem 2rem;
    }

    .feature-card,
    .article-card {
        margin-bottom: 2rem;
    }
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(33, 115, 77, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
