/**
 * Carousels CSS
 * Styles for the custom carousel system
 *
 * Project: Sharing Digital Kommunity (SDK)
 * Developer: KreativeStudio
 */

/* Base section styles for carousel containers */
.category-carousel {
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
    padding: 0;
}


.section-title {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary, #ffffff);
    margin-bottom: 2rem;
}

.section-title-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.75rem;
    color: var(--color-primary, #7c3aed);
}

.simple-carousel {
    position: relative;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    padding: 28px 0 38px 0;
}

.carousel-container {
    position: relative;
    height: 470px;
    overflow-x: clip;
    overflow-y: visible;
    overflow-clip-margin: 24px;
}

.carousel-mask-left,
.carousel-mask-right {
    display: none;
}

.carousel-track {
    display: flex !important;
    align-items: center !important; /* Centralizar cards verticalmente */
    height: 100% !important; /* Ocupar toda altura do container */
    transition: transform 0.3s ease;
    gap: 16px !important; /* Mesmo gap do grid das categorias */
    flex-direction: row !important; /* Garantir direção horizontal */
}

.carousel-slide {
    flex: 0 0 280px !important;
    height: 400px !important;
    position: relative;
    z-index: 1;
    min-width: 280px !important;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(124, 58, 237, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 20; /* Acima das máscaras */
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev {
    left: 5px;
}

.carousel-next {
    right: 5px;
}

.carousel-btn:hover {
    background: rgba(124, 58, 237, 1);
}

/* Responsivo */
@media (max-width: 1280px) {
    .carousel-slide {
        flex: 0 0 260px;
    }
}

@media (max-width: 1024px) {
    .carousel-slide {
        flex: 0 0 240px;
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        flex: 0 0 220px;
    }

    .carousel-track {
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .category-carousel {
        width: calc(100vw - 76px);
        margin-left: -10px;
        margin-right: 0;
    }

    .simple-carousel,
    .carousel-container {
        width: 100%;
    }

    .carousel-container {
        overflow-x: visible;
        overflow-y: visible;
        overflow-clip-margin: 0;
    }

    .carousel-track {
        gap: 28px !important;
    }

    .carousel-slide {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        height: 400px !important;
    }

    .carousel-slide .course-card {
        width: calc(100% - 20px) !important;
        height: 100% !important;
        margin: 10px !important;
    }
}

/* Featured Categories Specific Styles */
.featured-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-dark-surface, #1e293b);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    height: 180px;
    width: 100%;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.featured-category-card:hover {
    background: var(--color-dark-surface2, #334155);
    border-color: var(--color-primary, #7c3aed);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15);
}

.featured-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary, #7c3aed), var(--color-primary-light, #8b5cf6));
    border-radius: 50%;
    margin-bottom: 16px;
    color: white;
    transition: all 0.3s ease;
}

.featured-category-card:hover .featured-category-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.featured-category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary, #ffffff);
    text-align: center;
    margin: 0;
    transition: color 0.3s ease;
}

.featured-category-card:hover .featured-category-name {
    color: var(--color-primary, #7c3aed);
}

/* Featured Categories Carousel Adjustments */
#featured-categories-carousel .carousel-container {
    height: 220px; /* Altura menor para categorias */
}

#featured-categories-carousel .carousel-slide {
    flex: 0 0 200px; /* Largura menor para categorias */
    height: 180px;
}

/* Light Mode Adjustments */
html[data-theme="light"] .featured-category-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .featured-category-card:hover {
    background: #f8fafc;
    border-color: var(--color-primary, #7c3aed);
}

html[data-theme="light"] .featured-category-name {
    color: var(--color-text-primary, #1e293b);
}

/* Responsive adjustments for featured categories */
@media (max-width: 1024px) {
    #featured-categories-carousel .carousel-slide {
        flex: 0 0 180px;
    }
}

@media (max-width: 768px) {
    #featured-categories-carousel .carousel-slide {
        flex: 0 0 160px;
    }

    .featured-category-card {
        padding: 24px 16px;
        height: 160px;
    }

    .featured-category-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .featured-category-name {
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    #featured-categories-carousel .carousel-slide {
        flex: 0 0 140px;
    }

    .featured-category-card {
        padding: 20px 12px;
        height: 140px;
    }

    .featured-category-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }

    .featured-category-name {
        font-size: 13px;
    }
}

/* View More Card Styles */
.view-more-card {
    background: var(--color-dark-surface, #1e293b);
    border: 2px dashed rgba(156, 163, 175, 0.3); /* Cinza discreto */
    border-radius: 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-more-card:hover {
    border-color: var(--color-primary, #7c3aed);
    background: rgba(124, 58, 237, 0.05);
    transform: translateY(-2px);
}

.view-more-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 32px 24px;
    height: 100%;
    width: 100%;
    text-align: center;
}

.view-more-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(156, 163, 175, 0.2); /* Cinza discreto no estado normal */
    border-radius: 50%;
    margin-bottom: 16px;
    color: rgba(156, 163, 175, 0.8); /* Ícone cinza discreto */
    transition: all 0.3s ease;
}

.view-more-card:hover .view-more-icon {
    background: linear-gradient(135deg, var(--color-primary, #7c3aed), var(--color-primary-light, #8b5cf6));
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.view-more-text {
    font-size: 18px;
    font-weight: 600;
    color: rgba(156, 163, 175, 0.9); /* Cinza discreto no estado normal */
    margin: 0 0 8px 0;
    transition: color 0.3s ease;
}

.view-more-subtitle {
    font-size: 14px;
    color: rgba(156, 163, 175, 0.7); /* Cinza mais discreto no estado normal */
    margin: 0;
    transition: color 0.3s ease;
}

.view-more-card:hover .view-more-text {
    color: var(--color-primary, #7c3aed);
}

.view-more-card:hover .view-more-subtitle {
    color: var(--color-text-primary, #ffffff);
}

/* Light Mode Adjustments for View More Card */
html[data-theme="light"] .view-more-card {
    background: #ffffff;
    border-color: rgba(107, 114, 128, 0.3); /* Cinza discreto para modo claro */
}

html[data-theme="light"] .view-more-card:hover {
    background: rgba(124, 58, 237, 0.02);
    border-color: var(--color-primary, #7c3aed);
}

html[data-theme="light"] .view-more-icon {
    background: rgba(107, 114, 128, 0.15); /* Cinza discreto para modo claro */
    color: rgba(107, 114, 128, 0.8);
}

html[data-theme="light"] .view-more-text {
    color: rgba(107, 114, 128, 0.9); /* Cinza discreto no estado normal */
}

html[data-theme="light"] .view-more-subtitle {
    color: rgba(107, 114, 128, 0.7); /* Cinza mais discreto no estado normal */
}

html[data-theme="light"] .view-more-card:hover .view-more-text {
    color: var(--color-primary, #7c3aed);
}

html[data-theme="light"] .view-more-card:hover .view-more-subtitle {
    color: var(--color-text-primary, #1e293b);
}

/* Responsive adjustments for view more card */
@media (max-width: 768px) {
    .view-more-content {
        padding: 24px 16px;
    }

    .view-more-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 12px;
    }

    .view-more-text {
        font-size: 16px;
    }

    .view-more-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .view-more-content {
        padding: 20px 12px;
    }

    .view-more-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 10px;
    }

    .view-more-text {
        font-size: 15px;
    }

    .view-more-subtitle {
        font-size: 12px;
    }
}
