/* ============================================
   HOMEPAGE SPECIFIC STYLES
   Extends dark-theme.css - include both files
   ============================================ */

/* Apply dark-theme styles to homepage-premium class */
.homepage-premium {
    background: var(--dark) !important;
    color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.homepage-premium main {
    background: transparent;
}

/* ============================================
   1. Animated Background (Homepage Only)
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    animation: bgMove 20s ease-in-out infinite;
}

@keyframes bgMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(-1%, 1%) rotate(-1deg); }
    75% { transform: translate(1%, -2%) rotate(0.5deg); }
}

/* ============================================
   2. Hero Section (Homepage Only)
   ============================================ */
.homepage-premium header.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    background: transparent;
}

.homepage-premium .hero-content {
    text-align: center;
    z-index: 1;
    max-width: 1200px;
}

/* Hero Badge */
.homepage-premium .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
}

.homepage-premium .hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Hero Title */
.homepage-premium .hero-title {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
    animation: fadeInUp 0.8s ease 0.1s both;
}

/* Hero Subtitle */
.homepage-premium .hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--gray-light);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Hero CTA */
.homepage-premium .hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Hero Select Group */
.homepage-premium .hero-select-group {
    display: flex;
    gap: 0;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.homepage-premium .hero-select-group .form-select,
.homepage-premium .hero-select-group select.form-select,
.homepage-premium .hero-select-group select.form-select-lg,
body.homepage-premium .hero-select-group .form-select {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--white) !important;
    font-size: 1rem;
    padding: 1rem 2.5rem 1rem 1.25rem !important;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.homepage-premium .hero-select-group .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background-color: rgba(30, 41, 59, 0.95) !important;
}

.homepage-premium .hero-select-group .form-select option {
    background: var(--dark-light);
    color: var(--white);
    padding: 0.5rem;
}

.homepage-premium .hero-select-group .btn-primary {
    border-radius: 0 12px 12px 0;
    border-left: none !important;
    white-space: nowrap;
    padding: 1rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

/* ============================================
   3. Hero Visual - Animated Flow (Homepage Only)
   ============================================ */
.homepage-premium .hero-visual {
    margin-top: 4rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.homepage-premium .content-flow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.homepage-premium .flow-entity {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    text-align: center;
    min-width: 160px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.homepage-premium .flow-entity:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.homepage-premium .flow-entity-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--white);
}

.homepage-premium .flow-entity-icon-output {
    background: var(--gradient-2);
}

.homepage-premium .flow-entity h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.homepage-premium .flow-entity p {
    font-size: 0.85rem;
    color: var(--gray-light);
    margin: 0;
}

/* Animated Flow Line */
.homepage-premium .flow-line {
    flex: 1;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--primary) 100%);
    position: relative;
    min-width: 80px;
    max-width: 180px;
    border-radius: 2px;
}

.homepage-premium .flow-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: flowMove 2s linear infinite;
    box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary);
}

@keyframes flowMove {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% - 16px); opacity: 0; }
}

.homepage-premium .flow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.homepage-premium .flow-center i {
    font-size: 1.25rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

/* Flow - Mobile Vertical Layout */
@media (max-width: 768px) {
    .homepage-premium .content-flow-container {
        flex-direction: column;
        gap: 0;
        padding: 1.5rem;
    }
    
    .homepage-premium .flow-entity {
        padding: 1.5rem 2rem;
        min-width: 200px;
    }
    
    .homepage-premium .flow-line {
        width: 4px;
        height: 60px;
        min-width: 4px;
        max-width: 4px;
        min-height: 60px;
    }
    
    .homepage-premium .flow-line::before {
        animation: flowMoveVertical 2s linear infinite;
    }
    
    @keyframes flowMoveVertical {
        0% { top: 0; left: 50%; transform: translateX(-50%); opacity: 0; }
        10% { opacity: 1; }
        90% { opacity: 1; }
        100% { top: calc(100% - 16px); left: 50%; transform: translateX(-50%); opacity: 0; }
    }
}

/* ============================================
   4. Homepage Responsive
   ============================================ */
@media (max-width: 992px) {
    .homepage-premium header.hero-section {
        padding: 7rem 1.5rem 3rem;
        min-height: 100vh;
    }
    
    .homepage-premium .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .homepage-premium .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .homepage-premium .hero-select-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .homepage-premium .hero-select-group .form-select {
        border-radius: 12px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .homepage-premium .hero-select-group .btn-primary {
        border-radius: 12px;
        width: 100%;
        justify-content: center;
        border-left: 2px solid var(--primary-light) !important;
    }
}

@media (max-width: 768px) {
    .homepage-premium header.hero-section {
        padding: 6rem 1rem 2rem;
    }
}
