/* Grievance Redressal Landing Page Styles */
:root {
    --primary-color: #0B4BAE;
    --primary-dark: #182F54;
    --primary-light: #E8F1FD;
    --accent-blue: #2563eb;
    --bg-main: #F6F9FE;
    --bg-card: #ffffff;
    --border-color: #E5E7EB;
    --text-muted: #4b5563;
    --radius-sm: 10px;
    --radius-md: 16px;
    --shadow: 0 10px 30px rgba(11, 75, 174, 0.06);
    --transition-fast: all 0.25s ease;

    /* Card theme colors */
    --theme-blue: #0b4bae;
    --theme-green: #10b981;
    --theme-orange: #f59e0b;
    --theme-purple: #8b5cf6;
}

/* Page Reset & Defaults */
.grievance-body {
    background-color: var(--bg-main);
    font-family: 'Inter', sans-serif;
    color: var(--primary-dark);
}

.grievance-container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 0;
}

/* Breadcrumbs */
.breadcrumb-nav {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--text-muted);
}
.breadcrumb-nav a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}
.breadcrumb-nav a:hover {
    text-decoration: underline;
}
.breadcrumb-separator {
    margin: 0 8px;
    color: #9ca3af;
}

/* Hero Section */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
}
.hero-content {
    flex: 1;
    max-width: 650px;
}
.hero-content h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-family: 'Poppins', sans-serif;
}
.hero-content p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
}
.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-image {
    max-width: 100%;
    max-height: 280px;
    height: auto;
    object-fit: contain;
}

/* Action Cards Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}
.action-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px 24px;
    border: 1px solid rgba(11, 75, 174, 0.04);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    transition: var(--transition-fast);
    gap: 20px;
}
.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(11, 75, 174, 0.1);
}
.card-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-icon-wrapper i{
    margin-left: -5px;
}

.icon-blue { background-color: #f0f7ff; color: var(--theme-blue); }
.icon-green { background-color: #ecfdf5; color: var(--theme-green); }
.icon-orange { background-color: #fffbeb; color: var(--theme-orange); }
.icon-purple { background-color: #f5f3ff; color: var(--theme-purple); }

.action-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-dark);
}
.action-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Custom Buttons inside cards */
.card-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    width: 100%;
    transition: var(--transition-fast);
    cursor: pointer;
}
.btn-solid-blue {
    background-color: var(--primary-color);
    color: #ffffff;
    border: 1px solid var(--primary-color);
}
.btn-solid-blue:hover {
    background-color: #093c8c;
    border-color: #093c8c;
}
.btn-outline-green {
    background-color: transparent;
    color: var(--theme-green);
    border: 2px solid var(--theme-green);
}
.btn-outline-green:hover {
    background-color: var(--theme-green);
    color: #ffffff;
}
.btn-outline-orange {
    background-color: transparent;
    color: var(--theme-orange);
    border: 2px solid var(--theme-orange);
}
.btn-outline-orange:hover {
    background-color: var(--theme-orange);
    color: #ffffff;
}
.btn-outline-purple {
    background-color: transparent;
    color: var(--theme-purple);
    border: 2px solid var(--theme-purple);
}
.btn-outline-purple:hover {
    background-color: var(--theme-purple);
    color: #ffffff;
}

/* Grievance Process Flow */
.process-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(11, 75, 174, 0.04);
}
.process-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--primary-dark);
}
.process-flow {
    display: flex;
    justify-content: space-between;
    position: relative;
}
/* Horizontal dashed connector line on desktop */
.process-flow::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 5%;
    right: 5%;
    height: 2px;
    background-image: linear-gradient(to right, #ccc 50%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 10px 1px;
    background-repeat: repeat-x;
    z-index: 1;
}
.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}
.step-number {
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    border: 3px solid #0B4BAE;
    color: #0B4BAE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 10px rgba(11, 75, 174, 0.1);
}
.process-step:nth-child(2) .step-number { border-color: #3b82f6; color: #3b82f6; }
.process-step:nth-child(3) .step-number { border-color: #10b981; color: #10b981; }
.process-step:nth-child(4) .step-number { border-color: #f59e0b; color: #f59e0b; }
.process-step:nth-child(5) .step-number { border-color: #8b5cf6; color: #8b5cf6; }

.process-step h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
}
.process-step p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Track Section */
.track-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(11, 75, 174, 0.04);
    margin-bottom: 30px;
}
.track-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}
.track-info {
    flex: 1;
    min-width: 280px;
}
.track-info h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}
.track-info p {
    font-size: 14px;
    color: var(--text-muted);
}
.track-form {
    flex: 2;
    min-width: 320px;
    display: flex;
    gap: 15px;
}
.track-input-wrapper {
    position: relative;
    flex-grow: 1;
}
.track-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 15px;
    outline: none;
    transition: var(--transition-fast);
}
.track-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 75, 174, 0.1);
}
.track-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}
.track-btn:hover {
    background-color: #093c8c;
}

