/* =====================================================
   DevIQRA Portfolio System v2.1 — Widget Styles
   ===================================================== */

/* ── TESTIMONIALS — GRID ──────────────────────────── */
.iq-rev-grid {
    display: grid;
    gap: 24px;
}
.iq-rev-cols-1  { grid-template-columns: 1fr; }
.iq-rev-cols-2  { grid-template-columns: repeat(2, 1fr); }
.iq-rev-cols-3  { grid-template-columns: repeat(3, 1fr); }
.iq-rev-cols-4  { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .iq-rev-cols-t-1 { grid-template-columns: 1fr; }
    .iq-rev-cols-t-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .iq-rev-cols-1,.iq-rev-cols-2,.iq-rev-cols-3,.iq-rev-cols-4 { grid-template-columns: 1fr; }
}

/* ── TESTIMONIALS — SLIDER ────────────────────────── */
.iq-rev-slider-wrap {
    position: relative;
    padding-bottom: 48px; /* space for dots */
}
.iq-rev-swiper {
    overflow: hidden;
}
.iq-rev-swiper .swiper-slide {
    height: auto;
}
.iq-rev-swiper .swiper-pagination {
    bottom: 0;
}
.iq-rev-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #e0dcff;
    opacity: 1;
    transition: all 0.3s;
}
.iq-rev-swiper .swiper-pagination-bullet-active {
    background: #6C63FF;
    width: 24px;
    border-radius: 4px;
}

/* Prev / Next arrows */
.iq-slider-prev,
.iq-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #e8e5ff;
    color: #6C63FF;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(108,99,255,0.12);
}
.iq-slider-prev { left: -20px; }
.iq-slider-next { right: -20px; }
.iq-slider-prev:hover,
.iq-slider-next:hover {
    background: #6C63FF;
    color: #ffffff;
    border-color: #6C63FF;
    transform: translateY(-60%) scale(1.05);
}
.iq-slider-prev.swiper-button-disabled,
.iq-slider-next.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}
@media (max-width: 767px) {
    .iq-slider-prev { left: 0; }
    .iq-slider-next { right: 0; }
}

/* ── SHARED CARD ─────────────────────────────────── */
.iq-rev-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid #f0eeff;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.iq-rev-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(108, 99, 255, 0.09);
}

.iq-rev-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.iq-rev-quote {
    font-size: 56px;
    line-height: 0.9;
    color: #e8e5ff;
    font-family: Georgia, serif;
    font-weight: 900;
    letter-spacing: -4px;
    margin-top: -6px;
}

.iq-rev-stars { display: flex; gap: 2px; }
.iq-rev-star { font-size: 18px; line-height: 1; }
.iq-rev-star.filled { color: #f59e0b; }
.iq-rev-star.empty  { color: #d1d5db; }

.iq-rev-text {
    font-size: 15px;
    line-height: 1.7;
    color: #1A1A1A;
    font-style: italic;
    margin: 0 0 24px;
    flex: 1;
}

.iq-rev-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}

.iq-rev-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0eeff;
    display: block;
}
.iq-rev-avatar-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #6C63FF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.iq-rev-name {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 3px;
}
.iq-rev-role {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6C63FF;
    margin: 0;
}


/* ── PORTFOLIO GRID ──────────────────────────────── */
.iq-pf-grid {
    display: grid;
    gap: 24px;
}
.iq-pf-cols-1 { grid-template-columns: 1fr; }
.iq-pf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.iq-pf-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
    .iq-pf-cols-t-1 { grid-template-columns: 1fr; }
    .iq-pf-cols-t-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .iq-pf-cols-1,.iq-pf-cols-2,.iq-pf-cols-3 { grid-template-columns: 1fr; }
}

.iq-pf-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f0eeff;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}
.iq-pf-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(108, 99, 255, 0.10);
}

.iq-pf-img-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.iq-pf-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.iq-pf-card:hover .iq-pf-img-wrap img { transform: scale(1.04); }

/* Hover overlay */
.iq-pf-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(108, 99, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.iq-pf-card:hover .iq-pf-img-overlay { opacity: 1; }
.iq-pf-overlay-btn {
    background: #ffffff;
    color: #6C63FF;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
}
.iq-pf-overlay-btn:hover { background: #f0eeff; }

/* Link icon — top-right of image */
.iq-pf-link-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #6C63FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transition: all 0.25s;
    z-index: 2;
    line-height: 1;
}
.iq-pf-link-icon:hover {
    background: #6C63FF;
    color: #ffffff;
    transform: scale(1.08);
}

.iq-pf-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.iq-pf-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 8px;
    line-height: 1.3;
}
.iq-pf-sub {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}
.iq-pf-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.iq-pf-tech-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    background: #f0eeff;
    color: #6C63FF;
}
.iq-pf-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0eeff;
    padding-top: 16px;
    margin-top: auto;
}
.iq-pf-cat {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #6C63FF;
}
.iq-pf-visit {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.2s;
}
.iq-pf-visit:hover { color: #6C63FF; }


/* ── CASE STUDIES ──────────────────────────────────── */
.iq-cs-grid {
    display: grid;
    gap: 24px;
}
.iq-cs-cols-1 { grid-template-columns: 1fr; }
.iq-cs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.iq-cs-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
    .iq-cs-cols-t-1 { grid-template-columns: 1fr; }
    .iq-cs-cols-t-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .iq-cs-cols-1,.iq-cs-cols-2,.iq-cs-cols-3 { grid-template-columns: 1fr; }
}

