/* =============================================================================
   SINGLE PORTFOLIO — single-portfolio.php
   ============================================================================= */

.pf-single {
    background: #080b11;
    min-height: 70vh;
}

/* ── Hero: sin imagen destacada ── */
.pf-single__hero {
    position: relative;
    padding: 7rem 0 4rem;
    background: #080b11;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Hero: con imagen destacada ── */
.pf-single__hero--has-bg {
    min-height: 65vh;
    display: flex;
    align-items: flex-end;
    padding-top: 0;
    border-bottom: none;
}

.pf-single__hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.pf-single__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.45);
}

.pf-single__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 11, 17, 0.1) 0%,
        rgba(8, 11, 17, 0.55) 55%,
        rgba(8, 11, 17, 0.97) 100%
    );
}

.pf-single__hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-bottom: 3.5rem;
}

.pf-single__hero--has-bg .pf-single__hero-content {
    padding-top: 3rem;
}

/* Category badge */
.pf-single__cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary, #beea07);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: opacity 0.2s;
}

.pf-single__cat:hover {
    opacity: 0.7;
}

/* Title */
.pf-single__title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.05;
    max-width: 22ch;
    margin-bottom: 1rem;
}

/* Tagline */
.pf-single__tagline {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.65;
    max-width: 55ch;
    margin-bottom: 1.75rem;
}

/* Meta chips */
.pf-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pf-single__meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.pf-single__meta-chip i {
    font-size: 0.72rem;
    color: var(--color-primary, #beea07);
}

.pf-single__meta-chip--link:hover {
    border-color: rgba(190, 234, 7, 0.35);
    background: rgba(190, 234, 7, 0.06);
    color: rgba(255, 255, 255, 0.88);
}

/* ── Body ── */
.pf-single__body {
    padding: 4rem 0 5rem;
}

.pf-single__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3.5rem;
    align-items: start;
}

/* Entry content (main column) */
.pf-single__content.entry-content h2 {
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 2.5rem 0 1rem;
}

.pf-single__content.entry-content h3 {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 2rem 0 0.75rem;
}

.pf-single__content.entry-content p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.pf-single__content.entry-content a {
    color: var(--color-primary, #beea07);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pf-single__content.entry-content ul,
.pf-single__content.entry-content ol {
    color: rgba(255, 255, 255, 0.6);
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.pf-single__content.entry-content li {
    margin-bottom: 0.4rem;
    line-height: 1.65;
}

.pf-single__content.entry-content strong {
    color: rgba(255, 255, 255, 0.85);
}

.pf-single__content.entry-content blockquote {
    border-left: 3px solid var(--color-primary, #beea07);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.pf-single__content.entry-content img {
    max-width: 100%;
    border-radius: 0.75rem;
    display: block;
}

/* ── Sidebar card ── */
.pf-single__sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.75rem;
    position: sticky;
    top: 6rem;
}

.pf-single__sidebar-heading {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-primary, #beea07);
    margin: 0 0 1.5rem;
}

.pf-single__sidebar-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 1rem;
}

.pf-single__sidebar-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.28);
    flex-shrink: 0;
}

.pf-single__sidebar-value {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.72);
    text-align: right;
}

.pf-single__sidebar-services {
    padding: 0.75rem 0 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pf-single__sidebar-services .pf-single__sidebar-label {
    display: block;
    margin-bottom: 0.85rem;
}

.pf-single__services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pf-single__service-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    transition: color 0.2s;
}

.pf-single__service-link i {
    font-size: 0.72rem;
    color: var(--color-primary, #beea07);
    flex-shrink: 0;
}

.pf-single__service-link:hover {
    color: var(--color-primary, #beea07);
}

.pf-single__sidebar-caso {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--color-primary, #beea07);
    text-decoration: none;
    text-align: right;
    transition: opacity 0.2s;
    max-width: 16ch;
    line-height: 1.3;
}

.pf-single__sidebar-caso i {
    font-size: 0.72rem;
    flex-shrink: 0;
}

.pf-single__sidebar-caso:hover {
    opacity: 0.75;
}

.pf-single__sidebar-cta {
    width: 100%;
    justify-content: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
}

/* ── Gallery ── */
.pf-single__gallery-section {
    padding: 0 0 5.5rem;
}

.pf-single__gallery-heading {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 2rem;
}

.pf-single__gallery-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.28);
}

.pf-single__gallery-grid {
    columns: 3;
    column-gap: 1rem;
}

.pf-single__gallery-item {
    position: relative;
    display: block;
    break-inside: avoid;
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    cursor: zoom-in;
    margin-bottom: 1rem;
}

.pf-single__gallery-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pf-single__gallery-item:hover .pf-single__gallery-img {
    transform: scale(1.04);
}

.pf-single__gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 11, 17, 0.45);
    opacity: 0;
    transition: opacity 0.25s;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.88);
}

.pf-single__gallery-item:hover .pf-single__gallery-zoom {
    opacity: 1;
}

/* ── Prev / Next Navigation ── */
.pf-single__nav {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 2.5rem 0 3rem;
}

.pf-single__nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.pf-single__nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    transition: opacity 0.2s;
    max-width: 45%;
}

.pf-single__nav-item:hover {
    opacity: 0.8;
}

.pf-single__nav-item--next {
    text-align: right;
    align-items: flex-end;
}

.pf-single__nav-item--empty {
    flex: 1;
}

.pf-single__nav-dir {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
}

.pf-single__nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pf-single__nav-item:hover .pf-single__nav-title {
    color: var(--color-primary, #beea07);
}

.pf-single__nav-all {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.pf-single__nav-all:hover {
    border-color: var(--color-primary, #beea07);
    color: var(--color-primary, #beea07);
    background: rgba(190, 234, 7, 0.06);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .pf-single__layout {
        grid-template-columns: 1fr 260px;
        gap: 2.5rem;
    }

    .pf-single__gallery-grid {
        columns: 2;
    }
}

@media (max-width: 768px) {
    .pf-single__hero--has-bg {
        min-height: 50vh;
    }

    .pf-single__layout {
        grid-template-columns: 1fr;
    }

    .pf-single__sidebar-card {
        position: static;
    }
}

@media (max-width: 520px) {
    .pf-single__gallery-grid {
        columns: 1;
    }

    .pf-single__nav-title {
        display: none;
    }
}
