/* ============================================
   Premium UI Enhancements
   Modern Design System with Advanced Effects
   ============================================ */

/* Enhanced Color Variables */
:root {
    /* Primary Palette */
    --primary-green: #76c043;
    --primary-green-light: #8dd155;
    --primary-green-dark: #5da639;
    --dark-green: #2d5016;
    --accent-green: #4caf50;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #76c043 0%, #5da639 50%, #2d5016 100%);
    --gradient-subtle: linear-gradient(135deg, #f0f8f0 0%, #e8f5e9 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    
    /* Shadows (Enhanced) */
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 6px 24px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-intense: 0 20px 60px rgba(0, 0, 0, 0.25);
    --shadow-colored: 0 8px 32px rgba(118, 192, 67, 0.3);
    
    /* New Variables */
    --blur-glass: blur(10px);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Glassmorphism Effect
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-medium);
}

/* ============================================
   Enhanced Hero Section
   ============================================ */
.hero {
    position: relative;
    background: var(--gradient-primary);
    overflow: hidden;
}

/* Animated Floating Elements */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s ease-in-out infinite;
}

.hero::before {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero::after {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Enhanced Hero Content */
.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.3));
}

/* ============================================
   Advanced Button Styles
   ============================================ */
.btn-primary,
.btn-submit,
.select-package {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth);
}

.btn-primary::after,
.btn-submit::after,
.select-package::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::after,
.btn-submit:hover::after,
.select-package:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:active,
.btn-submit:active,
.select-package:active {
    transform: translateY(-2px) scale(0.98);
}

/* ============================================
   Enhanced Card Designs
   ============================================ */
.pricing-card,
.review-card,
.guarantee-item,
.choose-item {
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
}

/* Shine Effect on Hover */
.pricing-card::before,
.review-card::before,
.guarantee-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.pricing-card:hover::before,
.review-card:hover::before,
.guarantee-item:hover::before {
    opacity: 1;
    left: 100%;
}

/* ============================================
   Product Cards Grid Enhancement
   ============================================ */
.benefit-item {
    position: relative;
    overflow: hidden;
}

.benefit-item::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 4px;
    background: var(--gradient-primary);
    transition: width 0.4s var(--transition-smooth);
}

.benefit-item:hover::after {
    width: 100%;
}

/* ============================================
   Gallery Enhanced Effects
   ============================================ */
.gallery-grid img {
    position: relative;
    filter: brightness(0.95);
    transition: all 0.5s var(--transition-smooth);
}

.gallery-grid img:hover {
    filter: brightness(1.1) contrast(1.1);
    transform: scale(1.08) translateY(-5px);
}

/* Image Overlay Effect */
.gallery-grid > * {
    position: relative;
}

.gallery-grid > *::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(118, 192, 67, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
    pointer-events: none;
    border-radius: var(--radius-md, 12px);
}

.gallery-grid > *:hover::before {
    opacity: 1;
}

/* ============================================
   Pricing Cards - Premium Design
   ============================================ */
.pricing-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.pricing-card.featured {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8f0 100%);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
}

/* Discount Badge Animation */
.discount-badge {
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(50%) rotate(-3deg); }
    50% { transform: translateX(50%) rotate(3deg); }
}

/* ============================================
   Form Enhancements
   ============================================ */
.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    position: relative;
    z-index: 1;
}

/* Floating Label Effect */
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-150%) scale(0.85);
    color: var(--primary-green);
}

/* Input Focus Ring */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(118, 192, 67, 0.1),
                0 4px 12px rgba(118, 192, 67, 0.15);
}

/* ============================================
   Reviews Section Enhancement
   ============================================ */
.review-card {
    transform-origin: bottom;
}

.review-card:hover {
    transform: translateY(-15px) rotateX(2deg);
}

.stars {
    display: inline-block;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); }
}

/* ============================================
   Scroll Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Apply scroll animations */
.animate-on-scroll {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* ============================================
   Sticky CTA Enhancement
   ============================================ */
.sticky-cta {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-colored);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(118, 192, 67, 0.4),
                    0 0 40px rgba(118, 192, 67, 0.2),
                    0 12px 48px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(118, 192, 67, 0.6),
                    0 0 60px rgba(118, 192, 67, 0.3),
                    0 16px 56px rgba(0, 0, 0, 0.4);
    }
}

/* ============================================
   Ingredients List Enhancement
   ============================================ */
.ingredients-list li {
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
}

.ingredients-list li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s var(--transition-smooth);
}

.ingredients-list li:hover::after {
    width: 80%;
}

.ingredients-list li:hover {
    transform: translateY(-12px) scale(1.05);
}

/* ============================================
   Section Dividers
   ============================================ */
.section-divider {
    position: relative;
    height: 60px;
    overflow: hidden;
}

.section-divider svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   Loading Animation
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   Checkmark Animation
   ============================================ */
.checkmark {
    display: inline-block;
    animation: checkmark-pop 0.5s ease-out backwards;
}

@keyframes checkmark-pop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ============================================
   Tooltip Enhancement
   ============================================ */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ============================================
   Page Transitions
   ============================================ */
.page-transition {
    animation: pageLoad 0.6s ease-out;
}

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

/* ============================================
   Enhanced Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* ============================================
   Icon Animations
   ============================================ */
.icon-bounce {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   Gradient Text Effect
   ============================================ */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Responsive Enhancements
   ============================================ */
@media (max-width: 768px) {
    .hero::before {
        width: 200px;
        height: 200px;
    }
    
    .hero::after {
        width: 150px;
        height: 150px;
    }
    
    .btn-primary,
    .btn-submit {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Dark Mode Support (Future)
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f0f0f0;
        --text-medium: #d0d0d0;
        --off-white: #1a1a1a;
    }
}

/* ============================================
   Print Optimizations
   ============================================ */
@media print {
    .hero::before,
    .hero::after,
    .sticky-cta,
    .btn-primary,
    .btn-submit {
        display: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}
