/* ========================================
   N-Expert.ai Resources Page Styles
   ======================================== */

/* ========================================
   Resources Intro
   ======================================== */

.resources-intro {
    padding: 3rem 0 2rem;
    text-align: center;
}

.resources-intro p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   Resource Categories Grid
   ======================================== */

.categories-section {
    padding: 4rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-cyan-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(29, 161, 242, 0.15);
    border-color: var(--border-hover);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.category-card:hover .category-icon {
    transform: rotateY(360deg) scale(1.1);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    font-family: var(--font-heading);
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.badge-coming-soon {
    display: inline-block;
    background: rgba(29, 161, 242, 0.12);
    color: var(--accent-cyan);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(29, 161, 242, 0.25);
}

.category-card .btn-outline {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
}

/* Last card spanning center on odd count */
.categories-grid .category-card:last-child:nth-child(3n+1) {
    grid-column: 2;
}

/* ========================================
   Featured Articles Section
   ======================================== */

.articles-section {
    padding: 5rem 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(29, 161, 242, 0.15);
    border-color: var(--border-hover);
}

.article-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.7);
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

.article-coming-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 18, 32, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.article-coming-overlay span {
    background: rgba(29, 161, 242, 0.9);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.article-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-cyan);
    color: white;
    padding: 0.3rem 0.9rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 1;
}

.article-body {
    padding: 1.5rem 1.75rem 2rem;
}

.article-body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.article-body p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.article-link {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.article-link:hover {
    color: var(--accent-cyan-light);
    gap: 0.75rem;
}

.article-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.article-link:hover i {
    transform: translateX(3px);
}

/* ========================================
   Newsletter CTA Banner
   ======================================== */

.newsletter-cta {
    position: relative;
    padding: 6rem 0;
    background-image: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=1200&q=60');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.newsletter-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.92), rgba(11, 18, 32, 0.88));
    z-index: 0;
}

.newsletter-cta .container {
    position: relative;
    z-index: 1;
}

.newsletter-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 800;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 520px;
    margin: 2rem auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: var(--text-dim);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.15);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .categories-grid .category-card:last-child:nth-child(3n+1) {
        grid-column: auto;
    }

    .categories-grid .category-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }

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

    .articles-grid .article-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 450px;
        margin: 0 auto;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .resources-intro {
        padding: 2rem 0 1rem;
    }

    .categories-section {
        padding: 3rem 0;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .categories-grid .category-card:last-child:nth-child(odd) {
        max-width: 100%;
    }

    .category-card {
        padding: 2rem 1.5rem;
    }

    .articles-section {
        padding: 3rem 0;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .articles-grid .article-card:last-child:nth-child(odd) {
        max-width: 100%;
    }

    .newsletter-cta {
        padding: 4rem 0;
        background-attachment: scroll;
    }

    .newsletter-cta h2 {
        font-size: 1.8rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .category-icon {
        width: 65px;
        height: 65px;
        font-size: 1.5rem;
    }

    .category-card h3 {
        font-size: 1.1rem;
    }

    .category-card p {
        font-size: 0.9rem;
    }

    .article-thumbnail {
        height: 170px;
    }

    .article-body {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .article-body h3 {
        font-size: 1.05rem;
    }

    .newsletter-cta {
        padding: 3rem 0;
    }

    .newsletter-cta h2 {
        font-size: 1.5rem;
    }
}
