/* ════════════════════════════════════════════════════════════════════════════════════
   PROJECT DETAIL PAGE STYLES
   ════════════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────────────
   COVER HERO SECTION
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__cover-hero {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    background: linear-gradient(135deg, #FA3DC7 0%, #A870DB 50%, #46C0DF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-detail__cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ────────────────────────────────────────────────────────────────────────────────────
   TITLE SECTION & HERO GRID (70-30 Split)
   ──────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__title-section {
    padding: 3rem 1.5rem;
    background: #f8f8f9;
}

.proj-detail__hero-grid {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.proj-detail__hero-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.proj-detail__hero-right {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.proj-detail__title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--clr-text);
    letter-spacing: -0.5px;
}

.proj-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--clr-text-muted);
}

.proj-detail__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proj-detail__meta-item strong {
    color: var(--clr-primary);
    font-weight: 700;
}

/* ────────────────────────────────────────────────────────────────────────────────────
   ACTION BUTTONS - SQUARE GRID (3 columns × 2 rows = 6 buttons, 80px size)
   ──────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 1rem;
    width: fit-content;
}

.proj-detail__action-square {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 80px;
    height: 80px;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    background: white;
    color: var(--clr-text);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.proj-detail__action-square:hover {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 61, 199, 0.2);
}

.proj-detail__action-square.filled {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: white;
}

.proj-detail__action-square .material-symbols-rounded {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1;
}

.proj-detail__action-square .material-symbols-rounded.filled {
    font-variation-settings: 'FILL' 1;
}

.proj-detail__action-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-align: center;
    line-height: 1.1;
    word-break: break-word;
    width: 100%;
}

.proj-detail__like-count {
    font-weight: 700;
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.05rem 0.2rem;
    border-radius: 0.15rem;
}

.proj-detail__action-square.filled .proj-detail__like-count {
    background: rgba(0, 0, 0, 0.15);
}

/* ────────────────────────────────────────────────────────────────────────────────────
   INFO ROW - TAGS & DESCRIPTION
   ──────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__info-row {
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.proj-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.proj-detail__tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(250, 61, 199, 0.08);
    border: 1px solid var(--clr-border);
    border-radius: 1.5rem;
    font-size: 0.8rem;
    color: var(--clr-primary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.proj-detail__excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--clr-text);
    max-width: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   MAIN CONTENT
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__content {
    padding: 3rem 1.5rem;
    background: var(--clr-bg);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--clr-text);
}

.proj-detail__content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--clr-text);
}

.proj-detail__content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--clr-text);
}

.proj-detail__content p {
    margin-bottom: 1.25rem;
}

.proj-detail__content ul,
.proj-detail__content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.proj-detail__content li {
    margin-bottom: 0.5rem;
}

.proj-detail__content a {
    color: var(--clr-primary);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.proj-detail__content a:hover {
    opacity: 0.8;
}

.proj-detail__content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   GALLERY SECTION
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__gallery {
    padding: 3rem 1.5rem;
    background: var(--clr-bg-secondary);
    min-height: 400px;
}

.proj-detail__gallery-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--clr-text);
}

.proj-detail__gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.proj-detail__gallery-item {
    margin: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
    border: 1px solid var(--clr-border);
    transition: all 0.3s ease;
}

.proj-detail__gallery-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.proj-detail__gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.proj-detail__gallery-item figcaption {
    padding: 1.25rem;
}

.proj-detail__gallery-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.5rem;
}

.proj-detail__gallery-item p {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   Q&A / COMMENTS SECTION
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__qa {
    padding: 3rem 1.5rem;
    background: var(--clr-bg);
}

.proj-detail__qa h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--clr-text);
}

.proj-detail__comment-form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--clr-border);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--clr-text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--clr-border);
    border-radius: 0.3rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
    color: var(--clr-text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(250, 61, 199, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.3rem;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn--primary {
    background: var(--clr-primary);
    color: white;
}

.btn--primary:hover {
    background: #e32bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 61, 199, 0.3);
}

.proj-detail__comments {
    margin-top: 2rem;
}

.proj-detail__comments h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--clr-text);
}

.proj-detail__comment {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--clr-border);
    margin-bottom: 1rem;
}

.proj-detail__comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.proj-detail__comment-header strong {
    color: var(--clr-text);
    font-weight: 700;
    font-size: 1rem;
}

.proj-detail__comment-date {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

.proj-detail__comment-text {
    color: var(--clr-text);
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   MODALS
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
}

.proj-detail__modal.is-open {
    display: flex;
}

.proj-detail__modal-content {
    background: white;
    border-radius: 0.5rem;
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.proj-detail__modal-content--video {
    max-width: 95vw;
    width: 1200px;
    max-height: 85vh;
}

.proj-detail__modal-content--carousel {
    max-width: 95vw;
    width: 1100px;
    max-height: 85vh;
}

.proj-detail__modal-content--impact {
    max-width: 900px;
    padding: 2rem;
}

.proj-detail__modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
}

.proj-detail__modal-close:hover {
    background: var(--clr-primary);
    color: white;
    border-color: var(--clr-primary);
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   WATCH MODAL - VIDEO
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    overflow: hidden;
}

.proj-detail__video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   PRESENT MODAL - CAROUSEL
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.proj-detail__carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-detail__carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 0;
    margin: 0;
}

.proj-detail__carousel-slide.is-active {
    display: flex;
    position: absolute;
}

.proj-detail__carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
    padding: 0;
    display: block;
}

.proj-detail__slide-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    color: #aaa;
    gap: 1rem;
}

.proj-detail__slide-placeholder .material-symbols-rounded {
    font-size: 3rem;
}

.proj-detail__slide-placeholder p {
    font-size: 1.1rem;
    margin: 0;
}

.proj-detail__slide-title {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.3rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.proj-detail__carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.proj-detail__carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.proj-detail__carousel-btn--prev {
    left: 1rem;
}

.proj-detail__carousel-btn--next {
    right: 1rem;
}

.proj-detail__carousel-progress {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   IMPACT MODAL - 2 COLUMNS
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__impact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.proj-detail__impact-metrics h3,
.proj-detail__impact-description h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--clr-text);
}

.proj-detail__metrics-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proj-detail__metric-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.proj-detail__metric-dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 0.25rem;
}

.proj-detail__metric-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--clr-text);
    font-weight: 700;
}

.proj-detail__metric-item p {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    margin: 0;
}

.proj-detail__impact-description p {
    color: var(--clr-text);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   SHARE TOOLTIP
   ───────────────────────────────────────────────────────────────────────────────────── */
