/* ---------------------------------
   DYNAMIC CASE STUDIES SHORTCODE 
   --------------------------------- */
.anvex-cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    width: 100%;
}

.anvex-case-card {
    display: flex;
    flex-direction: column;
    background: #111827; /* Dark background from screenshot */
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* No rotation as requested */
}
.anvex-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.anvex-case-img-wrap {
    position: relative;
    width: 100%;
    height: 280px; /* Increased from 220px for a bigger picture */
    overflow: hidden;
}
.anvex-case-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.anvex-case-card:hover .anvex-case-img-wrap img {
    transform: scale(1.05);
}
.anvex-case-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(17,24,39,0) 50%, rgba(17,24,39,1) 100%);
}
.anvex-case-content {
    padding: 0 30px 30px 30px; /* Increased padding slightly for bigger card feel */
    background: #111827;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.anvex-case-cat {
    color: #FFAB00; /* Changed from Cyan/Green to brand yellow */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: "Inter", sans-serif;
    text-transform: uppercase;
}
.anvex-case-title {
    color: #ffffff;
    font-size: 22px; /* Increased from 18px */
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
}
.anvex-case-metric {
    color: #FFAB00; /* Changed from Cyan/Green to brand yellow */
    font-size: 15px; /* Increased from 14px */
    font-weight: 600;
    margin-top: auto; /* Push to bottom if titles vary in lines */
}

/* ---------------------------------
   VIEW ALL BUTTON
   --------------------------------- */
.anvex-cs-view-all-btn {
    display: inline-flex;
    align-items: center;
    background-color: #FFAB00;
    color: #0b0f19 !important;
    text-decoration: none !important;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.anvex-cs-view-all-btn:hover {
    background-color: #e6a600;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 171, 0, 0.3);
}

/* ---------------------------------
   IMMERSIVE SINGLE CASE STUDY
   --------------------------------- */
body.anvex-immersive-single {
    background-color: #0b1221; /* Deep navy/black from video */
    color: #f3f4f6;
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.anvex-cs-topbar {
    display: flex;
    justify-content: space-between;
    padding: 24px 60px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 10;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.anvex-cs-topbar a { color: #f3f4f6; text-decoration: none; font-weight: 700; transition: color 0.3s; }
.anvex-cs-topbar a:hover { color: #ffb800; }

.anvex-cs-hero {
    text-align: center;
    padding: 120px 20px 100px;
}

.anvex-cs-hero-title {
    font-size: clamp(60px, 8vw, 120px);
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 30px 0;
    line-height: 0.9;
    letter-spacing: -2px;
}

.anvex-cs-hero-subtitle {
    font-size: 24px;
    color: #9ca3af;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
}

.anvex-cs-media-hero {
    width: 100%;
    height: 85vh;
    overflow: hidden;
    position: relative;
}

.anvex-full-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

.anvex-cs-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 20px;
}

.anvex-cs-text p {
    margin-bottom: 2em;
}

/* Ensure headings added via rich text editor match the theme */
.anvex-cs-text h1,
.anvex-cs-text h2,
.anvex-cs-text h3,
.anvex-cs-text h4,
.anvex-cs-text h5,
.anvex-cs-text h6 {
    color: #ffffff;
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-family: "Inter", -apple-system, sans-serif;
}
.anvex-cs-text h2 { font-size: 32px; }
.anvex-cs-text h3 { font-size: 26px; }
.anvex-cs-text h4 { font-size: 22px; }

.anvex-cs-section {
    margin-bottom: 120px;
}

.anvex-cs-label {
    font-size: 14px;
    color: #FFAB00;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 171, 0, 0.2);
    padding-bottom: 10px;
    display: inline-block;
}

.anvex-cs-text {
    font-size: 19px;
    line-height: 1.8;
    color: #D1D5DB;
    font-weight: 400;
    font-family: "Inter", -apple-system, sans-serif;
    letter-spacing: -0.01em;
}

.anvex-cs-stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap; /* allow wrap only on very small screens */
}

.anvex-cs-stat-item {
    flex: 1 1 250px; /* evenly distribute */
}

.anvex-cs-stat-val {
    font-size: 72px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -2px; /* Premium tight tracking for large numbers */
}

.anvex-cs-stat-suffix {
    font-size: 0.5em;
    font-weight: 600;
}

.anvex-cs-stat-lbl {
    font-size: 15px;
    color: #9ca3af;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.anvex-cs-next-case {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 150px 20px;
    background: #050811; /* Darker bottom section */
    text-decoration: none;
    transition: background 0.5s ease;
}

.anvex-cs-next-case:hover {
    background: #111827;
}

.anvex-cs-next-label {
    font-size: 14px;
    letter-spacing: 4px;
    color: #9ca3af;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.anvex-cs-next-title {
    font-size: 80px;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    transition: color 0.3s;
}

.anvex-cs-next-case:hover .anvex-cs-next-title {
    color: #ffb800;
}

@media (max-width: 768px) {
    .anvex-cs-hero-title { font-size: 48px; }
    .anvex-cs-next-title { font-size: 40px; }
    .anvex-cs-topbar { padding: 20px; flex-direction: column; gap: 15px; text-align: center; }
    .anvex-cs-text { font-size: 18px; }
    .anvex-cs-text h2 { font-size: 32px; }
}

/* Extra small devices (Max 480px) */
@media (max-width: 480px) {
    /* Grid */
    .anvex-cs-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    /* Flip Card */
    .anvex-cs-flip-card {
        height: 350px;
    }
    .anvex-cs-flip-back {
        padding: 25px;
    }
    .anvex-cs-card-number {
        font-size: 48px;
        margin-bottom: 10px;
    }
    .anvex-cs-card-title-hover {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .anvex-cs-card-excerpt {
        font-size: 14px;
        margin-bottom: 15px;
    }

    /* Immersive Page Tweaks */
    .anvex-cs-hero-title {
        font-size: 40px;
    }
    .anvex-cs-hero-subtitle {
        font-size: 18px;
    }
    .anvex-cs-label {
        font-size: 32px;
        margin-bottom: 25px;
    }
    .anvex-cs-stat-val {
        font-size: 48px;
    }
    .anvex-cs-stat-item {
        flex: 1 1 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    .anvex-cs-next-title {
        font-size: 32px;
    }
}

/* ---------------------------------
   ARCHIVE PAGE WRAPPER
   --------------------------------- */
.anvex-cs-archive-wrapper {
    background-color: #0b0f19;
    padding: 150px 5% 100px;
    min-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
}
