/*
Theme Name: FreeJobAlert
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A government job alert portal theme with dual sidebars, responsive mobile layout, job listings, admit cards, results and education sections.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: freejobalert
Tags: two-columns, three-columns, right-sidebar, left-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #222;
    background: #f5f5f5;
}

a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =========================================================
   TOPBAR
   ========================================================= */
.fja-topbar {
    background: #b71c1c;
    color: #fff;
    font-size: 11px;
    padding: 4px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fja-topbar a { color: #ffcdd2; text-decoration: none; }
.fja-topbar a:hover { color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.fja-header {
    background: #c62828;
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.fja-site-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
}
.fja-site-title:hover { color: #ffcdd2; text-decoration: none; }

.fja-site-tagline {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.fja-header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.fja-header-btn {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.15s;
}
.fja-header-btn:hover { background: rgba(255,255,255,0.3); color: #fff; text-decoration: none; }

/* =========================================================
   PRIMARY NAVIGATION
   ========================================================= */
.fja-primary-nav {
    background: #b71c1c;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.fja-primary-nav ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0 8px;
}

.fja-primary-nav ul li a {
    display: block;
    color: #fff;
    font-size: 12px;
    padding: 8px 12px;
    text-decoration: none;
    opacity: 0.92;
    transition: background 0.15s;
}
.fja-primary-nav ul li a:hover,
.fja-primary-nav ul li.current-menu-item a {
    background: rgba(255,255,255,0.15);
    opacity: 1;
}

/* Dropdown */
.fja-primary-nav ul li { position: relative; }
.fja-primary-nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #8e0000;
    z-index: 999;
    min-width: 200px;
    flex-direction: column;
    flex-wrap: nowrap;
}
.fja-primary-nav ul li:hover > ul { display: flex; }
.fja-primary-nav ul li ul li a { font-size: 11.5px; padding: 7px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }

/* Hamburger toggle (mobile) */
.fja-nav-toggle {
    display: none;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 18px;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 3px;
    margin: 6px 12px;
}

/* =========================================================
   STATE NAV STRIP
   ========================================================= */
.fja-state-nav {
    background: #880e0e;
    display: flex;
    flex-wrap: wrap;
    padding: 2px 8px;
}
.fja-state-nav a {
    color: #ffcdd2;
    font-size: 11px;
    padding: 4px 7px;
    text-decoration: none;
    transition: color 0.1s;
}
.fja-state-nav a:hover { color: #fff; }

/* =========================================================
   BREAKING NEWS TICKER
   ========================================================= */
.fja-ticker {
    background: #fff8e1;
    border-bottom: 1px solid #ffe082;
    padding: 6px 14px;
    font-size: 12px;
    color: #e65100;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.fja-ticker-label {
    background: #e65100;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 2px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fja-ticker-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   QUICK LINKS BAR
   ========================================================= */
.fja-quicklinks {
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fja-quicklinks a {
    font-size: 11.5px;
    padding: 4px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}
.fja-quicklinks a:hover { opacity: 0.85; text-decoration: none; }
.fja-quicklinks a.red   { background: #c62828; color: #fff; }
.fja-quicklinks a.blue  { background: #1565c0; color: #fff; }
.fja-quicklinks a.green { background: #2e7d32; color: #fff; }
.fja-quicklinks a.dark  { background: #37474f; color: #fff; }
.fja-quicklinks a.amber { background: #e65100; color: #fff; }

/* =========================================================
   PAGE WRAPPER & THREE-COLUMN LAYOUT
   ========================================================= */
.fja-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.fja-wrapper {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 210px;
    gap: 14px;
    padding: 14px 0;
}

/* =========================================================
   SIDEBARS
   ========================================================= */
.fja-sidebar-left,
.fja-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =========================================================
   WIDGET / SIDEBAR BOX
   ========================================================= */
.fja-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.fja-widget-title {
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 10px;
    color: #fff;
    background: #c62828;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fja-widget-title.blue  { background: #1565c0; }
.fja-widget-title.green { background: #2e7d32; }
.fja-widget-title.dark  { background: #37474f; }
.fja-widget-title.amber { background: #e65100; }

.fja-widget-body { padding: 8px 10px; }

/* Widget link list */
.fja-widget-list li {
    padding: 5px 0;
    border-bottom: 1px dashed #e8e8e8;
    font-size: 12px;
    line-height: 1.4;
}
.fja-widget-list li:last-child { border-bottom: none; }
.fja-widget-list li a { color: #1565c0; }
.fja-widget-list li a:hover { text-decoration: underline; }

/* Widget button list */
.fja-btn-list { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.fja-btn-list a {
    display: block;
    text-align: center;
    padding: 7px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background: #1976d2;
    transition: opacity 0.15s;
}
.fja-btn-list a:hover { opacity: 0.88; text-decoration: none; }
.fja-btn-list a.red   { background: #c62828; }
.fja-btn-list a.green { background: #388e3c; }
.fja-btn-list a.dark  { background: #37474f; }
.fja-btn-list a.amber { background: #e65100; }

/* Education tag pills */
.fja-edu-tags { padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.fja-edu-tags a {
    font-size: 11px;
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
    padding: 3px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.15s;
}
.fja-edu-tags a:hover { background: #388e3c; color: #fff; border-color: #388e3c; }

/* State grid */
.fja-state-grid { padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.fja-state-grid a {
    font-size: 11px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 3px 8px;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
    transition: all 0.15s;
}
.fja-state-grid a:hover { background: #c62828; color: #fff; border-color: #c62828; }

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.fja-main { display: flex; flex-direction: column; gap: 16px; }

/* Section block */
.fja-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.fja-section-title {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
    color: #fff;
    background: #c62828;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fja-section-title.blue  { background: #1565c0; }
.fja-section-title.green { background: #2e7d32; }
.fja-section-title.dark  { background: #37474f; }
.fja-section-title .view-all {
    font-size: 10.5px;
    font-weight: 400;
    color: #ffcdd2;
    text-transform: none;
    letter-spacing: 0;
}
.fja-section-title .view-all:hover { color: #fff; text-decoration: underline; }

.fja-section-body { padding: 10px 12px; }

/* Post / job listing list */
.fja-post-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eeeeee;
    font-size: 12.5px;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.fja-post-list li:last-child { border-bottom: none; }
.fja-post-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c62828;
    margin-top: 5px;
    flex-shrink: 0;
}
.fja-post-list li a { color: #1565c0; }
.fja-post-list li a:hover { text-decoration: underline; }

/* Badges */
.fja-badge {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fja-badge.new   { background: #c62828; color: #fff; }
.fja-badge.out   { background: #388e3c; color: #fff; }
.fja-badge.today { background: #e65100; color: #fff; }
.fja-badge.soon  { background: #f57f17; color: #fff; }

/* Education 2-col grid */
.fja-edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: #e0e0e0;
}
.fja-edu-grid .fja-edu-cell {
    background: #fff;
    padding: 7px 8px;
    font-size: 11.5px;
    line-height: 1.4;
}
.fja-edu-grid .fja-edu-cell a { color: #1565c0; }
.fja-edu-grid .fja-edu-cell a:hover { text-decoration: underline; }
.fja-edu-grid .fja-edu-cell .new { color: #c62828; font-size: 9px; font-weight: 700; }

/* View all link */
.fja-view-all {
    display: inline-block;
    margin-top: 8px;
    font-size: 11.5px;
    color: #c62828;
    font-weight: 500;
}
.fja-view-all:hover { text-decoration: underline; }

/* =========================================================
   FOOTER
   ========================================================= */
.fja-footer-widgets {
    background: #212121;
    padding: 20px 0 10px;
}
.fja-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 1.4fr;
    gap: 20px;
}
.fja-footer-widget h3 {
    color: #e0e0e0;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fja-footer-widget ul li { margin-bottom: 5px; }
.fja-footer-widget ul li a { color: #9e9e9e; font-size: 11.5px; text-decoration: none; }
.fja-footer-widget ul li a:hover { color: #fff; }
.fja-footer-widget p { color: #757575; font-size: 11.5px; line-height: 1.7; }

.fja-footer-bottom {
    background: #111;
    padding: 10px 0;
    text-align: center;
    font-size: 11px;
    color: #616161;
    border-top: 1px solid #333;
}
.fja-footer-bottom a { color: #9e9e9e; }
.fja-footer-bottom a:hover { color: #fff; }

/* =========================================================
   WORDPRESS SPECIFIC
   ========================================================= */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: #757575; margin-top: 4px; text-align: center; }
.alignleft { float: left; margin: 0 16px 12px 0; }
.alignright { float: right; margin: 0 0 12px 16px; }
.aligncenter { display: block; margin: 12px auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Pagination */
.fja-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.fja-pagination a,
.fja-pagination span {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    color: #1565c0;
    text-decoration: none;
    background: #fff;
}
.fja-pagination span.current { background: #c62828; color: #fff; border-color: #c62828; }
.fja-pagination a:hover { background: #f5f5f5; }

/* Comments */
.fja-comments { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 16px; }
.fja-comments h2 { font-size: 14px; color: #222; margin-bottom: 12px; }
.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 7px 10px;
    font-size: 12.5px;
    margin-bottom: 8px;
    font-family: inherit;
}
.comment-form input[type="submit"] {
    background: #c62828;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 20px;
    width: auto;
}
.comment-form input[type="submit"]:hover { background: #b71c1c; }

/* =========================================================
   SINGLE POST / PAGE
   ========================================================= */
.fja-post-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px;
}
.fja-post-content h1 { font-size: 18px; color: #c62828; margin-bottom: 8px; }
.fja-post-content h2 { font-size: 15px; background: #ffebee; color: #c62828; padding: 5px 10px; margin: 14px 0 8px; border-left: 4px solid #c62828; }
.fja-post-content h3 { font-size: 13.5px; font-weight: 600; margin: 12px 0 6px; }
.fja-post-content p  { margin-bottom: 10px; font-size: 13px; line-height: 1.7; }
.fja-post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin: 10px 0;
}
.fja-post-content table th {
    background: #c62828;
    color: #fff;
    padding: 6px 10px;
    text-align: left;
    font-size: 12px;
}
.fja-post-content table td {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
}
.fja-post-content table tr:nth-child(even) td { background: #fff8f8; }

.fja-post-meta {
    font-size: 11.5px;
    color: #757575;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Important notice box */
.fja-notice {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-left: 4px solid #e65100;
    padding: 10px 12px;
    font-size: 12.5px;
    margin: 10px 0;
    color: #e65100;
    border-radius: 0 4px 4px 0;
}
.fja-notice.green { background: #e8f5e9; border-color: #a5d6a7; border-left-color: #2e7d32; color: #1b5e20; }
.fja-notice.blue  { background: #e3f2fd; border-color: #90caf9; border-left-color: #1565c0; color: #0d47a1; }
.fja-notice.red   { background: #ffebee; border-color: #ef9a9a; border-left-color: #c62828; color: #b71c1c; }

/* Apply button */
.fja-apply-btn {
    display: inline-block;
    background: #c62828;
    color: #fff;
    padding: 9px 22px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin: 6px 4px;
    transition: background 0.15s;
}
.fja-apply-btn:hover { background: #b71c1c; color: #fff; text-decoration: none; }
.fja-apply-btn.blue  { background: #1565c0; }
.fja-apply-btn.blue:hover { background: #0d47a1; }
.fja-apply-btn.green { background: #2e7d32; }
.fja-apply-btn.green:hover { background: #1b5e20; }

/* =========================================================
   SEARCH FORM
   ========================================================= */
.fja-search-form { display: flex; gap: 0; margin-bottom: 10px; }
.fja-search-form input[type="search"] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 3px 0 0 3px;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
}
.fja-search-form input[type="search"]:focus { border-color: #c62828; }
.fja-search-form button {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.fja-search-form button:hover { background: #b71c1c; }

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */
@media (max-width: 1024px) {
    .fja-wrapper { grid-template-columns: 190px minmax(0,1fr) 190px; gap: 10px; }
    .fja-footer-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 768px) {

    .fja-topbar { display: none; }

    .fja-header { padding: 8px 12px; }
    .fja-site-title { font-size: 18px; }
    .fja-header-right { display: none; }

    .fja-nav-toggle { display: block; }

    .fja-primary-nav ul {
        display: none;
        flex-direction: column;
        padding: 0;
    }
    .fja-primary-nav ul.open { display: flex; }
    .fja-primary-nav ul li ul {
        position: static;
        background: #6e0000;
        display: none;
    }
    .fja-primary-nav ul li.open > ul { display: flex; }

    .fja-quicklinks { gap: 4px; }
    .fja-quicklinks a { font-size: 11px; padding: 4px 8px; }

    /* Stack three columns into single column */
    .fja-wrapper {
        grid-template-columns: 1fr;
        padding: 10px 0;
        gap: 10px;
    }

    /* Reorder: main first, left sidebar, right sidebar */
    .fja-main          { order: 1; }
    .fja-sidebar-left  { order: 2; }
    .fja-sidebar-right { order: 3; }

    .fja-edu-grid { grid-template-columns: 1fr 1fr; }

    .fja-footer-grid { grid-template-columns: 1fr 1fr; }

    .fja-post-content h1 { font-size: 15px; }
    .fja-post-content table { font-size: 11.5px; }
    .fja-post-content table th,
    .fja-post-content table td { padding: 5px 7px; }
}

@media (max-width: 480px) {
    .fja-edu-grid { grid-template-columns: 1fr; }
    .fja-footer-grid { grid-template-columns: 1fr 1fr; }
    .fja-state-nav a { font-size: 10px; padding: 3px 5px; }
}
