/* Base Variables - Premium Indigo & Deep Slate */
:root {
    --sjh-bg: #f8fafc;
    --sjh-text: #0f172a;
    --sjh-text-muted: #475569;
    /* Increased contrast (was #64748b) */
    --sjh-primary: #3730a3;
    /* Darker Indigo (was #4338ca) */
    --sjh-primary-hover: #312e81;
    --sjh-secondary: #c2410c;
    /* Darker Orange for better text contrast (was #f97316) */
    --sjh-card-bg: #ffffff;
    --sjh-border: #cbd5e1;
    /* Darker border for structure */
    --sjh-danger: #b91c1c;
    --sjh-success: #15803d;
    --sjh-pulse-color: rgba(194, 65, 12, 0.4);
}

[data-theme="dark"] {
    --sjh-bg: #0f172a;
    --sjh-text: #f1f5f9;
    --sjh-text-muted: #94a3b8;
    --sjh-primary: #818cf8;
    --sjh-primary-hover: #a5b4fc;
    --sjh-secondary: #fb923c;
    --sjh-card-bg: #1e293b;
    --sjh-border: #334155;
    --sjh-pulse-color: rgba(251, 146, 60, 0.4);
}

/* Reset & Typgraphy */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--sjh-bg);
    color: var(--sjh-text);
    line-height: 1.5;
    font-size: 15px;
    /* Refined base size */
    transition: background-color 0.3s, color 0.3s;
}

@media (min-width: 1024px) {
    body {
        font-size: 16px;
    }

    /* Clean desktop size */
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    /* Compact mobile size */
}

* {
    box-sizing: border-box;
}

img,
iframe,
video,
table {
    max-width: 100%;
    height: auto;
}

/* Ensure media/tables don't overflow */
a {
    color: var(--sjh-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--sjh-primary-hover);
}

/* Layout */
.sjh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sjh-grid {
    display: grid;
    gap: 20px;
}

.sjh-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.sjh-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.sjh-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Header */
.sjh-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--sjh-card-bg);
    border-bottom: 1px solid var(--sjh-border);
    padding: 10px 0;
}

.sjh-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    margin: 0;
    line-height: 1.2;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--sjh-text-muted);
}

.site-branding a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--sjh-text);
}

.sjh-desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.sjh-desktop-nav a {
    font-weight: 500;
    color: var(--sjh-text);
}

.sjh-desktop-nav a:hover {
    color: var(--sjh-primary);
}

.sjh-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sjh-theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.sjh-mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.sjh-mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--sjh-text);
    margin: 4px 0;
}

/* Cards & UI */
.sjh-card {
    background: var(--sjh-card-bg);
    border: 1px solid var(--sjh-border);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sjh-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.sjh-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--sjh-primary);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
}

.sjh-btn:hover {
    background: var(--sjh-primary-hover);
    color: #fff;
}

.sjh-mb-4 {
    margin-bottom: 2rem;
}

.sjh-mt-4 {
    margin-top: 2rem;
}

/* Front Page Specifics */
.sjh-hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--sjh-primary) 0%, #312e81 100%);
    color: #fff;
    border-bottom: none;
}

.sjh-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sjh-hero p {
    color: #e0e7ff;
    font-size: 1.15rem;
}

.sjh-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 30px auto;
}

.sjh-search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--sjh-border);
    border-radius: 8px;
    background: var(--sjh-bg);
    color: var(--sjh-text);
    outline: none;
    transition: border-color 0.2s;
}

.sjh-search-input:focus {
    border-color: var(--sjh-primary);
}

.sjh-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--sjh-card-bg);
    border: 1px solid var(--sjh-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
}