.proj-detail__share-tooltip {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: white;
    border: 1px solid var(--clr-border);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    max-width: 300px;
    display: none;
}

.proj-detail__share-tooltip.is-visible {
    display: block;
}

.proj-detail__share-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--clr-text);
}

.proj-detail__copy-input {
    display: flex;
    gap: 0.5rem;
}

.proj-detail__copy-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--clr-border);
    border-radius: 0.3rem;
    font-size: 0.85rem;
    background: var(--clr-bg);
    color: var(--clr-text);
}

.proj-detail__copy-input button {
    padding: 0.5rem 0.75rem;
    background: var(--clr-primary);
    border: none;
    color: white;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-detail__copy-input button:hover {
    background: #e32bb8;
}

/* ─────────────────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .proj-detail__hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .proj-detail__hero-right {
        justify-content: flex-start;
    }

    .proj-detail__actions-grid {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .proj-detail__cover-hero {
        max-height: 300px;
    }

    .proj-detail__title-section {
        padding: 2rem 1rem;
    }

    .proj-detail__title {
        font-size: clamp(1.4rem, 4vw, 2rem);
        margin-bottom: 1rem;
    }

    .proj-detail__hero-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .proj-detail__actions-grid {
        grid-template-columns: repeat(3, 70px);
        gap: 0.8rem;
        width: fit-content;
    }

    .proj-detail__action-square {
        width: 70px;
        height: 70px;
        font-size: 0.65rem;
        padding: 0;
    }

    .proj-detail__action-square .material-symbols-rounded {
        font-size: 1.5rem;
    }

    .proj-detail__meta {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .proj-detail__info-row {
        padding-top: 1.5rem;
    }

    .proj-detail__excerpt {
        font-size: 0.95rem;
    }

    .proj-detail__modal-content--video {
        max-width: 90vw;
        width: auto;
    }

    .proj-detail__modal-content--carousel {
        max-width: 90vw;
        width: auto;
        max-height: 80vh;
    }

    .proj-detail__carousel-container {
        height: 350px;
    }

    .proj-detail__carousel-slides {
        min-height: 350px;
    }

    .proj-detail__carousel-slide {
        min-height: 350px;
    }

    .proj-detail__carousel-btn {
        width: 40px;
        height: 40px;
    }

    .proj-detail__carousel-btn--prev {
        left: 0.5rem;
    }

    .proj-detail__carousel-btn--next {
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .proj-detail__title-section {
        padding: 1.5rem 1rem;
    }

    .proj-detail__title {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .proj-detail__actions-grid {
        grid-template-columns: repeat(3, 60px);
        gap: 0.6rem;
        width: fit-content;
    }

    .proj-detail__action-square {
        width: 60px;
        height: 60px;
        font-size: 0.6rem;
        padding: 0;
    }

    .proj-detail__action-square .material-symbols-rounded {
        font-size: 1.3rem;
    }

    .proj-detail__meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .proj-detail__tags {
        gap: 0.4rem;
    }

    .proj-detail__tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .proj-detail__modal-content--video {
        max-width: 95vw;
    }

    .proj-detail__modal-content--carousel {
        max-width: 95vw;
        width: auto;
    }

    .proj-detail__carousel-container {
        height: 280px;
    }

    .proj-detail__carousel-slides {
        min-height: 280px;
    }

    .proj-detail__carousel-slide {
        min-height: 280px;
    }

    .proj-detail__carousel-progress {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .proj-detail__content {
        padding: 1.5rem 1rem;
        font-size: 0.95rem;
    }

    .proj-detail__gallery {
        padding: 1.5rem 1rem;
    }

    .proj-detail__gallery-grid {
        grid-template-columns: 1fr;
    }

    .proj-detail__qa {
        padding: 1.5rem 1rem;
    }

    .proj-detail__comment-form {
        padding: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .btn {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .proj-detail__action-btn {
        background: var(--clr-bg-secondary);
        color: var(--clr-text);
    }

    .proj-detail__comment-form,
    .proj-detail__comment {
        background: var(--clr-bg-secondary);
    }

    .proj-detail__modal-close {
        background: var(--clr-bg-secondary);
    }

    .proj-detail__share-tooltip {
        background: var(--clr-bg-secondary);
    }

    .proj-detail__copy-input input {
        background: var(--clr-bg);
    }
}
