/* Base styles and variables */
:root {
    --primary-color: #006400;  /* Dark Green - Pakistan's national color */
    --secondary-color: #ffffff;
    --accent-color: #f5f5f5;
    --text-color: #333333;
    --light-text: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: #f9f9f9;
    line-height: 1.6;
    padding-bottom: 200px;
}

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

/* Header styles */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo-container {
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.litiga-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 5px;
}

.logo-tagline {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffc107; /* Gold color for visibility */
    margin: 5px 0;
    text-align: center;
}

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

header h1 {
    font-size: 1.6rem;
    margin: 0;
}

.language-selector {
    display: flex;
}

.language-selector button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector button.active {
    color: var(--light-text);
    font-weight: bold;
    border-bottom: 2px solid white;
}

/* Search styles */
.search-container {
    margin: 1.5rem auto;
}

.search-box {
    display: flex;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-shadow: var(--box-shadow);
}

#search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    cursor: pointer;
}

.search-results {
    max-width: 600px;
    margin: 10px auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

/* Categories Grid */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.category-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

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

.category-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Quick Help Section */
.quick-help {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.quick-help h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.help-card {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.help-card p {
    margin-bottom: 0.5rem;
}

/* Footer styles */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 90;
    overflow-y: auto;
    max-height: 40vh;
    border-top: 4px solid #ffc107;
}

footer p {
    margin: 0.3rem 0;
}

footer p.primary-message {
    font-size: 1.2em;
    color: #ffc107;
    font-weight: bold;
    padding: 5px;
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

footer a {
    color: #ffc107;
    text-decoration: underline;
    font-weight: bold;
}

.contact-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

footer .btn-primary {
    background-color: white;
    color: var(--primary-color);
    border: none;
}

footer .btn-primary:hover {
    background-color: #f0f0f0;
}

/* Install Banner */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.install-banner.show {
    transform: translateY(0);
}

.install-banner button {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
}

#close-banner-btn {
    background: none;
    color: white;
    padding: 5px;
}

.hidden {
    display: none;
}

/* Content Pages Styles */
.page-title {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--primary-color);
}

.back-button {
    display: inline-block;
    margin: 1rem 0;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.back-button i {
    margin-right: 5px;
}

.content-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.content-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.card-section {
    margin-bottom: 1.5rem;
}

.card-section:last-child {
    margin-bottom: 0;
}

.card-section h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-list {
    list-style-type: none;
    padding-left: 0;
}

.info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.violation-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.violation-severe {
    border-left-color: #dc3545;
}

.violation-moderate {
    border-left-color: #ffc107;
}

.violation-light {
    border-left-color: #28a745;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th, table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* Media Queries */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.3rem;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .content-card {
        padding: 1rem;
    }
}

/* RTL Support for Urdu */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .search-box input {
    padding: 12px 15px 12px 50px;
}

.rtl .search-box button {
    right: auto;
    left: 0;
    border-radius: 0;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.rtl .violation-item {
    border-left: none;
    border-right: 4px solid var(--primary-color);
    padding-left: 0;
    padding-right: 1rem;
}

.rtl .back-button i {
    margin-right: 0;
    margin-left: 5px;
}
