/* ==========================================================================
   Single Portfolio Template
   ========================================================================== */

.hopmans-portfolio-single {
    padding: 40px 20px 80px;
}

.hopmans-portfolio-single-container {
    max-width: 1260px;
    margin: 0 auto;
}

/* Header */
.hopmans-portfolio-single-header {
    margin-bottom: 40px;
}

.hopmans-portfolio-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--e-global-color-primary, #10aa9e);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: opacity 0.2s ease;
}

.hopmans-portfolio-back-link:hover {
    opacity: 0.8;
    text-decoration: none;
    color: var(--e-global-color-primary, #10aa9e);
}

.hopmans-portfolio-single-title {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a2e;
    line-height: 1.2;
}

.hopmans-portfolio-single-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.hopmans-portfolio-single-subtitle svg {
    flex-shrink: 0;
    color: var(--e-global-color-primary, #10aa9e);
}

/* Two-column layout */
.hopmans-portfolio-single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* Main content */
.hopmans-portfolio-single-main {
    min-width: 0;
}

/* Gallery carousel */
.hopmans-portfolio-gallery {
    position: relative;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.hopmans-portfolio-gallery-viewport {
    overflow: hidden;
}

.hopmans-portfolio-gallery-track {
    display: flex;
    transition: transform 0.4s ease;
}

.hopmans-portfolio-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
}

.hopmans-portfolio-gallery-slide img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

/* Gallery navigation buttons */
.hopmans-portfolio-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hopmans-portfolio-gallery-btn:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hopmans-portfolio-gallery-prev {
    left: 16px;
}

.hopmans-portfolio-gallery-next {
    right: 16px;
}

/* Gallery dots */
.hopmans-portfolio-gallery-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hopmans-portfolio-gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hopmans-portfolio-gallery-dot.active,
.hopmans-portfolio-gallery-dot:hover {
    background: #fff;
}

/* Featured image fallback */
.hopmans-portfolio-single-image {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.hopmans-portfolio-single-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content */
.hopmans-portfolio-single-content {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.hopmans-portfolio-single-content h2,
.hopmans-portfolio-single-content h3,
.hopmans-portfolio-single-content h4 {
    color: #1a1a2e;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.hopmans-portfolio-single-content p {
    margin-bottom: 1em;
}

.hopmans-portfolio-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Sidebar */
.hopmans-portfolio-single-sidebar {
    position: sticky;
    top: 40px;
}

/* Details block */
.hopmans-portfolio-details {
    background: #f9fafb;
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 32px;
}

.hopmans-portfolio-details-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--e-global-color-primary, #10aa9e);
}

.hopmans-portfolio-detail {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.hopmans-portfolio-detail:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hopmans-portfolio-detail-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.hopmans-portfolio-detail-value {
    display: block;
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

/* Related projects */
.hopmans-portfolio-related {
    background: #f9fafb;
    border-radius: 8px;
    padding: 28px;
}

.hopmans-portfolio-related-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--e-global-color-primary, #10aa9e);
}

.hopmans-portfolio-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hopmans-portfolio-related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.hopmans-portfolio-related-item:hover {
    background: #e5e7eb;
    text-decoration: none;
}

.hopmans-portfolio-related-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
}

.hopmans-portfolio-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hopmans-portfolio-related-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hopmans-portfolio-related-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hopmans-portfolio-related-item:hover .hopmans-portfolio-related-name {
    color: var(--e-global-color-primary, #10aa9e);
}

.hopmans-portfolio-related-location {
    font-size: 12px;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
    .hopmans-portfolio-single-layout {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hopmans-portfolio-single {
        padding: 20px 16px 60px;
    }

    .hopmans-portfolio-single-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hopmans-portfolio-single-sidebar {
        position: static;
    }

    .hopmans-portfolio-single-title {
        font-size: 1.6em;
    }

    .hopmans-portfolio-gallery-btn {
        width: 36px;
        height: 36px;
    }

    .hopmans-portfolio-gallery-prev {
        left: 8px;
    }

    .hopmans-portfolio-gallery-next {
        right: 8px;
    }
}
