﻿
/* =========================================
   SSD INDUSTRIES
========================================= */

/* Main Container */

.ssd-industries {
    width: 100%;
    position: relative;
    box-sizing: border-box;
}


/* =========================================
   Header
========================================= */

.ssd-industries__header {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

.ssd-industries__title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.7;
    margin: 0 0 10px;
}

.ssd-industries__description {
    font-size: 15px;
    line-height: 1.9;
    opacity: .7;
    margin: 0 auto;
    max-width: 700px;
}


/* =========================================
   Items Container
========================================= */

.ssd-industries__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    width: 100%;
}


/* =========================================
   Card
========================================= */

.ssd-industries__card {
    position: relative;
    display: block;
    flex: 0 1 400px;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
    overflow: hidden;
    border: none !important;
    border-radius: 18px;
    background-color: #172033;
    text-decoration: none !important;
    background-image: none !important;
    isolation: isolate;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
    transition: transform .35s ease, box-shadow .35s ease;
    -webkit-tap-highlight-color: transparent;
}

    .ssd-industries__card * {
        cursor: pointer;
    }


    /* =========================================
   Hover
========================================= */

    .ssd-industries__card:hover {
        transform: translateY(-8px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
        text-decoration: none !important;
    }


    /* =========================================
   Focus
========================================= */

    .ssd-industries__card:focus {
        outline: none;
    }

    .ssd-industries__card:focus-visible {
        outline: 2px solid #647cff;
        outline-offset: 4px;
    }


    /* =========================================
   Card Border
========================================= */

    .ssd-industries__card::before {
        content: none !important;
    }

    .ssd-industries__card::after {
        content: "" !important;
        display: block !important;
        position: absolute;
        inset: 0;
        z-index: 5;
        width: auto;
        height: auto;
        border: 1px solid rgba(255, 255, 255, .30);
        border-radius: 18px;
        background: transparent !important;
        pointer-events: none;
        box-shadow: none !important;
        transition: border-color .35s ease;
    }

    .ssd-industries__card:hover::after {
        border-color: rgba(255, 255, 255, .75);
    }


/* =========================================
   Image Container
========================================= */

.ssd-industries__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    border-radius: 18px;
}


    /* =========================================
   Image
========================================= */

    .ssd-industries__image img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
        object-position: center;
        border: none;
        outline: none;
        transform: scale(1);
        transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .7s ease;
    }


/* =========================================
   Image Hover
========================================= */

.ssd-industries__card:hover .ssd-industries__image img {
    transform: scale(1.04);
}


/* =========================================
   Overlay
========================================= */

.ssd-industries__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 25px;
    border-radius: 18px;
    background: linear-gradient( to top, rgba(8, 15, 30, .95) 0%, rgba(8, 15, 30, .65) 45%, rgba(8, 15, 30, .05) 100% );
    transition: background .4s ease;
}

.ssd-industries__card:hover .ssd-industries__overlay {
    background: linear-gradient( to top, rgba(8, 15, 30, .98) 0%, rgba(8, 15, 30, .75) 60%, rgba(8, 15, 30, .15) 100% );
}


/* =========================================
   Content
========================================= */

.ssd-industries__content {
    position: relative;
    z-index: 2;
    width: 100%;
    color: #fff;
}

    .ssd-industries__content h3 {
        font-size: 21px;
        font-weight: 700;
        line-height: 1.7;
        margin: 0 0 10px;
        color: #fff;
    }

    .ssd-industries__content p {
        font-size: 13px;
        line-height: 1.9;
        margin: 0 0 15px;
        color: #fff;
        opacity: .8;
    }


/* =========================================
   Action Link
========================================= */

.ssd-industries__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    border: none;
    background: transparent;
    transition: gap .3s ease;
}

.ssd-industries__card:hover .ssd-industries__link {
    gap: 15px;
}


/* =========================================
   INDUSTRY MODAL
   HTML DIALOG - TOP LAYER
========================================= */

