/* DigiCode v4.2.16 - Homepage identity alignment for internal pages
 * Source of truth: the existing homepage color, container, title, card, gradient,
 * CTA, and spacing system. This file does not style the homepage itself.
 */

body.page-about-us,
body.page-services {
    --identity-blue: var(--primary-blue, #3b71b9);
    --identity-teal: var(--accent-green, #5bc4bf);
    --identity-navy: var(--black-fakhim, #111827);
    --identity-white: var(--white, #ffffff);
    --identity-muted: #5a6772;
    --identity-border: #e1e8ed;
    background: var(--identity-white);
}

/* One banner frame for About and Services, matching the homepage container. */
body.page-about-us .digi-inner-banner,
body.page-services .digi-inner-banner {
    display: block;
    width: min(1200px, calc(100% - 40px));
    aspect-ratio: 901 / 301;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(to left, var(--identity-navy), var(--identity-blue));
    color: var(--identity-white);
}

body.page-about-us .digi-inner-banner img,
body.page-services .digi-inner-banner img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center;
}

/* About page uses the homepage's exact container width and vertical rhythm. */
body.page-about-us .about-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 20px;
}

body.page-about-us .about-intro-section,
body.page-about-us .about-values-section,
body.page-about-us .about-why-section,
body.page-about-us .about-process-section {
    padding: 80px 0;
}

body.page-about-us .about-intro-section,
body.page-about-us .about-why-section,
body.page-about-us .about-process-section {
    background: var(--identity-white);
}

body.page-about-us .about-intro-inner,
body.page-about-us .about-section-heading {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

/* Section labels and titles copy the approved homepage services headers. */
body.page-about-us .about-eyebrow,
body.page-about-us .about-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 0 0 10px;
    color: var(--identity-teal);
    font: 800 .92rem/1.35 var(--font-headers, "Cairo", sans-serif) !important;
    letter-spacing: .01em;
}

body.page-about-us .about-eyebrow::before,
body.page-about-us .about-section-badge::before {
    content: none;
}

body.page-about-us .about-intro-inner h1,
body.page-about-us .about-section-heading h2 {
    position: relative;
    display: inline-block;
    max-width: 850px;
    margin: 0 0 18px;
    padding-bottom: 14px;
    color: var(--identity-blue);
    font-family: var(--font-headers, "Cairo", sans-serif) !important;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.35;
    text-wrap: balance;
}

body.page-about-us .about-intro-inner h1::after,
body.page-about-us .about-section-heading h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 50px;
    height: 4px;
    border-radius: 2px;
    background: var(--identity-teal);
    transform: translateX(-50%);
}

body.page-about-us .about-intro-inner p,
body.page-about-us .about-section-heading p {
    max-width: 820px;
    margin: 0 auto;
    color: var(--identity-muted);
    font-family: var(--font-main, "Sakkal Majalla", "Cairo", sans-serif) !important;
    font-size: clamp(1.25rem, 1.65vw, 1.5rem);
    line-height: 1.75;
}

/* Same circuit background and white overlay used by the homepage feature cards. */
body.page-about-us .about-values-section {
    position: relative;
    background: var(--identity-white) url('../images/bc-4.webp') center / cover no-repeat;
    isolation: isolate;
}

body.page-about-us .about-values-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, .85);
}

body.page-about-us .about-card-grid {
    gap: 30px;
}

/* About cards deliberately reuse the homepage feature-card language. */
body.page-about-us .about-info-card,
body.page-about-us .about-process-card {
    position: relative;
    min-height: 100%;
    padding: 35px 25px;
    overflow: hidden;
    border: 1px solid var(--identity-border);
    border-radius: 20px;
    background: var(--identity-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
    text-align: center;
    transition: transform .3s ease-in-out, box-shadow .3s ease-in-out, border-color .3s ease-in-out;
}

body.page-about-us .about-info-card::after {
    content: none;
}

body.page-about-us .about-info-card:hover,
body.page-about-us .about-process-card:hover {
    border-color: var(--identity-blue);
    box-shadow: 0 15px 40px rgba(59, 113, 185, .15);
    transform: translateY(-5px);
}

body.page-about-us .about-icon {
    display: flex;
    width: 75px;
    height: 75px;
    margin: 0 auto 25px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--identity-teal);
}

body.page-about-us .about-icon svg {
    width: 44px;
    height: 44px;
    stroke-width: 1.7;
}

