/**
 * Single Post Creative Template Styles
 * Scoped with .post-creative prefix
 * Uses theme CSS variables for consistency
 */

/* ============================================
   BASE LAYOUT
   ============================================ */
.post-creative {
    background-color: var(--bg-page, #FDFDFD);
    color: var(--text-primary, #111);
    min-height: 100vh;
    font-family: var(--font-main, 'Inter', sans-serif);
    overflow-x: hidden;
}

/* ============================================
   HERO SECTION
   ============================================ */
.post-creative__hero {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.post-creative__hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.post-creative__hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
}

.post-creative__hero-content {
    position: relative;
    z-index: 2;
    padding: 24px 24px 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.post-creative__category-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(17, 164, 212, 0.9);
    backdrop-filter: blur(4px);
    margin-bottom: 24px;
}

.post-creative__category-badge span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
}

.post-creative__title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.post-creative__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.post-creative__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-creative__meta-item svg {
    opacity: 0.7;
}

.post-creative__meta-sep {
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.post-creative__main {
    position: relative;
    z-index: 10;
    padding: 0 24px 80px;
    margin-top: -24px;
}

/* ============================================
   SAPO / LEAD
   ============================================ */
.post-creative__sapo {
    margin-bottom: 40px;
    padding-left: 24px;
    border-left: 2px solid #11a4d4;
}

.post-creative__sapo p {
    font-size: clamp(18px, 3vw, 22px);
    line-height: 1.6;
    color: var(--text-secondary, #555);
    font-weight: 300;
    margin: 0;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.post-creative__toc {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 40px;
}

.post-creative__toc:empty,
.post-creative__toc:not(:has(li)) {
    display: none;
}

.post-creative__toc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #111);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-creative__toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-creative__toc-list li {
    margin-bottom: 8px;
}

.post-creative__toc-list a {
    color: var(--text-secondary, #555);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s ease;
    display: block;
}

.post-creative__toc-list a:hover {
    color: var(--accent, #2563EB);
}

.post-creative__toc-list .toc-h3 {
    padding-left: 16px;
}

/* ============================================
   ARTICLE BODY
   ============================================ */
.post-creative__body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary, #555);
    margin-bottom: 48px;
}

.post-creative__body p {
    margin-bottom: 24px;
    text-align: justify;
    color: var(--text-secondary, #555);
}

.post-creative__body h2,
.post-creative__body h3,
.post-creative__body h4 {
    color: var(--text-primary, #111);
    margin-top: 48px;
    margin-bottom: 16px;
    scroll-margin-top: 80px;
}

.post-creative__body h2 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(22px, 4vw, 28px);
}

.post-creative__body h3 {
    font-size: clamp(18px, 3vw, 22px);
}

.post-creative__body a {
    color: #11a4d4;
    text-decoration: underline;
}

.post-creative__body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.post-creative__body blockquote {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--accent, #2563EB);
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
    position: relative;
}

.post-creative__body blockquote::before {
    content: '"';
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 80px;
    color: rgba(37, 99, 235, 0.1);
    position: absolute;
    top: -10px;
    left: 16px;
    line-height: 1;
}

.post-creative__body blockquote p {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(18px, 3vw, 22px);
    font-style: italic;
    color: var(--text-primary, #111);
    text-align: center;
    margin: 0;
}

.post-creative__body blockquote cite {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #2563EB);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-style: normal;
}

/* ============================================
   GALLERY SLIDER
   ============================================ */
.post-creative__gallery {
    margin-bottom: 48px;
}

.post-creative__gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.post-creative__gallery-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #111);
    margin: 0;
}

.post-creative__gallery-dots {
    display: flex;
    gap: 6px;
}

.post-creative__gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease;
}

.post-creative__gallery-dot.is-active {
    background: var(--accent, #2563EB);
}

.post-creative__gallery-main {
    position: relative;
    margin: 0 -24px;
}

.post-creative__gallery-slider {
    display: flex;
    gap: 16px;
    overflow: hidden;
    /* Changed from overflow-x: auto */
    padding: 0 24px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.post-creative__gallery-slider::-webkit-scrollbar {
    display: none;
}

.post-creative__gallery-slide {
    flex-shrink: 0;
    width: 85vw;
    max-width: 600px;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Gallery Arrows */
.post-creative__gallery-arrow {
    position: absolute;
    top: calc(50% - 8px);
    /* Adjust for bottom padding of slider */
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-primary, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-creative__gallery-arrow:hover {
    background: var(--accent, #2563EB);
    color: #fff;
    border-color: var(--accent, #2563EB);
    transform: translateY(-50%) scale(1.1);
}

.post-creative__gallery-arrow--prev {
    left: 12px;
}

.post-creative__gallery-arrow--next {
    right: 12px;
}

@media (max-width: 768px) {
    .post-creative__gallery-arrow {
        width: 40px;
        height: 40px;
    }
}

/* Dots as buttons */
.post-creative__gallery-dot {
    cursor: pointer;
}

.post-creative__gallery-img-wrap {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.post-creative__gallery-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.post-creative__gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.post-creative__gallery-caption p {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.post-creative__faq {
    margin-bottom: 48px;
}

.post-creative__faq-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(22px, 4vw, 28px);
    color: var(--text-primary, #111);
    margin: 0 0 24px;
}

.post-creative__faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-creative__faq-item {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.post-creative__faq-details {
    padding: 0;
}

.post-creative__faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary, #111);
}

.post-creative__faq-question::-webkit-details-marker {
    display: none;
}

.post-creative__faq-icon {
    flex-shrink: 0;
    color: var(--accent, #2563EB);
    transition: transform 0.2s ease;
}

.post-creative__faq-details[open] .post-creative__faq-icon {
    transform: rotate(180deg);
}

.post-creative__faq-answer {
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary, #555);
}

.post-creative__faq-answer p {
    margin: 0 0 12px;
    color: var(--text-secondary, #555);
}

.post-creative__faq-answer p:last-child {
    margin-bottom: 0;
}

/* ============================================
   AUTHOR BIO
   ============================================ */
.post-creative__author {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 48px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-creative__author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    border: 2px solid var(--accent, #2563EB);
    padding: 2px;
}

.post-creative__author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-creative__author-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #111);
    margin: 0 0 4px;
}

.post-creative__author-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent, #2563EB);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 12px;
}

.post-creative__author-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #555);
    margin: 0 0 16px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.post-creative__author-link {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary, #111);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-creative__author-link:hover {
    background: var(--accent, #2563EB);
    color: #fff;
    border-color: var(--accent, #2563EB);
}

/* ============================================
   RELATED POSTS
   ============================================ */
.post-creative__related {
    margin-bottom: 48px;
}

.post-creative__related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.post-creative__related-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 20px;
    color: var(--text-primary, #111);
    margin: 0;
}

.post-creative__related-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent, #2563EB);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.post-creative__related-all:hover {
    opacity: 0.7;
}

.post-creative__related-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 -24px;
    padding: 0 24px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.post-creative__related-slider::-webkit-scrollbar {
    display: none;
}

.post-creative__related-card {
    flex-shrink: 0;
    width: 256px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

.post-creative__related-img-wrap {
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 12px;
    position: relative;
}

.post-creative__related-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.post-creative__related-card:hover .post-creative__related-img {
    transform: scale(1.05);
}

.post-creative__related-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}

.post-creative__related-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #111);
    line-height: 1.4;
    margin: 0 0 4px;
    transition: color 0.2s ease;
}

.post-creative__related-card:hover .post-creative__related-card-title {
    color: var(--accent, #2563EB);
}

.post-creative__related-meta {
    font-size: 12px;
    color: var(--text-secondary, #555);
    margin: 0;
}

/* ============================================
   COMMENTS
   ============================================ */
.post-creative__comments {
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.post-creative__comments-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(22px, 4vw, 28px);
    color: var(--text-primary, #111);
    margin: 0 0 24px;
}

/* Comment Form */
.post-creative__comment-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.post-creative__comment-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-creative__comment-field--half {
    width: calc(50% - 8px);
}

@media (max-width: 600px) {
    .post-creative__comment-field--half {
        width: 100%;
    }
}

.post-creative__comment-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #111);
}

.post-creative__comment-field label .required {
    color: #ef4444;
}

.post-creative__comment-field input,
.post-creative__comment-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #111);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.post-creative__comment-field input:focus,
.post-creative__comment-field textarea:focus {
    outline: none;
    border-color: var(--accent, #2563EB);
}

.post-creative__comment-field input::placeholder,
.post-creative__comment-field textarea::placeholder {
    color: var(--text-secondary, #888);
}

.post-creative__comment-submit {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    background: var(--accent, #2563EB);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.post-creative__comment-submit:hover {
    background: var(--accent-dark, #1E40AF);
}

/* Comment List */
.post-creative__comments-list {
    margin-top: 32px;
}

.post-creative__comments-list .comment {
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.post-creative__comments-list .children {
    margin-left: 20px;
    list-style: none;
    padding: 0;
}

@media (min-width: 768px) {
    .post-creative__comments-list .children {
        margin-left: 48px;
    }
}

.post-creative__comments-list .comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-creative__comments-list .comment-author img {
    border-radius: 50%;
}

.post-creative__comments-list .comment-author .fn {
    font-weight: 600;
    color: var(--text-primary, #111);
}

.post-creative__comments-list .comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary, #555);
}

.post-creative__comments-list .comment-content p {
    margin: 0 0 12px;
    color: var(--text-secondary, #555);
}

.post-creative__comments-list .comment-meta {
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin-top: 12px;
}

.post-creative__comments-list .reply a {
    font-size: 13px;
    color: var(--accent, #2563EB);
    text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    .post-creative__main {
        max-width: 720px;
        margin: 0 auto;
        padding-left: 40px;
        padding-right: 40px;
    }

    .post-creative__gallery-slider,
    .post-creative__related-slider {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
}