/* Modern Home Page Styles with Animations - Light/Dark Mode Compatible */

/* Home-specific theme variables */
:root {
    /* Gradient colors for light theme */
    --hero-gradient-start: #667eea;
    --hero-gradient-end: #764ba2;
    --hero-overlay: rgba(255, 255, 255, 0.1);
    --hero-text-shadow: rgba(0, 0, 0, 0.3);
    --stats-gradient-start: #667eea;
    --stats-gradient-end: #764ba2;
}

/* Dark theme gradient adjustments */
[data-theme="dark"] {
    --hero-gradient-start: #2d3748;
    --hero-gradient-end: #4a5568;
    --hero-overlay: rgba(255, 255, 255, 0.05);
    --hero-text-shadow: rgba(0, 0, 0, 0.6);
    --stats-gradient-start: #2d3748;
    --stats-gradient-end: #4a5568;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-theme);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='25' cy='25' r='1' fill='rgba(255,255,255,0.1)'/%3E%3Ccircle cx='75' cy='75' r='1' fill='rgba(255,255,255,0.1)'/%3E%3Ccircle cx='75' cy='25' r='1' fill='rgba(255,255,255,0.1)'/%3E%3Ccircle cx='25' cy='75' r='1' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E") repeat;
    animation: float 20s infinite linear;
    opacity: 0.5;
    transition: var(--transition-theme);
}

[data-theme="dark"] .hero-section::before {
    opacity: 0.3;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='25' cy='25' r='1' fill='rgba(255,255,255,0.05)'/%3E%3Ccircle cx='75' cy='75' r='1' fill='rgba(255,255,255,0.05)'/%3E%3Ccircle cx='75' cy='25' r='1' fill='rgba(255,255,255,0.05)'/%3E%3Ccircle cx='25' cy='75' r='1' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E") repeat;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.hero-icon {
    width: 120px;
    height: 120px;
    background: var(--hero-overlay);
    backdrop-filter: var(--backdrop-blur);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: pulse 2s infinite;
    border: 2px solid var(--hero-overlay);
    transition: var(--transition-theme);
}

.hero-icon i {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 4px var(--hero-text-shadow));
}

.stat-card {
    text-align: center;
    color: white;
    padding: 2rem;
    transition: var(--transition-theme);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px var(--hero-text-shadow);
    transition: var(--transition-theme);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: var(--transition-theme);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modern Buttons */
.btn-modern {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-primary {
    background: white;
    color: var(--hero-gradient-start) !important;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-theme);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-dark);
    color: var(--hero-gradient-start) !important;
}

.btn-outline {
    background: transparent;
    color: white !important;
    border: 2px solid var(--hero-overlay);
    transition: var(--transition-theme);
}

.btn-outline:hover {
    background: var(--hero-overlay);
    transform: translateY(-3px);
    color: white !important;
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--primary-bg);
    transition: var(--transition-theme);
}

.section-header {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: var(--transition-theme);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    transition: var(--transition-theme);
}

/* Feature Cards */
.feature-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    border: 1px solid var(--card-border);
    transition: var(--transition-theme);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hero-gradient-start), var(--hero-gradient-end));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.ai-card .card-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.analytics-card .card-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.automation-card .card-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.database-card .card-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.collaboration-card .card-icon {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.security-card .card-icon {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.feature-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: var(--transition-theme);
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    transition: var(--transition-theme);
}

.card-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.card-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    transition: var(--transition-theme);
}

.card-features i {
    color: #4caf50;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition-theme);
}

/* Dark mode adjustments for card features */
[data-theme="dark"] .card-features i {
    color: #66bb6a;
}

.card-action {
    margin-top: auto;
}

.card-link {
    color: var(--hero-gradient-start);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-theme);
}

.card-link:hover {
    color: var(--hero-gradient-start);
    gap: 1rem;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--stats-gradient-start) 0%, var(--stats-gradient-end) 100%);
    transition: var(--transition-theme);
}

.stat-card {
    text-align: center;
    color: white;
    padding: 2rem;
    transition: var(--transition-theme);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--hero-overlay);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    transition: var(--transition-theme);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    transition: var(--transition-theme);
}

.stat-suffix {
    font-size: 2rem;
    display: inline;
    transition: var(--transition-theme);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    transition: var(--transition-theme);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-modern {
        width: 280px;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .feature-card {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .stats-section {
        padding: 60px 0;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-icon {
        width: 100px;
        height: 100px;
    }
    
    .hero-icon i {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Animation Keyframes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dark mode specific enhancements */
[data-theme="dark"] .hero-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .feature-card {
    backdrop-filter: blur(10px);
    border-color: var(--border-medium);
}

[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border-color: var(--border-light);
}

[data-theme="dark"] .card-icon {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stat-icon {
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Light mode specific enhancements */
[data-theme="light"] .feature-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .card-icon {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--hero-gradient-start), var(--hero-gradient-end));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--hero-gradient-end), var(--hero-gradient-start));
}
