/**
 * Homepage Styles - Skillify Calculators
 * Professional modern design for the front page
 * 
 * @package Skillify_Calculators
 */

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.95);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Hero Calculator Preview */
.hero-calculator-preview {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.preview-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-line {
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    width: 60%;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; width: 60%; }
    50% { opacity: 0.6; width: 80%; }
}

.preview-result {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    font-family: var(--font-mono);
}

.preview-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.preview-btn {
    height: 56px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: block;
    animation: btnPulse 3s ease-in-out infinite;
}

.preview-btn:nth-child(1) { animation-delay: 0s; }
.preview-btn:nth-child(2) { animation-delay: 0.2s; }
.preview-btn:nth-child(3) { animation-delay: 0.4s; }
.preview-btn:nth-child(4) { animation-delay: 0.6s; }

@keyframes btnPulse {
    0%, 100% { background: rgba(255, 255, 255, 0.3); }
    50% { background: rgba(255, 255, 255, 0.5); }
}

/* ============================================
   CALCULATORS SECTION
   ============================================ */

.calculators-section {
    padding: 100px 0;
    background: var(--bg-primary);
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.calculator-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.calculator-card:hover::before {
    transform: scaleX(1);
}

.calculator-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Color variations */
.calculator-card.color-1 .calculator-card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.calculator-card.color-2 .calculator-card-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.calculator-card.color-3 .calculator-card-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.calculator-card.color-4 .calculator-card-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.calculator-card.color-5 .calculator-card-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.calculator-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
}

.calculator-card:hover .calculator-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.calculator-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.calculator-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-card:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-card .arrow {
    transition: transform 0.3s ease;
}

.btn-card:hover .arrow {
    transform: translateX(4px);
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 32px;
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.feature-item:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-item:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-item:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-item:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-item:nth-child(5) .feature-icon { animation-delay: 0.8s; }
.feature-item:nth-child(6) .feature-icon { animation-delay: 1s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .cta-section {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.btn-white {
    background: white;
    color: #667eea;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-white:hover {
    background: #f8fafc;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .hero-content {
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
        text-align: center;
    }
    
    .hero-calculator-preview {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .calculators-section,
    .features-section,
    .cta-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1.125rem;
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }
    
    .preview-result {
        font-size: 2rem;
    }
    
    .preview-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .preview-btn {
        height: 48px;
    }
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

.homepage {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



