/* Case Studies Page Styles */

.case-studies-page {
    --bg: #0a0a0c;
    --panel: #111114;
    --card: #16161a;
    --text: #ffffff;
    --muted: #dbdbdc;
    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;
    --border: rgba(255, 255, 255, 0.08);
    --theme-border: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(59, 130, 246, 0.15);
}

.case-studies-page body {
    transition: none;
    background-color: var(--bg);
    color: var(--text);
}

.case-studies-page .logo-adaptive {
    filter: var(--logo-filter);
    transition: none;
}

.case-studies-page .glass-nav {
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--theme-border);
    transition: none;
}

.case-studies-page .custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--theme-border);
    border-radius: 10px;
}

.case-studies-page .bg-grid-pattern {
    background-image: radial-gradient(var(--theme-border) 1px, transparent 1px);
}

/* Case Card Base Styles */
.case-card {
    background: var(--panel);
    border: 1px solid var(--theme-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-rgb), 0.1);
}

/* Detail View Layouts */
.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--accent);
}

/* -------------------------------------------------------------------------- */
/* NEW DESIGN STYLES (MATCHING REACT VERSION)                                */
/* -------------------------------------------------------------------------- */

/* Back Button (Circular) */
.back-button-circular {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
}

.back-button-circular:hover {
    transform: scale(1.1) translateY(-2px);
}

/* Tags */
.tag-pill {
    padding: 0.2rem 0.7rem;
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    color: var(--accent);
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 9999px;
    display: inline-block;
}

/* Timeline Components */
.timeline-container {
    position: relative;
    max-width: 1050px;
    margin: 40px auto;
    padding: 10px 0;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 25px;
    bottom: 50px;
    width: 4px;
    background: linear-gradient(180deg, #4285F4, #CD7F32, #C0C0C0, #FFD700);
    border-radius: 3px;
    z-index: 0;
    opacity: 0.8;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 50px;
    z-index: 1;
    opacity: 1; /* Animation removed as requested, so keep it visible */
}

.timeline-dot {
    position: absolute;
    left: 8px;
    top: 30px;
    width: 20px;
    height: 20px;
    border: 3px solid;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.2);
    border-radius: 50%;
}

.timeline-dot-inner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.timeline-header-outer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    padding-top: 20px;
    padding-left: 5px;
}

.timeline-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.timeline-content {
    background: rgba(45, 45, 61, 0.4);
    border-radius: 1rem;
    padding: 22px 26px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.timeline-bullets {
    margin: 0;
    padding-left: 20px;
    color: #e0e5f0;
    font-size: 1.05rem;
    line-height: 1.7;
}

.timeline-bullets li {
    margin-bottom: 8px;
    list-style-type: disc;
    padding-left: 5px;
    text-align: left;
}

/* Security Section */
.security-section {
    background: rgba(45, 45, 61, 0.4);
    border-radius: 1rem;
    padding: 24px 30px;
    max-width: 850px;
    margin: 20px auto 0px auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}

.security-section:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.6);
    transform: translateY(-3px);
}

.security-title {
    color: #00cc99;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-description {
    color: #e0e5f0;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Section Card Refinement */
.section-card {
    background: #11111a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 2.25rem;
    transition: all 0.3s ease;
    height: 100%;
}

.section-card:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

.section-card p {
    margin-top: 0.5rem;
}

.spec-icon-box {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Changed from 1rem to 50% for circular look */
    flex-shrink: 0;
    overflow: hidden;
    /* Removed background-color: transparent !important to allow inline background colors */
    /* border: 1px solid currentColor; */
    backdrop-filter: blur(4px);
}



.spec-icon-box svg {
    position: relative;
    z-index: 1;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Case Card Icon Styling */
.case-card-icon-container {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.case-card-icon-container svg {
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-line {
        left: 10px;
    }
    .timeline-dot {
        left: 3px;
    }
    .timeline-item {
        padding-left: 35px;
    }
    .timeline-title {
        font-size: 1.25rem;
    }
}

/* Impact Metrics Grid */
.impact-metrics-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 3rem auto;
}

/* Impact Metric Card */
.impact-metric-card {
    background: rgba(22, 22, 36, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 2.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    flex: 0 1 340px; /* Non-flexible width to ensure 3 per row */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 360px;
}

.impact-metric-card:hover {
    transform: translateY(-12px);
    background: rgba(30, 30, 50, 0.6);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.impact-metric-card .spec-icon-box {
    width: 56px;
    height: 56px;
    margin-bottom: 2rem;
    border-radius: 50%;
}

.impact-metric-card .spec-icon-box span,
.impact-metric-card .spec-icon-box svg {
    width: 28px;
    height: 28px;
    font-size: 28px !important;
    display: block;
    line-height: 1;
}

.impact-metric-card .spec-icon-box span {
    font-family: 'Material Symbols Outlined' !important;
}

.metric-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.metric-label {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.metric-description {
    color: #c0c5d9;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    padding: 0 0.5rem;
}

/* Highlighted numbers in text */
.highlight-number {
    font-weight: 700;
}

@media (max-width: 640px) {
    .impact-metric-card {
        max-width: 100%;
        text-align: left;
        align-items: flex-start;
    }
    .impact-metric-card .spec-icon-box {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    .metric-number {
        font-size: 2.5rem;
    }
    .metric-label,
    .metric-description {
        text-align: left;
    }
    .section-card p,
    .timeline-bullets,
    .security-description,
    .case-overview-text {
        text-align: left !important;
        text-align-last: left !important;
        -moz-text-align-last: left;
    }
}

.section-card p,
.timeline-bullets,
.security-description,
.case-overview-text {
    text-align: left !important;
}