body.page-about-us .about-info-card h2,
body.page-about-us .about-info-card h3,
body.page-about-us .about-process-card h3 {
    min-height: 2.8em;
    margin: 0 0 12px;
    color: var(--identity-blue);
    font-family: var(--font-headers, "Cairo", sans-serif) !important;
    font-size: clamp(1.3rem, 1.8vw, 1.9rem);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

body.page-about-us .about-info-card h2::after,
body.page-about-us .about-info-card h3::after,
body.page-about-us .about-process-card h3::after {
    content: "";
    display: block;
    width: 45px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: var(--identity-teal);
}

body.page-about-us .about-info-card p,
body.page-about-us .about-process-card p {
    margin: 0;
    color: var(--identity-muted);
    font-family: var(--font-main, "Sakkal Majalla", "Cairo", sans-serif) !important;
    font-size: clamp(1.08rem, 1.35vw, 1.28rem);
    line-height: 1.72;
    text-align: center;
}

/* Same approved gradient used by homepage partners, achievements, and CTA. */
body.page-about-us .about-ceo-section {
    padding: 80px 0;
    background: linear-gradient(to left, var(--identity-navy), var(--identity-blue));
}

body.page-about-us .about-ceo-layout {
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    gap: 60px;
}

body.page-about-us .about-ceo-portrait {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .18);
}

body.page-about-us .about-ceo-content h2 {
    margin: 12px 0 20px;
    color: var(--identity-white);
    font-size: clamp(2rem, 3.2vw, 2.8rem);
}

body.page-about-us .about-ceo-content blockquote {
    padding: 24px 26px;
    border-inline-start: 4px solid var(--identity-teal);
    border-radius: 0;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: none;
}

body.page-about-us .about-ceo-content blockquote p {
    color: rgba(255, 255, 255, .92);
    font-size: clamp(1.25rem, 1.65vw, 1.5rem);
    line-height: 1.8;
}

/* Partners and final CTA are the actual homepage components, not replicas. */
body.page-about-us .about-partners-section .digi-logos-slider-section,
body.page-about-us .about-home-cta .digi-cta-contact-section {
    margin: 0;
}

body.page-about-us .about-process-grid {
    gap: 30px;
}

body.page-about-us .about-process-card {
    background: var(--identity-white);
}

body.page-about-us .about-step-number {
    color: rgba(59, 113, 185, .12);
    font-family: var(--font-accent, "Questv1", "Cairo", sans-serif) !important;
}

/* Services keeps all approved cards and performance work; only its frame aligns. */
body.page-services .digi-banner-wrapper {
    padding: 50px 0 40px;
}

body.page-services .services-image-banner + .digi-banner-wrapper {
    margin-top: 0;
}

/* Preserve the global footer exactly and eliminate page-specific trailing space. */
body.page-about-us .about-page-main,
body.page-services .services-main {
    margin-bottom: 0;
    padding-bottom: 0;
}

body.page-about-us .site-footer,
body.page-services .site-footer {
    margin-top: 0 !important;
}

@media (max-width: 992px) {
    body.page-about-us .about-card-grid-three,
    body.page-about-us .about-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-about-us .about-ceo-layout {
        grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
        gap: 36px;
    }
}

@media (max-width: 768px) {
    body.page-about-us .digi-inner-banner,
    body.page-services .digi-inner-banner {
        width: calc(100% - 24px);
    }

    body.page-about-us .about-intro-section,
    body.page-about-us .about-values-section,
    body.page-about-us .about-why-section,
    body.page-about-us .about-process-section,
    body.page-about-us .about-ceo-section {
        padding: 50px 0;
    }

    body.page-about-us .about-card-grid-three,
    body.page-about-us .about-process-grid,
    body.page-about-us .about-ceo-layout {
        grid-template-columns: 1fr;
    }

    body.page-about-us .about-info-card,
    body.page-about-us .about-process-card {
        padding: 25px 20px;
    }

    body.page-about-us .about-info-card h2,
    body.page-about-us .about-info-card h3,
    body.page-about-us .about-process-card h3 {
        min-height: auto;
    }

    body.page-about-us .about-ceo-portrait {
        width: min(100%, 390px);
        margin-inline: auto;
    }

    body.page-services .digi-banner-wrapper {
        padding: 35px 0 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-about-us .about-info-card,
    body.page-about-us .about-process-card {
        transition: none;
    }
}
