/* ============================================
   PUBLISHING PROCESS CSS (Timeline UI)
   ENHANCED VERSION — All Audit Recommendations Applied
   ============================================ */

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Dark overlay for cinematic depth & readability */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(44, 62, 80, 0.75) 0%,
        rgba(44, 62, 80, 0.55) 50%,
        rgba(44, 62, 80, 0.4) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero .hero-bg {
    background-image: url('https://picsum.photos/seed/writingdesk/1920/1080');
    background-size: cover;
    background-position: center;
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Floating magical particles in hero */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: heroParticleFloat 8s ease-in-out infinite;
}

.hero-particle:nth-child(1) {
    width: 6px; height: 6px;
    background: #FFD700;
    left: 15%; top: 30%;
    animation-delay: 0s;
}

.hero-particle:nth-child(2) {
    width: 8px; height: 8px;
    background: #FF6B9D;
    left: 25%; top: 60%;
    animation-delay: 1.5s;
}

.hero-particle:nth-child(3) {
    width: 5px; height: 5px;
    background: #4ECDC4;
    left: 70%; top: 25%;
    animation-delay: 3s;
}

.hero-particle:nth-child(4) {
    width: 7px; height: 7px;
    background: #FFE66D;
    left: 80%; top: 55%;
    animation-delay: 4.5s;
}

.hero-particle:nth-child(5) {
    width: 4px; height: 4px;
    background: #FF8C42;
    left: 45%; top: 15%;
    animation-delay: 6s;
}

.hero-particle:nth-child(6) {
    width: 6px; height: 6px;
    background: #C7F464;
    left: 55%; top: 70%;
    animation-delay: 2s;
}

.hero-particle:nth-child(7) {
    width: 5px; height: 5px;
    background: #B78EFF;
    left: 35%; top: 45%;
    animation-delay: 5s;
}

@keyframes heroParticleFloat {
    0% { opacity: 0; transform: translateY(20px) scale(0.5); }
    20% { opacity: 0.8; }
    50% { opacity: 0.6; transform: translateY(-30px) scale(1); }
    80% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-60px) scale(0.5); }
}

/* Floating book emojis in hero */
.hero-float {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    font-size: 1.8rem;
    opacity: 0;
    animation: heroFloatDrift 12s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.hero-float:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero-float:nth-child(2) { right: 12%; top: 35%; animation-delay: 3s; font-size: 1.4rem; }
.hero-float:nth-child(3) { left: 75%; top: 65%; animation-delay: 6s; font-size: 2rem; }
.hero-float:nth-child(4) { left: 5%; top: 70%; animation-delay: 9s; font-size: 1.5rem; }

@keyframes heroFloatDrift {
    0%, 100% { opacity: 0; transform: translateY(0) rotate(0deg); }
    25% { opacity: 0.35; transform: translateY(-15px) rotate(8deg); }
    50% { opacity: 0.25; transform: translateY(-8px) rotate(-5deg); }
    75% { opacity: 0.3; transform: translateY(-20px) rotate(10deg); }
}

/* Hero content sits above overlay */
.hero-container {
    position: relative;
    z-index: 3;
}

.hero-content {
    grid-column: 1 / span 6;
    max-width: 640px;
}

.hero-title {
    font-size: 52px;
    line-height: 1.15;
    margin-bottom: var(--space-4);
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
    font-weight: 400;
    margin-bottom: var(--space-5);
}

.hero-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #F7931E 100%);
    color: white;
    border: none;
}

.hero-actions .btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
}

.hero-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
    color: white;
}

/* ============================================
   TIMELINE WRAPPER ENHANCEMENTS
   ============================================ */


.timeline-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
    padding: var(--space-8) 0;
    margin: 0 auto;
    max-width: 1400px;
}

/* THE GRADIENT LINE — Enhanced with glow & thickness */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50px;
    right: 50px;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--color-border-light) 0%, 
        var(--color-primary) 30%, 
        var(--color-secondary) 70%,
        var(--color-border-light) 100%
    );
    z-index: 0;
    border-radius: 4px;
    box-shadow: 
        0 0 15px rgba(255, 107, 53, 0.3),
        0 0 30px rgba(255, 107, 53, 0.15),
        0 0 60px rgba(255, 107, 53, 0.08);
    animation: timelineGlow 4s ease-in-out infinite alternate;
}

@keyframes timelineGlow {
    0% { box-shadow: 0 0 15px rgba(255,107,53,0.25), 0 0 30px rgba(255,107,53,0.1); }
    100% { box-shadow: 0 0 20px rgba(255,107,53,0.4), 0 0 45px rgba(255,107,53,0.2), 0 0 80px rgba(255,107,53,0.1); }
}

/* ============================================
   TIMELINE STEP (Individual Item)
   ============================================ */

