/* Portfolio Page Specific Styles */

/* Hero Section */
.portfolio-hero {
    background: #1217234f;
    min-height: 30vh;
    position: relative;
    overflow: hidden;
}

.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.portfolio-lightbox[aria-hidden="false"] {
    display: flex;
}

.portfolio-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.85);
}

.portfolio-lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.portfolio-lightbox__figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.portfolio-lightbox__image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.portfolio-lightbox__caption {
    color: #e6e8ea;
    font-size: 0.95rem;
    text-align: center;
}

.portfolio-lightbox__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.portfolio-lightbox__nav {
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.portfolio-lightbox__nav:hover,
.portfolio-lightbox__nav:focus-visible,
.portfolio-lightbox__close:hover,
.portfolio-lightbox__close:focus-visible {
    background: rgba(107, 92, 255, 0.6);
    outline: none;
}

.portfolio-lightbox__nav--prev {
    order: 0;
}

.portfolio-lightbox__nav--next {
    order: 2;
}

@media (max-width: 768px) {
    .portfolio-lightbox__content {
        flex-direction: column;
        gap: 24px;
    }

    .portfolio-lightbox__nav {
        position: static;
        width: 40px;
        height: 40px;
    }
}

.portfolio-hero-content {
    padding: 15vh 48px 48px;
    position: relative;
    z-index: 2;
}

.portfolio-hero-title {
    margin-bottom: 16px;
    color: #ffffff;
}

.portfolio-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(107, 92, 255, 0.15) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 1;
}

.portfolio-back-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.portfolio-back-link:hover {
    opacity: 0.7;
}

/* Main Content */
.portfolio-main {
    padding: 64px 0;
}

.portfolio-grid {
    margin: 0;
}

.portfolio-grid-item {
    padding: 0 16px 32px;
}

.portfolio-grid-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-grid-image-wrapper {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.portfolio-grid-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-grid-card:hover .portfolio-grid-image {
    transform: scale(1.05);
}

.portfolio-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.portfolio-grid-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.portfolio-grid-title {
    margin: 16px 0 8px;
    font-weight: 600;
    color: #ffffff;
}

.portfolio-grid-client {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--m-text-muted);
}

.portfolio-grid-summary {
    margin: 0 0 16px;
    flex: 1;
    color: var(--m-text);
}

.portfolio-grid-tag-wrapper {
    margin-top: auto;
}

.portfolio-grid-tag {
    background: rgba(107, 92, 255, 0.1);
    color: #6b5cff;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
}

/* Project Details */
.portfolio-row {
    align-items: flex-start;
}

.portfolio-sidebar {
    margin-bottom: 24px;
    padding-right: 16px;
    box-sizing: border-box;
}

.portfolio-sidebar-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 24px;
    position: sticky;
    top: 24px;
    border-radius: 8px;
}

.portfolio-sidebar-title {
    margin-top: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #202838;
    color: white;
}

.portfolio-detail-label {
    margin: 0 0 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9e9e9e;
    border-bottom: solid 1px var(--m-accent);
}

.portfolio-detail-value {
    margin: 0 0 16px;
    color: white;
}

.portfolio-actions {
    border-top: 1px solid #202838;
    padding-top: 16px;
    margin-top: 24px;
}

.app-buttons {
    margin: 0 -4px 16px;
}

.app-buttons .pr3-col {
    padding: 0 4px;
}

.portfolio-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-left: 16px;
    box-sizing: border-box;
}

.portfolio-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 0;
    padding: 32px;
    border-radius: 8px;
}

.portfolio-card-title {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #202838;
    color: white;
}

.portfolio-project-card {
    display: block;
    text-decoration: none;
    background: #121723;
    overflow: hidden;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.portfolio-project-card:hover {
    transform: translateY(-4px);
}

.portfolio-project-image {
    height: 200px;
    overflow: hidden;
}

.portfolio-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-project-card:hover .portfolio-project-image img {
    transform: scale(1.05);
}

.portfolio-project-content {
    padding: 16px;
}

.portfolio-project-title {
    margin: 16px 0 8px;
    color: white;
}

.portfolio-project-summary {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--m-text-muted);
}

.portfolio-project-link {
    font-size: 14px;
    color: #6b5cff;
}

.portfolio-project-card:hover .portfolio-project-link {
    color: #8476ff;
}

/* Buttons */
.portfolio-button {
    background: #6b5cff;
    color: white !important;
    text-align: center;
    border: none;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    display: block;
    margin-bottom: 16px;
    transition: background 0.3s ease;
    width: 100%;
}

.portfolio-button:hover {
    background: #5a4dff;
    color: white;
}

.portfolio-button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
    justify-content: space-between;
}

.portfolio-card-button {
    background: rgba(107, 92, 255, 0.1);
    color: #6b5cff;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex: 1;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card-button:hover {
    background: rgba(107, 92, 255, 0.2);
    color: #8476ff;
}

.app-store-button,
.play-store-button {
    background: #000;
    color: white !important;
    text-align: center;
    border: none;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    display: block;
}

/* Gallery */
.portfolio-gallery-item {
    margin-bottom: 24px;
}

.portfolio-gallery-image {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.portfolio-gallery-grid {
    display: flex;
    gap: 16px;
}

.portfolio-gallery-thumb {
    position: relative;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
}

.portfolio-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-gallery-thumb:hover,
.portfolio-gallery-thumb:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    outline: none;
}

.portfolio-gallery-thumb:hover img,
.portfolio-gallery-thumb:focus-visible img {
    transform: scale(1.05);
}

/* Hero Image */
.portfolio-hero-image-container {
    margin: 64px auto 0;
    max-width: 100%;
    padding: 0 16px;
}

.portfolio-hero-image-wrapper {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.portfolio-hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portfolio-pagination {
    margin-top: 48px;
    text-align: center;
}

.portfolio-pagination-bar {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    background: #121723;
    border: 1px solid #202838;
}

.portfolio-pagination-link {
    background: transparent;
    color: #e6e8ea;
    border: none;
    padding: 8px 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.portfolio-pagination-link:hover {
    background: rgba(107, 92, 255, 0.1);
}

.portfolio-pagination-link--active {
    background: #6b5cff;
    color: white;
}

.portfolio-pagination-info {
    color: var(--m-text-muted);
    margin-top: 16px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .portfolio-sidebar {
        padding: 0 16px 32px;
    }

    .portfolio-content {
        padding: 0 16px 32px;
    }

    .portfolio-sidebar-card {
        position: static;
    }

    .portfolio-lightbox {
        top: 65px;
    }
    .portfolio-gallery-thumb{
        border-radius: 2px;
    }
}

@media (min-width: 1400px) {
    .portfolio-button-group {
        flex-direction: row;
    }
}