/* ========================================
   REAL-JOBS - Responsive & SEO-Friendly Blog
   AdSense Ready | Mobile First Design
======================================== */

/* CSS Variables for easy theming */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}
a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* ========================================
   NAVBAR - Responsive
======================================== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}
.nav-links {
    display: flex;
    gap: 20px;
}
.nav-links a {
    font-weight: 500;
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 6px;
}
.nav-links a:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* ========================================
   MAIN LAYOUT - Blog + Sidebar
======================================== */
.blog-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* ========================================
   JOB POST ARTICLE
======================================== */
.job-post {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Post Header */
.post-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 40px 30px;
    text-align: center;
}
.category-badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}
.post-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 12px;
    line-height: 1.3;
}
.post-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Sections */
.job-description, .job-details, .tips-section {
    padding: 30px;
    border-bottom: 1px solid var(--border);
}
.job-description h2, .job-details h2, .tips-section h2 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    color: var(--text);
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}
.job-description p { color: var(--text-light); margin-bottom: 12px; }

/* Details Table */
.details-table {
    width: 100%;
    border-collapse: collapse;
}
.details-table th, .details-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.details-table th {
    background: var(--bg);
    width: 40%;
    font-weight: 600;
    color: var(--text);
}
.details-table td { color: var(--text-light); }

/* Tips Sections */
.tips-section {
    background: var(--bg);
}
.tips-section h2 { border: none; padding-left: 0; }
.tips-section ul {
    list-style: disc;
    padding-left: 25px;
}
.tips-section li {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Disclaimer */
.disclaimer {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid var(--warning);
    color: #92400e;
    padding: 18px 24px;
    margin: 25px 30px;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Apply Button */
.apply-section {
    text-align: center;
    padding: 35px 30px;
}
.btn-apply {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 16px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}
.btn-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Expired Job Styles */
.expired-badge {
    background: #ef4444;
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-left: 10px;
}
.btn-disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   AD CONTAINERS
======================================== */
.ad-container {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-top { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
.ad-inline { margin: 25px 30px; }
.ad-sidebar { min-height: 250px; position: sticky; top: 90px; }

/* ========================================
   SIDEBAR
======================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    background: var(--text);
    color: #94a3b8;
    padding: 50px 20px 25px;
    margin-top: 50px;
}
.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.footer-col h4 {
    color: var(--white);
    margin-bottom: 18px;
    font-size: 1.15rem;
}
.footer-col p { font-size: 0.95rem; line-height: 1.6; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); padding-left: 5px; }
.footer-bottom {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 25px;
    margin-top: 40px;
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE - Mobile First
======================================== */

/* Tablet */
@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    .sidebar { display: none; } /* Hide sidebar ads on tablet */
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }

    .post-header { padding: 30px 20px; }
    .post-header h1 { font-size: 1.4rem; }
    .job-description, .job-details, .tips-section { padding: 20px; }
    .disclaimer { margin: 20px; padding: 15px; }
    .apply-section { padding: 25px 20px; }
    .btn-apply { padding: 14px 35px; font-size: 1rem; width: 100%; }

    .details-table th, .details-table td {
        display: table-cell; /* Force row layout */
        width: auto;
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    .details-table th {
        width: 35%; /* Fixed label width */
        background: var(--bg);
        color: var(--text);
        border-radius: 0;
    }
    .details-table td {
        border-bottom: 1px solid var(--border);
        margin-bottom: 0;
        border-radius: 0;
    }

    .footer-container { grid-template-columns: 1fr; text-align: center; }
}

/* Print Styles */
@media print {
    .navbar, .ad-container, .sidebar, .site-footer { display: none; }
    .job-post { box-shadow: none; }
}