/* =====================================================
   ALMSTAFID - INDUSTRIES UPGRADE
   Add AFTER your existing style.css, do not replace it.
   Layout: 4 columns desktop / 3 tablet / 2 mobile.
   Photos include captions baked into the JPGs, so we
   crop the bottom part inside the media container.
   ===================================================== */

html { scroll-behavior: smooth; }
#industries, .industry-scroll-anchor { scroll-margin-top: 95px; }
.industry-scroll-anchor { height: 0; }

.industries-section {
    background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
    padding: 95px 5% 110px;
    overflow: hidden;
}
.industries-container { max-width: 1380px; margin-inline: auto; }
.industries-heading {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 44px;
}
.industries-eyebrow {
    display: inline-block;
    color: #0878ee;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.6px;
}
.industries-heading h2 {
    color: #081e3e;
    font-size: clamp(29px, 3.6vw, 48px);
    line-height: 1.16;
    letter-spacing: -1.2px;
    font-weight: 800;
    margin: 14px 0 16px;
}
.industries-heading h2 em { color: #087af5; font-style: normal; }
.industries-heading p {
    color: #64758c;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}
.industries-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.industry-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce9f7;
    border-radius: 21px;
    box-shadow: 0 9px 25px rgba(7, 42, 84, 0.055);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.industry-card:hover {
    transform: translateY(-5px);
    border-color: #8acaff;
    box-shadow: 0 16px 36px rgba(10, 69, 126, .13);
}
.industry-media {
    width: 100%;
    aspect-ratio: 1.65 / 1;
    position: relative;
    overflow: hidden;
    background: #deedfb;
}
/* The source tile has a blue caption baked into its bottom. Cropping
   the bottom 26% removes that caption in most of the supplied images. */
.industry-card .industry-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 136%;
    object-fit: cover;
    object-position: top center;
    transition: transform .45s ease;
}
.industry-card:hover .industry-media img { transform: scale(1.05); }
.industry-icon {
    position: absolute;
    left: 14px;
    bottom: 12px;
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.88);
    border-radius: 14px;
    background: linear-gradient(135deg, #12b6ff 0%, #066af1 100%);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 7px 17px rgba(0,65,155,.22);
}
.industry-content {
    flex: 1;
    min-height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 17px 14px;
    text-align: left;
}
.industry-content h3 {
    padding: 0;
    margin: 0;
    color: #0b2446;
    font-weight: 750;
    font-size: clamp(13px, 1.13vw, 16px);
    line-height: 1.42;
    text-align: left;
    overflow-wrap: anywhere;
}
.industry-arrow {
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e9f5ff;
    color: #0879ef;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .industries-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
}
@media (max-width: 760px) {
    .industries-section { padding: 65px 15px 75px; }
    .industries-heading { margin-bottom: 29px; }
    .industries-heading h2 { font-size: clamp(25px, 6.5vw, 35px); letter-spacing: -.6px; }
    .industries-heading p { font-size: 13px; }
    .industries-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
    .industry-card { border-radius: 17px; }
    .industry-media { aspect-ratio: 1.43/1; }
    .industry-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; left: 9px; bottom: 8px; }
    .industry-content { min-height: 86px; gap: 5px; padding: 11px 10px 13px; }
    .industry-content h3 { font-size: 12px; line-height: 1.42; }
    .industry-arrow { width: 23px; height: 23px; font-size: 10px; }
}
@media (max-width: 350px) {
    .industries-grid { grid-template-columns: 1fr; }
    .industry-media { aspect-ratio: 1.8 / 1; }
    .industry-content h3 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .industry-card, .industry-media img { transition: none; }
}

/* INDUSTRY CONTACT MODAL */

.industry-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    padding: 20px;
    background: rgba(3, 17, 38, 0.72);
    backdrop-filter: blur(7px);
    align-items: center;
    justify-content: center;
}

.industry-modal.is-open {
    display: flex;
}

body.industry-modal-open {
    overflow: hidden;
}

.industry-modal-panel {
    width: 100%;
    max-width: 430px;
    position: relative;
    background: white;
    border-radius: 26px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0,0,0,0.22);
    animation: industryPop .3s ease;
}

.industry-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 35px;
    height: 35px;
    background: #edf4fc;
    color: #173253;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.industry-modal-logo img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
}

.industry-modal-label {
    display: block;
    margin-top: 12px;
    color: #008bff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.industry-modal-panel h2 {
    margin: 14px 0;
    color: #071b38;
    font-size: 23px;
    line-height: 1.3;
}

.industry-modal-panel p {
    color: #65758b;
    font-size: 14px;
    line-height: 1.7;
}

.industry-contact-actions {
    display: grid;
    gap: 12px;
    margin-top: 25px;
}

.industry-contact-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 15px;
    text-decoration: none;
    text-align: left;
    transition: transform .25s ease;
}

.industry-contact-option:hover {
    transform: translateY(-3px);
}

.industry-contact-option.whatsapp {
    background: #e9f9ef;
    color: #128c43;
}

.industry-contact-option.phone {
    background: #eaf4ff;
    color: #007bff;
}

.industry-contact-option > i:first-child {
    font-size: 25px;
}

.industry-contact-option > i:last-child {
    font-size: 13px;
    margin-left: auto;
}

.industry-contact-option span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.industry-contact-option strong {
    font-size: 15px;
}

.industry-contact-option small {
    font-size: 13px;
}

.industry-card {
    cursor: pointer;
}

.industry-card:focus-visible {
    outline: 3px solid #008bff;
    outline-offset: 4px;
}

@keyframes industryPop {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 500px) {
    .industry-modal-panel {
        padding: 26px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .industry-modal-panel {
        animation: none;
    }
}
