/**
 * HC Banner Block Styles
 *
 * Heritage Cities custom banner block
 */

/* ==========================================================================
   Banner Container
   ========================================================================== */

.hc-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hc-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    /* background-position is set via inline style from focal point picker */
    background-repeat: no-repeat;
    z-index: 0;
}

.hc-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.hc-banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 3rem 0;
}

.hc-banner-text {
    max-width: 900px;
    margin: 0 auto;
}

.hc-banner-text.text-left {
    text-align: left;
    margin-left: 0;
}

.hc-banner-text.text-center {
    text-align: center;
}

.hc-banner-text.text-right {
    text-align: right;
    margin-right: 0;
}

/* ==========================================================================
   Pre-title
   ========================================================================== */

.hc-banner-pretitle {
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.15em;
    font-weight: 400;
    font-family: var(--font-body);
}

/* ==========================================================================
   Title
   ========================================================================== */

.hc-banner-title {
    margin: 0 0 1rem 0;
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight, 500);
    line-height: 1.1;
}

/* ==========================================================================
   Subtitle with Decorative Lines
   ========================================================================== */

.hc-banner-subtitle {
    margin: 0 0 1.5rem 0;
    font-style: normal;
    font-family: var(--font-body);
    position: relative;
    display: inline-block;
}

/* Decorative lines */
.hc-banner-subtitle.with-lines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.hc-banner-subtitle.with-lines::before,
.hc-banner-subtitle.with-lines::after {
    content: '';
    flex: 1;
    max-width: 150px;
    height: 1px;
    background-color: var(--line-color, rgba(255, 255, 255, 0.5));
}

.text-left .hc-banner-subtitle.with-lines {
    justify-content: flex-start;
}

.text-left .hc-banner-subtitle.with-lines::before {
    display: none;
}

.text-right .hc-banner-subtitle.with-lines {
    justify-content: flex-end;
}

.text-right .hc-banner-subtitle.with-lines::after {
    display: none;
}

/* ==========================================================================
   Social Icons
   ========================================================================== */

.hc-banner-social-icons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.text-center .hc-banner-social-icons {
    justify-content: center;
}

.text-left .hc-banner-social-icons {
    justify-content: flex-start;
}

.text-right .hc-banner-social-icons {
    justify-content: flex-end;
}

.hc-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, var(--icon-bg-opacity, 0.2));
    color: var(--icon-color, #ffffff);
    font-size: var(--icon-size, 1.25rem);
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.hc-social-icon:hover {
    background-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
    color: var(--icon-color, #ffffff);
}

.hc-social-icon i {
    line-height: 1;
}

/* ==========================================================================
   Button
   ========================================================================== */

.hc-banner-button-wrap {
    margin-top: 1.5rem;
}

.text-center .hc-banner-button-wrap {
    text-align: center;
}

.text-left .hc-banner-button-wrap {
    text-align: left;
}

.text-right .hc-banner-button-wrap {
    text-align: right;
}

.hc-banner-button {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: normal;
}

.hc-banner-button:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
    .hc-banner-title {
        font-size: 3rem !important;
    }

    .hc-banner-pretitle {
        font-size: 1.25rem !important;
    }

    .hc-banner-subtitle.with-lines::before,
    .hc-banner-subtitle.with-lines::after {
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .hc-banner-content {
        padding: 2rem 0;
    }

    .hc-banner-title {
        font-size: 2.5rem !important;
    }

    .hc-banner-pretitle {
        font-size: 1rem !important;
    }

    .hc-banner-subtitle {
        font-size: 1rem !important;
    }

    .hc-banner-subtitle.with-lines::before,
    .hc-banner-subtitle.with-lines::after {
        max-width: 60px;
    }

    .hc-banner-social-icons {
        gap: 0.5rem;
    }

    .hc-social-icon {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Editor Styles
   ========================================================================== */

.editor-styles-wrapper .hc-banner {
    margin-left: -15px;
    margin-right: -15px;
}

.editor-styles-wrapper .hc-banner-pretitle,
.editor-styles-wrapper .hc-banner-title,
.editor-styles-wrapper .hc-banner-subtitle {
    margin-top: 0;
}

/* Social icons editor panel */
.hc-social-icons-editor .components-base-control {
    margin-bottom: 8px;
}

/* ==========================================================================
   Effects - Parallax
   ========================================================================== */

.hc-banner-parallax .hc-banner-bg {
    /* Extend background beyond container to prevent gaps during parallax */
    top: -30%;
    bottom: -30%;
    height: 160%;
    will-change: transform;
}

/* ==========================================================================
   Effects - Subtle Zoom Animation
   ========================================================================== */

@keyframes hc-subtle-zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

.hc-banner-zoom .hc-banner-bg {
    animation-name: hc-subtle-zoom;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
    will-change: transform;
}

/* Zoom speed variations */
.hc-banner-zoom-slow .hc-banner-bg {
    animation-duration: 20s;
}

.hc-banner-zoom-medium .hc-banner-bg {
    animation-duration: 12s;
}

.hc-banner-zoom-fast .hc-banner-bg {
    animation-duration: 6s;
}

/* Pause animation when not in viewport (will be controlled by JS) */
.hc-banner-zoom.hc-banner-paused .hc-banner-bg {
    animation-play-state: paused;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hc-banner-zoom .hc-banner-bg {
        animation: none;
    }

    .hc-banner-parallax .hc-banner-bg {
        transform: none !important;
    }
}
