/**
 * Slider Animations CSS
 * Animations for the homepage slider
 *
 * Project: Sharing Digital Kommunity (SDK)
 * Developer: KreativeStudio
 */

/* Homepage Slider Container */
.homepage-slider-container {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

.homepage-slider {
    width: 100%;
    height: 500px;
}

@media (max-width: 1024px) {
    .homepage-slider {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .homepage-slider {
        height: 350px;
    }
}

@media (max-width: 640px) {
    .homepage-slider {
        height: 300px;
    }
}

/* Slider Item */
.slider-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px; /* Rounded corners for the slider */
}

.slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-background-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-dark-surface2);
    border-radius: 16px; /* Rounded corners for placeholder */
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 16px; /* Rounded corners for overlay */
    /* Add a gradient overlay to ensure text readability */
    background-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.slider-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Left-align content */
    z-index: 1;
    padding: 0 60px; /* Add padding to the sides */
}

.slider-text {
    text-align: left; /* Left-align text */
    color: white;
    max-width: 800px;
}

.slider-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase; /* Uppercase small letters */
    letter-spacing: 1.5px;
    background-color: rgba(255, 255, 255, 0.2); /* Semi-transparent background */
    padding: 6px 12px;
    border-radius: 4px;
    margin: 0 0 16px;
}

.slider-title {
    font-size: 56px; /* Much larger title */
    font-weight: 800; /* Extra bold */
    margin: 0 0 20px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Text shadow for better readability */
}

.slider-description {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 30px;
    opacity: 0.9;
    max-width: 600px;
}

.slider-buttons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

/* Button Styles */
.slider-buttons .btn {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.slider-buttons .btn-primary {
    background-color: var(--color-primary);
    border: none;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.slider-buttons .btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(124, 58, 237, 0.4);
}

.slider-buttons .btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.slider-buttons .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .slider-content {
        padding: 0 40px;
    }

    .slider-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .slider-content {
        padding: 0 30px;
    }

    .slider-title {
        font-size: 36px;
    }

    .slider-subtitle {
        font-size: 12px;
        padding: 4px 10px;
    }

    .slider-description {
        font-size: 16px;
    }

    .slider-buttons .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .slider-content {
        padding: 0 20px;
    }

    .slider-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .slider-subtitle {
        font-size: 10px;
        margin-bottom: 10px;
    }

    .slider-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .slider-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .slider-buttons .btn {
        padding: 8px 16px;
        font-size: 12px;
        width: 100%;
        text-align: center;
    }
}

/* Navigation Buttons */
.slider-button-next,
.slider-button-prev {
    color: white;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.slider-button-next:hover,
.slider-button-prev:hover {
    opacity: 1;
}

.slider-button-next::after,
.slider-button-prev::after {
    font-size: 24px;
}

/* Pagination Dots */
.slider-pagination {
    bottom: 20px !important;
}

.slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: white;
    opacity: 0.5;
}

.slider-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background-color: var(--color-primary);
}

/* Animation Types */
.animation-fade .slider-subtitle,
.animation-fade .slider-title,
.animation-fade .slider-description,
.animation-fade .slider-buttons {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

.animation-fade .slider-subtitle {
    animation-delay: 0s;
}

.animation-fade .slider-title {
    animation-delay: 0.2s;
}

.animation-fade .slider-description {
    animation-delay: 0.4s;
}

.animation-fade .slider-buttons {
    animation-delay: 0.6s;
}

.animation-slide .slider-subtitle,
.animation-slide .slider-title,
.animation-slide .slider-description,
.animation-slide .slider-buttons {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideIn 1s ease-in-out forwards;
}

.animation-slide .slider-subtitle {
    animation-delay: 0s;
}

.animation-slide .slider-title {
    animation-delay: 0.2s;
}

.animation-slide .slider-description {
    animation-delay: 0.4s;
}

.animation-slide .slider-buttons {
    animation-delay: 0.6s;
}

.animation-zoom .slider-subtitle,
.animation-zoom .slider-title,
.animation-zoom .slider-description,
.animation-zoom .slider-buttons {
    opacity: 0;
    transform: scale(0.8);
    animation: zoomIn 1s ease-in-out forwards;
}

.animation-zoom .slider-subtitle {
    animation-delay: 0s;
}

.animation-zoom .slider-title {
    animation-delay: 0.2s;
}

.animation-zoom .slider-description {
    animation-delay: 0.4s;
}

.animation-zoom .slider-buttons {
    animation-delay: 0.6s;
}

.animation-flip .slider-subtitle,
.animation-flip .slider-title,
.animation-flip .slider-description,
.animation-flip .slider-buttons {
    opacity: 0;
    transform: rotateX(90deg);
    animation: flipIn 1s ease-in-out forwards;
}

.animation-flip .slider-subtitle {
    animation-delay: 0s;
}

.animation-flip .slider-title {
    animation-delay: 0.2s;
}

.animation-flip .slider-description {
    animation-delay: 0.4s;
}

.animation-flip .slider-buttons {
    animation-delay: 0.6s;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes flipIn {
    from { opacity: 0; transform: rotateX(90deg); }
    to { opacity: 1; transform: rotateX(0); }
}

/* Light Mode Adjustments */
html[data-theme="light"] .slider-background-placeholder {
    background-color: var(--color-light-surface2);
}
