/* Hero section zoom animation with border effects */
.hero, .page-hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--navy-900);
    --border-position: 0px; /* CSS variable for border position */
}

/* Only bottom border with scroll-based animation - only for homepage hero */
.hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 35px;
    background: url('images/assets/border.png') repeat-x;
    background-size: auto 100%;
    z-index: 3;
    pointer-events: none;
    bottom: 0;
    transform: rotate(180deg);
    background-position: var(--border-position) 0; /* Using CSS variable for dynamic position */
    transition: background-position 0.05s ease-out; /* Smooth transition for border movement */
}

/* Border animations */

/* Hero image zoom animation */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-attachment: fixed !important;
    z-index: -1;
    transform: scale(1.3);
    animation: heroZoomOut 15s ease-out forwards;
}

.hero-content {
    max-width: 800px;
    padding: 50px;
    animation: fadeIn 1.5s ease;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(243, 217, 123, 0.3);
    border-radius: 10px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.15);
}

.page-hero {
    height: 50vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-attachment: fixed !important;
    z-index: -1;
    transform: scale(1.3);
    animation: heroZoomOut 15s ease-out forwards;
}

.page-hero-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    position: relative;
    z-index: 2;
    animation: fadeIn 1.5s ease;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(243, 217, 123, 0.3);
    border-radius: 10px;
}

@keyframes heroZoomOut {
    0% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .hero::after,
    .page-hero::after {
        height: 25px;
    }
}

@media (max-width: 576px) {
    .hero::after,
    .page-hero::after {
        height: 20px;
    }
}
