/* CSS Variables for Theme Configuration */
:root {
    --primary-green: #006C35;
    --primary-green-light: #0A8B4C;
    --primary-green-bg: #E8F5E9;
    --primary-gold: #C5A059;
    --primary-gold-dark: #A4813F;
    --primary-gold-light: #E0C185;
    --primary-gold-bg: #FDF9F2;
    --text-dark: #1E2922;
    --text-muted: #627267;
    --bg-body: #F6F9F7;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    --border-color-active: #C5A059;
    --success-green: #2E7D32;
    --success-green-bg: #E8F5E9;
    --danger-red: #C62828;
    --danger-red-bg: #FFEBEE;
    --warning-orange: #EF6C00;
    --warning-orange-bg: #FFF3E0;
    --info-blue: #1565C0;
    --info-blue-bg: #E3F2FD;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar Styling */
.top-bar {
    background-color: var(--primary-green);
    border-bottom: 2px solid var(--primary-gold);
    color: #FFFFFF;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-links a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 8px;
    transition: var(--transition);
}

.top-bar-links a:hover {
    color: var(--primary-gold-light);
}

/* Header Section */
.header {
    background-color: #FFFFFF;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Right Section: Logo & Titles */
.header-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.jawazat-emblem {
    width: 80px;
    height: 85px;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.header-titles h1 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 2px;
}

.header-titles h2 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Center Section: Portal Logo */
.header-portal-logo {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.muqeem-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Cairo', sans-serif;
    line-height: 1.1;
}

.muqeem-text-green {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-green);
    letter-spacing: 2px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.05);
}

.muqeem-text-gold {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-gold);
    letter-spacing: 4px;
    margin-top: -4px;
}

.portal-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 500;
}

/* Left Section: Vision 2030 (Refined Typography) */
.vision-logo {
    border-right: 2.5px solid var(--primary-gold);
    padding-right: 15px;
}

.vision-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vision-svg {
    width: 65px;
    height: 48px;
}

.vision-logo-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    justify-content: center;
}

.vision-word-arabic {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1.1;
}

.vision-word-english {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary-gold-dark);
    letter-spacing: 1.5px;
    line-height: 1.1;
}

.vision-word-number {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--primary-gold-dark);
    letter-spacing: 2.5px;
    line-height: 1;
}

/* Main Navigation Bar */
.main-nav {
    background-color: var(--primary-green-light);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: flex-start;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li a {
    display: block;
    padding: 16px 24px;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--primary-green);
    border-bottom-color: var(--primary-gold);
    color: #FFFFFF;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #00562a 0%, #006C35 100%);
    padding: 35px 0;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: inset 0 -5px 15px rgba(0,0,0,0.1);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 15% 50%, rgba(197, 160, 89, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-card h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-gold-light);
}

.hero-card p {
    max-width: 750px;
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.7;
}

/* SPA Sections Structure */
.spa-section {
    display: none;
}

.spa-section.active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

/* Tabs for Main Inquiry Categories */
.inquiry-category-tabs {
    display: flex;
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
}

.category-tab {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 15px 25px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.category-tab.active {
    border-top: 3px solid var(--primary-gold);
    color: var(--primary-green);
    font-weight: 800;
}

.category-tab svg {
    stroke: var(--primary-gold);
}

/* Inquiry Main Card */
.inquiry-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 12px 12px;
    padding: 35px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 35px;
    position: relative;
}

/* Sub-tabs inside inquiry card */
.inquiry-sub-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--bg-body);
    padding-bottom: 15px;
}

.sub-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 6px;
}

.sub-tab:hover {
    color: var(--primary-green);
    background-color: var(--bg-body);
}

.sub-tab.active {
    background-color: var(--primary-green-bg);
    color: var(--primary-green);
    font-weight: 700;
}

/* Form Sections */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.input-group label .required {
    color: var(--danger-red);
}

.input-group input, 
.input-group select {
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
    background-color: #FCFDFD;
}

.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23627267' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 45px;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary-green-light);
    box-shadow: 0 0 0 3px rgba(0, 108, 53, 0.1);
    background-color: #FFFFFF;
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Captcha Widget Styling */
.captcha-container {
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
    max-width: 450px;
}

.captcha-label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-image-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(45deg, #e0e0e0, #f5f5f5);
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: #2e3d32;
    min-width: 140px;
    border: 1px solid #ccc;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.captcha-image-box::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0,0,0,0.15);
    transform: rotate(-10deg);
}