.ssd-industry-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    display: flex;
    flex-direction: row;
    width: calc(100% - 40px);
    max-width: 950px;
    height: fit-content;
    max-height: 85vh;
    padding: 0;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    color: #222;
    direction: rtl;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    animation: ssd-modal-show .3s ease;
}


    /* =========================================
   Modal Backdrop
========================================= */

    .ssd-industry-modal::backdrop {
        background: rgba(0, 0, 0, .65);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }


/* =========================================
   Modal Close Button
========================================= */

.ssd-industry-modal__close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

    .ssd-industry-modal__close:hover {
        background: #e53935;
        transform: rotate(90deg);
    }


/* =========================================
   Modal Image - Right Side
========================================= */

.ssd-industry-modal__image {
    flex: 0 0 38%;
    min-width: 0;
    min-height: 350px;
    overflow: hidden;
}

    .ssd-industry-modal__image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }


/* =========================================
   Modal Content - Left Side
========================================= */

.ssd-industry-modal__content {
    flex: 1;
    min-width: 0;
    padding: 40px 32px;
    direction: rtl;
    text-align: right;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ssd-industry-modal__category {
    display: inline-block;
    color: #3157a4;
    background: #f0f4ff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.ssd-industry-modal__content h2 {
    margin: 15px 0;
    font-size: 26px;
    font-weight: 700;
    color: #172033;
}

.ssd-industry-modal__content p {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 2;
    color: #666;
}

.ssd-industry-modal__content h3 {
    margin: 25px 0 15px;
    font-size: 18px;
    font-weight: 700;
    color: #172033;
}

.ssd-industry-modal__content ul {
    padding-right: 22px;
    margin: 0;
    line-height: 2.3;
    color: #444;
}

.ssd-industry-modal__content li {
    margin-bottom: 5px;
}


/* =========================================
   Modal Animation
========================================= */

@keyframes ssd-modal-show {
    from {
        opacity: 0;
        transform: scale(.95) translateY(15px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* =========================================
   Tablet
========================================= */

@media (max-width: 992px) {

    .ssd-industries__grid {
        gap: 18px;
    }

    .ssd-industries__card {
        flex-basis: 350px;
        max-width: 350px;
    }
}


/* =========================================
   Mobile
========================================= */

@media (max-width: 650px) {

    .ssd-industries__header {
        margin-bottom: 25px;
    }

    .ssd-industries__title {
        font-size: 23px;
    }

    .ssd-industries__description {
        font-size: 14px;
    }

    .ssd-industries__grid {
        gap: 15px;
    }

    .ssd-industries__card {
        flex-basis: 100%;
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }

    .ssd-industries__overlay {
        padding: 20px;
    }

    .ssd-industries__content h3 {
        font-size: 19px;
    }

    .ssd-industries__content p {
        font-size: 12px;
    }

    /* Modal Mobile */

    .ssd-industry-modal {
        flex-direction: column;
        width: calc(100% - 24px);
        height: auto;
        max-height: 90vh;
        border-radius: 14px;
    }

    .ssd-industry-modal__image {
        flex: none;
        width: 100%;
        height: 180px;
        min-height: 180px;
    }

    .ssd-industry-modal__content {
        flex: 1;
        padding: 25px 20px;
        overflow-y: auto;
    }

        .ssd-industry-modal__content h2 {
            font-size: 21px;
        }
}


/* =========================================
   Reduced Motion
========================================= */

@media (prefers-reduced-motion: reduce) {

    .ssd-industries__card,
    .ssd-industries__image img,
    .ssd-industries__overlay,
    .ssd-industries__link,
    .ssd-industry-modal,
    .ssd-industry-modal__close {
        transition: none !important;
        animation: none !important;
    }

        .ssd-industries__card:hover {
            transform: none;
        }

            .ssd-industries__card:hover .ssd-industries__image img {
                transform: none;
            }
}

/* Remove browser focus outline from modal close button */
.ssd-industry-modal__close:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Also handle keyboard focus */
.ssd-industry-modal__close:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}