/* Project Page Specific Styles */
.project-header {
    padding: calc(80px + 1rem) 0 1rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.project-category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #000000;
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.project-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
}

.project-content {
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 2rem;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #000000;
}

.section-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.code-block {
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #000000;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.code-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.copy-btn {
    padding: 0.4rem 0.8rem;
    background: #000000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.copy-btn:hover {
    background: #333333;
}

/* Download Section */
.download-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 2px solid #000000;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.download-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.download-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #000000;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    background: #333333;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.download-icon {
    font-size: 1.5rem;
}

/* Download Ad Modal - Please click 1 ad message */
.download-ad-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.download-ad-modal-overlay.show {
    display: flex;
}
.download-ad-modal-overlay.modal-2 {
    z-index: 9999;
}
.download-ad-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 2px solid #000;
    -webkit-overflow-scrolling: touch;
}
.download-ad-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.download-ad-modal-msg {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.download-ad-modal-msg.hindi {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
.download-ad-modal-ad {
    margin: 1rem 0;
    min-height: 250px;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.download-ad-modal-ad ins {
    display: block;
    text-align: center;
    min-height: 250px;
    min-width: 300px;
}
/* Loading spinner until ad loads */
.download-ad-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
    border-radius: 8px;
    z-index: 1;
}
.download-ad-modal-loading.hide {
    display: none;
}
.download-ad-modal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: download-modal-spin 0.8s linear infinite;
}
.download-ad-modal-loading p {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
}
@keyframes download-modal-spin {
    to { transform: rotate(360deg); }
}
.download-ad-modal-btns {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.download-ad-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: #000;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
}
.download-ad-modal-btn:hover {
    background: #333;
}
.download-ad-modal-close {
    background: #666;
}
.download-ad-modal-close:hover {
    background: #444;
}

/* Preview Section */
.preview-section {
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin: 1rem 0;
}

.share-section {
    background: #f5f5f5;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.share-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: #000000;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-base);
}

.share-btn:hover {
    background: #333333;
    transform: translateY(-2px);
}

.related-projects {
    padding: 2rem 0;
    background: #f5f5f5;
}

.related-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .project-header {
        padding: calc(70px + 1rem) 0 1rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-intro {
        font-size: 0.95rem;
    }

    .project-content {
        padding: 1.5rem 0;
    }

    .content-section {
        margin-bottom: 1.5rem;
    }

    .section-heading {
        font-size: 1.25rem;
    }

    .code-block {
        padding: 0.75rem;
    }

    .download-section {
        padding: 1.5rem 1rem;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .related-projects {
        padding: 1.5rem 0;
    }

    .related-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .related-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .related-projects .card-image {
        height: 120px !important;
    }

    .related-projects .card-icon {
        font-size: 2rem !important;
    }

    .related-projects .card-category {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.7rem !important;
    }

    .related-projects .card-content {
        padding: 0.75rem !important;
    }

    .related-projects .card-title {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
    }

    .related-projects .card-description {
        display: none !important;
    }

    .related-projects .card-footer {
        display: none !important;
    }
}