.timeline-step {
    position: relative;
    flex: 1;
    padding: 0 10px;
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    animation: stepEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.timeline-step:nth-child(1) { animation-delay: 0.1s; }
.timeline-step:nth-child(2) { animation-delay: 0.25s; }
.timeline-step:nth-child(3) { animation-delay: 0.4s; }
.timeline-step:nth-child(4) { animation-delay: 0.55s; }
.timeline-step:nth-child(5) { animation-delay: 0.7s; }

@keyframes stepEntrance {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* THE DOT ON THE LINE — Enhanced with glow, hover effects */
.timeline-dot {
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border: 4px solid var(--color-primary);
    border-radius: 50%;
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 
        0 0 0 4px rgba(255, 107, 53, 0.1),
        0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-step:hover .timeline-dot {
    transform: translateX(-50%) scale(1.4);
    background: var(--color-primary);
    border-color: var(--color-white);
    box-shadow: 
        0 0 0 6px rgba(255, 107, 53, 0.15),
        0 0 20px rgba(255, 107, 53, 0.4),
        0 0 40px rgba(255, 107, 53, 0.2),
        0 8px 20px rgba(0,0,0,0.15);
}

/* Pulse Animation for Active Step */
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 107, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* ============================================
   TIMELINE CONTENT CARD — Enhanced
   ============================================ */

.timeline-content {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-top: 50px;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.06),
        0 1px 3px rgba(0,0,0,0.04);
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

/* Card connector arrow to timeline */
.timeline-content::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 12px solid var(--color-white);
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.04));
    z-index: 3;
    transition: all 0.4s ease;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-bottom: 13px solid var(--color-border-light);
    z-index: 2;
}

/* Hover Effect — Enhanced lift, glow, shadow */
.timeline-step:hover .timeline-content {
    transform: translateY(-16px);
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.12),
        0 8px 20px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255, 107, 53, 0.1);
    border-color: var(--color-primary);
}

.timeline-step:hover .timeline-content::before {
    border-bottom-color: var(--color-primary);
}

/* Active Step Highlight — Enhanced */
.active-step .timeline-content {
    border: 2px solid var(--color-primary);
    background: linear-gradient(180deg, #FFFBF0 0%, var(--color-white) 100%);
    transform: scale(1.03);
    box-shadow: 
        0 25px 60px rgba(255, 107, 53, 0.15),
        0 10px 25px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255, 107, 53, 0.15),
        inset 0 0 30px rgba(255, 107, 53, 0.03);
    z-index: 5;
}

.active-step .timeline-content::before {
    border-bottom-color: var(--color-primary);
}

.active-step .timeline-dot {
    border-color: var(--color-secondary);
    background: var(--color-secondary);
    box-shadow: 
        0 0 0 6px rgba(174, 226, 255, 0.2),
        0 0 25px rgba(174, 226, 255, 0.5),
        0 0 50px rgba(174, 226, 255, 0.2);
}

/* Shimmer effect on card hover */
.timeline-content .shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.timeline-step:hover .timeline-content .shimmer {
    left: 150%;
}

/* ============================================
   CONTENT INNER STYLING — Enhanced
   ============================================ */

.step-icon {
    width: 56px;
    height: 56px;
    background: var(--color-bg-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto var(--space-2);
    position: relative;
    z-index: 3;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.08),
        inset 0 -2px 4px rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-step:hover .step-icon {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.12),
        0 0 0 4px rgba(255, 107, 53, 0.1);
}

/* Floating animation for icons */
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.active-step .step-icon {
    animation: iconFloat 3s ease-in-out infinite;
}

.step-number {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-dark), #1A252F);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 3px solid var(--color-white);
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.15),
        0 0 0 2px rgba(44, 62, 80, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 4;
}

.timeline-step:hover .step-number {
    transform: scale(1.15);
    box-shadow: 
        0 6px 18px rgba(0,0,0,0.2),
        0 0 0 3px rgba(255, 107, 53, 0.15),
        0 0 15px rgba(255, 107, 53, 0.3);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-dark);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.step-desc {
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.step-detail {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.75;
    margin-bottom: var(--space-3);
    letter-spacing: 0.01em;
    flex-grow: 1;
}

.step-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    align-self: flex-start;
    transition: all 0.3s ease;
}

.timeline-step:hover .step-time {
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(247,147,30,0.1));
    color: var(--color-primary);
}

/* Custom List Styling for Timeline Section */
.custom-list {
    list-style: none;
    padding-left: 0;
    margin-top: var(--space-3);
}

.custom-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--color-text-light);
    font-family: var(--font-body);
    line-height: 1.7;
}

.custom-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--color-secondary);
    font-weight: 700;
}

/* ============================================
   CTA SECTION ENHANCEMENTS
   ============================================ */

   .smth{
    background: var(--gradient-3);
   }

