/* why-ai-fails.css - Page-specific styles for Why AI Projects Fail */

/* Reading Progress Bar - Elegant Side Design */
.reading-progress {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40vh;
    background: rgba(15, 31, 51, 0.1);
    border-radius: 2px;
    z-index: 999;
    transition: all 0.3s ease;
}

.reading-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, var(--green) 0%, var(--blue) 100%);
    border-radius: 2px;
    transition: height 0.3s ease;
    box-shadow: 0 0 8px rgba(56, 161, 105, 0.3);
}

.reading-progress.active::after {
    height: var(--progress, 0%);
}

/* Article Hero */
.article-hero {
    padding: 6rem 0;
    text-align: center;
}

.article-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    display: block;
    font-size: 0.8em;
    font-weight: 500;
    margin-top: 0.5rem;
    color: var(--text-light);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.reading-time {
    padding-left: 2rem;
    border-left: 1px solid rgba(15, 31, 51, 0.2);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text);
    max-width: 700px;
    margin: 0 auto;
}


/* Success First Section */
.success-first {
    padding: 3rem 0;
}

.success-stat {
    background: var(--bg);
    border: 2px solid var(--green);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
}

.success-stat h2 {
    color: var(--green);
    margin-bottom: 2rem;
}

.success-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.success-item {
    padding: 1rem;
}

.success-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.success-item strong {
    display: block;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.success-item p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
}

.success-cta {
    font-weight: 600;
    color: var(--navy);
    margin-top: 2rem;
    font-size: 1.125rem;
}

/* Article Content */
.article-content {
    max-width: 700px;
    margin: 4rem auto;
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--navy);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--navy);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-intro {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--navy);
}

