/**
 * Petsure Hero Widget Styles
 *
 * Full hero section with parallax background,
 * animated heading, CTA button, video popup, avatars.
 *
 * @package Petsure_Core
 */

/* ===== Wrapper / Background ===== */
.petsure-hero-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 600px;
    padding: 80px 60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border-radius: var(--petsure-border-radius-lg);
}

/* ===== Slide (single or swiper-slide) ===== */
.petsure-hero-slide {
    display: flex;
    align-items: center;
    min-height: inherit;
    width: 100%;
}

/* When inside swiper, swiper-slide already has flex, so keep slide as full-width block */
.swiper-slide .petsure-hero-slide {
    min-height: inherit;
}

/* Parallax background layer */
.petsure-hero-bg-parallax {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
    pointer-events: none;
}

/* Shape overlay (color/gradient between bg and content) */
/* Background-color and opacity are set by Elementor controls via selectors — no defaults here */
.petsure-hero-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.petsure-hero-wrapper>*:not(.petsure-hero-bg-parallax):not(.petsure-hero-bg-overlay) {
    position: relative;
    z-index: 1;
}

/* ===== Container (flex row) ===== */
.petsure-hero-container {
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
    margin: 0 auto;
}

/* ===== Content Column ===== */
.petsure-hero-content {
    flex: 1;
    min-width: 0;
    max-width: 50%;
}

/* ===== Media Column ===== */
.petsure-hero-media {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.petsure-hero-image {
    width: auto;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--petsure-border-radius-lg);
}

.petsure-hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    max-height: 800px;
    object-fit: contain;
}

/* ===== Subheading - inherits .petsure-section-subheading from section-title.css ===== */
.petsure-hero-subheading {
    margin: 0 auto 8px auto !important;
    text-align: center;
    display: block;
}

/* ===== Heading - inherits .petsure-section-heading from section-title.css ===== */
.petsure-hero-heading {
    font-size: 48px !important;
}

/* Split-letter animation */
.petsure-hero-heading.petsure-hero-heading-animate .petsure-char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.petsure-hero-heading.petsure-hero-heading-animate.petsure-hero-heading-visible .petsure-char {
    opacity: 1;
    transition-delay: calc(var(--char-index, 0) * 0.04s);
}

.petsure-hero-heading .petsure-word {
    display: inline-block;
    white-space: nowrap;
}

/* ===== Description ===== */
.petsure-hero-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--petsure-text);
    margin: 0 auto 28px auto !important;
}

/* ===== Actions Row (CTA + Video) ===== */
.petsure-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin: 32px auto;
}

/* ===== CTA Button (inherits .petsure-btn from button.css + scheme classes) ===== */
.petsure-hero-cta-btn {
    padding: 12px 12px 12px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

/* ===== Video Button ===== */
.petsure-hero-video-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

/* ===== Video Text Path Circle ===== */
.petsure-hero-video-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    padding: 10px;
}

.petsure-hero-video-circle .petsure-hero-video-btn--circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.petsure-hero-video-circle .petsure-hero-vpath-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: petsure-hero-video-rotate var(--petsure-rotate-speed, 15s) linear infinite;
}

.petsure-hero-video-circle .petsure-hero-vpath-svg text {
    fill: currentColor;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

@keyframes petsure-hero-video-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.petsure-hero-video-circle:hover .petsure-hero-vpath-svg {
    animation-play-state: paused;
}

.petsure-hero-video-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--petsure-accent);
    background: transparent;
    color: var(--petsure-accent);
    fill: var(--petsure-accent);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
    padding: 0;
    outline: none;
}

.petsure-hero-video-btn:hover {
    background: var(--petsure-accent);
    color: var(--petsure-white);
    fill: var(--petsure-white);
}

.petsure-hero-video-btn:active {
    transform: scale(0.95);
}

/* Video button style variants */
.petsure-hero-video-btn--primary {
    background: var(--petsure-primary);
    color: var(--petsure-white);
    fill: var(--petsure-white);
    border-color: var(--petsure-primary);
}

.petsure-hero-video-btn--primary:hover {
    background: var(--petsure-secondary);
    border-color: var(--petsure-secondary);
}

.petsure-hero-video-btn--accent {
    background: var(--petsure-accent);
    color: var(--petsure-white);
    fill: var(--petsure-white);
    border-color: var(--petsure-accent);
}

.petsure-hero-video-btn--accent:hover {
    background: transparent;
    color: var(--petsure-accent);
    fill: var(--petsure-accent);
}

.petsure-hero-video-btn--white {
    background: var(--petsure-white);
    color: var(--petsure-primary);
    fill: var(--petsure-primary);
    border-color: var(--petsure-white);
}

.petsure-hero-video-btn--white:hover {
    background: var(--petsure-accent);
    color: var(--petsure-white);
    fill: var(--petsure-white);
    border-color: var(--petsure-accent);
}

.petsure-hero-video-btn i {
    font-size: 18px;
}

.petsure-hero-video-btn svg {
    width: 18px;
    height: 18px;
}

.petsure-hero-video-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--petsure-primary);
    line-height: 1.3;
}

/* ===== Avatars Row ===== */
.petsure-hero-avatars-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.petsure-hero-avatars-list {
    display: flex;
    flex-shrink: 0;
}

.petsure-hero-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--petsure-white);
    margin-right: -12px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.petsure-hero-avatar:last-child {
    margin-right: 0;
}

.petsure-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.petsure-hero-avatars-text {
    font-size: 16px;
    line-height: 1.2;
    color: var(--petsure-text);
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* ===== Swiper Carousel Overrides ===== */
.petsure-hero-wrapper.petsure-hero-swiper {
    display: block;
    padding: 0;
}

.petsure-hero-swiper .swiper-wrapper {
    align-items: stretch;
}

.petsure-hero-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.petsure-hero-swiper .swiper-slide .petsure-hero-slide {
    flex: 1;
    min-height: inherit;
    padding: 80px 60px;
}

/* ===== Video Modal ===== */
.petsure-hero-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.petsure-hero-video-modal.petsure-hero-video-modal-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.petsure-hero-video-modal-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    background: var(--petsure-black);
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.petsure-hero-video-modal-open .petsure-hero-video-modal-content {
    transform: scale(1);
}

.petsure-hero-video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--petsure-white);
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
    padding: 0;
}

.petsure-hero-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.petsure-hero-video-modal-close svg {
    width: 20px;
    height: 20px;
}

.petsure-hero-video-modal-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--petsure-black);
}

.petsure-hero-video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .petsure-hero-wrapper {
        padding: 60px 40px;
    }

    .petsure-hero-container {
        gap: 40px;
    }

    .petsure-hero-content {
        max-width: 55%;
    }

    .petsure-hero-heading {
        font-size: 38px !important;
    }
}

@media (max-width: 768px) {
    .petsure-hero-wrapper {
        padding: 50px 24px;
        min-height: auto;
    }

    .petsure-hero-container {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .petsure-hero-content {
        max-width: 100%;
    }

    .petsure-hero-media {
        max-width: 80%;
        margin: 0 auto;
    }

    .petsure-hero-heading {
        font-size: 30px !important;
    }

    .petsure-hero-description {
        max-width: 100%;
    }

    .petsure-hero-actions {
        gap: 16px;
    }

    .petsure-hero-avatars-text {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .petsure-hero-wrapper {
        padding: 40px 16px;
    }

    .petsure-hero-heading {
        font-size: 26px !important;
    }

    .petsure-hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .petsure-hero-avatars-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {

    .petsure-hero-heading.petsure-hero-heading-animate .petsure-char,
    .petsure-hero-bg-parallax {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}