/**
 * Frontend styles for the Custom Hero Carousel
 *
 * @package Custom_Hero_Carousel
 */

/* Main container */
.custom-hero-carousel-container {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

/* Carousel */
.custom-hero-carousel {
    position: relative;
    width: 100%;
    height: 600px;
    /* Default height, will be overridden by settings */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Slides */
.custom-hero-carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.custom-hero-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-hero-carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Content */
.custom-hero-carousel-content {
    padding: 30px;
    max-width: 800px;
    color: #ffffff;
    /* Default color, will be overridden by settings */
    text-align: center;
    z-index: 3;
}

.custom-hero-carousel-content.text-left {
    text-align: left;
    margin-right: auto;
}

.custom-hero-carousel-content.text-right {
    text-align: right;
    margin-left: auto;
}

.custom-hero-carousel-content.text-center {
    text-align: center;
    margin: 0 auto;
}

/* Headings */
.slide-heading {
    font-size: 48px;
    /* Default, will be overridden by settings */
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.active .slide-heading {
    opacity: 1;
    transform: translateY(0);
}

/* Subheading */
.slide-subheading {
    font-size: 24px;
    /* Default, will be overridden by settings */
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.active .slide-subheading {
    opacity: 1;
    transform: translateY(0);
}

/* Button */
.slide-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2271b1;
    /* Default, will be overridden by settings */
    color: #ffffff;
    /* Default, will be overridden by settings */
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s, background-color 0.3s ease;
}

.active .slide-button {
    opacity: 1;
    transform: translateY(0);
}

.slide-button:hover {
    background-color: #135e96;
}

/* Navigation arrows */
.custom-hero-carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    z-index: 4;
    display: flex;
    justify-content: space-between;
}

.custom-hero-carousel-nav button {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    margin: 0 20px;
}

.custom-hero-carousel-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.custom-hero-carousel-nav .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Pagination dots */
.custom-hero-carousel-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 4;
}

.pagination-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    margin: 0 5px;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-dot.active {
    background-color: #ffffff;
}

/* Sponsor logos */
.custom-hero-carousel-sponsors {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.sponsor-logo {
    margin: 0 20px;
    max-width: 160px;
    height: auto;
    transition: opacity 0.3s ease;
}

.sponsor-logo img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

.sponsor-logo:hover {
    opacity: 0.8;
}

/* No slides message */
.no-slides-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Responsive styles */
@media (max-width: 768px) {
    .custom-hero-carousel {
        height: 500px;
    }

    .slide-heading {
        font-size: 36px;
    }

    .slide-subheading {
        font-size: 18px;
    }

    .custom-hero-carousel-sponsors {
        flex-wrap: wrap;
    }

    .sponsor-logo {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .custom-hero-carousel {
        height: 400px;
    }

    .slide-heading {
        font-size: 28px;
    }

    .slide-subheading {
        font-size: 16px;
    }

    .slide-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .custom-hero-carousel-content {
        padding: 20px;
    }
}

/* Animation types */
/* Fade animation */
.custom-hero-carousel[data-animation="fade"] .custom-hero-carousel-slide {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.custom-hero-carousel[data-animation="fade"] .custom-hero-carousel-slide.active {
    opacity: 1;
}

/* Slide animation */
.custom-hero-carousel[data-animation="slide"] .custom-hero-carousel-slide {
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

.custom-hero-carousel[data-animation="slide"] .custom-hero-carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.custom-hero-carousel[data-animation="slide"] .custom-hero-carousel-slide.prev {
    opacity: 0;
    transform: translateX(-100%);
}

/* Zoom animation */
.custom-hero-carousel[data-animation="zoom"] .custom-hero-carousel-slide {
    opacity: 0;
    transform: scale(0.8);
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

.custom-hero-carousel[data-animation="zoom"] .custom-hero-carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Text animations */
/* Fade Up */
.custom-hero-carousel[data-text-animation="fade-up"] .slide-heading,
.custom-hero-carousel[data-text-animation="fade-up"] .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-up"] .slide-button {
    opacity: 0;
    transform: translateY(20px);
}

.custom-hero-carousel[data-text-animation="fade-up"] .active .slide-heading {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.custom-hero-carousel[data-text-animation="fade-up"] .active .slide-subheading {
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.custom-hero-carousel[data-text-animation="fade-up"] .active .slide-button {
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s, background-color 0.3s ease;
}

.custom-hero-carousel[data-text-animation="fade-up"] .active .slide-heading,
.custom-hero-carousel[data-text-animation="fade-up"] .active .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-up"] .active .slide-button {
    opacity: 1;
    transform: translateY(0);
}

/* Fade Down */
.custom-hero-carousel[data-text-animation="fade-down"] .slide-heading,
.custom-hero-carousel[data-text-animation="fade-down"] .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-down"] .slide-button {
    opacity: 0;
    transform: translateY(-20px);
}

.custom-hero-carousel[data-text-animation="fade-down"] .active .slide-heading,
.custom-hero-carousel[data-text-animation="fade-down"] .active .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-down"] .active .slide-button {
    opacity: 1;
    transform: translateY(0);
}

/* Fade Left */
.custom-hero-carousel[data-text-animation="fade-left"] .slide-heading,
.custom-hero-carousel[data-text-animation="fade-left"] .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-left"] .slide-button {
    opacity: 0;
    transform: translateX(20px);
}

.custom-hero-carousel[data-text-animation="fade-left"] .active .slide-heading,
.custom-hero-carousel[data-text-animation="fade-left"] .active .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-left"] .active .slide-button {
    opacity: 1;
    transform: translateX(0);
}

/* Fade Right */
.custom-hero-carousel[data-text-animation="fade-right"] .slide-heading,
.custom-hero-carousel[data-text-animation="fade-right"] .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-right"] .slide-button {
    opacity: 0;
    transform: translateX(-20px);
}

.custom-hero-carousel[data-text-animation="fade-right"] .active .slide-heading,
.custom-hero-carousel[data-text-animation="fade-right"] .active .slide-subheading,
.custom-hero-carousel[data-text-animation="fade-right"] .active .slide-button {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom In */
.custom-hero-carousel[data-text-animation="zoom-in"] .slide-heading,
.custom-hero-carousel[data-text-animation="zoom-in"] .slide-subheading,
.custom-hero-carousel[data-text-animation="zoom-in"] .slide-button {
    opacity: 0;
    transform: scale(0.8);
}

.custom-hero-carousel[data-text-animation="zoom-in"] .active .slide-heading,
.custom-hero-carousel[data-text-animation="zoom-in"] .active .slide-subheading,
.custom-hero-carousel[data-text-animation="zoom-in"] .active .slide-button {
    opacity: 1;
    transform: scale(1);
}

/* Slide Up */
.custom-hero-carousel[data-text-animation="slide-up"] .slide-heading,
.custom-hero-carousel[data-text-animation="slide-up"] .slide-subheading,
.custom-hero-carousel[data-text-animation="slide-up"] .slide-button {
    opacity: 0;
    transform: translateY(50px);
}

.custom-hero-carousel[data-text-animation="slide-up"] .active .slide-heading,
.custom-hero-carousel[data-text-animation="slide-up"] .active .slide-subheading,
.custom-hero-carousel[data-text-animation="slide-up"] .active .slide-button {
    opacity: 1;
    transform: translateY(0);
}