* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    overflow-x: hidden;
}

/* Official Government Theme */
:root {
    --gov-green: #1a5d3c;
    --gov-dark: #0e3a24;
    --gov-gold: #d4a017;
    --light-mint: #f0f5ed;
    --text-dark: #1e2a2a;
    --text-muted: #4a5b55;
}

/* Urdu text styling */
.urdu-text,
[data-lang="ur"] p,
[data-lang="ur"] h1,
[data-lang="ur"] h2,
[data-lang="ur"] h4,
[data-lang="ur"] .news-desc,
[data-lang="ur"] .service-card p,
[data-lang="ur"] .msg-quote {
    font-family: 'Noto Nastaliq Urdu', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.65;
    letter-spacing: 0.01em;
    word-spacing: normal;
}

/* Top Bar */
.top-bar {
    background: var(--gov-dark);
    color: #eef4e9;
    font-size: 0.85rem;
    padding: 8px 0;
}

/* News Ticker - Single Line Fix */
.news-ticker {
    background: #fef7e0;
    border-bottom: 1px solid #f0e2b6;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;          /* Prevent wrapping */
}

.ticker-container {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.ticker-label {
    background: var(--gov-green);
    color: white;
    padding: 4px 16px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;              /* Prevent label from shrinking */
    z-index: 1;
}

.ticker-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.ticker-track {
    display: inline-block;        /* Changed from inline-flex to inline-block for better single-line */
    white-space: nowrap;
    animation-duration: 40s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* LTR (English) - scroll left */
html[dir="ltr"] .ticker-track {
    animation-name: scrollLeft;
}

/* RTL (Urdu) - scroll right */
html[dir="rtl"] .ticker-track {
    animation-name: scrollRight;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

.ticker-scroll:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;        /* Ensure items sit side by side */
    margin-right: 48px;          /* Space between items */
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c4b35;
    white-space: nowrap;
}

html[dir="rtl"] .ticker-item {
    margin-right: 0;
    margin-left: 48px;           /* RTL spacing */
}

.ticker-item i {
    color: var(--gov-gold);
    margin-right: 6px;
    font-size: 0.5rem;
    vertical-align: middle;
}

.ticker-item .ticker-text {
    white-space: nowrap;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    padding: 0.7rem 0;
    direction: ltr;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--gov-green);
}

.nav-link {
    font-weight: 600;
    color: #2c3e2b !important;
    margin: 0 0.2rem;
    transition: 0.2s;
}

.nav-link:hover {
    color: var(--gov-green) !important;
}

/* Language Toggle Button */
.lang-switch {
    background: linear-gradient(135deg, #eef3ea 0%, #e2eade 100%);
    border: none;
    border-radius: 60px;
    padding: 6px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--gov-green);
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    white-space: nowrap;
}

.lang-switch:hover {
    background: var(--gov-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(26, 93, 60, 0.25);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), url('../images/ck-office.webp');
    background-size: cover;
    background-position: center center;
    padding: 160px 0;
    min-height: 85vh;
    color: white;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0;
        min-height: 70vh;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
}

.hero-section h1 {
    font-size: 3.2rem;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-section .lead {
    font-size: 1.2rem;
    max-width: 550px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.btn-gov {
    background: var(--gov-green);
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    transition: 0.2s;
}

.btn-gov:hover {
    background: var(--gov-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-outline-light {
    border: 2px solid white;
    background: transparent;
    border-radius: 40px;
    padding: 10px 28px;
    font-weight: 600;
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: var(--light-mint);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gov-dark);
    margin-bottom: 12px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--gov-gold);
    margin: 0 auto 40px auto;
    border-radius: 4px;
}

.service-card {
    background: white;
    border-radius: 28px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.25s;
    height: 100%;
    border: 1px solid #e2e8e2;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--gov-green);
}

.service-icon {
    font-size: 2.8rem;
    color: var(--gov-green);
    margin-bottom: 20px;
}

/* News Section */
.news-section {
    padding: 80px 0;
    background: white;
}

.news-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: 0.25s;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.1);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.news-card:hover .news-img img {
    transform: scale(1.04);
}

.news-date {
    font-size: 0.75rem;
    color: var(--gov-green);
    font-weight: 600;
    padding: 1rem 1rem 0 1rem;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
}

.news-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0 1rem 1.5rem 1rem;
}

/* Gallery Section */
.gallery-section {
    background: var(--light-mint);
    padding: 80px 0;
}

.gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: 0.3s;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent);
    width: 100%;
    padding: 12px;
    color: white;
    font-weight: 600;
}

/* Commissioner Banner */
.commissioner-banner {
    background: linear-gradient(135deg, #f8faf6 0%, #ffffff 100%);
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

.commissioner-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.08) 0%, rgba(212, 160, 23, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.commissioner-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    border-radius: 48px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
    padding: 40px 35px;
    border: 1px solid rgba(212, 160, 23, 0.2);
    transition: all 0.3s ease;
}

.commissioner-img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--gov-gold, #d4a017);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.commissioner-img:hover {
    transform: scale(1.02);
}

.commissioner-title h4 {
    font-size: 1.5rem;
    color: #1e4620;
}

.text-gold {
    color: #b8860b;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.message-wrapper {
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -15px;
    right: 0;
    font-size: 3rem;
    color: rgba(212, 160, 23, 0.2);
    z-index: 0;
}

.section-tagline {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gov-gold, #d4a017);
    margin-bottom: 18px;
    border-left: 4px solid var(--gov-gold);
    padding-left: 15px;
}

