/**
 * How It Works Page - Modern Redesign
 * Fortune Writers - Academic Writing Service
 */

/* Hero Section */
.hiw-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: var(--space-20) 0 var(--space-16);
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-primary-dark) 100%);
}

.hiw-hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hiw-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hiw-hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    color: var(--color-white);
    margin-bottom: var(--space-6);
    line-height: var(--leading-tight);
    animation: fadeInUp 0.8s ease-out;
}

.hiw-hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-10);
    line-height: var(--leading-relaxed);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hiw-hero-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hiw-badge {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    color: var(--color-white);
    font-weight: var(--font-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hiw-badge i {
    color: var(--color-secondary);
    font-size: var(--text-lg);
}

/* Process Timeline Section */
.hiw-process-section {
    padding: var(--space-20) 0;
    background: var(--color-white);
}

.hiw-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-16);
}

.hiw-section-header h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.hiw-section-header p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* Interactive Process Steps */
.hiw-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.hiw-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transform: translateX(-50%);
    z-index: 0;
}

.hiw-step {
    position: relative;
    margin-bottom: var(--space-16);
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.hiw-step:nth-child(even) {
    flex-direction: row-reverse;
}

.hiw-step-content {
    flex: 1;
    background: var(--color-white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--color-gray-100);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(30px);
}

.hiw-step-content.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.hiw-step-content:hover {
    box-shadow: var(--shadow-2xl);
    border-color: var(--color-secondary);
    transform: translateY(-5px);
}

.hiw-step-number-wrapper {
    position: relative;
    flex-shrink: 0;
    z-index: 2;
}

.hiw-step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: var(--text-3xl);
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--color-white);
    transition: all var(--transition-base);
}

.hiw-step-content:hover ~ .hiw-step-number-wrapper .hiw-step-number,
.hiw-step-number-wrapper:hover .hiw-step-number {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-primary);
    transform: scale(1.1) rotate(5deg);
}

.hiw-step-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 35px;
    height: 35px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-white);
    font-size: var(--text-sm);
}

.hiw-step-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.hiw-step-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin: 0;
}

.hiw-step-duration {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-secondary-light);
    color: var(--color-primary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.hiw-step-description {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.hiw-step-features {
    list-style: none;
    padding: 0;
    margin: var(--space-4) 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-3);
}

.hiw-step-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text);
    padding: var(--space-2);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
}

.hiw-step-features li i {
    color: var(--color-success);
    font-size: var(--text-base);
    flex-shrink: 0;
}

.hiw-step-highlight {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--color-info-light);
    border-left: 4px solid var(--color-info);
    border-radius: var(--radius-md);
}

.hiw-step-highlight strong {
    color: var(--color-info);
}

/* Guarantees Section */
.hiw-guarantees-section {
    padding: var(--space-20) 0;
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
}

.hiw-guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-12);
}

.hiw-guarantee-card {
    background: var(--color-white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.hiw-guarantee-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.hiw-guarantee-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.hiw-guarantee-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-3xl);
    margin: 0 auto var(--space-4);
    transition: all var(--transition-base);
}

.hiw-guarantee-card:hover .hiw-guarantee-icon {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: var(--color-primary);
    transform: scale(1.1) rotate(10deg);
}

.hiw-guarantee-card h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.hiw-guarantee-card p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* Communication Flow Section */
.hiw-communication-section {
    padding: var(--space-20) 0;
    background: var(--color-white);
}

.hiw-communication-visual {
    max-width: 900px;
    margin: var(--space-12) auto 0;
    background: var(--color-white);
    padding: var(--space-10);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--color-gray-100);
}

.hiw-communication-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.hiw-comm-participant {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.hiw-comm-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-4xl);
    margin: 0 auto var(--space-4);
    box-shadow: var(--shadow-lg);
}

.hiw-comm-participant h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.hiw-comm-participant p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.hiw-comm-arrows {
    flex-shrink: 0;
    font-size: var(--text-4xl);
    color: var(--color-secondary);
    animation: pulse 2s ease-in-out infinite;
}

.hiw-comm-features {
    margin-top: var(--space-8);
    padding-top: var(--space-8);
    border-top: 2px solid var(--color-gray-100);
}

.hiw-comm-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.hiw-comm-feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
}

.hiw-comm-feature i {
    color: var(--color-success);
    font-size: var(--text-xl);
}

.hiw-comm-feature span {
    color: var(--color-text);
    font-weight: var(--font-medium);
}

/* Pricing Comparison Section */
.hiw-pricing-section {
    padding: var(--space-20) 0;
    background: var(--color-gray-50);
}

.hiw-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-12);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.hiw-pricing-card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--color-gray-200);
    transition: all var(--transition-base);
    position: relative;
}

