/*
 * MedLek Articles Section - Styles
 * Version: 1.0.0
 */

/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sekcja główna */
.articles-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.articles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(157, 138, 124, 0.3) 50%,
        transparent 100%
    );
}

/* Container */
.articles-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header sekcji */
.articles-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.articles-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #9d8a7c;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
    position: relative;
}

.articles-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #9d8a7c, transparent);
}

.articles-title {
    font-family: 'Poppins', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #24262B;
    margin-bottom: 16px;
    line-height: 1.2;
}

.articles-description {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #576574;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid artykułów */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* Karta artykułu */
.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9d8a7c, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(157, 138, 124, 0.15);
}

.article-card:hover::before {
    transform: scaleX(1);
}

/* Obrazek artykułu */
.article-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.article-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-image {
    transform: scale(1.08);
}

/* Kategoria badge */
.article-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #9d8a7c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Data artykułu */
.article-date {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(36, 38, 43, 0.85);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.article-date i {
    font-size: 13px;
}

/* Zawartość karty */
.article-content {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-title-text {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #24262B;
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .article-title-text {
    color: #9d8a7c;
}

.article-excerpt {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #576574;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Footer karty */
.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: #576574;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f8f9fa;
}

.article-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #8898aa;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-item i {
    font-size: 14px;
}

/* Przycisk "Czytaj więcej" */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #9d8a7c;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.read-more-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #9d8a7c;
    transition: width 0.3s ease;
}

.read-more-btn:hover::after {
    width: 100%;
}

.read-more-btn i {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.read-more-btn:hover i {
    transform: translateX(4px);
}

/* Przycisk "Zobacz wszystkie" */
.view-all-wrapper {
    text-align: center;
    margin-top: 30px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #9d8a7c 0%, #8a7869 100%);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(157, 138, 124, 0.3);
    position: relative;
    overflow: hidden;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(157, 138, 124, 0.4);
}

.view-all-btn:hover::before {
    left: 100%;
}

.view-all-btn i {
    transition: transform 0.3s ease;
    font-size: 16px;
}

.view-all-btn:hover i {
    transform: translateX(4px);
}

/* Responsywność - Tablet */
@media screen and (max-width: 1024px) {
    .articles-section {
        padding: 60px 20px;
    }

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

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Responsywność - Mobile */
@media screen and (max-width: 768px) {
    .articles-section {
        padding: 50px 16px;
    }

    .articles-header {
        margin-bottom: 40px;
    }

    .articles-subtitle {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .articles-title {
        font-size: 28px;
    }

    .articles-description {
        font-size: 14px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-content {
        padding: 20px 18px;
    }

    .article-title-text {
        font-size: 18px;
    }

    .article-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .view-all-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* Animacje ładowania */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.article-card:nth-child(1) {
    animation-delay: 0.1s;
}

.article-card:nth-child(2) {
    animation-delay: 0.2s;
}

.article-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Skeleton loader (opcjonalnie dla dynamicznego ładowania) */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Styl dla ikony Font Awesome (jeśli używasz) */
.fa, .fas, .far {
    font-family: 'Font Awesome 5 Free';
}
