/**
 * WP Hero by NWT — Frontend Styles
 *
 * Carousel, testimonial cards, single detail page,
 * archive grid, and filter tabs.
 *
 * @package NWT_WP_Hero
 * @since   1.1.0
 */

/* ─────────────────────────────────────
   Variables
   ───────────────────────────────────── */
:root {
    --nwt-f-primary:       #4f46e5;
    --nwt-f-primary-light: #e0e7ff;
    --nwt-f-text:          #1e293b;
    --nwt-f-text-muted:    #64748b;
    --nwt-f-bg:            #ffffff;
    --nwt-f-bg-alt:        #f8fafc;
    --nwt-f-border:        #e2e8f0;
    --nwt-f-shadow:        0 4px 24px rgba(0, 0, 0, 0.06);
    --nwt-f-shadow-hover:  0 12px 40px rgba(0, 0, 0, 0.12);
    --nwt-f-radius:        16px;
    --nwt-f-radius-sm:     10px;
    --nwt-f-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --nwt-f-transition:    0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --nwt-f-quote-color:   #c7d2fe;
}

/* ─────────────────────────────────────
   CAROUSEL
   ───────────────────────────────────── */
.nwt-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    font-family: var(--nwt-f-font);
    overflow: hidden;
}

.nwt-carousel-title-bar {
    text-align: center;
    margin-bottom: 28px;
}

.nwt-carousel-heading {
    font-size: 28px;
    font-weight: 800;
    color: var(--nwt-f-text);
    margin: 0;
    letter-spacing: -0.02em;
}

/* Viewport & Track */
.nwt-carousel-viewport {
    overflow: hidden;
    border-radius: var(--nwt-f-radius);
}

.nwt-carousel-track {
    display: flex;
    transition: transform var(--nwt-f-transition);
    will-change: transform;
}

.nwt-carousel-slide {
    flex: 0 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ── Testimonial Card ── */
.nwt-testimonial-card {
    display: flex;
    flex-direction: column;
    background: var(--nwt-f-bg);
    border: 1px solid var(--nwt-f-border);
    border-radius: var(--nwt-f-radius);
    padding: 28px 24px 24px;
    text-decoration: none;
    color: var(--nwt-f-text);
    transition: all var(--nwt-f-transition);
    box-shadow: var(--nwt-f-shadow);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.nwt-testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--nwt-f-primary), #7c3aed, #ec4899);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--nwt-f-transition);
}

.nwt-testimonial-card:hover {
    box-shadow: var(--nwt-f-shadow-hover);
    transform: translateY(-4px);
    border-color: transparent;
}

.nwt-testimonial-card:hover::before {
    transform: scaleX(1);
}

/* Card Logo */
.nwt-card-logo {
    margin-bottom: 16px;
    height: 36px;
    display: flex;
    align-items: center;
}

.nwt-card-logo img {
    max-height: 36px;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity var(--nwt-f-transition);
}

.nwt-testimonial-card:hover .nwt-card-logo img {
    opacity: 1;
}

/* Quote */
.nwt-card-quote {
    flex: 1;
    margin-bottom: 20px;
    position: relative;
}

.nwt-quote-icon {
    width: 28px;
    height: 28px;
    color: var(--nwt-f-quote-color);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.nwt-card-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--nwt-f-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nwt-card-content p {
    margin: 0 0 8px;
}

.nwt-card-content p:last-child {
    margin-bottom: 0;
}

/* Author */
.nwt-card-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--nwt-f-border);
}

.nwt-author-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--nwt-f-primary-light);
    flex-shrink: 0;
}

.nwt-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nwt-f-primary), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.nwt-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nwt-author-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--nwt-f-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nwt-author-title {
    font-size: 12px;
    color: var(--nwt-f-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Date */
.nwt-card-date {
    margin-top: 8px;
    font-size: 12px;
    color: var(--nwt-f-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Carousel Arrows ── */
.nwt-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nwt-f-bg);
    border: 1px solid var(--nwt-f-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--nwt-f-transition);
    color: var(--nwt-f-text);
    padding: 0;
}

.nwt-carousel-arrow svg {
    width: 20px;
    height: 20px;
}

.nwt-carousel-arrow:hover {
    background: var(--nwt-f-primary);
    color: #fff;
    border-color: var(--nwt-f-primary);
    box-shadow: 0 4px 16px rgba(79,70,229,0.3);
}

.nwt-arrow-prev { left: -8px; }
.nwt-arrow-next { right: -8px; }

/* ── Dots ── */
.nwt-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.nwt-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--nwt-f-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--nwt-f-transition);
}

.nwt-carousel-dot.nwt-dot-active {
    background: var(--nwt-f-primary);
    transform: scale(1.3);
}

.nwt-carousel-dot:hover {
    background: var(--nwt-f-primary);
    opacity: 0.6;
}

/* ─────────────────────────────────────
   ALL TESTIMONIALS GRID
   ───────────────────────────────────── */
.nwt-all-testimonials,
.nwt-archive-testimonials {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--nwt-f-font);
}

/* Archive Header */
.nwt-archive-header {
    text-align: center;
    margin-bottom: 36px;
}

.nwt-archive-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--nwt-f-text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.nwt-archive-subtitle {
    font-size: 16px;
    color: var(--nwt-f-text-muted);
    margin: 0;
}

/* Filter Tabs */
.nwt-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.nwt-filter-tab {
    padding: 8px 20px;
    border: 1px solid var(--nwt-f-border);
    border-radius: 100px;
    background: var(--nwt-f-bg);
    color: var(--nwt-f-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--nwt-f-transition);
    font-family: var(--nwt-f-font);
}

