@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --trcodex-primary: #E31E24;
    --trcodex-dark: #121212;
    --trcodex-bg: #ffffff;
    --trcodex-gray-100: #f8f9fa;
    --trcodex-gray-200: #e9ecef;
    --trcodex-text-main: #2d3436;
    --trcodex-text-light: #636e72;
    --trcodex-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    box-sizing: border-box;
}

.trcodex-news-container {
    display: flex;
    gap: 24px;
    font-family: 'Outfit', sans-serif;
    height: 540px;
    margin-bottom: 40px;
    position: relative;
    color: var(--trcodex-text-main);
}

.trcodex-news-container.position-right {
    flex-direction: row-reverse;
}

/* Slider Section */
.trcodex-news-slider-wrapper {
    flex: 1.2;
    min-width: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.trcodex-news-main-slider {
    width: 100%;
    height: 100%;
}

.trcodex-slider-item {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.trcodex-slider-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.trcodex-slider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.95) 100%);
    pointer-events: none;
}

.trcodex-slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 40px 40px;
    color: #fff;
    z-index: 2;
}

.trcodex-news-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--trcodex-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.trcodex-slider-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.1;
    color: #ffffff;
    text-wrap: balance;
}

.trcodex-slider-meta {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.9;
}

/* List Section */
.trcodex-news-list-wrapper {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    background: var(--trcodex-gray-100);
    border: 1px solid var(--trcodex-gray-200);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.trcodex-news-list-header {
    padding: 24px;
    background: #fff;
    border-bottom: 1px solid var(--trcodex-gray-200);
}

.trcodex-news-list-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--trcodex-text-main);
}

.trcodex-news-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--trcodex-primary) transparent;
}

.trcodex-news-list-items::-webkit-scrollbar {
    width: 4px;
}

.trcodex-news-list-items::-webkit-scrollbar-thumb {
    background: var(--trcodex-primary);
    border-radius: 10px;
}

.trcodex-news-list-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--trcodex-transition);
    border: 1px solid transparent;
    border-left: 5px solid transparent;
    /* Prevent layout shift */
}

.trcodex-news-list-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-left-color: rgba(227, 30, 36, 0.2);
}

.trcodex-news-list-item.active {
    background: rgba(227, 30, 36, 0.04);
    border-color: var(--trcodex-primary);
    border-left: 5px solid var(--trcodex-primary);
    box-shadow: 0 12px 25px rgba(227, 30, 36, 0.08);
}

.trcodex-item-thumb {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.trcodex-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.trcodex-item-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--trcodex-text-main);
    line-height: 1.3;
}

.trcodex-item-excerpt {
    font-size: 0.8rem;
    color: var(--trcodex-text-light);
    margin: 0 0 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trcodex-item-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--trcodex-text-light);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Category Tabs */
.trcodex-category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 5px 5px 0;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.trcodex-category-tabs::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.trcodex-cat-tab {
    white-space: nowrap;
    padding: 8px 16px;
    background: var(--trcodex-gray-200);
    border: none;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--trcodex-text-light);
    cursor: pointer;
    transition: var(--trcodex-transition);
}

.trcodex-cat-tab:hover {
    background: #e0e0e0;
    color: var(--trcodex-text-main);
}

.trcodex-cat-tab.active {
    background: var(--trcodex-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.2);
}

/* Swiper Controls */
.swiper-button-next,
.swiper-button-prev {
    display: none !important;
    /* Hide as per request */
}

.swiper-pagination {
    bottom: 25px !important;
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.4;
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
    transition: var(--trcodex-transition);
}

.swiper-pagination-bullet-active {
    background: var(--trcodex-primary);
    opacity: 1;
    width: 28px;
    border-radius: 5px;
}

/* Responsive Overhaul */
@media (max-width: 1024px) {
    .trcodex-news-container {
        flex-direction: column !important;
        height: auto !important;
        gap: 25px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 40px !important;
        padding: 0 !important;
    }

    .trcodex-news-slider-wrapper {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
        min-height: 350px;
        flex: none !important;
        border-radius: 24px !important;
        margin: 0 !important;
    }

    .trcodex-news-list-wrapper {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        flex: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .trcodex-news-list-items {
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
    }

    .trcodex-news-list-item {
        margin-bottom: 16px !important;
        width: 100% !important;
        border: 1px solid var(--trcodex-gray-200) !important;
        border-left: 5px solid transparent !important;
        padding: 15px !important;
    }

    .trcodex-news-list-item.active {
        border-left: 5px solid var(--trcodex-primary) !important;
        background: #fff !important;
    }

    .trcodex-slider-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 767px) {
    .trcodex-news-slider-wrapper {
        aspect-ratio: 1 / 1.2;
        /* Dikey ekranlar için daha karemsi/dikey form */
        min-height: 450px;
    }

    .trcodex-slider-content {
        padding: 30px 20px 25px !important;
    }

    .trcodex-slider-title {
        font-size: 1.6rem !important;
    }

    .trcodex-item-thumb {
        width: 90px !important;
        height: 90px !important;
        min-width: 90px !important;
    }

    .trcodex-news-list-header {
        padding: 0 0 15px 0 !important;
    }

    .trcodex-category-tabs {
        gap: 8px !important;
        padding-bottom: 5px !important;
    }

    .trcodex-cat-tab {
        padding: 7px 14px !important;
        font-size: 0.75rem !important;
    }

    .trcodex-item-excerpt {
        display: none !important;
    }

    .trcodex-item-title {
        font-size: 0.95rem !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
    }
}