/* =========================================================
    FILE: impact.css
    PROJECT: Circular Digital Bridge (CDB)
    AUTHOR: CDB Engineering Team
    LAST UPDATED: 2026-07-25
    ---------------------------------------------------------
    PURPOSE: Page-specific styles for impact.html.
    Contains: hero section, impact metric cards, mission/vision/
    story cards, success story cards, partner logo grid, ITAD
    section, and responsive overrides for the impact page.

    BADGE COLOR CONVENTIONS (applied via .badge class):
    - .badge-lab: Lab Deployment (teal)
    - .badge-assurance: CDB Assurance (dark blue)
    - .badge-full: Full Deployment (teal)

    TIMELINE PATTERN:
    - .story-timeline: CSS Grid with gap
    - .story-timeline-item: Flex row with step number circle
    - .story-timeline-step: Circular badge showing step number
    ========================================================= */

:root {
    --teal: #008080;
    --dark-blue: #1A237E;
    --bg-light: #F5F7FA;
    --text-dark: #1E293B;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
}

h1,
h2,
h3,
.btn {
    font-family: 'Poppins', sans-serif;
}
::-webkit-scrollbar {
  width: 2px;
}
.btn-teal {
    background-color: var(--teal);
    color: white;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: 0.2s;
}

.btn-teal:hover {
    background-color: #006666;
}

.btn-outline-teal {
    border: 1px solid var(--teal);
    color: var(--teal);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
}

.btn-outline-teal:hover {
    background: var(--teal);
    color: white;
}

.impact-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0;
}

.impact-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: 100%;
    border: 1px solid #E2E8F0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 128, 128, 0.12);
    border-color: rgba(0, 128, 128, 0.2);
}

.impact-card i {
    transition: transform 0.3s ease;
}

.impact-card:hover i {
    transform: scale(1.1);
}

.impact-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #64748B;
}

.case-study-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 128, 128, 0.15);
    border-color: rgba(0, 128, 128, 0.3);
}

.case-study-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: filter 0.3s ease;
}

.case-study-img-wrap {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    height: 200px;
    z-index: 1;
}

.case-study-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-card .p-3 {
    position: relative;
    z-index: 2;
}

.case-study-card:hover img {
    filter: brightness(1.05);
}

.case-study-card .p-3 {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.case-study-card h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.case-study-card .text-muted {
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

.story-modal .modal-content {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.story-modal .modal-header {
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.08), rgba(26, 35, 126, 0.08));
}

.story-modal .modal-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--teal);
}

.story-modal .story-hero {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    min-height: 240px;
}

.story-modal .story-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-modal .story-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.72) 100%);
}

.story-modal .story-hero-content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    padding: 1.25rem 1.4rem;
    color: white;
}

.story-modal .story-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    font-size: 0.8rem;
    font-weight: 600;
}

.story-modal .story-section-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
}

.story-modal .story-section-title {
    color: var(--teal);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    margin-bottom: 0.6rem;
}

.story-modal .story-section-card p {
    color: #475569;
    line-height: 1.65;
    margin-bottom: 0.7rem;
}

.story-modal .story-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.story-modal .story-metric {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.8rem;
}

.story-modal .story-metric-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.story-modal .story-metric-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.story-modal .story-testimonial {
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.08), rgba(26, 35, 126, 0.06));
}

.story-modal .story-quote {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 0.6rem;
}

.story-modal .story-author {
    color: var(--teal);
    font-weight: 600;
}

.story-modal .story-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.story-modal .story-service-chip {
    background: white;
    border: 1px solid rgba(0, 128, 128, 0.2);
    border-radius: 999px;
    color: var(--teal);
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.story-modal .story-summary {
    font-size: 0.95rem;
    color: #475569;
}

.story-modal .story-timeline {
    display: grid;
    gap: 0.75rem;
}

.story-modal .story-timeline-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.85rem 0.95rem;
}

.story-modal .story-timeline-step {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(0, 128, 128, 0.12);
    color: var(--teal);
    font-weight: 700;
    flex-shrink: 0;
}

.story-modal .story-timeline-item h6 {
    color: var(--dark-blue);
}

.story-modal .modal-footer .btn {
    border-radius: 999px;
}

@media (max-width: 767.98px) {
    .story-modal .story-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Partners grid – responsive CSS Grid */
.partners-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
}

@media (min-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid>.partner-card-horizontal:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Horizontal partner card */
.partner-card-horizontal {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.partner-card-horizontal:hover {
    transform: translateY(-2px);
    border-color: #20c997;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Logo thumbnail box */
.partner-thumb-small {
    width: 110px;
    height: 100px;
    flex-shrink: 0;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-thumb-small img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Partner text content */
.partner-info {
    flex-grow: 1;
}

.partner-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0d9488;
    background-color: #ccfbf1;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.4rem;
}

.partner-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

.partner-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.asset-disposal-card {
    background: linear-gradient(135deg, #1A237E, #008080);
    color: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(26, 35, 126, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.asset-disposal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(26, 35, 126, 0.3);
}

.asset-disposal-card i {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.asset-disposal-card h3 {
    font-size: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.asset-disposal-card .lead {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.contacts-tab {
    max-width: 320px;
    width: 100%;
}

.contact-link {
    color: white;
    background: rgba(255, 255, 255, 0.096);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50px;
    margin: 0px 2px;
}

.contact-link:hover {
    color: var(--dark-blue);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

footer {
    background: var(--dark-blue);
    color: #ccc;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

/* Story modal hero with gradient overlay */
.story-hero {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: #f0f0f0;
}

.story-hero img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
}

.story-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.5rem 1.25rem 1rem;
    background: linear-gradient(to top,
            rgba(15, 23, 42, 0.88) 0%,
            rgba(15, 23, 42, 0.55) 60%,
            rgba(15, 23, 42, 0) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
}

.story-hero-content h3 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 0.5rem !important;
    margin-bottom: 0.25rem !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.story-hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.story-hero-content p i {
    color: #20c997;
}

.story-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #20c997;
    color: #ffffff;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .story-hero img {
        height: 380px;
    }

    .story-hero-content {
        padding: 2rem 1.75rem 1.25rem;
    }

    .story-hero-content h3 {
        font-size: 1.6rem;
    }
}