/* Animated Hero Section with Scroll Interactions */
.hero-animated {
    position: relative;
    overflow: hidden;
    padding: 20px 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    transition: all 0.6s ease-out;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-animated {
        padding-top: 5px;
        min-height: 280px;
    }
}

/* Content wrapper for flex layout */
.hero-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

/* Main hero content */
.hero-main {
    position: relative;
    text-align: center;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 800px;
    margin: 0 auto 40px;
    transform-origin: center top;
    z-index: 2;
    will-change: transform, opacity;
}

/* Hero Statement - Most Important Component */
.hero-statement {
    text-align: center;
    margin-bottom: 24px;
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform: translateY(0);
    opacity: 1;
    z-index: 3;
    position: relative;
    max-width: 700px;
    padding: 0;
}

.hero-title {
    font-size: 3.8rem;
    margin-bottom: 12px;
    line-height: 1.1;
    color: #222;
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 6px;
    background: var(--secondary-color);
    bottom: 6px;
    left: 0;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0.6;
    transition: transform 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.2s;
}

/* Subtle highlight for subtitle text */
.highlight-subtle {
    position: relative;
    color: inherit;
    font-weight: 600;
}

.highlight-subtle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--secondary-color);
    bottom: 0;
    left: 0;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0.5;
    transition: transform 1s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s;
}

.hero-animated.scrolled .highlight-subtle::after {
    transform: scaleX(1);
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.4;
    color: #444;
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Feature Icons with Descriptions (Single Line) */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 0;
    position: relative;
    opacity: 1; /* Start visible but items inside are hidden */
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 1;
    max-width: 700px;
    flex-wrap: nowrap; /* Force single line */
    padding: 0;
}

.feature-item {
    display: flex;
    flex-direction: column; /* Stack icon on top of text */
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy effect */
    width: 24%; /* Four equal items */
    margin-bottom: 0;
}

.feature-text {
    text-align: center;
    margin-left: 0;
    margin-top: 10px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: visible;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background-color: white;
    cursor: pointer;
}

.hero-animated.scrolled .feature-icon {
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.feature-icon i {
    font-size: 24px;
    color: #7d3bed;
    transition: transform 0.4s ease;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.feature-label {
    font-weight: 700;
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
    transition: opacity 0.4s ease;
    margin-top: 6px;
}

.feature-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-label {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #2d3748;
}

.feature-desc {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
    max-width: 180px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.15s;
}

/* Call to Action Buttons - Second Most Important */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.cta-button {
    font-size: 1.1rem;
    padding: 16px 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:hover::after {
    transform: translateX(100%);
}

.secondary-button {
    font-size: 1rem;
    padding: 15px 30px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.secondary-button:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-3px);
}

/* Animation states for scroll interaction */
.hero-animated.scrolled {
    padding-top: 20px;
}

.hero-animated.scrolled .hero-statement {
    transform: translateY(-30px) scale(0.85);
}

.hero-animated.scrolled .hero-title {
    font-size: 3.8rem;
}

.hero-animated.scrolled .hero-title .highlight::after {
    transform: scaleX(1);
}

.hero-animated.scrolled .hero-cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.hero-animated.scrolled .hero-features {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* More dramatic staggered icon animations */
.hero-animated.scrolled .feature-item:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
    transition-duration: 0.6s;
}

.hero-animated.scrolled .feature-item:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.3s;
    transition-duration: 0.6s;
}

.hero-animated.scrolled .feature-item:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.8s;
    transition-duration: 0.6s;
}

.hero-animated.scrolled .feature-item:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 2.3s;
    transition-duration: 0.6s;
}

/* Icon hover effects */
.hero-animated.scrolled .feature-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(125, 59, 237, 0.3);
    background-color: #7d3bed;
}

.hero-animated.scrolled .feature-icon:hover i {
    transform: scale(1.1);
    color: white;
}

/* Animation for feature descriptions - appear after icons */
.hero-animated.scrolled .feature-item:nth-child(1) .feature-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.1s;
    transition-duration: 0.5s;
}

.hero-animated.scrolled .feature-item:nth-child(2) .feature-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.6s;
    transition-duration: 0.5s;
}

.hero-animated.scrolled .feature-item:nth-child(3) .feature-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 2.1s;
    transition-duration: 0.5s;
}

.hero-animated.scrolled .feature-item:nth-child(4) .feature-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 2.6s;
    transition-duration: 0.5s;
}

.feature-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(125, 59, 237, 0.3);
    background-color: #7d3bed;
}

.feature-icon:hover i {
    color: white;
}

/* All icons now use the same style with purple accents */
.conversation-icon,
.structured-icon,
.exams-icon,
.business-icon {
    background: white;
    box-shadow: 0 6px 15px rgba(125, 59, 237, 0.2);
    border: 2px solid #7d3bed;
}

/* Mobile responsiveness */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3.8rem;
    }
    
    .hero-animated.scrolled .hero-title {
        font-size: 3.2rem;
    }
}

@media (max-width: 768px) {
    .hero-animated {
        padding: 10px 0 30px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-animated.scrolled .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-features {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .feature-item {
        width: 45%;
        margin-bottom: 10px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-button, .secondary-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-item {
        width: 45%;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon i {
        font-size: 20px;
    }
    
    .feature-text {
        width: 100%;
    }
    
    .feature-label {
        font-size: 13px;
    }
    
    .feature-desc {
        font-size: 11px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-features {
        gap: 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 24px;
    }
    
    .feature-label {
        font-size: 14px;
    }
}