.message-content p {
    color: #2c3e2f;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.citizen-facilities {
    background: #fef9e6;
    padding: 18px 22px;
    border-radius: 24px;
    margin: 20px 0;
    border-left: 5px solid var(--gov-gold);
}

.facilities-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a5d3c;
    margin-bottom: 12px;
}

.facilities-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.facilities-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d4a2d;
}

.facilities-list li i {
    color: var(--gov-gold);
    font-size: 0.85rem;
    width: 20px;
}

.message-footer p {
    color: #2c3e2f;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.invitation {
    font-style: italic;
    background: linear-gradient(90deg, #eef5e9, transparent);
    padding: 12px 18px;
    border-radius: 20px;
    font-weight: 500;
}

.btn-team {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(95deg, #1a5d3c, #0e3a24);
    color: white;
    padding: 12px 28px;
    border-radius: 60px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 6px 14px rgba(26, 93, 60, 0.3);
    border: none;
    gap: 8px;
}

.btn-team:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(26, 93, 60, 0.4);
    color: white;
    background: linear-gradient(95deg, #0e3a24, #1a5d3c);
}

/* RTL Support */
html[dir="rtl"] .section-tagline {
    border-left: none;
    border-right: 4px solid var(--gov-gold);
    padding-left: 0;
    padding-right: 15px;
    text-align: right;
}

html[dir="rtl"] .facilities-list li {
    flex-direction: row-reverse;
}

html[dir="rtl"] .quote-icon {
    right: auto;
    left: 0;
}

/* Footer */
.footer {
    background: #0e2a1c;
    color: #ddebe2;
    padding: 55px 0 25px;
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 1.3rem;
    border-left: 3px solid var(--gov-gold);
    padding-left: 12px;
    color: #f9f2db;
}

.footer a {
    color: #c2dbc8;
    text-decoration: none;
}

.footer a:hover {
    color: var(--gov-gold);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #2e5a42;
    margin-top: 35px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.urdu-text {
    text-align: right;
    direction: rtl;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .hero-section {
        padding: 70px 0;
    }
    .ticker-label {
        font-size: 0.7rem;
        padding: 2px 10px;
    }
    .ticker-item {
        font-size: 0.8rem;
    }
    .lang-switch {
        padding: 4px 14px;
        font-size: 0.8rem;
    }
    .commissioner-card {
        padding: 25px 20px;
    }
    .commissioner-img {
        width: 130px;
        height: 130px;
    }
    .section-tagline {
        font-size: 0.95rem;
    }
}

/* ============================================
   CUSTOM PAGINATION - NO BOOTSTRAP
   ============================================ */

.custom-pagination {
    margin: 40px 0 20px;
    text-align: center;
}

.custom-pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.custom-pagination-item {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.custom-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #1a5d3c;
    background-color: #ffffff;
    border: 1px solid #e2e8e2;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

/* Hover Effect */
.custom-pagination-link:hover {
    background-color: #1a5d3c;
    border-color: #1a5d3c;
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Active Page */
.custom-pagination-item.active .custom-pagination-link {
    background-color: #1a5d3c;
    border-color: #1a5d3c;
    color: #ffffff;
    cursor: default;
    box-shadow: 0 2px 8px rgba(26, 93, 60, 0.3);
}

/* Disabled State */
.custom-pagination-item.disabled .custom-pagination-link {
    color: #adb5bd;
    background-color: #f8f9fa;
    border-color: #e2e8e2;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Previous & Next Buttons */
.custom-pagination-item:first-child .custom-pagination-link,
.custom-pagination-item:last-child .custom-pagination-link {
    padding: 0 18px;
    font-weight: 600;
}

/* RTL Support for Urdu */
html[dir="rtl"] .custom-pagination-list {
    direction: rtl;
}

/* Responsive - Mobile */
@media (max-width: 576px) {
    .custom-pagination-list {
        gap: 5px;
    }
    
    .custom-pagination-link {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }
    
    .custom-pagination-item:first-child .custom-pagination-link,
    .custom-pagination-item:last-child .custom-pagination-link {
        padding: 0 12px;
    }
}

/* Divider styling */
.divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gov-green), transparent);
}

.divider-icon {
    display: inline-block;
    background: white;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ==================== SERVICE & DEPARTMENT CARDS ==================== */
.services-grid,
.departments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.service-card-wrapper,
.department-card-wrapper {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--order) * 0.05s);
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.service-card,
.department-card {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    height: 100%;
    border: 1px solid #eef2f0;
}

.service-card:hover,
.department-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(26,93,60,0.12);
    border-color: var(--gov-green);
}

.service-icon a,
.department-icon a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gov-green), var(--gov-dark));
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.service-icon i,
.department-icon i {
    font-size: 2.5rem;
    color: white;
}

.service-card:hover .service-icon a,
.department-card:hover .department-icon a {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(26,93,60,0.3);
}

.service-title,
.department-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-title a,
.department-title a {
    color: var(--gov-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.service-title a:hover,
.department-title a:hover {
    color: var(--gov-green);
}

.service-description,
.department-description {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gov-green);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 30px;
    background: #f8faf6;
}

.btn-view:hover {
    background: var(--gov-green);
    color: white;
    gap: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid, .departments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}
@media (max-width: 768px) {
    .services-grid, .departments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .service-card, .department-card { padding: 20px 15px; }
    .service-icon a, .department-icon a { width: 60px; height: 60px; }
    .service-icon i, .department-icon i { font-size: 1.8rem; }
    .service-title, .department-title { font-size: 1rem; }
    .service-description, .department-description { font-size: 0.75rem; }
}
@media (max-width: 550px) {
    .services-grid, .departments-grid {
        grid-template-columns: 1fr;
    }
}