/**
 * Single Project Page Styles
 * Version: 2.0.0
 */

:root {
    --primary-blue: #234E70;
    --primary-dark: #1a3a52;
    --primary-light: #2d6090;
    --accent-gold: #D4AF37;
    --dark-navy: #0F172A;
    --soft-white: #F8FAFC;
    --pure-white: #FFFFFF;
    --border-gray: #E2E8F0;
    --text-dark: #1E293B;
    --text-light: #64748B;
}

/* Single Project Container */
.cpf-single-project {
    background: var(--pure-white);
}

/* Hero Section */
.cpf-project-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--dark-navy);
}

.cpf-project-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cpf-project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpf-project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(35, 78, 112, 0.9) 0%, rgba(26, 58, 82, 0.85) 100%);
}

.cpf-project-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.cpf-project-hero-inner {
    max-width: 900px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.cpf-project-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cpf-project-hero-title {
    font-size: 56px;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cpf-project-hero-excerpt {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* Details Bar */
.cpf-project-details-bar {
    background: white;
    border-bottom: 1px solid var(--border-gray);
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cpf-project-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.cpf-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpf-detail-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.cpf-detail-content {
    display: flex;
    flex-direction: column;
}

.cpf-detail-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.cpf-detail-value {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
}

/* Content Wrapper */
.cpf-project-content-wrapper {
    padding: 60px 0;
    background: var(--soft-white);
}

.cpf-project-content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
}

/* Main Content */
.cpf-project-main-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.cpf-content-section {
    margin-bottom: 40px;
}

.cpf-content-section:last-child {
    margin-bottom: 0;
}

.cpf-section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-blue);
}

.cpf-section-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.cpf-project-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

.cpf-project-description p {
    margin-bottom: 20px;
}

.cpf-project-description h2,
.cpf-project-description h3,
.cpf-project-description h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--dark-navy);
}

.cpf-project-description ul,
.cpf-project-description ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.cpf-project-description img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Categories */
.cpf-project-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cpf-category-tag {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(35, 78, 112, 0.2);
}

.cpf-category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(35, 78, 112, 0.3);
}

/* Tags */
.cpf-project-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cpf-tag-item {
    padding: 8px 16px;
    background: var(--soft-white);
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Sidebar */
.cpf-project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cpf-sidebar-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.cpf-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-gray);
}

/* Technologies */
.cpf-tech-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cpf-tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--soft-white);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.cpf-tech-item:hover {
    background: rgba(35, 78, 112, 0.05);
    transform: translateX(5px);
}

.cpf-tech-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

/* Project Link Button */
.cpf-project-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--primary-blue);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(35, 78, 112, 0.2);
}

.cpf-project-link-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 78, 112, 0.3);
}

.cpf-project-link-btn svg {
    width: 20px;
    height: 20px;
}

/* Share Buttons */
.cpf-share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cpf-share-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cpf-share-btn svg {
    width: 20px;
    height: 20px;
}

.cpf-share-facebook {
    background: #1877F2;
    color: white;
}

.cpf-share-facebook:hover {
    background: #0d5dbf;
    transform: translateY(-3px);
}

.cpf-share-twitter {
    background: #1DA1F2;
    color: white;
}

.cpf-share-twitter:hover {
    background: #0c85d0;
    transform: translateY(-3px);
}

.cpf-share-linkedin {
    background: #0A66C2;
    color: white;
}

.cpf-share-linkedin:hover {
    background: #004182;
    transform: translateY(-3px);
}

.cpf-share-whatsapp {
    background: #25D366;
    color: white;
}

.cpf-share-whatsapp:hover {
    background: #1da851;
    transform: translateY(-3px);
}

/* Project Navigation */
.cpf-project-navigation {
    background: white;
    border-top: 1px solid var(--border-gray);
    padding: 40px 0;
}

.cpf-project-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cpf-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    background: var(--soft-white);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 350px;
}

.cpf-nav-link:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 78, 112, 0.2);
}

.cpf-nav-link:hover .cpf-nav-label,
.cpf-nav-link:hover .cpf-nav-title,
.cpf-nav-link:hover svg {
    color: white;
}

.cpf-nav-link svg {
    width: 24px;
    height: 24px;
    color: var(--primary-blue);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.cpf-nav-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cpf-nav-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.cpf-nav-title {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.cpf-nav-home {
    flex: 0 0 auto;
    max-width: none;
}

.cpf-nav-home span {
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.cpf-nav-prev .cpf-nav-content {
    align-items: flex-start;
}

.cpf-nav-next {
    flex-direction: row-reverse;
}

.cpf-nav-next .cpf-nav-content {
    align-items: flex-end;
    text-align: right;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .cpf-project-content-container {
        grid-template-columns: 1fr;
    }
    
    .cpf-project-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .cpf-project-hero {
        height: 500px;
    }
    
    .cpf-project-hero-title {
        font-size: 36px;
    }
    
    .cpf-project-hero-excerpt {
        font-size: 16px;
    }
    
    .cpf-project-details-container {
        padding: 0 20px;
        gap: 30px;
    }
    
    .cpf-project-content-container {
        padding: 0 20px;
    }
    
    .cpf-project-main-content {
        padding: 30px 20px;
    }
    
    .cpf-section-title {
        font-size: 26px;
    }
    
    .cpf-project-sidebar {
        grid-template-columns: 1fr;
    }
    
    .cpf-project-nav-container {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .cpf-nav-link {
        max-width: none;
        width: 100%;
    }
    
    .cpf-nav-home {
        order: -1;
    }
}

@media (max-width: 480px) {
    .cpf-project-hero {
        height: 400px;
    }
    
    .cpf-project-hero-title {
        font-size: 28px;
    }
    
    .cpf-detail-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .cpf-sidebar-box {
        padding: 20px;
    }
    
    .cpf-share-buttons {
        justify-content: center;
    }
}

/* RTL Support */
[dir="rtl"] .cpf-nav-prev {
    flex-direction: row-reverse;
}

[dir="rtl"] .cpf-nav-next {
    flex-direction: row;
}

[dir="rtl"] .cpf-nav-prev .cpf-nav-content {
    align-items: flex-end;
    text-align: right;
}

[dir="rtl"] .cpf-nav-next .cpf-nav-content {
    align-items: flex-start;
    text-align: left;
}
