/* ============================================
   N8N Workflow Automation Page Styles
   Theme: Purple/Violet (#8B5CF6, #A78BFA)
   ============================================ */

/* Hero Section */
.n8nHeroSection {
    position: relative;
    padding: 120px 0 80px;
    background: transparent !important;
    overflow: hidden;
}

[data-theme="dark"] .n8nHeroSection {
    background: transparent !important;
}

.n8nHeroGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
}

@media (min-width: 1024px) {
    .n8nHeroGrid {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }
}

.n8nHeroContent {
    animation: fadeInUp 0.8s ease-out;
}

.heroBadge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    margin-bottom: 24px;
    animation: fadeIn 1s ease-out 0.2s both;
}

[data-theme="dark"] .heroBadge {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.25));
    border-color: rgba(139, 92, 246, 0.3);
}

.badgeIcon {
    font-size: 20px;
}

.badgeText {
    font-size: 14px;
    font-weight: 600;
    color: #8B5CF6;
}

[data-theme="dark"] .badgeText {
    color: #A78BFA;
}

.heroTitle {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 24px;
    animation: fadeIn 1s ease-out 0.3s both;
}

@media (min-width: 768px) {
    .heroTitle {
        font-size: 56px;
    }
}

.titleGradient {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.heroDescription {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    animation: fadeIn 1s ease-out 0.4s both;
}

[data-theme="dark"] .heroDescription {
    color: #cbd5e1;
}

/* Hero Stats */
.heroStats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
    animation: fadeIn 1s ease-out 0.5s both;
}

.heroStat {
    text-align: center;
}

@media (min-width: 640px) {
    .heroStat {
        text-align: left;
    }
}

.statValue {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.statLabel {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Hero Actions */
.heroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.btnPrimary, .btnSecondary {
    padding: 18px 36px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btnPrimary {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow:
        0 8px 24px rgba(139, 92, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .btnPrimary {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow:
        0 8px 24px rgba(139, 92, 246, 0.5),
        inset 0 1px 0 rgba(139, 92, 246, 0.2);
}

.btnPrimary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btnPrimary span {
    position: relative;
    z-index: 1;
}

.btnPrimary svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
}

.btnPrimary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btnPrimary:hover {
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.6),
        inset 0 1px 0 rgba(139, 92, 246, 0.25);
}

.btnPrimary:hover::before {
    opacity: 1;
}

.btnPrimary:hover span,
.btnPrimary:hover svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.btnSecondary {
    background: white;
    color: #8B5CF6;
    border: 2px solid rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .btnSecondary {
    background: rgba(30, 41, 59, 0.8);
    color: #A78BFA;
    border-color: rgba(139, 92, 246, 0.3);
}

.btnSecondary:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8B5CF6;
}

[data-theme="dark"] .btnSecondary:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #A78BFA;
}

/* N8N Hero Visual - Workflow System */
.n8nHeroVisual {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-out 0.7s both;
}

.workflowContainer {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 500px;
    margin: 0 auto;
}

/* Central N8N Node */
.workflowCentralNode {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.6);
    animation: centralPulse 3s ease-in-out infinite;
    z-index: 10;
}

[data-theme="dark"] .workflowCentralNode {
    box-shadow: 0 0 80px rgba(139, 92, 246, 0.8);
}

@keyframes centralPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 60px rgba(139, 92, 246, 0.6);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 80px rgba(139, 92, 246, 0.8);
    }
}

.centralNodeInner {
    width: 40px;
    height: 40px;
    color: white;
    margin-bottom: 8px;
}

.centralNodeInner svg {
    width: 100%;
    height: 100%;
}

.centralNodeLabel {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

/* Connection Lines */
.workflowConnections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connectionLine {
    stroke: #8B5CF6;
    stroke-width: 2;
    stroke-dasharray: 8 4;
    opacity: 0.3;
    animation: lineFlow 3s linear infinite;
}

[data-theme="dark"] .connectionLine {
    stroke: #A78BFA;
    opacity: 0.4;
}

@keyframes lineFlow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -100;
    }
}

/* App Nodes */
.workflowAppNode {
    z-index: 5;
}

.appNodeInner {
    width: 80px;
    height: 80px;
    background: var(--color-surface);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 20px rgba(139, 92, 246, 0.15);
    transition: all 0.3s ease;
    animation: nodeFloat 4s ease-in-out infinite;
}

[data-theme="dark"] .appNodeInner {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 30px rgba(139, 92, 246, 0.2);
}

.appNodeInner:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: #8B5CF6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 40px rgba(139, 92, 246, 0.3);
}

@keyframes nodeFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.appNodeIcon {
    font-size: 28px;
    line-height: 1;
}

.appNodeLabel {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
}

[data-theme="dark"] .appNodeLabel {
    color: #cbd5e1;
}

/* Features Section */
.n8nFeaturesSection {
    padding: 80px 0;
    background: transparent !important;
}

[data-theme="dark"] .n8nFeaturesSection {
    background: transparent !important;
}

.sectionHeader {
    text-align: center;
    margin-bottom: 60px;
}

.sectionTitle {
    font-size: 42px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 16px;
}

.sectionSubtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.featuresGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 640px) {
    .featuresGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .featuresGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.featureCard {
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .featureCard {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.featureCard:hover {
    transform: translateY(-8px);
    border-color: #8B5CF6;
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.2),
        0 0 40px rgba(139, 92, 246, 0.1);
}

.featureIcon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #8B5CF6;
}

[data-theme="dark"] .featureIcon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.25));
    color: #A78BFA;
}

.featureIcon svg {
    width: 28px;
    height: 28px;
}

.featureTitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.featureDescription {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* Workflow Examples Section */
.workflowExamplesSection {
    padding: 80px 0;
    background: transparent !important;
}

[data-theme="dark"] .workflowExamplesSection {
    background: transparent !important;
}

.workflowsGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .workflowsGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .workflowsGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.workflowCard {
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .workflowCard {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.workflowCard:hover {
    transform: translateY(-8px);
    border-color: #8B5CF6;
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.2),
        0 0 40px rgba(139, 92, 246, 0.1);
}

.workflowIcon {
    font-size: 48px;
    margin-bottom: 20px;
}

.workflowTitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.workflowDescription {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.workflowFlow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
}

[data-theme="dark"] .workflowFlow {
    background: rgba(139, 92, 246, 0.1);
}

.flowStep {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #8B5CF6;
    white-space: nowrap;
}

[data-theme="dark"] .flowStep {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.3));
    border-color: rgba(139, 92, 246, 0.3);
    color: #A78BFA;
}

.flowArrow {
    font-size: 14px;
    color: #8B5CF6;
    font-weight: 700;
}

[data-theme="dark"] .flowArrow {
    color: #A78BFA;
}

/* Integrations Section */
.integrationsSection {
    padding: 80px 0;
    background: transparent !important;
}

[data-theme="dark"] .integrationsSection {
    background: transparent !important;
}

.integrationsCategoriesGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .integrationsCategoriesGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .integrationsCategoriesGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.integrationCategory {
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .integrationCategory {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.integrationCategory:hover {
    border-color: #8B5CF6;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.categoryTitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
}

.integrationBadges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.integrationBadge {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #8B5CF6;
    transition: all 0.2s ease;
}

[data-theme="dark"] .integrationBadge {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.25);
    color: #A78BFA;
}

.integrationBadge:hover {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Benefits Section */
.benefitsSection {
    padding: 80px 0;
    background: transparent !important;
}

[data-theme="dark"] .benefitsSection {
    background: transparent !important;
}

.benefitsGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .benefitsGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.benefitCard {
    padding: 40px;
    background: var(--color-surface);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .benefitCard {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.benefitCard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.benefitCard:hover {
    transform: translateY(-8px);
    border-color: #8B5CF6;
    box-shadow:
        0 12px 32px rgba(139, 92, 246, 0.2),
        0 0 40px rgba(139, 92, 246, 0.1);
}

.benefitCard:hover::before {
    opacity: 1;
}

.benefitNumber {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 20px;
}

.benefitTitle {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.benefitDescription {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* CTA Section */
.n8nCtaSection {
    padding: 80px 0;
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .n8nCtaSection {
    background: transparent !important;
}

.ctaContent {
    text-align: center;
    position: relative;
    z-index: 1;
}

.ctaTitle {
    font-size: 42px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .ctaTitle {
        font-size: 48px;
    }
}

.ctaDescription {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.ctaActions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .n8nHeroVisual {
        height: 400px;
    }

    .workflowContainer {
        max-width: 400px;
        height: 400px;
    }

    .workflowCentralNode {
        width: 90px;
        height: 90px;
    }

    .appNodeInner {
        width: 70px;
        height: 70px;
    }

    .appNodeIcon {
        font-size: 24px;
    }

    .appNodeLabel {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .heroTitle {
        font-size: 36px;
    }

    .heroStats {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .n8nHeroVisual {
        height: 350px;
    }

    .workflowContainer {
        max-width: 350px;
        height: 350px;
    }

    .workflowCentralNode {
        width: 80px;
        height: 80px;
    }

    .centralNodeInner {
        width: 35px;
        height: 35px;
    }

    .centralNodeLabel {
        font-size: 14px;
    }

    .appNodeInner {
        width: 60px;
        height: 60px;
    }

    .appNodeIcon {
        font-size: 22px;
    }

    .appNodeLabel {
        font-size: 10px;
    }

    .sectionTitle {
        font-size: 32px;
    }

    .ctaTitle {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .heroTitle {
        font-size: 28px;
    }

    .n8nHeroVisual {
        height: 300px;
    }

    .workflowContainer {
        max-width: 300px;
        height: 300px;
    }

    .workflowCentralNode {
        width: 70px;
        height: 70px;
    }

    .centralNodeInner {
        width: 30px;
        height: 30px;
    }

    .centralNodeLabel {
        font-size: 12px;
    }

    .appNodeInner {
        width: 50px;
        height: 50px;
    }

    .appNodeIcon {
        font-size: 20px;
    }

    .appNodeLabel {
        font-size: 9px;
    }

    .flowStep {
        font-size: 11px;
        padding: 4px 8px;
    }
}
