/**
 * Yapuka Dynamic Content Module - Styles
 * Copyright (C) 2025 Yapuka. All rights reserved.
 */

/* ========================================================================
   Common Styles
   ======================================================================== */

.yapuka-dynmac {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ========================================================================
   Carousel Layout
   ======================================================================== */

.yapuka-carousel-wrapper {
    margin-bottom: 2rem;
}

.yapuka-carousel {
    position: relative;
    width: 100%;
}

.yapuka-carousel .carousel-item {
    position: relative;
    min-height: 400px;
    padding: 3rem 0;
}

/* Carousel Row */
.yapuka-carousel-row {
    display: flex;
    align-items: stretch;
}

/* Carousel Card */
.yapuka-carousel-card {
    background: white;
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.yapuka-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Card Image - Fixed Height */
.yapuka-carousel-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.yapuka-carousel-card-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.yapuka-carousel-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.yapuka-carousel-card:hover .yapuka-carousel-card-image img {
    transform: scale(1.05);
}

/* Card Body */
.yapuka-carousel-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yapuka-carousel-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.yapuka-carousel-card-title a {
    color: var(--dark, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.yapuka-carousel-card-title a:hover {
    color: var(--primary-color, #007bff);
}

.yapuka-carousel-card-intro {
    color: var(--gray-600, #666);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.yapuka-carousel-card-readmore {
    margin-top: auto;
}

.yapuka-carousel-card-readmore .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.yapuka-carousel-card-readmore .btn:hover {
    transform: translateX(2px);
}

.yapuka-carousel-card-readmore .btn i {
    transition: transform 0.3s ease;
}

.yapuka-carousel-card-readmore .btn:hover i {
    transform: translateX(4px);
}


/* Carousel Controls */
.yapuka-carousel .carousel-control-prev,
.yapuka-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.yapuka-carousel .carousel-control-prev {
    left: 2rem;
}

.yapuka-carousel .carousel-control-next {
    right: 2rem;
}

.yapuka-carousel .carousel-control-prev:hover,
.yapuka-carousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.yapuka-carousel .carousel-control-prev-icon,
.yapuka-carousel .carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

/* Carousel Indicators */
.yapuka-carousel .carousel-indicators {
    bottom: 2rem;
    margin-bottom: 0;
}

.yapuka-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.yapuka-carousel .carousel-indicators button.active {
    background-color: white;
    width: 40px;
    border-radius: 6px;
}

/* ========================================================================
   Slideshow Layout
   ======================================================================== */

.yapuka-slideshow-wrapper {
    margin-bottom: 2rem;
}

.yapuka-slideshow {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #000;
}

.yapuka-slideshow-items {
    position: relative;
    width: 100%;
    height: 100%;
}

.yapuka-slideshow-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.yapuka-slideshow-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Slideshow Background */
.yapuka-slideshow-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}

.yapuka-slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

/* Slideshow Content */
.yapuka-slideshow-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.yapuka-slideshow-inner {
    max-width: 800px;
    text-align: left;
}

.yapuka-slideshow-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.yapuka-slideshow-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.yapuka-slideshow-title a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.yapuka-slideshow-intro {
    font-size: 1.25rem;
    line-height: 1.6;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.yapuka-slideshow-readmore {
    margin-top: 2rem;
}

.yapuka-slideshow-readmore .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.yapuka-slideshow-readmore .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.yapuka-slideshow-readmore .btn i {
    transition: transform 0.3s ease;
}

.yapuka-slideshow-readmore .btn:hover i {
    transform: translateX(4px);
}

/* Slideshow Controls */
.yapuka-slideshow-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 3;
    pointer-events: none;
}

.yapuka-slideshow-prev,
.yapuka-slideshow-next {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yapuka-slideshow-prev:hover,
.yapuka-slideshow-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Slideshow Progress Bar */
.yapuka-slideshow-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.yapuka-slideshow-progress-bar {
    height: 100%;
    width: 0;
    background: white;
    transition: width linear;
}

/* Slideshow Dots */
.yapuka-slideshow-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.yapuka-slideshow-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.yapuka-slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.yapuka-slideshow-dot.active {
    width: 40px;
    border-radius: 6px;
    background: white;
}

/* Slideshow Effects */
/* Fade Effect (default) */
.yapuka-slideshow-effect-fade .yapuka-slideshow-item {
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Slide Effect */
.yapuka-slideshow-effect-slide .yapuka-slideshow-item {
    transform: translateX(100%);
    transition: transform 0.8s ease, opacity 0.8s ease, visibility 0.8s ease;
}

.yapuka-slideshow-effect-slide .yapuka-slideshow-item.active {
    transform: translateX(0);
}

.yapuka-slideshow-effect-slide .yapuka-slideshow-item.prev {
    transform: translateX(-100%);
}

/* Zoom Effect */
.yapuka-slideshow-effect-zoom .yapuka-slideshow-background {
    transform: scale(1.2);
    transition: transform 8s ease;
}

.yapuka-slideshow-effect-zoom .yapuka-slideshow-item.active .yapuka-slideshow-background {
    transform: scale(1);
}

/* ========================================================================
   Responsive Design
   ======================================================================== */

@media (max-width: 991px) {
    .yapuka-carousel .carousel-item {
        height: 400px;
    }

    .yapuka-carousel-title {
        font-size: 2rem;
    }

    .yapuka-carousel-intro {
        font-size: 1rem;
    }

    .yapuka-slideshow {
        height: 500px;
    }

    .yapuka-slideshow-title {
        font-size: 2.25rem;
    }

    .yapuka-slideshow-intro {
        font-size: 1.125rem;
    }
}

@media (max-width: 767px) {
    .yapuka-carousel .carousel-item {
        height: 350px;
    }

    .yapuka-carousel-caption {
        text-align: center;
    }

    .yapuka-carousel-content {
        max-width: 100%;
    }

    .yapuka-carousel-title {
        font-size: 1.75rem;
    }

    .yapuka-carousel-intro {
        font-size: 0.9375rem;
    }

    .yapuka-carousel .carousel-control-prev,
    .yapuka-carousel .carousel-control-next {
        width: 50px;
        height: 50px;
    }

    .yapuka-carousel .carousel-control-prev {
        left: 1rem;
    }

    .yapuka-carousel .carousel-control-next {
        right: 1rem;
    }

    .yapuka-slideshow {
        height: 400px;
    }

    .yapuka-slideshow-inner {
        text-align: center;
        max-width: 100%;
    }

    .yapuka-slideshow-title {
        font-size: 1.75rem;
    }

    .yapuka-slideshow-intro {
        font-size: 1rem;
    }

    .yapuka-slideshow-prev,
    .yapuka-slideshow-next {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .yapuka-slideshow-controls {
        padding: 0 1rem;
    }
}

@media (max-width: 575px) {
    .yapuka-carousel .carousel-item {
        height: 300px;
    }

    .yapuka-carousel-title {
        font-size: 1.5rem;
    }

    .yapuka-slideshow {
        height: 350px;
    }

    .yapuka-slideshow-title {
        font-size: 1.5rem;
    }
}
