.icon-work {
    object-fit: scale-down;
}

.slider {
    max-width: 100%;
}

.banner-title {
    text-transform: uppercase;
}

/* Search Page Custom Styles */

.search-section-title {
    margin-top: 40px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #1a1a1a;
    text-align: left;
    margin-right: auto;
}

.search-result-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /* Mobile default */
    gap: 24px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .search-result-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Tablet */
    }
}

@media (min-width: 992px) {
    .search-result-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Desktop */
    }
}

.search-result-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for card look */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    /* Ensure full height in grid cell */
    display: flex;
    flex-direction: column;
}

.search-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.search-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-card-image-wrapper {
    width: 100%;
    height: 200px;
    /* Fixed height for standard size */
    overflow: hidden;
    background-color: #f5f5f5;
}

.search-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image covers area without distortion */
    transition: transform 0.3s ease;
}

.search-card-link:hover .search-card-image {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.search-card-content {
    padding: 20px;
    flex: 1;
    /* Pushes content to fill space */
    display: flex;
    flex-direction: column;
}

.search-card-title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;

    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 0;

    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Ensure it behaves nicely */
    flex-grow: 1;
}

/* News Page Custom Styles */

.news-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /* Mobile default */
    gap: 32px;
    margin-bottom: 60px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Tablet */
    }
}

@media (min-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Desktop */
    }
}

.news-card {
    background: #fff;
    /* Clean rounded corners */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    /* Light border */
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    /* Pop effect */
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-image-wrapper {
    width: 100%;
    height: 220px;
    /* Standard height for news images */
    overflow: hidden;
    background-color: #f5f5f5;
    position: relative;
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card-link:hover .news-card-image {
    transform: scale(1.08);
    /* Subtle zoom */
}

.news-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;

    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.news-card:hover .news-card-title {
    color: #16253f;
    /* Example highlight color, adjust to brand */
}

.news-card-subtitle {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 12px;
    font-weight: 600;
}

.news-card-text {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0;

    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    flex-grow: 1;
}

/* Pagination Styles */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination-link {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    text-decoration: none;
    color: #16253f;
    /* Dark Blue */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background-color: #f5f5f5;
    color: #000;
}

.pagination-link.active {
    background-color: #16253f;
    /* Dark Blue */
    color: #fff;
    border-color: #16253f;
}

/* Home Video Adjustment */
.banner-section-photo {
    height: 500px !important;
    /* Reduced height to crop bottom */
    overflow: hidden;
}

.banner-section-photo video {
    object-position: center top !important;
    /* Align top so proper bottom crop occurs */
}

@media (min-width: 1080px) and (max-width: 1200px) {
    .banner-section-photo {
        height: 400px !important;
    }
}

@media (min-width: 1400px) {
    .banner-section-photo {
        height: 550px !important;
    }
}

@media (min-width: 1600px) and (max-width: 1910px) {
    .banner-section-photo {
        height: 650px !important;
    }
}

@media (min-width: 1900px) {
    .banner-section-photo {
        height: 90vh !important;
    }
}

@media (min-width: 2500px) {
    .banner-section-photo {
        height: 100vh !important;
    }
}

/* Cookie Consent Popup */
.cookie-consent-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: #f8f9fa;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.5s ease-in-out;
    border: 1px solid #e0e0e0;
    pointer-events: none;
    /* Ignore clicks while hidden */
}

.cookie-consent-popup.show {
    transform: translateY(0);
    pointer-events: auto;
    /* Enable clicks when visible */
}

.cookie-consent-content {
    flex-grow: 1;
}

.cookie-consent-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cookie-consent-link {
    color: #16253f;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
}

.cookie-consent-accept {
    background-color: #16253f;
    color: #fff;
}

.cookie-consent-accept:hover {
    background-color: #0d1626;
}

.cookie-consent-decline {
    background-color: transparent;
    color: #666;
    border: 1px solid #ccc;
}

.cookie-consent-decline:hover {
    background-color: #f0f0f0;
    color: #333;
}

@media (min-width: 768px) {
    .cookie-consent-popup {
        flex-direction: row;
        align-items: center;
        bottom: 30px;
        left: 30px;
        right: auto;
        max-width: 600px;
    }
}

/* ─── Nav dropdown fix ───────────────────────────────────────────────────────
   Causa raiz 1: webflow.css `.w--nav-dropdown-list-open { position:static }`
   sem media query → o fundo do nav expande para baixo em desktop.

   Causa raiz 2: `transition` CSS não dispara de display:none → display:block
   no mesmo frame (o browser não tem "estado anterior"). Usar `animation`
   resolve porque parte sempre do `from {}`, independentemente do display.

   Causa raiz 3: backdrop-filter activo durante a animação força re-composite
   por frame via CPU. Eliminar durante a entrada.

   Causa raiz 4: os itens dentro de `.nav-dropdown-link-wrapper` têm
   `margin-left:-20px` + `transition:all .3s` — ao aparecerem animam layout,
   contribuindo para o jank. Fix: forçar `transform` em vez de `margin`.
───────────────────────────────────────────────────────────────────────────── */
@media screen and (min-width: 992px) {

    /* Fix 1: impede o nav de expandir para baixo */
    #nav-header .w--nav-dropdown-list-open {
        position: absolute !important;
    }

    /* Fix 2: pré-promover o container do dropdown à camada GPU */
    #nav-header .w-dropdown {
        transform: translateZ(0);
    }

    /* Fix 3: animar apenas ao abrir, com keyframe (funciona com display:none).
       backdrop-filter desactivado DURANTE a animação; restaurado no fim. */
    #nav-header .nav-dropdown-list.w--open {
        animation: navDropFadeIn 0.17s ease-out both;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Restaura blur depois da animação acabar */
    #nav-header .nav-dropdown-list.w--open {
        animation: navDropFadeIn 0.17s ease-out forwards,
                   navDropBlur 0s linear 0.17s forwards;
    }

    /* Fix 4: substituir margin-left animado por transform (compositor-only)
       nos itens dentro do wrapper, eliminando o recalculate-layout por frame */
    #nav-header .nav-dropdown-link-wrapper {
        overflow: visible;
    }

    #nav-header .nav-dropdown-link {
        margin-left: 0 !important;
        transform: translateX(-8px);
        transition: color 0.25s ease, transform 0.25s ease !important;
    }

    #nav-header .nav-dropdown-link:hover {
        transform: translateX(0) !important;
    }
}

@keyframes navDropFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

@keyframes navDropBlur {
    to {
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
}

@media (max-width: 767px) {
  .subtitle-text,
  .in-section-title {
    padding-top: 18px !important;
  }
}