/* =========================================================
   IMIS PROGRAMMES - ELEMENTOR WIDGET CSS
   3 CARDS PER ROW (DEFAULT)
   NORMAL: Equal Flex Distribution
   HOVER:  1 : 3 : 1 ratio (20% / 60% / 20%)
========================================================= */

/* =========================================================
   MAIN WRAPPER
========================================================= */

.wp-programmes,
.imis-programmes {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================================
   SECTION HEADER
========================================================= */

.wp-programmes-header,
.imis-programmes-header {
    margin-bottom: 35px;
    box-sizing: border-box;
}

.wp-programmes-subtitle,
.imis-programmes-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wp-subtitle-line,
.imis-subtitle-line {
    display: inline-block;
    width: 32px;
    height: 2px;
    background-color: #d97724;
    flex-shrink: 0;
}

.wp-subtitle-text,
.imis-subtitle-text {
    color: #d97724;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.wp-programmes-title,
.imis-programmes-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 52px;
    line-height: 1.15;
    font-weight: 400;
    margin: 0;
    padding: 0;
    max-width: 650px;
    letter-spacing: -0.5px;
}

.wp-title-light,
.imis-title-light {
    color: #ffffff;
    font-style: normal;
    font-weight: 400;
}

.wp-title-highlight,
.imis-title-highlight {
    color: #d97724;
    font-style: italic;
    font-weight: 400;
}

.wp-title-highlight em,
.imis-title-highlight em {
    font-style: italic;
}

/* =========================================================
   ROW
========================================================= */

.wp-programme-row,
.imis-programme-row {
    display: flex;
    width: 100%;
    height: var(--imis-row-height, 280px);
    gap: var(--imis-row-gap, 10px);
    margin: 0 0 var(--imis-row-gap, 10px) 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* =========================================================
   CARD
========================================================= */

.wp-programme-card,
.imis-programme-card {
    position: relative;
    display: block;

    flex: 1 1 0;
    min-width: 0;
    height: 100%;

    overflow: hidden;

    border-radius: 2px;

    text-decoration: none !important;

    background: #222;

    box-sizing: border-box;

    transition:
        flex-grow 0.6s cubic-bezier(.22, .61, .36, 1),
        flex-basis 0.6s cubic-bezier(.22, .61, .36, 1);
}

/* =========================================================
   HOVER DISTRIBUTION
   NORMAL = 1 : 1 : 1
   HOVER  = 1 : 3 : 1
   = approximately 20 / 60 / 20
========================================================= */

.wp-programme-row:hover .wp-programme-card,
.imis-programme-row:hover .imis-programme-card {
    flex-grow: 1;
}

.wp-programme-row .wp-programme-card:hover,
.imis-programme-row .imis-programme-card:hover {
    flex-grow: 3;
}

/* =========================================================
   IMAGE
========================================================= */

.wp-programme-card > img,
.imis-programme-card > img {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;

    transform: scale(1);

    transition:
        transform 0.8s cubic-bezier(.22, .61, .36, 1);

    z-index: 1;
}

/* Image zoom */

.wp-programme-card:hover > img,
.imis-programme-card:hover > img {
    transform: scale(1.05);
}

/* =========================================================
   IMAGE DARK OVERLAY
========================================================= */

.wp-programme-overlay,
.imis-programme-overlay {
    position: absolute;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,0.05) 0%,
            rgba(0,0,0,0.12) 35%,
            rgba(0,0,0,0.85) 100%
        );

    z-index: 2;

    pointer-events: none;

    transition:
        background 0.5s ease;
}

/* Slightly darker when hovered */

.wp-programme-card:hover .wp-programme-overlay,
.imis-programme-card:hover .imis-programme-overlay {
    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,0.02) 0%,
            rgba(0,0,0,0.10) 35%,
            rgba(0,0,0,0.86) 100%
        );
}

/* =========================================================
   NUMBER
========================================================= */

.wp-programme-number,
.imis-programme-number {
    position: absolute;

    top: 17px;
    left: 17px;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;
    line-height: 1;

    font-style: italic;
    font-weight: 400;

    z-index: 5;

    pointer-events: none;
}

/* =========================================================
   COLLAPSED LABEL
========================================================= */

.wp-programme-label,
.imis-programme-label {
    position: absolute;

    left: 18px;
    right: 15px;
    bottom: 17px;

    color: #ffffff;

    z-index: 5;

    opacity: 1;

    transform: translateY(0);

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.4s ease;
}

/* Category */

