/**
 * Modern Sections - Generalized Design System
 * Reusable classes for consistent styling across all sections
 */

/* =========================================
   Section Containers
   ========================================= */

.section-glass {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

[data-bs-theme="dark"] .section-glass {
    background: rgba(30, 30, 45, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.section-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 60px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .section-card {
    background: rgba(30, 30, 45, 0.65);
    border-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
   Section Headers
   ========================================= */

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--bs-gray-900);
    margin-bottom: 16px;
}

[data-bs-theme="dark"] .section-title {
    color: #fff;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--bs-gray-600);
    font-weight: 500;
}

[data-bs-theme="dark"] .section-subtitle {
    color: var(--bs-gray-300);
}

/* =========================================
   Search Components
   ========================================= */

.search-container {
    position: relative;
    max-width: 500px;
    margin: 30px auto 0;
}

.search-input {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 18px 25px 18px 55px;
    font-size: 1rem;
    color: var(--bs-gray-800);
    transition: all 0.3s ease;
}

.search-input:focus {
    background: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 10px 20px rgba(var(--bs-primary-rgb), 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--bs-gray-400);
    transition: color 0.3s ease;
}

.search-input:focus+.search-icon {
    color: var(--bs-primary);
}

/* Dark Mode - Search Components */
[data-bs-theme="dark"] .search-input {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-bs-theme="dark"] .search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .search-icon {
    color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .search-input:focus+.search-icon {
    color: var(--bs-primary);
}

/* =========================================
   Modern Cards (Universal)
   ========================================= */

.card-modern {
    background: #fff;
    border: 1px solid var(--bs-gray-200);
    border-radius: 24px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

[data-bs-theme="dark"] .card-modern {
    background: rgba(30, 30, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .card-modern:hover {
    background: rgba(40, 40, 65, 0.9);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card-modern:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bs-dark);
    margin-bottom: 12px;
}

[data-bs-theme="dark"] .card-title {
    color: #fff !important;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--bs-gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

[data-bs-theme="dark"] .card-desc {
    color: var(--bs-gray-300) !important;
}

.card-action {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bs-gray-100);
    color: var(--bs-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: auto;
}

.card-modern:hover .card-action {
    background: var(--bs-primary);
    color: #fff;
    transform: rotate(-45deg);
}

[data-bs-theme="dark"] .card-action {
    background: rgba(255, 255, 255, 0.12);
    color: var(--bs-gray-200);
}

/* =========================================
   Carousel Components
   ========================================= */

.carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.carousel-nav {
    display: flex;
    gap: 8px;
}

.carousel-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--bs-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--bs-gray-600);
}

.carousel-nav-btn:hover {
    background: var(--bs-gray-100);
    border-color: var(--bs-gray-400);
    color: var(--bs-gray-900);
}

[data-bs-theme="dark"] .carousel-nav-btn {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-gray-400);
}

[data-bs-theme="dark"] .carousel-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0 20px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.artikel-item {
    flex: 0 0 340px;
    scroll-snap-align: start;
}

/* Override card-modern padding when used as artikel-item */
.artikel-item.card-modern {
    padding: 0;
    height: auto;
    min-width: 340px;
    max-width: 340px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .artikel-item {
        flex: 0 0 280px;
    }

    .artikel-item.card-modern {
        min-width: 280px;
        max-width: 280px;
    }
}

/* =========================================
   Utility Classes
   ========================================= */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   Responsive Adjustments
   ========================================= */

@media (max-width: 768px) {
    .section-card {
        padding: 20px;
        border-radius: 20px;
    }

    .section-title {
        font-size: 2rem;
        padding-left: 10px;
        padding-right: 10px;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .carousel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .carousel-header>div:first-child {
        padding-left: 10px;
        padding-right: 10px;
    }
}