/* 
 * India Pincode Finder - Main Stylesheet
 * Mobile-first responsive design
 */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* Header Styles */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

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

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

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

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search Container */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

#searchInput {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    border-radius: 25px;
}

.search-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #059669;
}

/* Autocomplete Results */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

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

.autocomplete-item {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: var(--bg-light);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Search Results */
.search-results {
    background: white;
    border-radius: 10px;
    margin-top: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: none;
}

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

/* Introduction Section */
.intro-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.intro-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* States Section */
.states-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.state-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.state-card a {
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}

.state-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.state-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.state-link {
    color: var(--secondary-color);
    font-weight: 600;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background: var(--bg-white);
    text-align: center;
}

.how-it-works h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.pin-structure {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.pin-digit {
    flex: 1;
    min-width: 150px;
}

.digit {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.pin-digit p {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.pin-digit small {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.faq-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.7;
}

/* AdSense Containers */
.ad-container {
    text-align: center;
    margin: 2rem 0;
}

.adsense-placeholder {
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

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

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

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Pincode Details Page */
.page-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.sidebar-left {
    position: relative;
}

.sticky-ad {
    position: sticky;
    top: 100px;
}

.main-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.pincode-intro {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-light);
}

.details-section {
    margin: 2rem 0;
}

.details-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

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

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.details-table th,
.details-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.details-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.details-table tr:hover {
    background: var(--bg-light);
}

/* Quick Info Cards */
.quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.info-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.info-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Map Section */
.map-section {
    margin: 2rem 0;
}

.map-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Nearby Pincodes */
.nearby-section {
    margin: 2rem 0;
}

.nearby-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.nearby-card {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

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

.nearby-pincode {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.nearby-office {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.nearby-district {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Additional Information */
.additional-info {
    margin: 2rem 0;
}

.additional-info h2, .additional-info h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
}

.related-searches {
    list-style: none;
    padding-left: 0;
}

.related-searches li {
    margin-bottom: 0.5rem;
}

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

.related-searches a:hover {
    text-decoration: underline;
}

/* State Page */
.state-stats-banner {
    display: flex;
    justify-content: center;
    gap: 3rem;
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.seo-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    line-height: 1.8;
    color: var(--text-light);
}

.top-pincodes-section {
    margin: 3rem 0;
}

.top-pincodes-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

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

.pincode-link {
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.3s;
}

.pincode-link:hover {
    background: var(--bg-light);
}

.districts-section {
    margin: 3rem 0;
}

.districts-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.districts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.district-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

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

.district-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.district-card p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.view-link {
    color: var(--secondary-color);
    font-weight: 600;
}

/* District Page */
.district-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.stat-box {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    min-width: 200px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.pincodes-table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

.pincodes-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.pincodes-table th,
.pincodes-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.pincodes-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    position: sticky;
    top: 0;
}

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

.pincode-link-bold {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.pincode-link-bold:hover {
    text-decoration: underline;
}

.view-details-btn {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.view-details-btn:hover {
    background: #059669;
}

.related-links {
    margin: 3rem 0;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.related-links h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.related-links ul {
    list-style: none;
}

.related-links li {
    margin-bottom: 0.5rem;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 10px;
    }
    
    #searchInput, .search-btn {
        border-radius: 8px;
    }
    
    .main-nav {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left {
        display: none;
    }
    
    .state-stats-banner {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .district-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pin-structure {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .states-grid,
    .districts-grid {
        grid-template-columns: 1fr;
    }
}