/**
 * Single Portfolio Page Styles
 * 
 * @package Asivo
 * @version 1.0.0
 */

/* ================================
   Portfolio Hero
   ================================ */

.portfolio-hero {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, #0a0f14 0%, #0d1014 100%);
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

.portfolio-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.btn--small {
    padding: 10px 20px;
    font-size: 13px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #9CA3AF;
    text-decoration: none;
    transition: all 0.3s;
}

.back-link:hover {
    color: #00D1FF;
    gap: 12px;
}

.portfolio-hero-title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 16px;
}

.portfolio-hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #9CA3AF;
    margin-bottom: 48px;
    max-width: 800px;
}

.portfolio-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-item--tech {
    grid-column: 1 / -1;
}

.meta-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6B7280;
    font-weight: 600;
}

.meta-value {
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
}

.tech-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag-small {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 999px;
    color: #A5B4FC;
    font-size: 12px;
    font-weight: 500;
}

/* ================================
   Featured Image
   ================================ */

.portfolio-featured {
    padding: 0;
    background: #0a0e15;
}

.portfolio-featured-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.portfolio-featured-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* ================================
   Live Preview
   ================================ */

.portfolio-preview {
    padding: 80px 0;
    background: linear-gradient(180deg, #0a0e15 0%, #0d1014 100%);
}

.portfolio-preview-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.preview-title {
    font-size: 28px;
    color: #ffffff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-icon {
    font-size: 32px;
}

.preview-open {
    font-size: 14px;
    color: #00D1FF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.preview-open:hover {
    color: #ffffff;
    gap: 10px;
}

.preview-frame-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #24324A;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.preview-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.preview-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.fallback-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.fallback-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.fallback-message p {
    color: #9CA3AF;
    font-size: 16px;
    margin-bottom: 20px;
}

.fallback-message .btn {
    padding: 12px 28px;
}

/* ================================
   Content Sections
   ================================ */

.portfolio-content {
    padding: 100px 0;
    background: linear-gradient(180deg, #0a0e15 0%, #0d1014 100%);
}

.portfolio-content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.content-block {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    align-items: start;
}

.content-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 8px;
}

.content-number {
    font-size: 64px;
    font-weight: 700;
    color: #00D1FF;
    opacity: 0.2;
    font-family: var(--font-ui);
    line-height: 1;
}

.content-title {
    font-size: 32px;
    line-height: 1.2;
    color: #ffffff;
    font-weight: 600;
    margin: 0;
}

.content-text {
    font-size: 18px;
    line-height: 1.8;
    color: #b3b8c4;
    margin: 0;
    white-space: pre-line;
    max-width: 800px;
}

/* Technologies */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-tag {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 999px;
    color: #A5B4FC;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.tech-tag:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
}

/* ================================
   CTA Section
   ================================ */

.portfolio-cta {
    padding: 100px 0;
    background: linear-gradient(180deg, #0d1014 0%, #0a0f14 100%);
    border-top: 1px solid rgba(79, 70, 229, 0.1);
}

.portfolio-cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.cta-title {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.2;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 16px;
}

.cta-text {
    font-size: 18px;
    line-height: 1.6;
    color: #9CA3AF;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-cta .btn {
    font-size: 14px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s;
}

.portfolio-cta .btn--primary {
    background: #4F46E5;
    color: #ffffff;
    border: none;
}

.portfolio-cta .btn--primary:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.portfolio-cta .btn--secondary {
    background: transparent;
    color: #4F46E5;
    border: 1px solid #4F46E5;
}

.portfolio-cta .btn--secondary:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: #4338CA;
    color: #4338CA;
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 120px 0 60px;
    }

    .portfolio-hero-container,
    .portfolio-content-container,
    .portfolio-cta-container,
    .portfolio-preview-container {
        padding: 0 24px;
    }

    .hero-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .portfolio-hero-title {
        font-size: 32px;
    }

    .portfolio-hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .portfolio-meta-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portfolio-preview {
        padding: 60px 0;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .preview-title {
        font-size: 24px;
    }

    .portfolio-content {
        padding: 60px 0;
    }

    .portfolio-content-container {
        gap: 60px;
    }

    .content-block {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .content-header {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding-top: 0;
    }

    .content-number {
        font-size: 48px;
    }

    .content-title {
        font-size: 24px;
    }

    .content-text {
        font-size: 16px;
    }

    .portfolio-cta {
        padding: 60px 0;
    }

    .cta-title {
        font-size: 28px;
    }

    .cta-text {
        font-size: 16px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}