/* Warning/Success Stats */
.warning-stat {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.warning-stat strong {
    color: #dc2626;
    font-size: 1.25rem;
}

.stat-source {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.opportunity-cost {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 1rem;
}

/* Failure Reasons */
.failure-reason {
    background: var(--bg);
    border-left: 4px solid var(--navy);
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 8px rgba(15, 31, 51, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.failure-reason:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(15, 31, 51, 0.12);
}

.failure-header {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.failure-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--navy);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    animation: subtle-shake 4s ease-in-out infinite;
}

@keyframes subtle-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

.failure-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.failure-cost {
    font-size: 0.875rem;
    color: #dc2626;
    font-weight: 600;
}

/* Details/Summary Styling */
.failure-details {
    cursor: pointer;
}

.failure-details summary {
    padding: 0 1.5rem 1.5rem;
    list-style: none;
    color: var(--blue);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.failure-details summary::-webkit-details-marker {
    display: none;
}

.failure-details summary .arrow {
    transition: transform 0.3s ease;
}

.failure-details[open] summary .arrow {
    transform: rotate(90deg);
}

.failure-content {
    padding: 1.5rem;
    background: var(--bg-subtle);
    border-top: 1px solid rgba(15, 31, 51, 0.1);
}

.prevention-box {
    background: rgba(56, 161, 105, 0.1);
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.prevention-box strong {
    color: var(--green);
}

/* Key Insights */
.key-insight {
    background: var(--bg-subtle);
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    position: relative;
}

.key-insight::before {
    content: "💡";
    position: absolute;
    top: -15px;
    left: 20px;
    background: white;
    padding: 0 10px;
    font-size: 1.5rem;
}

.key-insight h3 {
    margin-top: 0;
}

/* Comparison Cards (Mobile-friendly) */
.comparison-wrapper {
    margin: 2rem 0;
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.comparison-card {
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid;
}

.comparison-card.failed {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
}

.comparison-card.success {
    background: rgba(56, 161, 105, 0.05);
    border-color: var(--green);
}

.comparison-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
}

.comparison-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comparison-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(15, 31, 51, 0.1);
    font-size: 0.95rem;
}

.comparison-card li:last-child {
    border-bottom: none;
}

/* Special Content Sections */
.clever-quote {
    font-style: italic;
    color: var(--navy);
    font-size: 1.125rem;
    margin: 1rem 0;
}

.comedy-gold {
    background: rgba(214, 158, 46, 0.1);
    padding: 1rem;
    border-left: 3px solid var(--gold);
    margin: 1rem 0;
}

.hidden-four-section {
    background: var(--navy);
    color: white !important;
    padding: 3rem;
    border-radius: 16px;
    margin: 3rem 0;
}

.hidden-four-section p {
    color: white !important;
}

.hidden-four-section * {
    color: white !important;
}

.hidden-four-section h2 {
    color: white;
}

.hidden-intro {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.paranoia-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.paranoia-box strong {
    color: var(--gold);
}

/* Confession Box */
.confession-box {
    background: var(--bg-subtle);
    padding: 2rem;
    border-left: 4px solid var(--navy);
    margin: 3rem 0;
    border-radius: 0 12px 12px 0;
}

.confession-box h3 {
    color: var(--navy);
    margin-top: 0;
    font-style: italic;
}

.confession-box blockquote {
    margin: 0;
}

.confession-box blockquote p {
    font-style: italic;
    color: var(--text);
    line-height: 1.8;
}

.confession-box cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Final Insights */
.final-insight {
    background: linear-gradient(135deg, var(--navy) 0%, #1a2a3d 100%);
    color: white !important;
    padding: 3rem;
    border-radius: 16px;
    margin: 3rem 0;
}

.final-insight p {
    color: white !important;
}

.final-insight * {
    color: white !important;
}

.final-insight h3 {
    color: white;
    margin-top: 0;
    font-size: 1.75rem;
}

.final-insight p {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Article CTA */
.article-cta {
    background: var(--navy);
    color: white !important;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    margin: 4rem 0;
}

.article-cta p {
    color: white !important;
}

.article-cta * {
    color: white !important;
}

.article-cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    margin: 1rem 0;
}

.download-button {
    display: inline-block;
    background: white;
    color: var(--navy);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.cta-guarantee {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Author Bio */
.author-bio {
    border-top: 1px solid rgba(15, 31, 51, 0.1);
    padding-top: 2rem;
    margin-top: 4rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.author-bio a {
    color: var(--navy);
    text-decoration: underline;
}

/* Exit Intent Bar */
.exit-intent-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navy);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 12px rgba(15, 31, 51, 0.2);
    z-index: 998;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.exit-intent-bar.visible {
    transform: translateY(0);
}

.exit-intent-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.exit-intent-bar p {
    margin: 0;
    font-size: 1.125rem;
}

.exit-intent-button {
    background: white;
    color: var(--navy);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exit-intent-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .article-hero h1 {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 0 1.5rem;
        font-size: 1rem;
    }
    
    /* Mobile Progress Bar - Bottom of screen */
    .reading-progress {
        right: auto;
        left: 0;
        top: auto;
        bottom: 0;
        transform: none;
        width: 100vw;
        height: 3px;
        background: rgba(15, 31, 51, 0.1);
        border-radius: 0;
    }
    
    .reading-progress::after {
        height: 100%;
        width: 0%;
        background: linear-gradient(to right, var(--green) 0%, var(--blue) 100%);
        border-radius: 0;
    }
    
    .reading-progress.active::after {
        width: var(--progress, 0%);
        height: 100%;
    }
    
    .failure-reason {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }
    
    .failure-header {
        grid-template-columns: auto 1fr;
    }
    
    .failure-cost {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reading-time {
        padding-left: 0;
        padding-top: 0.5rem;
        border-left: none;
        border-top: 1px solid rgba(15, 31, 51, 0.2);
    }
    
    .comparison-cards {
        grid-template-columns: 1fr;
    }
    
    .exit-intent-bar .container {
        flex-direction: column;
        text-align: center;
    }
    
    .exit-intent-bar p {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .reading-progress,
    .exit-intent-bar,
    #site-header,
    #sticky-cta,
    #site-footer {
        display: none;
    }
    
    .failure-details[open] summary {
        display: none;
    }
    
    .failure-content {
        display: block !important;
    }
}