/* ===== BASE STYLES ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-light: #666666;
    --bg-white: #ffffff;
    --bg-gray: #f8f8f8;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    font-size: 14px;
}

/* ===== LAYOUT & CONTAINERS ===== */
.page-wrapper {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    gap: 20px;
}

.main-container {
    flex: 1;
    width: 100%;
    padding: 20px 0;
    min-width: 0; /* Prevent flex item overflow */
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

/* ===== HEADER & NAVIGATION ===== */
.back-navigation-wrapper {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

/* Minimalist Back Button */
.back-navigation-wrapper {
    padding: 0 15px 20px;
    margin-bottom: 20px;
}

.back-btn-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    color: var(--primary-color, #0a7de3);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    min-height: 40px;
}

.back-btn-enhanced:hover {
    background: var(--primary-color, #007bff);
    color: white;
    border-color: var(--primary-color, #007bff);
}

.back-icon {
    transition: transform 0.2s ease;
}

.back-btn-enhanced:hover .back-icon {
    transform: translateX(-2px);
}

/* Mobile responsive for minimalist version */
@media (max-width: 575.98px) {
    .back-navigation-wrapper {
        padding: 0 10px 15px;
    }
    
    .back-btn-enhanced {
        padding: 8px 12px;
        min-height: 36px;
        width: 100%;
        justify-content: center;
    }
}

/* ===== JOB HEADER ===== */
.job-header {
    background: var(--bg-white);
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

.company-logo {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.job-title-section {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.job-title-section h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 12px 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.company-name-style {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    word-wrap: break-word;
}

.job-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    flex-shrink: 0;
}
/* ===== JOB STATS - FIXED ===== */
.job-stats-container {
    border-top: 1px solid #eee;
    padding-top: 20px;
    width: 100%;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    flex-shrink: 0;
}

.job-code-referal {
    background: var(--bg-gray);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #eee;
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.job-code-referal i {
    color: var(--primary-color);
}

.views, .likes {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.views i, .likes i {
    color: var(--primary-color);
}

.like-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    background: var(--bg-gray);
    color: var(--danger-color);
}

.like-btn.liked {
    color: var(--danger-color);
}

.like-btn.liked i {
    color: var(--danger-color);
}

/* Ensure all stat items are visible */
#jobCodeWrapper,
.stat-item.views,
.stat-item.likes {
    display: flex !important;
    visibility: visible !important;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    margin-bottom: 20px;
    width: 100%;
}

.content-wrapper {
    background: var(--bg-white);
    width: 100%;
}

.content-block {
    padding: 0;
    width: 100%;
}

.quick-actions {
    padding: 20px 0;
    width: 100%;
    text-align: center;
}
/* Compact Quick Actions Button */
.quick-actions {
    padding: 0 15px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px; /* More rounded for modern look */
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    min-height: 40px;
    width: auto;
    max-width: 250px;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

/* Mobile Responsive */
@media (max-width: 575.98px) {
    .action-btn {
        padding: 6px 14px;
        font-size: 12px;
        min-height: 36px;
        max-width: 100%;
        width: 100%;
        border-radius: 20px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .action-btn {
        padding: 7px 15px;
        font-size: 12.5px;
        max-width: 220px;
    }
}

@media (min-width: 768px) {
    .action-btn {
        padding: 8px 16px;
        font-size: 13px;
        max-width: 240px;
    }
}

.overview-section {
    padding: 24px 0;
    width: 100%;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.overview-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

/* ===== JOB DESCRIPTION CONTENT ===== */
.description-content {
    color: var(--text-secondary);
    line-height: 1.7;
    width: 100%;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.description-content p {
    margin-bottom: 16px;
    word-wrap: break-word;
}

.description-content ul, .description-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.description-content li {
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* ===== JOB DETAILS GRID ===== */
.job-details-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    word-wrap: break-word;
    text-align: center;
}

.detail-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== SKILLS ===== */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    justify-content: center;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--bg-gray);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== QUALIFICATIONS ===== */
.qualifications-content {
    color: var(--text-secondary);
    line-height: 1.7;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.qualifications-content ul {
    padding-left: 20px;
}

.qualifications-content li {
    margin-bottom: 10px;
    position: relative;
    word-wrap: break-word;
}

/* ===== COMMUNITY SECTION ===== */
.community-section {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    margin: 24px 0;
    width: 100%;
    padding: 24px;
    text-align: center;
}

.community-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

.community-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    max-width: 100%;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background: #128c7e;
}

.telegram-btn {
    background: #0088cc;
    color: white;
}

.telegram-btn:hover {
    background: #006699;
}

/* ===== ADS STYLES - FIXED ===== */
.ad-section-responsive {
    margin: 24px 0;
    text-align: center;
    width: 100%;
}

.ad-container, .ad-box-job {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    width: 100%;
    min-height: 250px; /* Increased minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ad-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
}

/* Sidebar Ads - FIXED */
.ad-left, .ad-right {
    width: 160px;
    min-width: 160px; /* Ensure minimum width */
    position: sticky;
    top: 100px;
    height: fit-content;
    flex-shrink: 0; /* Prevent shrinking */
}

.ad-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Ensure ads have proper dimensions */
.adsbygoogle {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px !important;
}

/* Fallback for ad blocks */
.ad-fallback {
    display: none;
    padding: 20px;
    background: #f0f0f0;
    border-radius: var(--border-radius);
    text-align: center;
    color: #666;
    font-size: 14px;
}

.ad-container:empty + .ad-fallback,
.ad-box-job:empty + .ad-fallback {
    display: block;
}

/* ===== LOADER ===== */
.page-loader-minimal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktops (1200px+) */
@media (min-width: 1200px) {
    .page-wrapper {
        gap: 24px;
    }
    
    .ad-left, .ad-right {
        width: 200px;
        min-width: 200px;
    }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
    .page-wrapper {
        padding: 0 12px;
        gap: 16px;
    }
    
    .company-logo {
        width: 90px;
        height: 90px;
    }
    
    .job-title-section h1 {
        font-size: 24px;
    }
    
    .job-meta {
        gap: 16px;
    }
    
    .ad-left, .ad-right {
        width: 140px;
        min-width: 140px;
    }
    
    .ad-container, .ad-box-job {
        min-height: 200px;
    }
}

/* Mobile Devices (576px - 767px) */
@media (max-width: 767px) {
    .main-container {
        padding: 16px 0;
    }
    
    .job-header {
        padding: 20px 0;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
    }
    
    .job-title-section h1 {
        font-size: 22px;
    }
    
    .company-name-style {
        font-size: 18px;
    }
    
    .job-meta {
        gap: 12px;
        flex-direction: column;
    }
    
    .stats-row {
        gap: 12px;
        flex-direction: column;
    }
    
    .overview-section {
        padding: 20px 0;
    }
    
    .quick-actions {
        padding: 16px 0;
    }
    
    .community-links {
        flex-direction: column;
    }
    
    .job-details-container {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    /* Show sidebar ads on mobile but make them horizontal */
    .ad-left, .ad-right {
        display: block !important;
        width: 100%;
        position: static;
        min-width: auto;
    }
    
    .page-wrapper {
        flex-direction: column;
    }
    
    .ad-column {
        flex-direction: row;
        gap: 16px;
        overflow-x: auto;
    }
    
    .ad-left .ad-column,
    .ad-right .ad-column {
        flex-direction: column;
    }
}

/* Small Mobile Devices (320px - 575px) */
@media (max-width: 575px) {
    .page-wrapper {
        padding: 0 12px;
        gap: 12px;
    }
    
    .main-container {
        padding: 12px 0;
    }
    
    .job-title-section h1 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .company-name-style {
        font-size: 16px;
    }
    
    .meta-item {
        font-size: 13px;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .job-details-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .description-content, .qualifications-content {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .skill-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .community-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ad-container, .ad-box-job {
        min-height: 150px;
        padding: 16px;
    }
}

/* Extra Small Mobile Devices (under 360px) */
@media (max-width: 359px) {
    .page-wrapper {
        padding: 0 10px;
    }
    
    .job-title-section h1 {
        font-size: 18px;
    }
    
    .company-name-style {
        font-size: 15px;
    }
    
    .company-logo {
        width: 70px;
        height: 70px;
    }
    
    .action-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

a {
  text-decoration: none;
  color: inherit;
}

/* Social Share Section - Mobile Responsive */
.social-share-section {
    border-left: 4px solid #007bff;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.social-share-section .card {
    border: none;
    border-radius: 12px;
}

/* Desktop Buttons */
.social-share-buttons {
    gap: 0.5rem;
}

.social-share-btn {
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-weight: 500;
}

/* Mobile Buttons */
.social-share-buttons-mobile .btn {
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.social-share-buttons-mobile .bi {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.social-share-buttons-mobile small {
    font-size: 0.7rem;
    line-height: 1.2;
}

/* Hover Effects */
.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.social-share-btn:active {
    transform: translateY(0);
}

/* Platform Specific Colors */
.btn-success.social-share-btn { 
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-color: #128C7E;
}

.btn-primary.social-share-btn { 
    background: linear-gradient(135deg, #0077B5, #0a66c2);
    border-color: #0a66c2;
}

.btn-info.social-share-btn { 
    background: linear-gradient(135deg, #0088cc, #229ED9);
    border-color: #229ED9;
}

.btn-success.social-share-btn:hover { 
    background: linear-gradient(135deg, #128C7E, #25D366);
    border-color: #25D366;
}

.btn-primary.social-share-btn:hover { 
    background: linear-gradient(135deg, #0a66c2, #0077B5);
    border-color: #0077B5;
}

.btn-info.social-share-btn:hover { 
    background: linear-gradient(135deg, #229ED9, #0088cc);
    border-color: #0088cc;
}

/* Mobile Specific Adjustments */
@media (max-width: 768px) {
    .social-share-section {
        margin-left: -15px;
        margin-right: -15px;
        border-left: none;
        border-top: 4px solid #007bff;
    }
    
    .social-share-section .card {
        border-radius: 0;
        margin: 0;
    }
    
    .social-share-buttons-mobile .col-4 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .social-share-buttons-mobile .btn {
        padding: 0.6rem 0.3rem;
        min-height: 65px;
    }
    
    .social-share-buttons-mobile .bi {
        font-size: 1.1rem;
    }
    
    .social-share-buttons-mobile small {
        font-size: 0.65rem;
    }
}

/* Animation for better UX */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.social-share-btn:focus {
    animation: pulse 0.6s ease-in-out;
}