.iq-cs-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #f0eeff;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.iq-cs-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(108, 99, 255, 0.10);
}

.iq-cs-img-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.iq-cs-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.iq-cs-card:hover .iq-cs-img-wrap img { transform: scale(1.04); }

.iq-cs-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(108, 99, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.iq-cs-card:hover .iq-cs-img-overlay { opacity: 1; }
.iq-cs-img-overlay .iq-cs-open-btn {
    background: #ffffff;
    color: #6C63FF;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 10px 22px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
}

.iq-cs-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.iq-cs-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 8px;
    line-height: 1.3;
}
.iq-cs-sub {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
}
.iq-cs-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.iq-cs-meta-pill {
    font-size: 11px;
    color: #555;
    background: #f9f9ff;
    border: 1px solid #e8e5ff;
    border-radius: 50px;
    padding: 4px 12px;
}
.iq-cs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0eeff;
    padding-top: 16px;
    margin-top: auto;
}
.iq-cs-cat {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #6C63FF;
}
.iq-cs-footer .iq-cs-open-btn {
    background: #6C63FF;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 9px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.iq-cs-footer .iq-cs-open-btn:hover {
    background: #5a52e0;
    transform: translateY(-1px);
}


/* ── CASE STUDY POPUP ──────────────────────────────── */
.iq-cs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: iq-overlay-in 0.25s ease;
}
@keyframes iq-overlay-in { from { opacity: 0; } to { opacity: 1; } }

.iq-cs-popup-inner {
    background: #fff;
    border-radius: 28px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: iq-popup-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: #e0dcff transparent;
}
@keyframes iq-popup-in {
    from { opacity: 0; transform: scale(0.93) translateY(28px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.iq-cs-popup-close {
    position: sticky;
    top: 16px;
    float: right;
    margin: 16px 16px 0 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0eeff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6C63FF;
    font-weight: 900;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
}
.iq-cs-popup-close:hover { background: #e0dcff; transform: scale(1.1); }

.iq-cs-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
    clear: both;
}
.iq-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #f0eeff;
    border-top-color: #6C63FF;
    border-radius: 50%;
    animation: iq-spin 0.75s linear infinite;
}
@keyframes iq-spin { to { transform: rotate(360deg); } }

.iq-cs-popup-content {
    padding: 0 32px 40px;
    clear: both;
}
.iq-cs-popup-cover {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 28px;
    display: block;
}
.iq-cs-popup-header { margin-bottom: 20px; }
.iq-cs-popup-cat {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #6C63FF;
    margin: 0 0 8px;
}
.iq-cs-popup-title {
    font-size: 26px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 8px;
    line-height: 1.2;
}
.iq-cs-popup-subtitle { font-size: 15px; color: #666; margin: 0; }

.iq-cs-popup-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 26px;
}
.iq-cs-popup-pill {
    background: #f9f9ff;
    border: 1px solid #e8e5ff;
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 12px;
    color: #555;
    font-weight: 600;
}

.iq-cs-popup-sections { display: flex; flex-direction: column; gap: 14px; }
.iq-cs-popup-section {
    background: #f9f9ff;
    border-radius: 14px;
    padding: 18px 20px;
    border-left: 4px solid #6C63FF;
}
.iq-cs-popup-section-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #6C63FF;
    margin: 0 0 8px;
}
.iq-cs-popup-section p { font-size: 15px; line-height: 1.7; color: #333; margin: 0; }

.iq-cs-popup-techs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.iq-cs-popup-tech-tag {
    background: #6C63FF;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
}

.iq-cs-popup-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 22px;
}
.iq-cs-popup-gallery img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    cursor: zoom-in;
    transition: transform 0.3s;
}
.iq-cs-popup-gallery img:hover { transform: scale(1.03); }

.iq-cs-popup-cta { margin-top: 28px; text-align: center; }
.iq-cs-popup-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1A1A1A;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: 50px;
    transition: background 0.2s, transform 0.2s;
}
.iq-cs-popup-cta a:hover { background: #6C63FF; transform: translateY(-2px); }

@media (max-width: 600px) {
    .iq-cs-popup-inner  { border-radius: 18px; }
    .iq-cs-popup-content{ padding: 0 16px 28px; }
    .iq-cs-popup-cover  { height: 200px; border-radius: 12px; }
    .iq-cs-popup-title  { font-size: 20px; }
}
