/* Sarkari Rojgar Kendra - Modern Unified Stylesheet
    Focus: Side-by-Side Information + Readability + Mobile First
*/

:root {
    --primary: #FF9933;
    --primary-hover: #e68a00;
    --secondary: #1e3a8a;
    --accent: #19f804;
    --dark: #1a1a1a;
    --light-bg: #f8fafc;
    --border-card: #e2e8f0;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --card-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --radius: 12px;
    --primary-saffron: #FF9933;
    --secondary-blue: #1e3a8a;
}

/* Global Reset & Base */
body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
    padding-top: 80px; /* Offset for fixed header */
}

/* Main Container */
article, .container {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 0;
}

/* --- THE 55/45 SIDE-BY-SIDE LAYOUT --- */
.section-with-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr; /* This ensures equal 50/50 width */
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Explanation Side (55%) */
.explanation-column {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border-left: 6px solid var(--primary-saffron);
}

.explanation-column h2, 
.explanation-column h3,
.explanation-title {
    color: var(--secondary-blue);
    margin-top: 0;
}

.explanation-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.explanation-content p {
    margin-bottom: 1rem;
    color: #475569;
}

.explanation-highlight {
    background: #fff7ed;
    color: #c2410c;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 4px;
}

.explanation-tip {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px dashed #7dd3fc;
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* Information/Table Side (45%) */
.card-column {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Card Headers */
.card-header,
.dates-header, 
.fees-header, 
.age-header, 
.vacancy-header, 
.links-header, 
.process-header {
    background: var(--secondary);
    color: white;
    padding: 15px 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Card Items */
.date-item, 
.fee-item, 
.age-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #f1f5f9;
}

.date-label, 
.fee-label, 
.age-label {
    font-weight: 600;
    color: #64748b;
}

.date-value, 
.fee-value, 
.age-value {
    font-weight: 700;
    color: var(--dark);
}

.fee-value.free {
    color: #059669;
    background: #ecfdf5;
    padding: 2px 10px;
    border-radius: 20px;
}

/* Tables Styling */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8fafc;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

/* Tables Architecture */
.vacancy-table, 
.category-grid-compact {
    width: 100%;
    border-collapse: collapse;
}

.vacancy-table th {
    background: #f8fafc;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid var(--border-card);
}

.vacancy-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-card);
}

.category-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border-card);
}

.category-item {
    padding: 10px;
    border: 0.5px solid var(--border-card);
    text-align: center;
}

.category-item.header {
    background: var(--secondary);
    color: white;
    font-weight: bold;
}

/* ====== FAQ SECTION ====== */
.faq-section {
    margin: 50px 0;
}

.faq-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.faq-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 700;
}

.faq-content {
    padding: 30px;
}

.faq-intro {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.faq-intro h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.faq-intro div {
    color: #64748b;
    font-size: 1rem;
}

/* FAQ Accordion */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    background: white;
}

.faq-question {
    padding: 20px;
    background-color: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    font-weight: 700;
}

.faq-question:hover {
    background-color: #f1f5f9;
}

.question-text {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.05rem;
}

.question-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s ease;
}

.question-icon::before, 
.question-icon::after {
    content: '';
    position: absolute;
    background-color: #64748b;
    transition: all 0.3s ease;
}

.question-icon::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
}

.question-icon::after {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
}

.faq-item.active .question-icon::after {
    transform: translateX(-50%) rotate(90deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Increased from 300px to ensure long text isn't cut off */
    padding: 20px;
}

.answer-content {
    color: #475569;
    line-height: 1.7;
}

/* ====== POSTS SECTIONS ====== */
.posts-sections-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 50px 0;
}

.posts-section {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.posts-header, 
.related-posts-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
}

.posts-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.related-posts-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.posts-content {
    padding: 25px;
    min-height: 200px;
}

.no-posts {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px 20px;
}

/* ====== FLOATING NAVIGATION ====== */
.floating-nav {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999 !important; /* Higher z-index to stay on top of cards */
}

.nav-toggle-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.nav-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.nav-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 16px;
    width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none; /* Change from visibility:hidden to display:none */
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

/* Add !important to ensure it overrides the hidden state */
.nav-menu.active {
    display: block !important; 
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.nav-menu-items {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.nav-item {
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-3px);
}

/* ====== FOOTER STYLES ====== */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 60px 5% 30px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid #f59e0b;
}

