/**
 * JobGear.co.uk Styles
 * Core Web Vitals Optimized
 * Scannable design for busy HR managers
 */

/* Main Content Layout */
.main-content {
    padding: 2rem 0 4rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar-area {
        order: 2;
    }
}

/* Category Hero */
.category-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.category-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
}

/* Featured Article */
.featured-article {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.featured-article .article-image {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.featured-article .article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article .article-content {
    padding: 2rem;
}

.featured-article h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.featured-article h2 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-article h2 a:hover {
    color: #3b82f6;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Card */
.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
    background: #f1f5f9;
}

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

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.article-category a {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.article-category a:hover {
    background: #bfdbfe;
}

.card-content h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.card-content h3 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.card-content h3 a:hover {
    color: #3b82f6;
}

.article-meta {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.article-meta span {
    margin: 0 0.25rem;
}

.article-meta span:first-child {
    margin-left: 0;
}

.card-content p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.read-more:hover {
    color: #2563eb;
}

.article-excerpt {
    color: #475569;
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Full Article Page */
.article-page {
    background: #f8fafc;
}

.article-full {
    background: #fff;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .article-full {
        padding: 1.5rem;
    }
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #0f172a;
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.75rem;
    }
}

.article-header .author {
    color: #1e293b;
    font-weight: 600;
}

.article-excerpt-box {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 4px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #1e40af;
}

.article-excerpt-box strong {
    color: #1e40af;
}

.article-featured-image {
    margin: 0 -3rem 2rem;
    border-radius: 0;
}

@media (max-width: 768px) {
    .article-featured-image {
        margin: 0 -1.5rem 2rem;
    }
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Body - Scannable Formatting for HR Managers */
.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1e293b;
}

.article-body h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: #0f172a;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #1e293b;
}

.article-body p {
    margin-bottom: 1.5rem;
}

/* Key Takeaway Boxes - High Visibility */
.article-body .key-takeaway {
    background: #fef3c7;
    border-left: 5px solid #f59e0b;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.article-body .key-takeaway h3 {
    color: #92400e;
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
}

.article-body .key-takeaway p {
    color: #78350f;
    margin-bottom: 0;
    font-weight: 500;
}

/* Lists - Easy Scanning */
.article-body ul,
.article-body ol {
    margin: 1.5rem 0 1.5rem 2rem;
    color: #334155;
}

.article-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.article-body li strong {
    color: #0f172a;
}

/* Bold Text - Strategic Emphasis */
.article-body strong {
    color: #0f172a;
    font-weight: 700;
}

/* Emphasized Text */
.article-body em {
    color: #3b82f6;
    font-style: italic;
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.article-cta {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.article-cta h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.article-cta p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.article-cta .btn-primary {
    background: #fff;
    color: #1e40af;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.article-cta .btn-primary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.cta-subtext {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-buttons span {
    font-weight: 600;
    color: #64748b;
}

.share-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.share-btn.twitter {
    background: #1da1f2;
    color: #fff;
}

.share-btn.twitter:hover {
    background: #1a8cd8;
}

.share-btn.linkedin {
    background: #0077b5;
    color: #fff;
}

.share-btn.linkedin:hover {
    background: #006399;
}

.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn.facebook:hover {
    background: #166fe5;
}

/* Related Articles */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.related-articles h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col p {
    line-height: 1.6;
    color: #94a3b8;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #60a5fa;
}

.footer-cta {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: background 0.2s;
}

.footer-cta:hover {
    background: #2563eb;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0.25rem 0;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-content h1 {
    font-size: 6rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.error-content p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.error-actions {
    margin: 2rem 0;
}

.error-suggestions {
    margin-top: 4rem;
    text-align: left;
}

.error-suggestions h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.no-articles {
    text-align: center;
    padding: 4rem 2rem;
}

.no-articles h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.no-articles p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Accessibility */
:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .sidebar,
    .footer,
    .share-buttons,
    .article-cta {
        display: none;
    }
    
    .article-full {
        box-shadow: none;
    }
}
