/* ================================================
   CASE STUDY ARCHIVE PAGE - TeroTAM
   Font: Montserrat | Colors: #0C1C44, #FF8214
   ================================================ */

/* ---------- Global Overrides for WP/Elementor ---------- */
.cs-archive-page,
.cs-archive-page *,
.cs-archive-page *::before,
.cs-archive-page *::after {
    box-sizing: border-box;
}
.cs-archive-page {
    font-family: 'Montserrat', sans-serif;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-block-start: 0 !important;
    width: 100%;
    overflow-x: clip;
}
.cs-archive-page section {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ---------- Container ---------- */
.cs-archive-page .cs-container { max-width: 1200px; margin: 0 auto; padding: 0 30px; width: 100%; }

/* ---------- Breadcrumbs ---------- */
.cs-breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 24px; }
.cs-breadcrumbs a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color .3s; }
.cs-breadcrumbs a:hover { color: #FF8214; }
.cs-bread-sep { color: rgba(255,255,255,0.4); display: flex; }
.cs-bread-current { color: #FF8214; font-weight: 500; }

/* ================================
   HERO SECTION
   ================================ */
.cs-hero {
    background: linear-gradient(135deg, #0C1C44 0%, #142952 60%, #0C1C44 100%);
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}
.cs-hero-bg-pattern {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,130,20,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,130,20,0.04) 0%, transparent 50%);
    pointer-events: none;
}
.cs-hero-bg-pattern::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(255,130,20,0.08);
    pointer-events: none;
}
.cs-hero .cs-container { position: relative; z-index: 2; }
.cs-hero-title {
    font-size: 42px; font-weight: 700; color: #fff !important;
    line-height: 1.2; margin-bottom: 16px;
}
.cs-hero-title span { color: #FF8214; }
.cs-hero-desc {
    font-size: 16px; color: rgba(255,255,255,0.75) !important;
    max-width: 640px; line-height: 1.7; margin-bottom: 40px;
}

/* Hero Stats - Full Width */
.cs-hero-stats-wrapper {
    margin-top: 40px;
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    padding: 28px 30px;
}
.cs-hero-stats {
    display: flex; align-items: center; gap: 40px;
    max-width: 1200px; margin: 0 auto;
    justify-content: center;
}
.cs-stat { text-align: center; }
.cs-stat-top { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.cs-stat-number {
    font-size: 36px; font-weight: 700; color: #FF8214;
    display: inline; line-height: 1;
}
.cs-stat-suffix { font-size: 24px; font-weight: 700; color: #FF8214; }
.cs-stat-label { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.cs-stat-divider { width: 1px; height: 50px; background: rgba(255,255,255,0.12); }

/* ================================
   FILTER & SEARCH SECTION
   ================================ */
.cs-filter-section {
    background: #fff;
    padding: 30px 0 0;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 20px rgba(12,28,68,0.06);
}
.cs-filter-bar { display: flex; flex-direction: column; gap: 16px; }

/* Search */
.cs-search-wrapper {
    position: relative; max-width: 400px;
}
.cs-search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); pointer-events: none;
    z-index: 2;
}
.cs-search-input {
    width: 100% !important; padding: 12px 16px 12px 46px !important;
    border: 1px solid #e2e5ea !important; border-radius: 0 !important;
    font-size: 14px !important; font-family: 'Montserrat', sans-serif;
    background: #F8F9FE !important; transition: all .3s;
    outline: none; box-sizing: border-box;
}
.cs-search-input:focus {
    border-color: #FF8214 !important; background: #fff !important;
    box-shadow: 0 0 0 3px rgba(255,130,20,0.1) !important;
}
.cs-search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none !important; border: none !important; font-size: 20px; color: #999 !important; cursor: pointer;
    line-height: 1; padding: 4px;
}

/* Filter Tags */
.cs-filter-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cs-filter-tags::-webkit-scrollbar { display: none; }
.cs-archive-page .cs-filter-tag {
    display: inline-flex !important; align-items: center; gap: 6px;
    padding: 8px 18px !important; border-radius: 0 !important;
    font-size: 13px !important; font-weight: 500 !important; font-family: 'Montserrat', sans-serif;
    border: 1px solid #e2e5ea !important; background: #fff !important;
    color: #555 !important; cursor: pointer;
    transition: all .3s; white-space: nowrap;
    line-height: 1.4 !important;
}
.cs-archive-page .cs-filter-tag:hover {
    border-color: #FF8214 !important; color: #FF8214 !important;
    background: rgba(255,130,20,0.04) !important;
}
.cs-archive-page .cs-filter-tag.active {
    background: #0C1C44 !important; color: #fff !important;
    border-color: #0C1C44 !important;
}
.cs-archive-page .cs-filter-tag.active .cs-filter-count {
    background: #FF8214 !important; color: #fff !important;
}
.cs-filter-count {
    font-size: 11px; background: #f0f0f0; color: #777;
    padding: 1px 7px; border-radius: 0;
    font-weight: 600; transition: all .3s;
}

/* ================================
   RESULTS INFO
   ================================ */
.cs-results-section { padding: 24px 0 0; }
.cs-results-info {
    display: flex; justify-content: space-between; align-items: center;
}
.cs-results-count { font-size: 14px; color: #666; }
.cs-results-count strong { color: #0C1C44; }
.cs-view-toggle { display: flex; gap: 4px; }
.cs-archive-page .cs-view-btn {
    width: 36px !important; height: 36px !important;
    display: flex !important; align-items: center; justify-content: center;
    border: 1px solid #e2e5ea !important; border-radius: 0 !important;
    background: #fff !important;
    color: #999 !important; cursor: pointer; transition: all .3s;
    padding: 0 !important; min-width: unset !important;
    line-height: 1 !important;
}
.cs-archive-page .cs-view-btn svg {
    width: 16px; height: 16px;
    fill: currentColor;
}
.cs-archive-page .cs-view-btn.active,
.cs-archive-page .cs-view-btn:hover {
    background: #0C1C44 !important; color: #fff !important; border-color: #0C1C44 !important;
}

/* ================================
   CASE STUDY GRID
   ================================ */
.cs-grid-section { padding: 30px 0 60px; background: #F8F9FE; }
.cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.cs-grid.list-view {
    grid-template-columns: 1fr;
}

/* ---------- Case Study Card ---------- */
.cs-card {
    background: #fff; border-radius: 0;
    box-shadow: 0 4px 20px rgba(12,28,68,0.06);
    overflow: hidden; transition: all .4s cubic-bezier(.25,.8,.25,1);
    opacity: 0; transform: translateY(30px);
    display: flex; flex-direction: column;
}
.cs-card.visible {
    opacity: 1; transform: translateY(0);
}
.cs-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(12,28,68,0.12);
}

/* List View Card */
.cs-grid.list-view .cs-card {
    flex-direction: row;
}
.cs-grid.list-view .cs-card-image-wrapper {
    width: 320px; min-width: 320px; height: auto;
}
.cs-grid.list-view .cs-card-img,
.cs-grid.list-view .cs-card-img-placeholder {
    height: 100%; aspect-ratio: auto;
}

/* Card Image */
.cs-card-image-wrapper { position: relative; overflow: hidden; }
.cs-card-image-link { display: block; }
.cs-card-img {
    width: 100%; aspect-ratio: 16/10; object-fit: cover;
    display: block; transition: transform .6s cubic-bezier(.25,.8,.25,1);
}
.cs-card:hover .cs-card-img { transform: scale(1.05); }
.cs-card-img-placeholder {
    width: 100%; aspect-ratio: 16/10;
    display: flex; align-items: center; justify-content: center;
    background: #f0f2f5;
}
.cs-card-overlay {
    position: absolute; inset: 0;
    background: rgba(12,28,68,0.7);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .4s;
}
.cs-card:hover .cs-card-overlay { opacity: 1; }
.cs-card-overlay-text {
    color: #fff; font-size: 14px; font-weight: 600;
    padding: 10px 24px; border: 2px solid #FF8214;
    border-radius: 0; letter-spacing: 0.5px;
    transition: background .3s, color .3s;
}
.cs-card:hover .cs-card-overlay-text { background: #FF8214; }

/* Industry Badge */
.cs-industry-badge {
    position: absolute; top: 14px; left: 14px;
    background: #FF8214; color: #fff;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    padding: 5px 14px; border-radius: 0;
    letter-spacing: 0.5px; z-index: 2;
    text-decoration: none;
}

/* Card Body */
.cs-card-body {
    padding: 24px 28px 28px;
    display: flex; flex-direction: column; flex: 1;
}
.cs-card-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #888; margin-bottom: 12px;
}
.cs-card-date { display: flex; align-items: center; gap: 5px; color: #FF8214; font-weight: 500; }
.cs-card-date svg { color: #FF8214; }
.cs-card-separator { color: #ddd; }
.cs-card-author { color: #888; }

.cs-card-title {
    font-size: 17px; font-weight: 700; line-height: 1.4;
    margin-bottom: 10px;
}
.cs-card-title a {
    color: #0C1C44; text-decoration: none;
    transition: color .3s;
}
.cs-card-title a:hover { color: #FF8214; }

.cs-card-excerpt {
    font-size: 13px; color: #666; line-height: 1.7;
    margin-bottom: 18px; flex: 1;
}

.cs-read-more {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: #FF8214;
    text-decoration: none; transition: gap .3s, color .3s;
}
.cs-read-more svg { transition: transform .3s; }
.cs-read-more:hover { color: #0C1C44; gap: 12px; }
.cs-read-more:hover svg { transform: translateX(3px); }

/* ================================
   PAGINATION
   ================================ */
.cs-pagination {
    margin-top: 50px; display: flex; justify-content: center;
}
.cs-pagination .page-numbers {
    list-style: none; display: flex; gap: 6px;
    padding: 0; margin: 0;
}
.cs-pagination .page-numbers li { display: flex; }
.cs-pagination .page-numbers a,
.cs-pagination .page-numbers span {
    display: flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 6px;
    border-radius: 0; font-size: 14px; font-weight: 500;
    text-decoration: none; transition: all .3s;
    border: 1px solid #e2e5ea; color: #555;
    background: #fff;
}
.cs-pagination .page-numbers a:hover {
    border-color: #FF8214; color: #FF8214;
    background: rgba(255,130,20,0.04);
}
.cs-pagination .page-numbers .current {
    background: #0C1C44; color: #fff; border-color: #0C1C44;
}
.cs-pagination .page-numbers .prev,
.cs-pagination .page-numbers .next {
    color: #0C1C44;
}
.cs-pagination .page-numbers .prev:hover,
.cs-pagination .page-numbers .next:hover {
    background: #0C1C44; color: #fff; border-color: #0C1C44;
}

/* ================================
   NO RESULTS
   ================================ */
.cs-no-results {
    text-align: center; padding: 80px 20px;
}
.cs-no-results-icon { margin-bottom: 20px; }
.cs-no-results h3 { font-size: 22px; color: #0C1C44; margin-bottom: 8px; }
.cs-no-results p { color: #666; margin-bottom: 24px; }

/* ================================
   CTA SECTION
   ================================ */
.cs-cta-section {
    background: linear-gradient(135deg, #0C1C44 0%, #142952 100%);
    padding: 80px 0; position: relative; overflow: hidden;
    text-align: center;
}
.cs-cta-bg-pattern {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 10% 50%, rgba(255,130,20,0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 50%, rgba(255,130,20,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.cs-cta-content { position: relative; z-index: 2; }
.cs-cta-title { font-size: 34px; font-weight: 700; color: #fff !important; margin-bottom: 14px; }
.cs-cta-title span { color: #FF8214; }
.cs-cta-desc { font-size: 15px; color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto 30px; line-height: 1.7; }
.cs-cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ================================
   BUTTONS (Shared)
   ================================ */
.cs-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px; border-radius: 0;
    font-size: 14px; font-weight: 600; text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    transition: all .3s; cursor: pointer; border: 2px solid transparent;
}
.cs-btn-orange,
.cs-btn-orange:link,
.cs-btn-orange:visited {
    background: #FF8214; color: #fff !important; border-color: #FF8214;
}
.cs-btn-orange:hover {
    background: #e6720e; border-color: #e6720e; color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,130,20,0.3);
}
.cs-btn-primary {
    background: #0C1C44; color: #fff; border-color: #0C1C44;
}
.cs-btn-primary:hover {
    background: #142952; transform: translateY(-2px);
}
.cs-btn-outline {
    background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.3);
}
.cs-btn-outline:hover {
    border-color: #FF8214; color: #FF8214;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .cs-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-hero-stats { gap: 24px; }
    .cs-hero-stats-wrapper { padding: 24px 28px; }
    .cs-stat-number { font-size: 28px; }
    .cs-hero-title { font-size: 34px; }
}

@media (max-width: 768px) {
    .cs-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .cs-grid.list-view .cs-card { flex-direction: column; }
    .cs-grid.list-view .cs-card-image-wrapper { width: 100%; min-width: unset; }
    .cs-hero { padding: 40px 0 50px; }
    .cs-hero-title { font-size: 28px; }
    .cs-hero-desc { font-size: 14px; }
    .cs-hero-stats { flex-wrap: wrap; gap: 20px; justify-content: center; }
    .cs-hero-stats-wrapper { padding: 20px; }
    .cs-stat-divider { display: none; }
    .cs-stat { min-width: 120px; }
    .cs-filter-section { position: static; }
    .cs-filter-bar { gap: 12px; }
    .cs-search-wrapper { max-width: 100%; }
    .cs-filter-tags { padding-bottom: 16px; }
    .cs-results-info { flex-direction: column; gap: 12px; align-items: flex-start; }
    .cs-cta-title { font-size: 26px; }
    .cs-cta-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .cs-hero-stats { flex-direction: column; gap: 16px; }
    .cs-hero-stats-wrapper { padding: 16px; }
    .cs-stat { display: flex; align-items: center; gap: 8px; min-width: unset; }
    .cs-stat-label { margin-top: 0; }
    .cs-card-body { padding: 20px; }
}

/* cs-mobile-img-fix */
@media(max-width:767px){.cs-card-img{aspect-ratio:auto!important;object-fit:contain!important;height:auto!important;background:#f0f2f5}.cs-card-image-wrapper{overflow:visible!important}}
