/* ============================================================
   LAYOUT FIXES
   Corrections to existing sections, kept out of site.css because it has
   an unclosed block near line 3620 that swallows anything appended.
   Loaded last so these win.
   ============================================================ */

/* ------------------------------------------------------------
   1. Capability card icons overflowed their tile
   .ocr-card-number is a fixed 60x60 box, but the <img> inside had no
   size constraint, so the SVG rendered at its intrinsic size and spilled
   over the card title. Constrain the image to the tile.
   ------------------------------------------------------------ */
.ocr-card-number {
    padding: 10px;
    overflow: hidden;
    flex: 0 0 auto;
}

.ocr-card-number img,
.ocr-card-number svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ------------------------------------------------------------
   2. Compliance list text spilled out of its card
   .compliance-design-item had a hard height:95px. On narrow screens the
   description wraps to three lines, overflows the card and lands on top
   of the next one. Let the card grow instead.
   ------------------------------------------------------------ */
.compliance-design-item {
    height: auto;
    min-height: 95px;
    align-items: center;
}

.compliance-design-inner-content {
    min-width: 0;          /* let long words wrap instead of forcing width */
    justify-content: center;
}

.compliance-design-item-description {
    overflow-wrap: anywhere;
}

@media (max-width: 576px) {
    .compliance-design-item {
        gap: 1rem;
        padding: 14px 12px;
    }

    .compliance-design-item-title {
        font-size: 1.05rem;
    }

    .compliance-design-item-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* ------------------------------------------------------------
   3. Header logos misaligned on phones
   At <=768px the AI logo switched to position:relative. Being the last
   child of <nav>, after the container, it dropped onto its own line
   below the navbar and sat under the DigiCore logo. Keep it on the bar,
   just left of the hamburger.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .digicore-brand {
        margin-left: 0 !important;
    }

    .ai-logo-container {
        position: absolute;
        right: 5.5rem;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0;
        display: block;
    }

    .ai-logo {
        height: 34px;
    }

    .digicore-logo {
        height: 38px;
    }
}

@media (max-width: 400px) {
    .ai-logo-container {
        right: 4.75rem;
    }

    .ai-logo {
        height: 28px;
    }

    .digicore-logo {
        height: 32px;
    }
}

/* ------------------------------------------------------------
   4. Vision / Mission / Values did not stack on phones
   .VissionMission and .vmv-Values are display:flex with no responsive
   rule at any breakpoint, so the two cards stayed side by side and each
   became a very narrow column of one or two words per line.
   .values-list also had line-height:1, which left the lines touching.
   ------------------------------------------------------------ */
.values-list {
    line-height: 1.6;
}

.values-list li {
    padding: 14px 0;
}

.values-list li strong {
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 991px) {
    .VissionMission,
    .vmv-Values {
        flex-direction: column;
        gap: 20px;
    }

    .VissionMission-content {
        padding: 24px;
        width: 100%;
    }

    .vmv-Values {
        padding: 24px;
    }

    .vmv-image {
        padding: 0;
        width: 100%;
    }

    .vmv-image img {
        width: 100%;
        height: auto;
        max-height: 240px;
        object-fit: cover;
    }

    .vmv-text {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .vmv-section {
        padding: 60px 0;
    }

    .VissionMission-content,
    .vmv-Values {
        padding: 20px;
    }

    .vmv-description,
    .values-list {
        font-size: 1rem;
    }

    .vmv-image img {
        max-height: 190px;
    }
}

/* ------------------------------------------------------------
   5. About cards: text and bullets hung outside the card on phones
   .who-card uses a large left padding (3.8rem) and then pulls its text
   back with margin-left:-40px. At <=768px a media rule cuts the padding
   to 1.5rem but the -40px stays, so the text and bullet markers ended up
   16px outside the card's left edge. Drop the negative pull on small
   screens and let the padding do the work.
   ------------------------------------------------------------ */
@media (max-width: 991px) {
    .who-card {
        padding: 1.75rem 1.5rem;
    }

    .who-card-description,
    .who-card-list li {
        margin-left: 0;
    }

    .who-card-list {
        padding-left: 0;
    }

    .who-card-list li {
        padding-left: 1.35rem;
    }

    .who-card-title {
        margin-left: 0;
    }
}

/* ------------------------------------------------------------
   6. Footer text squeezed into a narrow column
   .footer-section-one is width:45% and its inner div carries an inline
   width:45% as well, so on a phone the description was rendered in about
   a fifth of the screen - four or five words per line. The bottom bar is
   also a space-between flex row, which split the copyright and the legal
   links mid-sentence.
   ------------------------------------------------------------ */
@media (max-width: 991px) {
    .footer-section-one {
        width: 100%;
    }

    .footer-section-one > div {
        width: 100% !important;   /* overrides the inline style */
    }

    .footer-text-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        text-align: center;
    }

    .footer-bottom-text {
        margin: 0;
    }
}
