/* Tutorial Detail Page Styles */

/* Tutorial Header */
.tutorial-header {
    background: var(--gradient-primary);
    padding: 120px 0 60px;
    color: white;
    position: relative;
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.tutorial-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.tutorial-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.tutorial-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
}

.tutorial-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Chapter Accordion */
.chapter-navigation {
    background: var(--light-gray);
    padding: 3rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.chapter-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.chapter-accordion {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--light-gray);
}

.accordion-item {
    border-bottom: 1px solid var(--light-gray);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.accordion-header:hover {
    background: var(--light-gray);
}

.accordion-header.active {
    background: var(--gradient-primary);
    color: white;
}

.chapter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.accordion-header.active .chapter-title {
    color: white;
}

.chapter-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.chapter-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
    background: var(--light-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.accordion-header.active .chapter-duration {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.duration-icon {
    font-size: 0.8rem;
}

.accordion-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: 50%;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    color: var(--medium-gray);
}

.accordion-header.active .accordion-arrow {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--light-gray);
}

.accordion-content.active {
    max-height: 200px;
    padding: 1.5rem 2rem;
}

.chapter-summary {
    font-size: 0.95rem;
    color: var(--medium-gray);
    line-height: 1.6;
    margin: 0;
}

.chapter-highlights {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Smooth animations */
@keyframes accordionOpen {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 200px;
        opacity: 1;
    }
}

.accordion-content.active {
    animation: accordionOpen 0.3s ease forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chapter-wrapper {
        margin: 0 1rem;
    }
    
    .accordion-header {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .chapter-title {
        font-size: 1rem;
    }
    
    .chapter-meta {
        align-self: flex-end;
        gap: 0.75rem;
    }
    
    .accordion-content.active {
        padding: 1.25rem 1.5rem;
    }
    
    .chapter-highlights {
        justify-content: center;
    }
}

/* Tutorial Content */
.tutorial-content {
    padding: 4rem 0;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.content-section h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 0.5rem;
}

.content-section h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--medium-gray);
}

.content-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--medium-gray);
}

.content-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--medium-gray);
}

.content-section p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--medium-gray);
    font-size: 1.05rem;
}

.content-section ul,
.content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--medium-gray);
}

/* Special Content Boxes */
.highlight-box {
    background: var(--gradient-light);
    border-left: 4px solid var(--primary-blue);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.highlight-box h4 {
    color: var(--dark-gray);
    margin-top: 0;
    margin-bottom: 1rem;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.concept-card {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.concept-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.concept-card h4 {
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 1rem;
}

.pattern-list {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.pattern-list li {
    color: #742a2a;
}

.example-box {
    background: var(--light-gray);
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.before-after {
    display: grid;
    gap: 1.5rem;
}

.before,
.after {
    padding: 1.5rem;
    border-radius: 8px;
}

.before {
    background: #fed7d7;
    border-left: 4px solid #e53e3e;
}

.after {
    background: #c6f6d5;
    border-left: 4px solid var(--primary-green);
}

.before h5,
.after h5 {
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.before p,
.after p {
    margin: 0;
    font-style: italic;
}

.technique-box {
    background: #e6fffa;
    border-left: 4px solid #38b2ac;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.technique-box h4 {
    color: #234e52;
    margin-top: 0;
}

.warning-box {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.warning-box h4 {
    color: #744210;
    margin-top: 0;
}

.tip-box {
    background: var(--light-green);
    border-left: 4px solid var(--primary-green);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.tip-box h4 {
    color: var(--dark-green);
    margin-top: 0;
}

/* Process Steps */
.process-steps {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary-blue);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-gray);
}

.step-content p {
    margin: 0;
    color: var(--medium-gray);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.tool-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.tool-card ul {
    margin: 0;
    padding-left: 1.5rem;
}

.tool-card li {
    margin-bottom: 0.5rem;
    color: var(--medium-gray);
}

/* Ethics Grid */
.ethics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.ethics-card {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.ethics-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.1);
}

.ethics-card h4 {
    margin: 0 0 1rem 0;
    color: var(--dark-gray);
}

.ethics-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--medium-gray);
}

/* Conclusion */
.conclusion {
    background: var(--light-gray);
    padding: 3rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.next-steps {
    margin-top: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
}

.next-steps h3 {
    margin-top: 0;
    color: var(--dark-gray);
}

/* Related Tutorials */
.related-tutorials {
    background: var(--light-gray);
    padding: 4rem 0;
}

.related-tutorials h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--dark-gray);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-gray);
    position: relative;
}

.related-card h4 {
    margin: 0 0 1rem 0;
    color: var(--dark-gray);
}

.related-card p {
    margin: 0 0 1rem 0;
    color: var(--medium-gray);
}

.coming-soon {
    background: #fed7d7;
    color: #e53e3e;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tutorial-header {
        padding: 100px 0 40px;
    }
    
    .tutorial-header h1 {
        font-size: 2.2rem;
    }
    
    .tutorial-description {
        font-size: 1.1rem;
    }
    
    .tutorial-stats {
        gap: 1rem;
    }
    
    .table-of-contents {
        padding: 2rem 0;
    }
    
    .toc-wrapper {
        padding: 1.5rem;
    }
    
    .tutorial-content {
        padding: 3rem 0;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .content-section {
        margin-bottom: 3rem;
    }
    
    .content-section h2 {
        font-size: 1.8rem;
    }
    
    .content-section h3 {
        font-size: 1.4rem;
    }
    
    .concept-grid,
    .tools-grid,
    .ethics-grid {
        grid-template-columns: 1fr;
    }
    
    .before-after {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
    
    .highlight-box,
    .technique-box,
    .warning-box,
    .tip-box,
    .example-box,
    .pattern-list {
        padding: 1.5rem;
    }
    
    .conclusion {
        padding: 2rem;
    }
    
    .related-tutorials {
        padding: 3rem 0;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tutorial-header h1 {
        font-size: 1.8rem;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
    }
    
    .tutorial-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .certification-cta {
        padding: 1.5rem;
    }
    
    .cert-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cert-cta-text h3 {
        font-size: 1.2rem;
    }
    
    .cert-cta-btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .cert-final-content {
        padding: 2rem;
    }
    
    .cert-benefits {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cert-final-btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Certification CTA Styles
   ======================================== */

/* Header Certification CTA */
.certification-cta {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cert-cta-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cert-cta-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.cert-cta-text {
    flex: 1;
}

.cert-cta-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.cert-cta-text p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95rem;
}

.cert-cta-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cert-cta-btn:hover {
    background: white;
    color: var(--primary-blue);
    border-color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Final Certification CTA Section */
.certification-section {
    background: var(--gradient-light);
    padding: 4rem 0;
    border-top: 1px solid var(--light-gray);
}

.cert-final-cta {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--light-gray);
    overflow: hidden;
}

.cert-final-content {
    padding: 3rem;
    text-align: center;
}

.cert-final-header {
    margin-bottom: 2rem;
}

.cert-final-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.cert-final-header h2 {
    font-size: 2rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-weight: 700;
}

.cert-final-header p {
    font-size: 1.1rem;
    color: var(--medium-gray);
    line-height: 1.6;
    margin: 0;
}

.cert-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-gray);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--light-gray);
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.benefit-icon {
    font-size: 1rem;
}

.cert-action {
    margin-top: 2rem;
}

.cert-final-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: white;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.cert-final-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    text-decoration: none;
    color: white;
}

.cert-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
    opacity: 0.8;
}

/* Bounce animation for certification icon */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}