/* Ula Group — News (Figma node 4:91, hover 55:1208 / 55:1262 / 55:1276) */

.news {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #ffffff;
}

.news__decoration {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(73vw, 1052px);
    pointer-events: none;
    z-index: 0;
}

html[dir="ltr"] .news__decoration,
html:not([dir="rtl"]) .news__decoration {
    left: max(-110px, -7.6vw);
    right: auto;
}

html[dir="rtl"] .news__decoration {
    right: max(-110px, -7.6vw);
    left: auto;
    transform: scaleX(-1);
}

.news__decoration img,
.news__decoration svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.news__canvas {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    aspect-ratio: 1440 / 905;
    container-type: inline-size;
    container-name: news;
}

.news__layer {
    position: absolute;
    inset: 0;
}

.news__header {
    position: absolute;
    left: calc(336 / 1440 * 100%);
    right: calc(336 / 1440 * 100%);
    top: calc(82 / 905 * 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(22.9 / 905 * 100%);
    text-align: center;
}

.news__heading {
    margin: 0;
    font-family: "Granadia-Bold", "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(2rem, calc(100cqw * 64 / 1440), 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #293579;
}

.news__intro {
    margin: 0;
    width: 100%;
    font-family: "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(0.875rem, calc(100cqw * 18 / 1440), 1.125rem);
    line-height: 1.6;
    letter-spacing: 0.05em;
    color: #6b6b6b;
    text-align: center;
}

.news__grid {
    position: absolute;
    left: calc(150 / 1440 * 100%);
    right: calc(150 / 1440 * 100%);
    top: calc(275 / 905 * 100%);
    bottom: calc((905 - 275 - 520) / 905 * 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(100cqw * 30 / 1440);
}

.news__card {
    position: relative;
    display: block;
    min-width: 0;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
}

/* Default: full-bleed image + gradient title (news*close) */
.news__card-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.news__card-media {
    position: absolute;
    inset: 0;
}

.news__card-media img,
.news__card-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.news__card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(24, 59, 86, 0) 0%,
        #152532 100%
    );
    pointer-events: none;
}

.news__card-title {
    position: absolute;
    left: 8.89%;
    right: 8.89%;
    bottom: 0.96%;
    top: 72.12%;
    margin: 0;
    font-family: "Granadia-Bold", "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(0.9375rem, calc(100cqw * 18 / 1440), 1.125rem);
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0.2px;
    color: #ffffff;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Hover: white detail card (news*open) */
.news__card-panel {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5eaf4;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, box-shadow 0.35s ease;
}

.news__card-panel-media {
    position: relative;
    flex: 0 0 44.23%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.news__card-panel-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news__card-panel-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 8.89% 8.89% 5.38%;
}

.news__card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 4.5%;
    font-size: clamp(0.8125rem, calc(100cqw * 16 / 1440), 1rem);
    line-height: 1.375;
    white-space: nowrap;
}

.news__card-category {
    font-family: "Granadia-Bold", "Granadia-Book", Helvetica, Arial, sans-serif;
    font-weight: 700;
    color: #375794;
}

.news__card-date {
    font-family: "Granadia-Book", Helvetica, Arial, sans-serif;
    color: #b3bac5;
}

.news__card-headline {
    margin: 0 0 3.85%;
    font-family: "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(0.9375rem, calc(100cqw * 18 / 1440), 1.125rem);
    font-weight: 400;
    line-height: 28px;
    letter-spacing: 0.2px;
    color: #000000;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    text-overflow: ellipsis;
    word-break: break-word;
}

.news__card-excerpt {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 44px;
    margin: 0 0 auto;
    font-family: "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(0.9375rem, calc(100cqw * 18 / 1440), 1.125rem);
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0;
    color: #5a7184;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
    word-break: break-word;
}

.news__card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 4%;
    font-family: "Granadia-Bold", "Granadia-Book", Helvetica, Arial, sans-serif;
    font-size: clamp(0.875rem, calc(100cqw * 16 / 1440), 1rem);
    font-weight: 700;
    line-height: 1.5;
    color: #6ac0ec;
}

.news__card-link img {
    display: block;
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(73%) sepia(35%) saturate(746%) hue-rotate(169deg) brightness(97%) contrast(91%);
}

html[dir="rtl"] .news__card-title,
html[dir="rtl"] .news__card-headline,
html[dir="rtl"] .news__card-excerpt {
    text-align: right;
}

html[dir="rtl"] .news__card-link img {
    transform: scaleX(-1);
}

html[dir="rtl"] .news__header,
html[dir="rtl"] .news__intro {
    text-align: center;
}

@media (hover: hover) and (pointer: fine) {
    .news__card:hover .news__card-cover,
    .news__card:focus-visible .news__card-cover {
        opacity: 0;
        visibility: hidden;
    }

    .news__card:hover .news__card-panel,
    .news__card:focus-visible .news__card-panel {
        opacity: 1;
        visibility: visible;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }

    .news__card:hover .news__card-media img,
    .news__card:focus-visible .news__card-media img {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .news__card-cover,
    .news__card-panel,
    .news__card-media img {
        transition: none;
    }
}

@media (max-width: 991px) {
    .news__canvas {
        aspect-ratio: auto;
    }

    .news__layer {
        position: relative;
        padding: 64px 24px 72px;
    }

    .news__header,
    .news__intro,
    .news__grid {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
    }

    .news__heading {
        font-size: clamp(2.25rem, 8vw, 4rem);
    }

    .news__intro {
        margin-top: 0;
        font-size: 1.125rem;
    }

    .news__grid {
        margin-top: 40px;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news__card {
        aspect-ratio: 360 / 520;
        height: auto;
    }

    .news__decoration {
        width: min(90vw, 700px);
        opacity: 0.65;
    }

    /* On touch, show expanded panel by default */
    .news__card-cover {
        opacity: 0;
        visibility: hidden;
    }

    .news__card-panel {
        opacity: 1;
        visibility: visible;
    }
}