.track-btn i {
    margin: 0; 
    padding: 0;   
}

.track-btn .fa {
    width: 15px;
}



/* AJAX / Results Output styles */
.track-result-wrapper {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: none; /* Controlled via JS */
}
.result-card {
    background-color: #fcfdfe;
    border: 1px solid #e2edf9;
    border-radius: var(--radius-sm);
    padding: 25px;
}
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2edf9;
    padding-bottom: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.result-id {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-pending { background-color: #fffbeb; color: #d97706; }
.status-in-progress { background-color: #eff6ff; color: #2563eb; }
.status-resolved { background-color: #ecfdf5; color: #059669; }
.status-rejected { background-color: #fef2f2; color: #dc2626; }

.result-body-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.result-field h5 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.result-field p {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-dark);
}
.remarks-box {
    background-color: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 20px;
}
.remarks-box h5 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}
.remarks-box p {
    font-size: 14px;
    color: #475569;
}

/* Visual Tracking Timeline (4 steps) */
.tracking-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0;
    padding: 0 10px;
}
.tracking-timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 4px;
    background-color: #e2e8f0;
    z-index: 1;
}
.timeline-progress-bar {
    position: absolute;
    top: 15px;
    left: 10%;
    height: 4px;
    background-color: var(--theme-green);
    z-index: 1.5;
    transition: width 0.5s ease;
    width: 0%; /* Dynamic */
}
.timeline-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}
.timeline-node {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #cbd5e1;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.timeline-step.completed .timeline-node {
    background-color: var(--theme-green);
    border-color: var(--theme-green);
    color: #ffffff;
}
.timeline-step.active .timeline-node {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(11, 75, 174, 0.15);
}
.timeline-step.rejected .timeline-node {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}
.timeline-label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}
.timeline-step.completed .timeline-label,
.timeline-step.active .timeline-label {
    color: var(--primary-dark);
}
.timeline-step.rejected .timeline-label {
    color: #ef4444;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 47, 84, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-window {
    background: #ffffff;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    padding: 30px;
}
.modal-overlay.active .modal-window {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--primary-dark);
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--primary-dark);
}
.modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}
.modal-body p {
    margin-bottom: 15px;
}
.modal-body ul, .modal-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}
.modal-body li {
    margin-bottom: 8px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-image {
        max-height: 220px;
    }
    .process-flow {
        flex-direction: column;
        gap: 30px;
    }
    .process-flow::before {
        display: none;
    }
    .process-step {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 0;
    }
    .step-number {
        margin: 0 20px 0 0;
        flex-shrink: 0;
    }
    .process-step p {
        margin: 0;
    }
    .tracking-timeline {
        flex-direction: column;
        gap: 25px;
        align-items: flex-start;
        padding-left: 25px;
    }
    .tracking-timeline::before {
        left: 35px;
        top: 0;
        bottom: 0;
        width: 4px;
        height: auto;
    }
    .timeline-progress-bar {
        left: 35px;
        top: 0;
        width: 4px;
        height: 0%;
        transition: height 0.5s ease;
    }
    .timeline-step {
        display: flex;
        align-items: center;
        text-align: left;
    }
    .timeline-node {
        margin: 0 20px 0 0;
    }
}

@media (max-width: 600px) {
    .track-form {
        flex-direction: column;
        width: 100%;
    }
    .track-btn {
        width: 100%;
        justify-content: center;
    }
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}


.timeline-step.rejected .timeline-node {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.timeline-step.completed .timeline-node {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.timeline-step.active .timeline-node {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}