.captcha-image-box::after {
    content: "";
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    height: 1.5px;
    background: rgba(0,0,0,0.1);
    transform: rotate(8deg);
}

.captcha-refresh {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}

.captcha-refresh:hover {
    color: var(--primary-green);
    transform: rotate(45deg);
}

#captcha-input {
    flex-grow: 1;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 3px;
    outline: none;
}

#captcha-input:focus {
    border-color: var(--primary-green-light);
}

/* Form Actions styling */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: #FFFFFF;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 108, 53, 0.2);
    transition: var(--transition);
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-green-light) 0%, var(--primary-green) 100%);
    box-shadow: 0 6px 15px rgba(0, 108, 53, 0.3);
    transform: translateY(-1px);
}

.btn-reset {
    background-color: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border-color);
    padding: 14px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    background-color: var(--bg-body);
    color: var(--text-dark);
    border-color: var(--text-muted);
}

/* Section Header for SPA Pages */
.section-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.section-header h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* SECTION 2: ELECTRONIC SERVICES PORTAL */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.service-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-green);
    transform: scaleY(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-gold-light);
}

.service-card:hover::after {
    transform: scaleY(1);
}

.service-icon-box {
    font-size: 1.8rem;
    margin-bottom: 18px;
    background-color: var(--primary-green-bg);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(0, 108, 53, 0.1);
}

.service-card h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.service-action-link {
    color: var(--primary-gold-dark);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    transition: var(--transition);
}

.service-card:hover .service-action-link {
    color: var(--primary-green);
    padding-right: 6px;
}

/* SECTION 3: SUPPORT TICKETS */
.support-container {
    max-width: 800px;
    margin: 0 auto;
}

.support-form-card,
.support-success-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.support-form-card textarea {
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
    background-color: #FCFDFD;
    resize: vertical;
    width: 100%;
}

.support-form-card textarea:focus {
    border-color: var(--primary-green-light);
    box-shadow: 0 0 0 3px rgba(0, 108, 53, 0.1);
    background-color: #FFFFFF;
}

.support-success-card {
    text-align: center;
}

.success-icon-box {
    width: 70px;
    height: 70px;
    background-color: var(--primary-green-bg);
    color: var(--primary-green);
    font-size: 2.2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 108, 53, 0.1);
}

.support-success-card h4 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.support-success-card p {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.support-success-card .success-details {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 15px auto;
}

/* SECTION 4: ABOUT PORTAL */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-bottom: 40px;
}

.about-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--shadow-md);
}