.nwt-filter-tab:hover {
    border-color: var(--nwt-f-primary);
    color: var(--nwt-f-primary);
}

.nwt-filter-tab.nwt-tab-active {
    background: var(--nwt-f-primary);
    color: #fff;
    border-color: var(--nwt-f-primary);
}

/* Product Group */
.nwt-product-group {
    margin-bottom: 48px;
    animation: nwt-fadeIn 0.4s ease-out;
}

.nwt-product-group.nwt-hidden {
    display: none;
}

.nwt-product-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--nwt-f-text);
    margin: 0 0 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--nwt-f-primary-light);
}

.nwt-product-desc {
    font-size: 14px;
    color: var(--nwt-f-text-muted);
    margin: 0 0 20px;
}

/* Grid */
.nwt-testimonials-grid {
    display: grid;
    gap: 24px;
}

.nwt-testimonials-grid[data-columns="1"] { grid-template-columns: 1fr; }
.nwt-testimonials-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.nwt-testimonials-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.nwt-testimonials-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }

.nwt-grid-card {
    display: flex;
    flex-direction: column;
}

/* No testimonials */
.nwt-no-testimonials {
    text-align: center;
    font-size: 16px;
    color: var(--nwt-f-text-muted);
    padding: 60px 20px;
}

/* ─────────────────────────────────────
   SINGLE TESTIMONIAL PAGE
   ───────────────────────────────────── */
.nwt-single-testimonial {
    font-family: var(--nwt-f-font);
    padding: 40px 20px 80px;
}

.nwt-single-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Back link */
.nwt-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--nwt-f-primary);
    text-decoration: none;
    margin-bottom: 32px;
    transition: opacity var(--nwt-f-transition);
}

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

/* Header */
.nwt-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.nwt-single-logo {
    margin-bottom: 20px;
}

.nwt-single-logo img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.nwt-single-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--nwt-f-text);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.nwt-single-products {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.nwt-product-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--nwt-f-primary-light);
    color: var(--nwt-f-primary);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
}

/* Quote Block */
.nwt-single-quote-block {
    background: var(--nwt-f-bg-alt);
    border-radius: var(--nwt-f-radius);
    padding: 40px 36px;
    margin-bottom: 32px;
    border: 1px solid var(--nwt-f-border);
    position: relative;
}

.nwt-single-quote-icon {
    width: 40px;
    height: 40px;
    color: var(--nwt-f-quote-color);
    margin-bottom: 16px;
}

.nwt-single-full-testimonial {
    font-size: 17px;
    line-height: 1.8;
    color: var(--nwt-f-text);
}

.nwt-single-full-testimonial p {
    margin: 0 0 16px;
}

.nwt-single-full-testimonial p:last-child {
    margin-bottom: 0;
}

/* Author Card */
.nwt-single-author-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--nwt-f-bg);
    border: 1px solid var(--nwt-f-border);
    border-radius: var(--nwt-f-radius);
    padding: 24px;
    box-shadow: var(--nwt-f-shadow);
    flex-wrap: wrap;
}

.nwt-single-author-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--nwt-f-primary-light);
    flex-shrink: 0;
}

.nwt-single-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nwt-f-primary), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    flex-shrink: 0;
}

.nwt-single-author-details {
    flex: 1;
    min-width: 0;
}

.nwt-single-author-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--nwt-f-text);
    margin: 0 0 4px;
}

.nwt-single-author-designation {
    font-size: 14px;
    color: var(--nwt-f-text-muted);
    margin: 0 0 4px;
}

.nwt-single-author-company {
    font-size: 14px;
    color: var(--nwt-f-text);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nwt-inline-logo {
    max-height: 20px;
    max-width: 60px;
    object-fit: contain;
}

.nwt-single-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--nwt-f-text-muted);
    margin-left: auto;
}

/* Tags */
.nwt-single-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.nwt-tag-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--nwt-f-bg-alt);
    color: var(--nwt-f-text-muted);
    border: 1px solid var(--nwt-f-border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

/* ─────────────────────────────────────
   PAGINATION (per product group)
   ───────────────────────────────────── */
.nwt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 0;
}

.nwt-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    border: 1px solid var(--nwt-f-border);
    border-radius: 8px;
    background: var(--nwt-f-bg);
    color: var(--nwt-f-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--nwt-f-transition);
    font-family: var(--nwt-f-font);
}

.nwt-page-btn:hover:not(:disabled) {
    background: var(--nwt-f-primary);
    color: #fff;
    border-color: var(--nwt-f-primary);
    box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.nwt-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nwt-page-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--nwt-f-text-muted);
}

.nwt-page-current {
    color: var(--nwt-f-primary);
    font-weight: 800;
}

/* ─────────────────────────────────────
   Animations
   ───────────────────────────────────── */
@keyframes nwt-fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────
   Responsive
   ───────────────────────────────────── */
@media (max-width: 992px) {
    .nwt-testimonials-grid[data-columns="3"],
    .nwt-testimonials-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nwt-testimonials-grid[data-columns="2"],
    .nwt-testimonials-grid[data-columns="3"],
    .nwt-testimonials-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }

    .nwt-carousel-heading {
        font-size: 22px;
    }

    .nwt-archive-title {
        font-size: 28px;
    }

    .nwt-single-title {
        font-size: 24px;
    }

    .nwt-single-quote-block {
        padding: 24px 20px;
    }

    .nwt-single-author-card {
        flex-direction: column;
        text-align: center;
    }

    .nwt-single-date {
        margin-left: 0;
    }

    .nwt-carousel-arrow {
        display: none;
    }

    .nwt-filter-tabs {
        gap: 6px;
    }

    .nwt-filter-tab {
        padding: 6px 14px;
        font-size: 13px;
    }
}
