/**
 * MX Hero CSS
 */

/* Hero container */
.mx-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

/* Image container */
.mx-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Picture element */
.mx-hero__picture {
    display: block;
    width: 100%;
    height: 100%;
}

.mx-hero__picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Vimeo container */
.mx-hero__vimeo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.mx-hero__vimeo.loaded {
    opacity: 1;
}

.mx-hero__vimeo iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    pointer-events: none;
    /* Ensure video covers the container completely */
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    /* max-width and max-height ensure the iframe doesn't exceed the container */
    max-width: initial;
    max-height: initial;
}

/* Dark overlay */
.mx-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 3;
}

/* Top gradient overlay for header visibility */
.mx-hero__top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
    z-index: 4;
    pointer-events: none; /* Allows clicks to pass through */
}

/* Content container */
.mx-hero__content {
    position: relative;
    z-index: 5;
    padding: 80px;
    width: 100%;
}

/* Byline */
.mx-hero__byline {
    color: #ffffff;
    font-size: 1rem;
    font-weight: normal;
    margin: 0 0 10px 0;
    line-height: 1.4;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    text-align: left;
}

/* Title */
.mx-hero__title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Responsive styles */
@media (max-width: 767px) {
    .mx-hero {
        height: 50vh;
    }

    .mx-hero__content {
        padding: 20px;
    }

    .mx-hero__byline {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .mx-hero__title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .mx-hero__title {
        font-size: 1.5rem;
    }
}

/* Bottom gradient overlay */
.mx-hero__bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

/* Link styles with arrow animation */
.mx-hero__link-element {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important; /* Force no underline on the entire link */
    transition: color 0.3s ease;
    position: relative;
}

/* Explicitly keep the same color on hover unless overridden by Elementor settings */
.mx-hero__link-element:hover {
    color: inherit;
}

.mx-hero__link-text {
    position: relative;
}

/* Create underline effect only for the text on hover (not under arrow) */
.mx-hero__link-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.mx-hero__link-element:hover .mx-hero__link-text::after {
    width: 100%; /* Only underlines the text span, not the arrow */
}

.mx-hero__link-arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block;
    transform: translateY(0); /* Ensure baseline alignment */
    text-decoration: none !important; /* Force no underline on arrow */
}

/* Move arrow to the right on hover */
.mx-hero__link-element:hover .mx-hero__link-arrow {
    transform: translateX(5px) translateY(0);
}
