/* BASE CSS*/

/* Main Wrapper */
.blog-wrapper {
    background-color: #ffffff;
    min-height: 100vh;
    padding-bottom: 2rem;
    margin-top: -4.75rem;
}

/* Categories Section */
.blog-categories-section {
    background-color: #ffffff;
    padding-top: calc(4.75rem + 1.5rem);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.categories-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 1rem 0 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 45px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    outline: none;
    opacity: 0;
    pointer-events: none;
}

.scroll-btn:hover {
    background: #ff6a28;
    color: #ffffff;
    border-color: #ff6a28;
    box-shadow: 0 6px 15px rgba(255, 106, 40, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.scroll-btn.left {
    left: 0;
}

.scroll-btn.right {
    right: 0;
}

/* Categories Container */
.blog-categories-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    margin: 0;
    padding: 15px 5px 10px 5px;
    margin-bottom: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    scrollbar-width: none;
}

.blog-categories-container::-webkit-scrollbar {
    display: none;
}

/* Section Title */
.oc-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--oc-title);
    margin-bottom: 30px;
}

.categories-header-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.categories-header-flex .oc-section-title {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.arrow-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6a28;
}

.divider-difused {
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, transparent 100%);
    margin-bottom: 25px;
    width: 100%;
}

/* Category Pill */
.category-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.10);
    background-color: #ffffff;
    color: #374151;
    scroll-snap-align: start;
    white-space: nowrap;
    width: fit-content;
}

.category-pill i {
    font-size: 0.75em;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-pill:hover {
    border-color: #ff6a28;
    color: #ff6a28;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255, 106, 40, 0.15);
}

.category-pill:hover i {
    opacity: 1;
    transform: translate(2px, -2px);
}

.category-pill.active {
    background-color: #ff6a28;
    border-color: #ff6a28;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(255, 106, 40, 0.18);
}

/* Slider Section */
.blog-slider-section {
    margin: 20px auto 40px auto;
}

.slider-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1a1a1a;
    aspect-ratio: 21 / 4;
}

.slider-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(90deg, rgba(9, 25, 46, 0.85) 0%, transparent 100%);
    display: flex;
    align-items: center;
    padding-left: 5%;
    z-index: 2;
}

.slider-text-main {
    color: #ffffff;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.slider-navigation-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background-color: #ffffff;
}

/* Description Section */
.blog-description-section {
    margin-bottom: 20px;
}

.description-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    margin-top: 0;
}

.description-text {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Articles Section */
.blog-articles-section {
    padding-bottom: 1.5rem;
    margin-bottom: 0;
}

.articles-slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 45px;
}

.articles-flex-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    scroll-snap-type: x mandatory;
    width: 100%;
}

.articles-flex-container::-webkit-scrollbar {
    height: 6px;
}

.articles-flex-container::-webkit-scrollbar-track {
    background: transparent;
}

.articles-flex-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* Article Card */
.article-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    flex: 0 0 min(300px, calc(25% - 1.5rem));
    min-width: 250px;
    scroll-snap-align: start;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.article-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 55%;
    overflow: hidden;
    background-color: #f1f5f9;
    display: block;
}

.article-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image,
.article-card:hover .article-fallback-icon {
    transform: scale(1.05);
}

.article-fallback-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}

.article-content {
    padding: 0 15px 15px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-date {
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0.5rem 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-read-more {
    color: #ff6a28;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: auto;
    transition: color 0.2s ease;
}

.article-read-more:hover {
    color: #e55c20;
}

.article-category-tag {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ff6a28;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.article-excerpt {
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0.4rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    margin-top: auto;
    padding-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.article-meta .article-read-more,
.article-meta .article-date {
    margin-top: 0;
}

/* Empty state */
.no-articles-found {
    padding: 2rem 0 0.5rem;
    color: #64748b;
}

/* DARK MODE */

body.theme-dark .blog-wrapper {
    background-color: var(--oc-page-bg, #0f172a);
}

body.theme-dark .blog-categories-section {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

body.theme-dark .scroll-btn {
    background-color: var(--card-surface, #1f2937);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--oc-title, #f3f4f6);
}

body.theme-dark .scroll-btn:hover {
    background-color: #ff6a28;
    color: #ffffff;
}

body.theme-dark .divider-difused {
    background: linear-gradient(90deg, #334155 0%, transparent 100%);
}

body.theme-dark .category-pill {
    background-color: var(--card-surface, #1f2937);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--oc-title, #f3f4f6);
}

body.theme-dark .category-pill.active {
    background-color: #ff6a28;
}

body.theme-dark .description-title {
    color: #e2e8f0;
}

body.theme-dark .description-text {
    color: #94a3b8;
}

body.theme-dark .article-card {
    background: var(--card-surface, #1e293b);
    border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .article-image-wrapper {
    background-color: #1a2332;
}

body.theme-dark .article-fallback-icon {
    color: #475569;
}

body.theme-dark .article-date {
    color: #64748b;
}

body.theme-dark .article-title {
    color: var(--oc-title, #f8fafc);
}

body.theme-dark .article-read-more {
    color: #ff6a28;
}

body.theme-dark .article-category-tag {
    color: #ff8c50;
}

body.theme-dark .article-excerpt {
    color: #94a3b8;
}

body.theme-dark .articles-flex-container {
    scrollbar-color: #334155 transparent;
}

body.theme-dark .articles-flex-container::-webkit-scrollbar-thumb {
    background-color: #334155;
}

/* RESPONSIVE */

@media (max-width: 1199.98px) {
    .blog-wrapper {
        margin-top: -6rem;
    }

    .blog-categories-section {
        padding-top: calc(6rem + 1rem);
    }
}

@media (max-width: 1024px) {
    .slider-container {
        aspect-ratio: 16 / 4;
    }
}

@media (max-width: 768px) {
    .categories-slider-wrapper {
        padding: 0 8px;
        margin: 1rem 0 0 0;
    }

    .articles-slider-wrapper {
        padding: 0 8px;
    }

    .scroll-btn {
        display: none !important;
    }

    .slider-container {
        aspect-ratio: 16 / 6;
    }

    .article-card {
        flex: 0 0 260px;
    }
}