.hiw-pricing-card.featured {
    border-color: var(--color-secondary);
    transform: scale(1.05);
}

.hiw-pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-secondary);
    color: var(--color-primary);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
}

.hiw-pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.hiw-pricing-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.hiw-pricing-name {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.hiw-pricing-amount {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    color: var(--color-primary);
}

.hiw-pricing-amount span {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
}

.hiw-pricing-features {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0;
}

.hiw-pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-gray-100);
    color: var(--color-text);
}

.hiw-pricing-features li i {
    color: var(--color-success);
    font-size: var(--text-lg);
}

/* FAQ Section */
.hiw-faq-section {
    padding: var(--space-20) 0;
    background: var(--color-white);
}

.hiw-faq-container {
    max-width: 900px;
    margin: var(--space-12) auto 0;
}

.hiw-faq-item {
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-4);
    overflow: hidden;
    transition: all var(--transition-base);
}

.hiw-faq-item:hover {
    border-color: var(--color-primary);
}

.hiw-faq-item.active {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-lg);
}

.hiw-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6);
    cursor: pointer;
    background: var(--color-white);
    transition: all var(--transition-base);
    width: 100%;
    border: none;
    text-align: left;
    font-family: inherit;
}

.hiw-faq-question:hover {
    background: var(--color-gray-50);
}

.hiw-faq-item.active .hiw-faq-question {
    background: var(--color-primary);
    color: var(--color-white);
}

.hiw-faq-question h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
}

.hiw-faq-item.active .hiw-faq-question h3 {
    color: var(--color-white);
}

.hiw-faq-toggle {
    width: 35px;
    height: 35px;
    background: var(--color-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.hiw-faq-item.active .hiw-faq-toggle {
    background: var(--color-secondary);
    transform: rotate(180deg);
}

.hiw-faq-toggle i {
    color: var(--color-primary);
    transition: all var(--transition-base);
}

.hiw-faq-item.active .hiw-faq-toggle i {
    color: var(--color-primary);
}

.hiw-faq-answer {
    padding: 0 var(--space-6);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-base);
}

.hiw-faq-item.active .hiw-faq-answer {
    padding: var(--space-6);
    max-height: 500px;
}

.hiw-faq-answer p {
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* Support Section */
.hiw-support-section {
    padding: var(--space-20) 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
}

.hiw-support-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hiw-support-content h2 {
    color: var(--color-white);
    margin-bottom: var(--space-6);
}

.hiw-support-content p {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-10);
}

.hiw-support-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.hiw-support-channel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

.hiw-support-channel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.hiw-support-channel i {
    font-size: var(--text-4xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-4);
}

.hiw-support-channel h4 {
    color: var(--color-white);
    margin-bottom: var(--space-2);
}

.hiw-support-channel p {
    font-size: var(--text-sm);
    margin-bottom: 0;
}

/* CTA Section */
.hiw-cta-section {
    padding: var(--space-20) 0;
    background: var(--color-white);
    text-align: center;
}

.hiw-cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.hiw-cta-content h2 {
    font-size: var(--text-4xl);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.hiw-cta-content p {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-10);
}

.hiw-cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hiw-hero-title {
        font-size: var(--text-3xl);
    }

    .hiw-hero-subtitle {
        font-size: var(--text-lg);
    }

    .hiw-timeline::before {
        left: 30px;
    }

    .hiw-step {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: var(--space-16);
    }

    .hiw-step-number-wrapper {
        position: absolute;
        left: 0;
    }

    .hiw-step-number {
        width: 60px;
        height: 60px;
        font-size: var(--text-xl);
    }

    .hiw-step-icon {
        width: 28px;
        height: 28px;
        font-size: var(--text-xs);
    }

    .hiw-step-content {
        width: 100%;
    }

    .hiw-communication-flow {
        flex-direction: column;
    }

    .hiw-comm-arrows {
        transform: rotate(90deg);
    }

    .hiw-pricing-card.featured {
        transform: scale(1);
    }

    .hiw-section-header h2 {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 480px) {
    .hiw-hero {
        min-height: 60vh;
        padding: var(--space-16) 0 var(--space-12);
    }

    .hiw-hero-title {
        font-size: var(--text-2xl);
    }

    .hiw-hero-subtitle {
        font-size: var(--text-base);
    }

    .hiw-hero-badges {
        flex-direction: column;
    }

    .hiw-step-title {
        font-size: var(--text-xl);
    }

    .hiw-guarantees-grid,
    .hiw-pricing-grid,
    .hiw-support-channels {
        grid-template-columns: 1fr;
    }

    .hiw-cta-buttons {
        flex-direction: column;
    }

    .hiw-cta-buttons .btn {
        width: 100%;
    }
}