.section.authors .container.text-center {
    position: relative;
    background: var(--gradient-2);
    border-radius: 12px;
    padding: var(--space-6) var(--space-4);
}

/* Decorative background for CTA */
.section.authors .container.text-center::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,107,53,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(183,142,255,0.06) 0%, transparent 50%);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

/* Floating decorations for CTA */
.cta-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.cta-deco {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: ctaDecoFloat 10s ease-in-out infinite;
}

.cta-deco:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.cta-deco:nth-child(2) { right: 15%; top: 25%; animation-delay: 2.5s; font-size: 1.2rem; }
.cta-deco:nth-child(3) { left: 20%; bottom: 20%; animation-delay: 5s; font-size: 1.8rem; }
.cta-deco:nth-child(4) { right: 10%; bottom: 25%; animation-delay: 7.5s; font-size: 1.3rem; }

@keyframes ctaDecoFloat {
    0%, 100% { opacity: 0; transform: translateY(0) rotate(0deg); }
    25% { opacity: 0.25; transform: translateY(-10px) rotate(5deg); }
    50% { opacity: 0.15; transform: translateY(-5px) rotate(-3deg); }
    75% { opacity: 0.2; transform: translateY(-12px) rotate(8deg); }
}

/* ============================================
   ACCESSIBILITY — Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .hero-particle,
    .hero-float,
    .cta-deco,
    .timeline-wrapper::before,
    .timeline-dot,
    .step-icon,
    .timeline-content,
    .timeline-step {
        animation: none !important;
        transition: none !important;
    }

    .timeline-step {
        opacity: 1;
        transform: none;
    }

    .pulse {
        animation: none !important;
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2) !important;
    }
}

/* ============================================
   RESPONSIVE TIMELINE (Mobile) — Enhanced
   ============================================ */

@media (max-width: 992px) {
    .timeline-wrapper {
        flex-direction: column;
        padding-left: 40px;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Change Line to Vertical on the Left */
    .timeline-wrapper::before {
        width: 6px;
        height: 100%;
        top: 0;
        left: 20px;
        right: auto;
        background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
        box-shadow: 
            0 0 15px rgba(255,107,53,0.3),
            0 0 30px rgba(255,107,53,0.15);
    }

    .timeline-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0;
        margin-bottom: var(--space-6);
    }

    /* Move dot to the left on the line */
    .timeline-dot {
        position: absolute;
        left: 20px;
        top: 0;
        transform: translateX(-50%);
    }

    .timeline-step:hover .timeline-dot {
        transform: translateX(-50%) scale(1.4);
    }

    /* Move content to the right of the line */
    .timeline-content {
        margin-top: 0;
        margin-left: 40px;
        width: calc(100% - 40px);
        min-height: auto;
    }

    /* Connector arrow for mobile (points left) */
    .timeline-content::before {
        top: 16px;
        left: -12px;
        transform: none;
        border-left: 0;
        border-right: 12px solid var(--color-white);
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-bottom-color: transparent;
    }

    .timeline-content::after {
        top: 15px;
        left: -13px;
        transform: none;
        border-left: 0;
        border-right: 13px solid var(--color-border-light);
        border-top: 11px solid transparent;
        border-bottom: 11px solid transparent;
    }

    .timeline-step:hover .timeline-content::before {
        border-right-color: var(--color-primary);
        border-bottom-color: transparent;
    }

    .step-number {
        top: -10px;
        right: -10px;
    }

    .step-icon {
        margin: 0 0 var(--space-2) 0;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-content {
        grid-column: 1 / span 8;
    }
}

@media (max-width: 768px) {
    .timeline-wrapper {
        padding-left: 30px;
    }

    .timeline-wrapper::before {
        left: 15px;
    }

    .timeline-dot {
        left: 15px;
    }

    .timeline-content {
        margin-left: 30px;
        width: calc(100% - 30px);
        padding: var(--space-3);
    }

    .timeline-step {
        margin-bottom: var(--space-5);
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-content {
        grid-column: 1 / span 12;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .timeline-wrapper {
        padding-left: 25px;
    }

    .timeline-wrapper::before {
        left: 12px;
    }

    .timeline-dot {
        left: 12px;
        width: 20px;
        height: 20px;
    }

    .timeline-content {
        margin-left: 25px;
        width: calc(100% - 25px);
        padding: 20px;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-detail {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .step-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 28px;
    }
}

/* ============================================
   FOCUS STATES — Accessibility
   ============================================ */

.timeline-content:focus-visible,
.timeline-dot:focus-visible,
.step-icon:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
}

/* ============================================
   SERVICE CARD ENHANCEMENTS (Timeline Overview)
   ============================================ */

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 107, 53, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
}

.service-desc {
    color: var(--color-text-light);
    margin-bottom: var(--space-3);
    line-height: 1.7;
}