/* ===================================
   India Pincode - CSS Stylesheet
   Compact, Simple, Boxed Design
   =================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

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

/* Search Bar */
.search-bar {
    background: var(--primary);
    padding: 0.75rem 0;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    outline: none;
}

.search-form button {
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #d97706;
}

/* Main Content */
.main {
    flex: 1;
    padding: 1.5rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.hero p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.card h1,
.card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card .subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.stat {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* List Grid */
.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.list-item {
    display: block;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.list-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

/* Office List */
.office-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.office-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.office-item:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.office-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.office-name {
    font-weight: 500;
}

.office-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.office-location {
    color: var(--text-light);
}

.office-pincode {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Pincode Display */
.pincode-display {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    color: #fff;
    margin-bottom: 1.5rem;
}

.pincode-display.centered {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.pincode-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.pincode-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

/* Details Table */
.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.details-table tr {
    border-bottom: 1px solid var(--border);
}

.details-table th,
.details-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
}

.details-table th {
    width: 35%;
    color: var(--text-light);
    font-weight: 500;
}

.details-table td a {
    color: var(--primary);
    text-decoration: none;
}

.details-table td a:hover {
    text-decoration: underline;
}

/* Info Section */
.info-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.info-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.info-section p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Error Display */
.error-display {
    text-align: center;
    padding: 3rem 1rem;
}

.error-code {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.error-display h1 {
    margin: 0.5rem 0;
}

.error-display p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Button */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--text);
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-col p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.5;
}

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

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-col ul a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .pincode-value {
        font-size: 2rem;
    }

    .details-table th {
        width: 40%;
    }

    .office-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .list-grid {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }
}

/* Accent Button */
.btn-accent {
    background: var(--accent);
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.btn-accent:hover {
    background: #d97706;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

/* Loader */
.loader {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.loader::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Location Result */
.location-result-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.location-result-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.location-result-header p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.nearby-office {
    display: block;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.nearby-office:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.nearby-office-name {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nearby-office-pincode {
    color: var(--primary);
    font-weight: 700;
}

.nearby-office-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.nearby-office-distance {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.error-message {
    text-align: center;
    padding: 1rem;
    color: var(--danger);
}

/* Content Section */
.content-section {
    line-height: 1.8;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 0.95rem;
}

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

.content-section a {
    color: var(--primary);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-section {
    margin-top: 1rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg);
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.2s;
}

.faq-question:hover {
    background: #e2e8f0;
}

.faq-question.active {
    background: #eff6ff;
    color: var(--primary);
}

.faq-icon {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
    transition: transform 0.2s;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
    color: var(--primary);
}

.faq-answer {
    display: none;
    padding: 0 1rem 1rem;
    background: var(--bg-card);
}

.faq-answer.show {
    display: block;
}

.faq-answer p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.blog-card-content {
    padding: 1.25rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--text);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
}

.blog-read-more:hover {
    text-decoration: underline;
}

/* Blog Post */
.blog-post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.blog-post-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-post-content {
    line-height: 1.8;
}

.blog-post-content h2 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

.blog-post-content h3 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
    color: var(--text);
}

.blog-post-content p {
    margin-bottom: 1rem;
    color: var(--text);
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

.blog-post-content a {
    color: var(--primary);
    text-decoration: none;
}

.blog-post-content a:hover {
    text-decoration: underline;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.blog-post-content table th,
.blog-post-content table td {
    padding: 0.5rem;
    border: 1px solid var(--border);
    text-align: left;
}

.blog-post-content table th {
    background: var(--bg);
    font-weight: 600;
}

/* Page Content */
.page-content h1 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.page-content h2 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem;
}

.page-content h3 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
}

/* Responsive Blog */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Badge Variants */
.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--accent);
}

.badge-danger {
    background: var(--danger);
}

/* FAQ Section - Static Version */
.faq-section .faq-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.faq-section .faq-item h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.faq-section .faq-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* List Group */
.list-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.list-group-item:hover {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

.list-group-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.list-group-item.active .badge {
    background: rgba(255, 255, 255, 0.3);
}

/* Related Links */
.related-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.related-link:hover {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

/* Utility Classes */
.text-muted {
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

/* Card content paragraphs */
.card>p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

.card>p strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .related-links {
        grid-template-columns: 1fr;
    }

    .faq-section .faq-item {
        padding: 0.875rem;
    }

    .faq-section .faq-item h3 {
        font-size: 0.95rem;
    }
}