.sjh-hero-quick-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sjh-hero-quick-links a {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.sjh-hero-quick-links a:hover {
    background: var(--sjh-secondary);
    color: #fff;
    border-color: var(--sjh-secondary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}

.sjh-list-card {
    padding: 0;
    overflow: hidden;
}

.sjh-list-header {
    padding: 15px 20px;
    background: var(--sjh-bg);
    border-bottom: 1px solid var(--sjh-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sjh-list-header h3 {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sjh-list-header h3 i {
    font-size: 1.25rem;
}

.sjh-icon-jobs {
    color: #f59e0b;
}

/* Amber/Gold */
.sjh-icon-admit {
    color: #3b82f6;
}

/* Blue */
.sjh-icon-results {
    color: #22c55e;
}

/* Green */
.sjh-icon-keys {
    color: #ef4444;
}

/* Red */
.sjh-icon-syllabus {
    color: #8b5cf6;
}

/* Purple */
.sjh-view-all {
    font-size: 0.85rem;
    font-weight: 600;
}

.sjh-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sjh-post-list li {
    border-bottom: 1px solid var(--sjh-border);
}

.sjh-post-list li:last-child {
    border-bottom: none;
}

.sjh-post-list a {
    display: block;
    padding: 10px 20px;
    color: var(--sjh-text);
    transition: background 0.2s;
}

.sjh-post-list a:hover {
    background: var(--sjh-bg);
    color: var(--sjh-primary);
}

.sjh-list-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.sjh-list-meta {
    font-size: 0.8rem;
    color: var(--sjh-text-muted);
    margin-left: 5px;
}

.sjh-new-badge {
    display: inline-block;
    background: var(--sjh-secondary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pulse Animation for urgent badges */
@keyframes sjhPulse {
    0% {
        box-shadow: 0 0 0 0 var(--sjh-pulse-color);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(0, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

.sjh-pulse {
    animation: sjhPulse 2s infinite;
}

/* Professional Social Brands - Original App Style */
.sjh-social-original {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    /* Circular for modern apps */
    color: #fff !important;
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sjh-social-original:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.sjh-brand-wa {
    background-color: #25D366 !important;
}

/* WhatsApp Original Green */
.sjh-brand-fb {
    background-color: #1877F2 !important;
}

/* Facebook Original Blue */
.sjh-brand-x {
    background-color: #000000 !important;
}

/* X/Twitter Black */
.sjh-brand-li {
    background-color: #0A66C2 !important;
}

/* LinkedIn Blue */
.sjh-brand-ig {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
}

/* Instagram Original Gradient */
.sjh-brand-tg {
    background-color: #0088CC !important;
}

/* Telegram Original Blue */
.sjh-brand-yt {
    background-color: #FF0000 !important;
}

/* YouTube Red */

/* Share Buttons - Professional Horizontal Layout */
.sjh-share-block {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.sjh-btn-share {
    padding: 8px 16px;
    border-radius: 6px;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.sjh-btn-share:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.sjh-btn-share i {
    font-size: 1.1rem;
}

.sjh-state-card {
    display: block;
    background: var(--sjh-card-bg);
    padding: 15px;
    border: 1px solid var(--sjh-border);
    border-radius: 8px;
    text-align: center;
    color: var(--sjh-text);
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.sjh-state-card::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--sjh-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.sjh-state-card:hover::before {
    transform: scaleX(1);
}

.sjh-state-card:hover {
    border-color: var(--sjh-border);
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: var(--sjh-primary);
}

.sjh-cta-section {
    background: var(--sjh-card-bg);
    padding: 40px 0;
    border-top: 1px solid var(--sjh-border);
    border-bottom: 1px solid var(--sjh-border);
}

.sjh-btn-telegram {
    background-color: #0088cc;
}

.sjh-btn-telegram:hover {
    background-color: #0077b3;
}

.sjh-btn-whatsapp {
    background-color: #25D366;
}

.sjh-btn-whatsapp:hover {
    background-color: #128C7E;
}

/* Inner Page Layout */
.sjh-inner-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.sjh-sidebar {
    width: 300px;
    position: sticky;
    top: 100px;
    flex-shrink: 0;
}

.sjh-content-area {
    flex-grow: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .sjh-inner-layout {
        flex-direction: column-reverse;
    }

    .sjh-sidebar {
        width: 100%;
        position: static;
    }
}

.sjh-widget-title {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--sjh-primary);
    padding-bottom: 8px;
    display: inline-block;
}

.sjh-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sjh-widget li {
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--sjh-border);
    padding-bottom: 5px;
}

.sjh-widget a {
    color: var(--sjh-text);
}

.sjh-widget a:hover {
    color: var(--sjh-primary);
    padding-left: 5px;
}

.sjh-single-title {
    font-size: 2rem;
    border-bottom: 1px solid var(--sjh-border);
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 20px;
}

.sjh-job-summary-table table,
.sjh-important-links table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

.sjh-job-summary-table th,
.sjh-job-summary-table td,
.sjh-important-links th,
.sjh-important-links td {
    padding: 10px;
    border: 1px solid var(--sjh-border);
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9rem;
}

.sjh-job-summary-table th,
.sjh-important-links th {
    background: var(--sjh-bg);
    width: 40%;
    font-weight: 600;
    color: var(--sjh-text-muted);
}

.sjh-important-links {
    border: 2px solid var(--sjh-primary);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.sjh-important-links h3 {
    margin-top: 0;
    color: var(--sjh-primary);
}

/* Ensure all buttons in content are responsive */
.sjh-entry-content .wp-block-button__link,
.sjh-entry-content a.sjh-btn {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.sjh-state-dropdown {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--sjh-border);
    background: var(--sjh-bg);
    color: var(--sjh-text);
}

/* Footer */
.sjh-footer-widgets {
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.sjh-footer-col h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--sjh-text);
}

.sjh-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sjh-footer-col ul li {
    margin-bottom: 12px;
}

.sjh-footer-col a {
    color: var(--sjh-text-muted);
    transition: color 0.2s;
}

.sjh-footer-col a:hover {
    color: var(--sjh-primary);
    padding-left: 5px;
}

.sjh-footer-col .sjh-footer-logo img {
    max-width: 200px;
    height: auto;
}

/* Utilities */
.text-center {
    text-align: center;
}

/* State Grid Container */
.sjh-grid-container {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

@media (max-width: 768px) {
    .sjh-desktop-nav {
        display: none;
    }

    .sjh-mobile-menu-toggle {
        display: block;
    }

    .sjh-grid-2 {
        grid-template-columns: 1fr;
    }

    .sjh-hero h1 {
        font-size: 1.8rem;
    }

    .sjh-single-title {
        font-size: 1.5rem;
    }

    .sjh-container {
        padding: 0 15px;
        overflow-x: hidden;
    }

    /* Fix horizontal scroll safety */
    .sjh-content-area {
        padding: 15px;
        width: 100%;
    }

    .sjh-job-summary-table table,
    .sjh-job-summary-table tr,
    .sjh-job-summary-table th,
    .sjh-job-summary-table td {
        display: block;
        width: 100% !important;
        border: none;
    }

    .sjh-job-summary-table tr {
        border-bottom: 1px solid var(--sjh-border);
        padding: 8px 0;
    }

    .sjh-job-summary-table th {
        background: transparent;
        padding: 0;
        color: var(--sjh-text-muted);
        font-size: 0.8rem;
        width: 100% !important;
    }

    .sjh-job-summary-table td {
        padding: 2px 0 0 0;
        font-weight: 500;
        font-size: 0.9rem;
        width: 100% !important;
    }
}