.about-card h4 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-gold-light);
    padding-bottom: 10px;
    display: inline-block;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.about-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-card ul li {
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Stats dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.stat-box {
    background: linear-gradient(135deg, var(--primary-green) 0%, #004d26 100%);
    color: #FFFFFF;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-gold);
}

.stat-number {
    font-family: 'Cairo', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-gold-light);
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

/* SUBSCRIBER LOGIN MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    border-top: 6px solid var(--primary-gold);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    background-color: var(--primary-green-bg);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-green);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.7rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--danger-red);
}

.modal-body {
    padding: 25px;
}

.modal-service-badge {
    background-color: var(--primary-gold-bg);
    border: 1px solid var(--primary-gold-light);
    color: var(--primary-gold-dark);
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.modal-footer-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.85rem;
}

.modal-footer-links a {
    color: var(--primary-green-light);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer-links a:hover {
    text-decoration: underline;
}

/* Loader Styles */
.loader-container {
    display: none;
    padding: 50px 0;
    text-align: center;
}

.loader-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background-color: #FFFFFF;
    padding: 30px 50px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--primary-green-bg);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-box h4 {
    font-size: 1.1rem;
    color: var(--primary-green);
    font-weight: 700;
}

.loader-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Results Section */
.results-container {
    display: none;
    margin-bottom: 40px;
    animation: slideUp 0.5s ease;
}

/* Success Result Card */
.result-card-success {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-top: 6px solid var(--primary-gold);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(to left, var(--primary-gold-bg), #FFFFFF);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.result-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-header-title svg {
    color: var(--primary-green);
}

.result-header-title h3 {
    font-size: 1.25rem;
    color: var(--primary-green);
    font-weight: 700;
}

.btn-print {
    background: none;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-print:hover {
    background-color: var(--primary-green);
    color: #FFFFFF;
}

.result-body {
    padding: 30px;
}

/* Result Data Grid */
.result-data-section {
    margin-bottom: 30px;
}

.section-title-badge {
    background-color: var(--primary-green-bg);
    color: var(--primary-green);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background-color: var(--bg-body);
    border-radius: 8px;
    border-right: 3px solid var(--border-color);
}

.detail-item.highlight-green {
    border-right-color: var(--success-green);
}

.detail-item.highlight-red {
    border-right-color: var(--danger-red);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Specific Badges & Statuses */
.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
}

.status-active {
    background-color: var(--success-green-bg);
    color: var(--success-green);
}

.status-absent {
    background-color: var(--danger-red-bg);
    color: var(--danger-red);
}

/* Facility Evaluation */
.evaluation-badge-box {
    display: inline-flex;
    align-items: center;
}

.evaluation-red-small {
    background-color: var(--danger-red);
    color: #FFFFFF;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(198, 40, 40, 0.3);
}

.evaluation-red-text {
    color: var(--danger-red);
    font-weight: 700;
}

/* Custom Government Ministries Status Layout */
.ministries-status-section {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 10px;
}

.ministries-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ministries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.ministry-card {
    background-color: #FFFFFF;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.ministry-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ministry-card.hr {
    border-right: 4px solid var(--warning-orange);
}

.ministry-card.moi {
    border-right: 4px solid var(--danger-red); /* Changed to red as status is Rejected */
}

.ministry-card.justice {
    border-right: 4px solid var(--primary-green-light); /* Changed to green/gold as status is Processed */
    grid-column: 1 / -1; /* Stretch Justice alert across full width */
}

.ministry-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ministry-logo-mock {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    flex-shrink: 0;
}

.ministry-logo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ministry-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.ministry-status-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
}

.status-badge-orange {
    background-color: var(--warning-orange-bg);
    color: var(--warning-orange);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 5px;
}

.status-badge-blue {
    background-color: var(--info-blue-bg);
    color: var(--info-blue);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 5px;
}

.status-badge-red {
    background-color: var(--danger-red-bg);
    color: var(--danger-red);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 5px;
}

.justice-alert-box {
    background-color: var(--danger-red-bg);
    border: 1px solid rgba(198, 40, 40, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 8px;
    color: var(--danger-red);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.6;
}

/* Error/Update Alert Card */
.result-card-error {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-top: 6px solid var(--danger-red);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.error-icon {
    width: 60px;
    height: 60px;
    background-color: var(--danger-red-bg);
    color: var(--danger-red);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.result-card-error h3 {
    font-size: 1.3rem;
    color: var(--danger-red);
    margin-bottom: 12px;
    font-weight: 700;
}

.result-card-error p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Footer Section */
.footer {
    background-color: #17241C;
    color: #A3B8AC;
    padding: 60px 0 0 0;
    margin-top: 60px;
    border-top: 3px solid var(--primary-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #283A2F;
}

.footer-col h4 {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 35px;
    height: 2px;
    background-color: var(--primary-gold);
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a {
    color: #A3B8AC;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    cursor: pointer;
}

.footer-col ul li a:hover {
    color: #FFFFFF;
    padding-right: 5px;
}

.brand-col p {
    margin-top: 15px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-bottom {
    background-color: #0E1611;
    padding: 20px 0;
    font-size: 0.85rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-sec-logos {
    display: flex;
    gap: 15px;
}

.nic-badge, .elm-badge {
    background-color: #21352A;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid #2D4839;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logo-section {
        flex-direction: column;
    }
    
    .vision-logo {
        border-right: none;
        padding-right: 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu li a {
        padding: 12px 15px;
        border-bottom: none;
        border-right: 4px solid transparent;
    }
    
    .nav-menu li a:hover,
    .nav-menu li a.active {
        border-right-color: var(--primary-gold);
        background-color: var(--primary-green);
    }
    
    .inquiry-card {
        padding: 20px;
    }
    
    .inquiry-sub-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Print Styling */
@media print {
    body {
        background-color: #FFFFFF;
        color: #000000;
    }
    
    .top-bar, .header, .main-nav, .hero-section, .inquiry-category-tabs, .inquiry-card, .footer, .spa-section, .modal-overlay {
        display: none !important;
    }
    
    .spa-section#section-inquiry {
        display: block !important;
    }
    
    .results-container {
        display: block !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .result-card-success {
        border: 1px solid #000000 !important;
        border-top: 6px solid #000000 !important;
        box-shadow: none !important;
    }
    
    .btn-print {
        display: none !important;
    }
    
    .detail-item {
        background-color: #F9F9F9 !important;
        border: 1px solid #E2E8F0 !important;
        page-break-inside: avoid;
    }
    
    .ministry-card {
        border: 1px solid #E2E8F0 !important;
        page-break-inside: avoid;
    }
}
