/* =========================================================
   company-profile.css — single company page (company-profile.html)
   Shared parts (header, footer, buttons, cards…) are in main.css

   Layout (desktop):            Layout (tablet / mobile):
   ┌──────── crumbs ────────┐   crumbs
   │ hero          │ side   │   hero
   │ body          │ bar    │   sidebar
   └───────────────┴────────┘   body
   ========================================================= */

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "crumbs crumbs"
        "hero   side"
        "body   side";
    column-gap: 40px;
}

.profile-crumbs  { grid-area: crumbs; }
.profile-hero    { grid-area: hero; }
.profile-sidebar { grid-area: side; }
.profile-body    { grid-area: body; }

/* Light background band behind breadcrumbs + company header.
   The big box-shadow stretches the colour to the screen edges. */
.profile-crumbs,
.profile-hero {
    background: var(--hero);
    box-shadow: 0 0 0 100vmax var(--hero);
    clip-path: inset(0 -100vmax);
}

.profile-crumbs {
    margin: 0;
    padding: 22px 0 26px;
}


/* ---------- COMPANY HEADER ---------- */
.profile-hero {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding-bottom: 40px;
}

.profile-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    color: #173d6c;
    font-size: 32px;
    font-weight: 900;
    line-height: .9;
}

.profile-logo small {
    margin-top: 7px;
    font-size: 15px;
    letter-spacing: .06em;
}

.profile-eyebrow {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
}

.profile-intro h1 {
    margin-bottom: 8px;
    font-size: var(--fs-h1-detail);
    letter-spacing: -.03em;
}

.profile-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    color: #476583;
    font-size: var(--fs-base);
}

.profile-lead {
    max-width: 650px;
    margin-bottom: 20px;
    color: var(--text-soft);
    font-size: var(--fs-md);
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* ---------- SIDEBAR ---------- */
.profile-sidebar {
    position: relative;
    z-index: 1;          /* keep cards above the hero background band */
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.side-card {
    padding: 18px 20px;
}

.side-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: var(--fs-md);
}

.side-card h3 .icon {
    color: var(--blue);
}

.details div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 7px 0;
    font-size: 13px;
}

.details dt {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.details dd {
    color: #294669;
    font-weight: 600;
    text-align: right;
}

.details a {
    color: var(--blue-bright);
}

.side-label {
    margin-bottom: 8px;
    color: var(--muted-light);
    font-size: var(--fs-sm);
}

.country-list {
    display: grid;
    gap: 7px;
    color: #4d6783;
    font-size: 13px;
}

.divider {
    height: 1px;
    margin: 14px 0;
    border: 0;
    background: var(--line-soft);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cert-grid span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 56px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: #375c7c;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
}

.cert-grid small {
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.side-title-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.side-title-row a {
    color: var(--blue-bright);
    font-size: var(--fs-sm);
    font-weight: 700;
    white-space: nowrap;
}

.event-mini {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
}

.side-title-row + .event-mini {
    padding-top: 0;
    border-top: 0;
}

.event-mini-logo {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #e1252c;
    font-size: 24px;
    font-weight: 800;
}

.event-mini strong {
    display: block;
    color: var(--navy);
    font-size: 13px;
}

.event-mini small {
    display: block;
    margin-top: 2px;
    color: var(--muted-light);
    font-size: var(--fs-sm);
    line-height: 1.5;
}


/* ---------- MAIN CONTENT ---------- */
.profile-body {
    padding: 34px 0 55px;
}

.profile-section {
    margin-bottom: 36px;
}

.profile-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: var(--fs-h3);
}

.profile-section h2 .icon {
    color: var(--blue);
}

.profile-section p {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: var(--fs-md);
    line-height: 1.7;
}

.video-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 380px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #456681, #b5c1c9 55%, #5d6c75);
    box-shadow: var(--shadow-sm);
}

.play {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding-left: 4px;
    border-radius: 50%;
    background: #f20d12;
    color: var(--white);
    font-size: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.video-caption {
    position: absolute;
    left: 18px;
    bottom: 14px;
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid #dce8f4;
    border-radius: 10px;
    background: #f5f9fe;
    color: #4c6584;
    font-size: 13px;
    line-height: 1.35;
    transition: background-color var(--transition), transform var(--transition);
}

.product-item:hover {
    transform: translateY(-2px);
    background: var(--white);
}

.product-item .icon {
    color: var(--blue);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.highlight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--tint);
}

.highlight .icon {
    color: var(--blue-bright);
}

.highlight p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.6;
}

/* Contact form box */
.contact-box {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(115deg, #f1f7fe, #f8fbff);
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.contact-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    color: var(--navy);
}

.contact-copy h2 {
    margin-bottom: 10px;
    font-size: 22px;
}

.contact-copy p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.contact-form {
    display: grid;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-form .btn {
    justify-self: start;
}


/* ---------- SIMILAR COMPANIES ---------- */
.related-company {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
}

.related-logo {
    display: grid;
    place-items: center;
    height: 56px;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 800;
}

.related-logo.green { color: #3b9b55; }
.related-logo.olive { color: #6d8b22; }

.related-company strong {
    color: var(--navy);
    font-size: var(--fs-base);
}

.related-company span,
.related-company small {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted-light);
    font-size: var(--fs-sm);
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "crumbs"
            "hero"
            "side"
            "body";
    }

    .profile-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        padding: 30px 0 0;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .profile-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 32px;
    }

    .profile-logo {
        width: 130px;
        height: 110px;
    }

    .hero-buttons .btn {
        flex: 1 1 200px;
    }

    .profile-sidebar {
        grid-template-columns: 1fr;
    }

    .video-placeholder {
        height: 230px;
    }

    .contact-box {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form .btn {
        width: 100%;
    }
}


/* ---------- PHP version additions ---------- */
.profile-logo .logo-initials {
    font-size: 40px;
}

.related-logo .logo-initials {
    font-size: 22px;
}

/* YouTube video, 16:9 */
.video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0b2344;
    box-shadow: var(--shadow-sm);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Events in the sidebar are links */
a.event-mini:hover strong {
    color: var(--blue-bright);
}

.event-mini > span:last-child {
    display: block;
    min-width: 0;
}

.contact-form .alert {
    margin-bottom: 4px;
}