/* Link items with button on right side */
.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.link-label {
    color: #475569;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

.link-button {
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    margin-left: 15px;
}

.link-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.link-item:last-child {
    border-bottom: none;
}

/* Different button colors for variety */
.link-item:nth-child(1) .link-button { background: #3b82f6; }
.link-item:nth-child(1) .link-button:hover { background: #2563eb; }

.link-item:nth-child(2) .link-button { background: #10b981; }
.link-item:nth-child(2) .link-button:hover { background: #059669; }

.link-item:nth-child(3) .link-button { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.link-item:nth-child(3) .link-button:hover { 
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.link-item:nth-child(4) .link-button { background: #8b5cf6; }
.link-item:nth-child(4) .link-button:hover { background: #7c3aed; }

/* --- Header & Navigation --- */
.navbar-gradient {
    background: linear-gradient(90deg, #000000, #2d2d2d);
    border-bottom: 3px solid var(--primary);
}

.nav-item-active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary);
}

/* --- Summary Banner --- */
.post-summary {
    background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
    border: 1px solid var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .section-with-explanation {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .posts-sections-container {
        grid-template-columns: 1fr;
    }
    
    /* Alternative layout for tablets */
    @media (min-width: 769px) and (max-width: 1024px) {
        .section-with-explanation {
            grid-template-columns: 400px 1fr; /* Fixed card, flexible explanation */
        }
    }
}

@media (max-width: 768px) {
    body { 
        padding-top: 70px; 
    }
    
    article, .container {
        width: 95%;
    }
    
    .explanation-column {
        padding: 20px;
        order: 2; /* Move explanation below card on mobile */
    }
    
    .card-column {
        order: 1;
    }
    
    .post-title {
        font-size: 1.5rem !important;
    }
    
    .category-grid-compact {
        font-size: 0.8rem;
        grid-template-columns: repeat(2, 1fr); /* Adjust for mobile */
    }
    
    /* Link items mobile */
    .link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px 0;
    }
    
    .link-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .link-button {
        margin-left: 0;
        align-self: flex-start;
    }
    
    /* Floating nav mobile */
    .floating-nav {
        bottom: 20px;
        right: 20px;
    }
    
    .nav-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .link-item {
        padding: 12px 0;
    }
    
    .link-button {
        width: 100%;
        text-align: center;
    }
    
    .category-grid-compact {
        grid-template-columns: 1fr; /* Stack on very small screens */
    }
    
    .nav-menu-items {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


    /* Enhanced CSS for the new sections - CORRECTED VERSION */
    .section-with-explanation {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .card-column {
        flex: 1;
        min-width: 300px;
    }

    .explanation-column {
        flex: 2;
        min-width: 300px;
        background: white;
        border-left: 6px solid var(--primary-saffron);
        border-radius: 12px;
        padding: 30px;
        box-shadow: var(--card-shadow);
    }

    .explanation-header {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid var(--secondary-blue);
    }

    .explanation-icon {
        font-size: 1.5rem;
        color: var(--secondary-blue);
        margin-right: 0.75rem;
    }

    .explanation-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--secondary);
    }

    .explanation-content {
        color: #475569;
        line-height: 1.7;
    }

    .explanation-content p {
        margin-bottom: 1rem;
    }

    .explanation-highlight {
        background: #fff7ed;
        color: #c2410c;
        font-weight: 700;
        padding: 0 4px;
        border-radius: 4px;
    }

    .explanation-tip {
        background: #f0f9ff;
        padding: 1rem;
        border-radius: 8px;
        border: 1px dashed #7dd3fc;
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    /* Additional Styling for Specific Cards */
    .vacancy-table tbody tr:nth-child(even) {
        background-color: #f8fafc;
    }

    .vacancy-table tbody tr:hover {
        background-color: #f1f5f9;
    }

    .post-name {
        font-weight: 600;
        color: #1e293b;
    }

    .post-count {
        font-weight: 700;
        color: #dc2626;
        font-size: 1.1rem;
    }

    .eligibility-criteria {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .section-with-explanation {
            flex-direction: column;
        }
        
        .card-column, .explanation-column {
            min-width: 100%;
        }
    }

    /* CRITICAL FIX: Ensure nav-menu displays properly */
    .nav-menu {
        position: absolute;
        bottom: 70px;
        right: 0;
        background: white;
        border-radius: 16px;
        width: 300px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        display: none !important; /* Use !important to override */
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 1001;
    }

    .nav-menu.active {
        display: block !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