.wp-programme-label span,
.imis-programme-label span {
    display: block;

    margin: 0 0 6px 0;

    color: #e3bd62;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}

/* Title */

.wp-programme-label strong,
.imis-programme-label strong {
    display: block;

    margin: 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;
    line-height: 1.15;

    font-weight: 500;
}

/* =========================================================
   HIDE COLLAPSED LABEL ON HOVER
========================================================= */

.wp-programme-card:hover .wp-programme-label,
.imis-programme-card:hover .imis-programme-label {
    opacity: 0;

    transform: translateY(10px);
}

/* =========================================================
   EXPANDED CONTENT
========================================================= */

.wp-programme-content,
.imis-programme-content {
    position: absolute;

    left: 20px;
    right: 25px;
    bottom: 19px;

    color: #ffffff;

    z-index: 6;

    opacity: 0;

    transform: translateY(18px);

    pointer-events: none;

    transition:
        opacity 0.35s ease 0.12s,
        transform 0.45s ease 0.12s;
}

/* Show expanded content */

.wp-programme-card:hover .wp-programme-content,
.imis-programme-card:hover .imis-programme-content {
    opacity: 1;

    transform: translateY(0);
}

/* =========================================================
   EXPANDED CATEGORY
========================================================= */

.wp-programme-content small,
.imis-programme-content small {
    display: block;

    margin: 0 0 6px 0;

    color: #e3bd62;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}

/* =========================================================
   EXPANDED TITLE
========================================================= */

.wp-programme-content h3,
.imis-programme-content h3 {
    display: block;

    margin: 0 0 7px 0;
    padding: 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;
    line-height: 1.08;

    font-weight: 600;
}

/* =========================================================
   DESCRIPTION
========================================================= */

.wp-programme-content p,
.imis-programme-content p {
    display: block;

    margin: 0 0 12px 0;
    padding: 0;

    color: rgba(255,255,255,0.88);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 14px;
    line-height: 1.35;

    font-style: italic;
}

/* =========================================================
   TAG LIST
========================================================= */

.wp-programme-content ul,
.imis-programme-content ul {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
}

/* =========================================================
   TAG
========================================================= */

.wp-programme-content li,
.imis-programme-content li {
    display: inline-block;

    margin: 0;
    padding: 4px 10px;

    border: 1px solid rgba(255,255,255,0.45);

    border-radius: 30px;

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 10px;
    line-height: 1.2;

    font-weight: 400;

    white-space: nowrap;
}

/* =========================================================
   CTA BUTTON
========================================================= */

.wp-programmes-button,
.imis-programmes-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 26px;
    background: #e58e26;
    color: #000000 !important;
    border: 0;
    border-radius: 2px;
    text-decoration: none !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-sizing: border-box;
    transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
    margin: 0;
}

/* Arrow */

.wp-programmes-button span,
.imis-programmes-button span {
    display: inline-block;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* Button hover */

.wp-programmes-button:hover,
.imis-programmes-button:hover {
    background: #c87515;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.wp-programmes-button:hover span,
.imis-programmes-button:hover span {
    transform: translateX(4px);
    color: inherit;
}

/* =========================================================
   HEADER FLEX WITH BUTTON (TOP RIGHT / TOP CENTER)
========================================================= */

.wp-programmes-header.has-button-top_right,
.imis-programmes-header.has-button-top_right,
.wp-programmes-header.has-button-header_right,
.imis-programmes-header.has-button-header_right {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.wp-programmes-header.has-button-top_center,
.imis-programmes-header.has-button-top_center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.wp-programmes-header.has-button-top_center .wp-subtitle-line,
.imis-programmes-header.has-button-top_center .imis-subtitle-line {
    display: none;
}

.wp-programmes-header.has-button-top_center .wp-programmes-subtitle,
.imis-programmes-header.has-button-top_center .imis-programmes-subtitle {
    justify-content: center;
}

.wp-programmes-header-left,
.imis-programmes-header-left {
    flex: 1;
    min-width: 0;
}

.wp-programmes-header-button,
.imis-programmes-header-button,
.wp-programmes-header-right,
.imis-programmes-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4px;
}

.wp-programmes-header-button.pos-top_center,
.imis-programmes-header-button.pos-top_center {
    justify-content: center;
    width: 100%;
    margin-top: 6px;
    padding-bottom: 0;
}

.wp-programmes-header-button .wp-programmes-button,
.imis-programmes-header-button .imis-programmes-button,
.wp-programmes-header-right .wp-programmes-button,
.imis-programmes-header-right .imis-programmes-button {
    margin: 0;
}

/* =========================================================
   CTA BUTTON WRAPPER POSITIONS (BOTTOM CENTER / RIGHT / LEFT)
========================================================= */

.wp-programmes-button-wrapper,
.imis-programmes-button-wrapper {
    width: 100%;
    display: flex;
    margin-top: 25px;
    box-sizing: border-box;
}

.wp-programmes-button-wrapper.pos-bottom_left,
.imis-programmes-button-wrapper.pos-bottom_left {
    justify-content: flex-start;
}

.wp-programmes-button-wrapper.pos-bottom_center,
.imis-programmes-button-wrapper.pos-bottom_center {
    justify-content: center;
}

.wp-programmes-button-wrapper.pos-bottom_right,
.imis-programmes-button-wrapper.pos-bottom_right,
.wp-programmes-button-wrapper.pos-top_right,
.imis-programmes-button-wrapper.pos-top_right,
.wp-programmes-button-wrapper.pos-header_right,
.imis-programmes-button-wrapper.pos-header_right {
    justify-content: flex-end;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .wp-programme-row,
    .imis-programme-row {
        height: var(--imis-row-height-tablet, 250px);
        gap: var(--imis-row-gap-tablet, 8px);
        margin-bottom: var(--imis-row-gap-tablet, 8px);
    }

    .wp-programme-number,
    .imis-programme-number {
        top: 14px;
        left: 14px;
        font-size: 15px;
    }

    .wp-programme-label,
    .imis-programme-label {
        left: 14px;
        right: 12px;
        bottom: 14px;
    }

    .wp-programme-label span,
    .imis-programme-label span {
        font-size: 9px;
        margin-bottom: 5px;
    }

    .wp-programme-label strong,
    .imis-programme-label strong {
        font-size: 15px;
    }

    .wp-programme-content,
    .imis-programme-content {
        left: 18px;
        right: 18px;
        bottom: 17px;
    }

    .wp-programme-content h3,
    .imis-programme-content h3 {
        font-size: 22px;
    }

    .wp-programme-content p,
    .imis-programme-content p {
        font-size: 13px;
    }

}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .wp-programmes,
    .imis-programmes {
        width: 100%;
    }

    /* Each row becomes vertical */

    .wp-programme-row,
    .imis-programme-row {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
        overflow: visible;
    }

    /* Header Mobile Adjustments */

    .wp-programmes-header,
    .imis-programmes-header {
        margin-bottom: 25px;
    }

    .wp-programmes-header.has-button-top_right,
    .imis-programmes-header.has-button-top_right,
    .wp-programmes-header.has-button-header_right,
    .imis-programmes-header.has-button-header_right {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .wp-programmes-header-button,
    .imis-programmes-header-button,
    .wp-programmes-header-right,
    .imis-programmes-header-right {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .wp-programmes-title,
    .imis-programmes-title {
        font-size: 34px;
        line-height: 1.2;
    }

    .wp-subtitle-text,
    .imis-subtitle-text {
        font-size: 11px;
        letter-spacing: 1.8px;
    }

    /* Default card */

    .wp-programme-card,
    .imis-programme-card,
    .wp-programme-row:hover .wp-programme-card,
    .imis-programme-row:hover .imis-programme-card,
    .wp-programme-row .wp-programme-card:hover,
    .imis-programme-row .imis-programme-card:hover {
        display: block;
        width: 100%;
        height: var(--imis-card-mobile-height, 105px);
        min-height: var(--imis-card-mobile-height, 105px);
        margin: 0 0 var(--imis-row-gap-mobile, 8px) 0;
        flex: none;
        border-radius: 2px;
        transition: height 0.45s ease;
    }

    /* Expanded card */

    .wp-programme-card:hover,
    .imis-programme-card:hover {
        height: var(--imis-card-mobile-expand-height, 350px) !important;
        min-height: var(--imis-card-mobile-expand-height, 350px);
    }

    /* Image */

    .wp-programme-card > img,
    .imis-programme-card > img {
        object-position: center;
    }

    /* Number */

    .wp-programme-number,
    .imis-programme-number {
        top: 16px;
        left: 17px;
        font-size: 16px;
    }

    /* Mobile label */

    .wp-programme-label,
    .imis-programme-label {
        left: 52px;
        right: 15px;
        bottom: 18px;
    }

    .wp-programme-label span,
    .imis-programme-label span {
        font-size: 9px;
        margin-bottom: 5px;
    }

    .wp-programme-label strong,
    .imis-programme-label strong {
        font-size: 16px;
    }

    /* Don't hide the label on mobile */

    .wp-programme-card:hover .wp-programme-label,
    .imis-programme-card:hover .imis-programme-label {
        opacity: 0;
        transform: translateY(8px);
    }

    /* Mobile content */

    .wp-programme-content,
    .imis-programme-content {
        left: 20px;
        right: 20px;
        bottom: 22px;
    }

    .wp-programme-content small,
    .imis-programme-content small {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .wp-programme-content h3,
    .imis-programme-content h3 {
        font-size: 25px;
        line-height: 1.1;
        margin-bottom: 8px;
    }

    .wp-programme-content p,
    .imis-programme-content p {
        font-size: 14px;
        line-height: 1.35;
        margin-bottom: 12px;
    }

    .wp-programme-content li,
    .imis-programme-content li {
        font-size: 10px;
        padding: 4px 9px;
    }

    /* CTA */

    .wp-programmes-button,
    .imis-programmes-button {
        margin-top: 12px;
        padding: 13px 20px;
    }

}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .wp-programme-card:hover,
    .imis-programme-card:hover {
        height: 330px !important;
        min-height: 330px;
    }

    .wp-programme-content h3,
    .imis-programme-content h3 {
        font-size: 22px;
    }

    .wp-programme-content p,
    .imis-programme-content p {
        font-size: 13px;
    }

}
