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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #004080;
    text-decoration: underline;
}

header a {
    color: white;
}

h1, h2, h3, h4 {
    margin-bottom: 20px;
    color: #333;
}

h1 {
    font-size: 2em;
    margin-top: 30px;
}

h2 {
    font-size: 1.5em;
    margin-top: 25px;
}

h3 {
    font-size: 1.2em;
    margin-top: 20px;
}

p {
    margin-bottom: 15px;
}

ul, ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

/* Header styles */
header {
    background-color: #0066cc;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-bottom: #004080 3px solid;
}

@media (max-width: 768px) {
    /* Adjust header padding on mobile */
    header {
        padding: 12px 0;
    }
}

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

/* Navbar brand container */
.navbar-brand-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-right: 20px;
}

/* Site title container */
.site-title-container {
    margin-left: 10px;
}

/* Site title with truncation */
.site-title {
    font-size: 1.4em;
    margin: 0;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 5px 0;
    font-weight: 600;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    padding: 5px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

.header-logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .header-logo {
    transform: scale(1.05);
}

/* Navigation */
.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ccdfff;
    text-decoration: underline;
}

.navbar-toggler {
    display: none; /* Hidden by default, shown on small screens */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Search box styles */
.search-box {
    background-color: #004080;
    padding: 20px 0;
}

#search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.search-options {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.search-toggle {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px 10px;
}

.search-prompt {
    color: white;
    margin-right: 10px;
    font-size: 14px;
}

.toggle-button {
    background-color: transparent;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.toggle-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.toggle-button.active {
    background-color: #ff9900;
    font-weight: bold;
}

.search-input-wrapper {
    display: flex;
    width: 70%;
}

.search-form {
    display: flex;
    margin-left: auto;
}

.search-input-container {
    position: relative;
    flex-grow: 1;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.search-form input[type="search"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    background-color: white;
}

.search-form button:hover {
    background-color: #e68a00;
    transform: translateY(-1px);
}

.search-form button:active {
    transform: translateY(1px);
}

/* Display classes for responsiveness */
.d-none {
    display: none;
}

.d-sm-none {
    display: inline-block;
}

.d-sm-inline {
    display: none;
}

@media (min-width: 576px) {
    .d-none.d-sm-inline {
        display: inline-block;
    }
    
    .d-sm-none {
        display: none;
    }
}

/* Search Results */
.search-results {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: 400px;
    overflow-y: auto;
    position: absolute;
    width: 70%;
    z-index: 1000;
}

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

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

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

.search-results .result-item .postal-code {
    font-weight: bold;
    color: #0066cc;
}

/* Hero Section (Homepage) */
.hero-section {
    background: linear-gradient(135deg, #004080 0%, #0066cc 100%);
    color: white;
    padding: 60px 0 40px; /* Reduced bottom padding */
    text-align: center;
    margin-bottom: 20px; /* Reduced bottom margin for mobile */
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%23ffffff" fill-opacity="0.03" width="50" height="50" x="0" y="0"/><rect fill="%23ffffff" fill-opacity="0.03" width="50" height="50" x="50" y="50"/></svg>');
    background-size: 100px 100px;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: white;
    border-bottom: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.search-form-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-box-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin-bottom: 15px;
}

.search-icon-hero {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.search-form-hero input[type="text"] {
    width: 100%;
    padding: 15px 15px 15px 45px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    -webkit-appearance: none; /* Fix for iOS styling */
    appearance: none;
}

.search-form-hero input[type="text"]:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Hero search results styling */
.hero-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    padding: 0;
    margin-top: 3px;
    border: 1px solid #e0e0e0;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

@media (min-width: 768px) {
    .search-box-container {
        display: flex;
        align-items: center;
    }
    
    .search-form-hero input[type="text"] {
        border-radius: 8px 0 0 8px;
        margin-bottom: 0;
    }
    
    .search-form-hero button {
        border-radius: 0 8px 8px 0;
        margin-top: 0;
    }
}

/* Main content styles */
main {
    min-height: 60vh;
}

#content {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 30px;
}

.intro {
    margin-bottom: 30px;
}

.section-title {
    border-bottom: 2px solid #0066cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Breadcrumbs */
.breadcrumb {
    list-style: none;
    padding: 10px 0;
    margin: 0 0 20px 0;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    display: inline-block;
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: #6c757d;
    content: "/";
}

.breadcrumb-item a {
    text-decoration: none;
    color: #0066cc;
}

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

.breadcrumb-item.active {
    color: #495057;
}

/* Dual Breadcrumbs (from MX site) */
.dual-breadcrumbs-container {
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.breadcrumbs {
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs-label {
    font-weight: bold;
    margin-right: 8px;
    color: #333;
    display: inline-flex;
    align-items: center;
}

.breadcrumbs .separator {
    margin: 0 5px;
    color: #888;
}

.breadcrumbs .current {
    color: #333;
    font-weight: 500;
}

/* Browse Sections */
.browse-options {
    margin-bottom: 40px;
}

.section-title {
    margin-bottom: 25px;
}

.section-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.section-title h2 i {
    color: #0066cc;
}

/* Improved card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-text {
    margin-bottom: 20px;
    color: #666;
}

/* Department buttons */
.browse-departments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: auto;
}

@media (max-width: 480px) {
    /* Optimize department buttons for very small screens */
    .browse-departments {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}

.department-button {
    text-align: center;
    padding: 8px 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

/* Digit buttons */
.digit-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 5px;
}

@media (max-width: 480px) {
    /* Better digit buttons layout for very small screens */
    .digit-buttons {
        gap: 8px;
    }
    
    .digit-button {
        width: 85px; /* Slightly smaller width */
        height: 46px; /* But larger height for better touch */
    }
}

.digit-button {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    width: 90px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.digit-button:hover {
    background-color: #0066cc;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.digit {
    font-size: 1.4rem;
    font-weight: 700;
}

.digit-mask {
    font-size: 0.8rem;
    color: #999;
    position: absolute;
    left: 35px;
    opacity: 0.6;
}

.digit-button:hover .digit-mask {
    color: rgba(255, 255, 255, 0.7);
}

/* Letter buttons */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 10px;
    justify-content: center;
}

.letter-button {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.letter-button:hover {
    background-color: #0066cc;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Contact email styling */
.contact-email {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.contact-email a {
    color: #0066cc;
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* Color variations */
.bg-primary {
    background-color: #0066cc !important;
}

.text-white {
    color: white !important;
}

/* Info card for sections */
.info-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Grid Layouts */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.grid-item {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.grid-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Postal code grid from MX site */
.postal-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.postal-group-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Nearby postal codes styling */
.nearby-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

/* Map legend styling */
.map-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .map-legend {
        gap: 10px;
        justify-content: center;
        margin-bottom: 20px;
        font-size: 0.9em;
    }
}

/* Info items in postal code page */
.info-item h4 {
    color: #0066cc;
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.info-item .list-group {
    box-shadow: none;
}

.info-item .list-group-item {
    padding: 8px 12px;
    border-left: 3px solid #0066cc;
    margin-bottom: 5px;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease;
}

.info-item .list-group-item:hover {
    background-color: #f0f7ff;
    transform: translateX(3px);
}

/* Areas card for neighborhoods and rural areas */
.areas-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.areas-list {
    box-shadow: none;
}

.areas-list .list-group-item {
    background-color: white;
    margin-bottom: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.areas-list .list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.areas-list .list-group-item i {
    margin-right: 8px;
}

/* Alert styling */
.alert {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-info {
    background-color: #e8f4fd;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert i {
    margin-right: 8px;
}

/* Locality link styling */
.locality-link {
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
    padding-left: 3px;
}

.locality-link:hover {
    color: #004080;
    text-decoration: none;
    transform: translateX(3px);
}

.postal-group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.postal-group-card h3 {
    margin-top: 0;
    color: #0066cc;
    font-size: 1.4em;
}

.state-card {
    display: block;
    text-align: left;
    color: #333;
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 10px 15px;
}

.state-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    background-color: #e6f2ff;
    text-decoration: none;
}

.state-card h3 {
    margin: 0;
    color: #0066cc;
    font-size: 1.1em;
}

/* Lists */
.list-columns {
    list-style: none;
    padding: 0;
    column-count: 2;
    column-gap: 20px;
}

.list-columns li a {
    text-decoration: none;
    color: #0066cc;
    display: block;
    padding: 5px 0;
    transition: color 0.2s ease-in-out;
}

.list-columns li a:hover {
    color: #004080;
}

.list-inline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.list-inline li {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Alphabet and Number Lists */
.alphabet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.letter {
    background-color: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-align: center;
    transition: background-color 0.3s;
}

.letter:hover {
    background-color: #e0e0e0;
}

.letter.active {
    background-color: #0066cc;
}

.letter.active a {
    color: white;
}

.number-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.number-item {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 10px 15px;
    text-align: center;
    min-width: 60px;
    transition: background-color 0.3s;
}

.number-item:hover {
    background-color: #e0e0e0;
}

/* Badges (for CP digits, letters) */
.badge {
    display: inline-block;
    padding: 0.5em 0.75em;
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    text-decoration: none;
    background-color: #6c757d;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0 3px 5px 0;
}

.badge:hover, .badge.active {
    background-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Postal Code Navigation Digits */
.pagination-digits {
    margin: 20px 0;
    text-align: center;
}

.pagination-digits.top-navigation {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Badge Variations */
.badge.bg-primary {
    background-color: #0066cc !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-primary:hover {
    background-color: #0056b3 !important;
}

.badge.bg-success:hover {
    background-color: #218838 !important;
}

.badge.bg-info:hover {
    background-color: #138496 !important;
}

.badge.bg-secondary:hover {
    background-color: #5a6268 !important;
}

/* Button-like badges */
.btn-outline-primary {
    color: #0066cc;
    border-color: #0066cc;
    background-color: transparent;
    font-weight: 500;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #0066cc;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
}

.submit-button, button.button, input[type="submit"].button {
    display: inline-block;
    background: #0066cc;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.submit-button:hover, button.button:hover, input[type="submit"].button:hover {
    background: #004080;
}

/* Info sections */
.info-section {
    margin-bottom: 60px;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-feature-card {
    display: flex;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background-color: #f5f8ff;
    color: #0066cc;
    font-size: 2.5rem;
    min-width: 110px;
}

.info-content {
    padding: 25px;
    flex: 1;
}

.info-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.info-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed #eee;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: #0066cc;
}

.code-format-example {
    display: flex;
    background-color: #f5f8ff;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid #e1e8ff;
}

.code-part {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-right: 1px dashed #c3d1ff;
}

.code-part:last-child {
    border-right: none;
}

.code-digits {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 5px;
}

.code-label {
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 768px) {
    .info-feature-card {
        flex-direction: column;
    }
    
    .info-icon {
        min-width: auto;
        padding: 20px;
    }
    
    .info-content {
        padding: 20px 15px; /* Less padding on smaller screens */
    }
    
    /* Code format example optimization for mobile */
    .code-format-example {
        flex-direction: column;
        align-items: center;
    }
    
    .code-part {
        width: 100%;
        padding: 10px;
        border-right: none;
        border-bottom: 1px dashed #c3d1ff;
    }
    
    .code-part:last-child {
        border-bottom: none;
    }
}

.info-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-column {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 20px;
}

/* Map styles */
.map-container {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Map loading state indicator */
.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.map-container.loading::before {
    opacity: 1;
}

#map {
    background-color: #e9ecef;
    border-radius: 8px;
    height: 450px;
    border: 1px solid #dee2e6;
    transition: box-shadow 0.3s ease;
}

#map:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile map optimizations */
@media (max-width: 768px) {
    #map {
        height: 350px; /* Reduced height on mobile */
    }
    
    .map-container {
        margin: 15px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    #map {
        height: 300px; /* Further reduced height on small screens */
        border-radius: 6px;
    }
    
    /* Optimize map controls for touchscreens */
    .gm-style-cc,
    .gm-style button,
    .gm-control-active {
        transform: scale(1.2); /* Make controls larger */
        margin: 2px !important; /* Add spacing between controls */
    }
    
    /* Better spacing for map attribution */
    .gm-style .gmnoprint {
        margin: 5px !important;
    }
    
    /* Optimize info windows for mobile */
    .gm-style .gm-style-iw {
        max-width: 90vw !important; /* Limit width on small screens */
        font-size: 14px !important; /* Legible text size */
    }
    
    .gm-style .gm-style-iw-c {
        padding: 12px !important; /* More touch-friendly padding */
    }
    
    .gm-style .gm-style-iw-d {
        max-height: 40vh !important; /* Limit height on mobile */
        overflow-y: auto !important; /* Ensure scrolling works */
    }
}

/* Enhanced postal code page */
.postal-code-summary {
    margin: 20px 0;
}

.summary-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Ultra-compact summary card for CP pages */
.summary-card-ultra-compact {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.cp-code {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066cc;
}

.cp-badges {
    display: flex;
    gap: 4px;
    align-items: center;
}

.badge-mini {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-rural {
    background-color: #17a2b8;
    color: white;
}

.badge-urban {
    background-color: #6c757d;
    color: white;
}

.summary-content {
    font-size: 0.85rem;
}

.info-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.info-label {
    color: #6c757d;
    margin-right: 8px;
    min-width: 16px;
}

.info-value {
    flex: 1;
    color: #495057;
    line-height: 1.3;
}

.info-value a {
    color: #495057;
    text-decoration: none;
    border-bottom: 1px dotted #dee2e6;
}

.info-value a:hover {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Mobile optimizations for ultra-compact card */
@media (max-width: 768px) {
    .summary-card-ultra-compact {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .summary-header {
        margin-bottom: 6px;
        padding-bottom: 6px;
    }
    
    .cp-code {
        font-size: 1rem;
    }
    
    .badge-mini {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .summary-content {
        font-size: 0.8rem;
    }
    
    .info-row {
        margin-bottom: 3px;
    }
    
    .info-label {
        margin-right: 6px;
        font-size: 0.75rem;
    }
}

/* Address template card styling */
.address-template-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.address-format {
    margin-bottom: 20px;
}

.address-line {
    display: flex;
    margin-bottom: 8px;
    align-items: baseline;
}

.address-label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
    margin-right: 10px;
}

.address-example {
    color: #333;
    flex: 1;
}

.address-postal .address-example {
    font-weight: bold;
}

.cp-highlight {
    background-color: #0066cc;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.address-copy-section {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.copy-address {
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-line;
    color: #495057;
    margin-bottom: 10px;
}

/* Mobile optimizations for address template */
@media (max-width: 768px) {
    .address-template-card {
        padding: 15px;
    }
    
    .address-line {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .address-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 4px;
        font-size: 0.9rem;
    }
    
    .address-example {
        font-size: 0.9rem;
    }
    
    .copy-address {
        font-size: 0.85rem;
        padding: 10px;
    }
}

/* Compact neighborhoods display */
.neighborhoods-compact {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.neighborhood-tag {
    display: inline;
    color: #495057;
    font-size: 0.9rem;
    text-decoration: none;
}

.neighborhood-tag:hover {
    color: #0066cc;
    text-decoration: underline;
}

.neighborhood-tag.rural {
    color: #28a745;
    font-weight: 500;
}

.neighborhood-tag.rural:hover {
    color: #1e7e34;
    text-decoration: underline;
}

.neighborhood-tag.no-link {
    color: #6c757d;
    font-style: italic;
    cursor: default;
}

.neighborhood-tag.no-link:hover {
    color: #6c757d;
    text-decoration: none;
}

/* Mobile optimizations for neighborhoods */
@media (max-width: 768px) {
    .neighborhoods-compact {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .neighborhood-tag {
        font-size: 0.85rem;
    }
}

/* Table styling for postal code pages */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.table {
    margin-bottom: 0;
    background-color: white;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #0066cc;
    padding: 12px 15px;
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 102, 204, 0.03);
}

.table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.08);
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Make sure the list groups inside tables don't create weird spacings */
.table .list-group-item {
    padding: 5px 0;
    border: none;
    background: transparent;
}

/* List styling for postal code pages */
.list-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.list-group-item {
    border-left: none;
    border-right: none;
    transition: background-color 0.3s;
}

.list-group-item:first-child {
    border-top: none;
}

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

/* Search tip box */
.search-tip {
    background-color: #f0f7ff;
    border-left: 4px solid #0066cc;
    margin: 15px 0;
    padding: 15px;
    border-radius: 4px;
}

.search-tip p {
    margin: 0;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

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

@media (max-width: 480px) {
    /* Optimize footer for very small screens */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    footer {
        padding: 30px 0 15px;
    }
    
    .footer-column h3 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .footer-column ul li {
        margin-bottom: 8px;
        font-size: 0.9em;
    }
    
    .copyright {
        font-size: 12px;
        padding-top: 15px;
    }
}

.footer-column h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ccc;
}

.footer-column a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
    color: #aaa;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: #0066cc;
    text-decoration: none;
}

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

.footer-links a {
    margin: 0 10px;
}

/* Back to top button */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #0066cc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 20px;
    z-index: 99;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0.8;
}

.back-to-top:hover {
    background-color: #004080;
    text-decoration: none;
    transform: translateY(-3px);
    opacity: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(1px);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

/* Department Page Styles */
.department-header {
    margin-bottom: 30px;
}

.department-description {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.municipalities-section, .localities-section, .postal-codes-section {
    margin-bottom: 40px;
}

/* Postal code list styles */
.postal-code-list .btn-outline-primary {
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 10px 15px;
    font-weight: 600;
}

.postal-code-list .btn-outline-primary .badge {
    font-size: 0.65em;
    padding: 4px 6px;
    margin-left: 5px;
    font-weight: 400;
}

.postal-code-list .btn-block {
    display: block;
    width: 100%;
}

/* Postal grid for department page */
.postal-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.postal-grid .badge {
    font-size: 1em;
    padding: 8px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.postal-grid .badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
}

.card-header {
    font-weight: 600;
    font-size: 1.1em;
    padding: 10px 15px;
}

/* Fix for title hover background */
.card-header.bg-secondary:hover, 
.card-header.bg-info:hover {
    color: white !important;
}

/* Add left margin to card header */
.card-header i {
    margin-right: 8px;
}

.section-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-body {
    padding: 20px;
}

.card-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0066cc;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #0055aa;
    text-decoration: none;
}

.btn-outline-primary {
    background-color: transparent;
    color: #0066cc;
    border: 1px solid #0066cc;
}

.btn-outline-primary:hover {
    background-color: #0066cc;
    color: white;
    text-decoration: none;
}

.list-group {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.list-group-item {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-bottom: none;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-group-item:last-child {
    border-bottom: 1px solid #ddd;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.see-more {
    text-align: center;
    margin: 15px 0;
}

.bg-success {
    background-color: #28a745 !important;
    color: white;
}

.bg-info {
    background-color: #17a2b8 !important;
    color: white;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

.text-white {
    color: white !important;
}

.text-white:hover {
    color: #f0f0f0 !important;
    text-decoration: underline;
}

/* Medium Mobile Screens */
@media (max-width: 480px) {
    html {
        font-size: 15px; /* Slightly reduce base font size for medium screens */
    }
    
    body {
        line-height: 1.5; /* Slightly tighter line height */
    }
    
    p {
        margin-bottom: 12px; /* Reduce paragraph spacing */
    }

    h1 {
        font-size: 1.9em;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 1.5em;
        margin-bottom: 12px;
        margin-top: 20px;
    }

    h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
        margin-top: 15px;
    }
    
    /* Improve card text legibility */
    .card-text {
        font-size: 0.95em;
    }
    
    /* Improved button text */
    .btn, .badge {
        font-size: 0.9em;
    }
}

/* Very Small Mobile Screens */
@media (max-width: 380px) {
    html {
        font-size: 14px; /* Further reduce base font size for very small screens */
    }
    
    /* Make site title smaller on very small screens */
    .site-title {
        font-size: 1.1em;
    }
    
    /* Reduce logo size further for very small screens */
    .header-logo {
        height: 32px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    h3 {
        font-size: 1.1em;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    /* Optimize text in cards and info sections */
    .card-text, 
    .info-content p,
    .info-card p {
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    /* Improve postal code format display */
    .code-digits {
        font-size: 1.3rem; /* Slightly smaller but still prominent */
    }
    
    .code-label {
        font-size: 0.75rem; /* Smaller label text */
    }
    
    /* Improve font rendering for better legibility at small sizes */
    body {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Responsive Design */
/* Improve table typography for mobile */
@media (max-width: 480px) {
    /* Make tables more readable on mobile */
    .table thead th {
        font-size: 0.9em;
        padding: 8px 10px;
    }
    
    .table td {
        font-size: 0.9em;
        padding: 8px 10px;
    }
    
    /* Improve list readability */
    .list-group-item {
        font-size: 0.9em;
        padding: 8px 12px;
    }
    
    /* Breadcrumbs optimization */
    .breadcrumbs {
        font-size: 0.85em;
    }
    
    /* Department button text size */
    .department-button {
        font-size: 0.85em;
    }
}

@media (max-width: 768px) {
    /* Hide the welcome section on mobile */
    .intro {
        display: none;
    }
    
    /* Hide verbose descriptions on mobile for department pages */
    .department-header .department-description {
        display: none;
    }
    
    /* Hide verbose descriptions on mobile for municipality pages */
    .municipality-description, 
    h1 + p.mt-3 {
        display: none;
    }
    
    /* Hide verbose descriptions on mobile for postal code pages */
    h1 + p.mt-3,
    section h2 + p:first-of-type {
        display: none;
    }
    
    /* Target map sections directly */
    section:nth-child(n+2) h2 + p {
        display: none;
    }
    
    /* Special case for map container paragraphs */
    .map-container {
        margin-top: 0; /* Remove top margin to avoid gap */
    }
    
    /* Adjust logo size for mobile header */
    .header-logo {
        height: 36px; /* Slightly smaller logo */
    }
    
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: center;
    }
    
    .navbar-brand-container {
        flex: 1;
        margin-bottom: 0;
        flex-direction: row; /* Keep items in a row */
        align-items: center; /* Center vertically */
    }
    
    .navbar-brand {
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    
    .site-title-container {
        margin-left: 8px; /* Add a small margin between logo and title */
        width: auto; /* Allow the container to size to content */
    }
    
    .site-title {
        font-size: 1.2em;
        /* Truncate long titles but keep "Códigos Postales de Colombia" visible */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 300px; /* Increased width to fit main title */
    }
    
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-toggler {
        display: none; /* Hide the menu toggler completely */
    }

    .navbar-collapse {
        display: none; /* Hidden by default */
        width: 100%;
    }
    
    /* Hide all navigation elements on mobile */
    .navbar-nav, 
    .search-container,
    .navbar-collapse {
        display: none;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        margin-left: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 10px;
        background: #004d99;
        border-radius: 4px;
    }
    
    .nav-link:hover {
        background: #003d7a;
    }

    .search-form {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .search-form input[type="search"] {
        flex-grow: 1;
    }
    
    #search-form {
        flex-direction: column;
        align-items: center;
    }
    
    .search-toggle {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-prompt {
        margin-bottom: 5px;
        width: 100%;
        text-align: center;
    }
    
    .search-input-wrapper {
        width: 100%;
        flex-direction: column;
    }
    
    #search-input, .search-form input[type="search"] {
        width: 100%;
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    #search-form button[type="submit"], .search-form button {
        width: 100%;
        border-radius: 4px;
    }
    
    .search-results {
        width: 100%;
    }

    .list-columns {
        column-count: 1;
    }

    .hero-section h1 {
        font-size: 1.8rem; /* Slightly smaller for better fit */
        margin-bottom: 15px; /* Reduce space between elements */
        padding: 0 10px; /* Add some side padding */
    }
    
    .hero-section p {
        display: none; /* Hide subtitle on mobile */
    }
    
    .search-form-hero {
        width: 100%;
        padding: 0 10px;
    }
    
    .search-form-hero input[type="text"],
    .search-form-hero input[type="search"] {
        width: 100%;
        margin-bottom: 10px;
        border-radius: 8px;
        font-size: 16px; /* Prevent iOS zoom on focus */
        padding: 12px 12px 12px 38px; /* Optimized touch target */
        height: auto;
        -webkit-appearance: none; /* Fix iOS input styling */
        appearance: none;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* More prominent shadow */
        letter-spacing: 0.01em; /* Slightly improve letter spacing for readability */
    }
    
    .search-icon-hero {
        left: 20px;
    }
    
    .search-form-hero button {
        width: 100%;
        border-radius: 8px;
        padding: 12px;
        font-size: 16px;
    }
    
    #hero-search-results {
        max-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    }
    
    .info-content, .postal-code-info, .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Improve mobile card grids */
    .card-grid {
        grid-template-columns: 1fr; /* Single column on smallest screens */
        gap: 15px; /* Reduced gap */
    }
    
    .browse-sections,
    .states-list,
    .counties-list, 
    .localities-list, 
    .postal-codes-list, 
    .places-list,
    .neighborhoods-grid, 
    .municipalities-list, 
    .cp-cards {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* Adjust card and button sizes for mobile */
    .digit-button, .letter-button {
        height: 44px; /* Larger touch target */
    }
    
    /* Make sure info cards look good on mobile */
    .info-feature-card {
        flex-direction: column; /* Stack icon and content */
    }
    
    .info-icon {
        min-width: auto;
        padding: 15px;
        display: flex;
        justify-content: center;
    }
}

/* Enrichment sections styling */
.enrichment-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.enrichment-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.enrichment-section h3 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.demographic-content,
.household-content,
.age-distribution-content,
.cultural-diversity-content {
    line-height: 1.6;
}

.enrichment-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

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

.enrichment-section p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Mobile responsiveness for enrichment sections */
@media (max-width: 768px) {
    .enrichment-section {
        padding: 0 1rem;
    }
    
    .enrichment-section h2 {
        font-size: 1.25rem;
    }
    
    .enrichment-section h3 {
        font-size: 1.1rem;
    }
}
/* Dual Breadcrumbs Styling */
.dual-breadcrumbs-container {
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.breadcrumbs {
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs-label {
    font-weight: bold;
    margin-right: 8px;
    color: #333;
    display: inline-flex;
    align-items: center;
}

.breadcrumbs-label i {
    margin-right: 5px;
}

.breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
    margin: 0 5px;
}

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

/* Separator style */
.breadcrumbs .separator {
    margin: 0 5px;
    color: #888;
}

/* Current page style (no link) */
.breadcrumbs .current {
    color: #333;
    font-weight: 500;
}
/* Instant search dropdown styles */
.search-container {
    position: relative;
    width: 100%;
}

/* Style updates for search form without button */
.search-form {
    width: 100%;
}

.search-input-container {
    width: 100%;
}

/* Search results dropdown */
#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    padding: 0;
    margin-top: 3px;
    border: 1px solid #e0e0e0;
    width: 100%;
}

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

/* Result items */
.result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

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

/* Result item content */
.result-primary {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 3px;
}

.result-secondary {
    font-size: 0.85em;
    color: #666;
}

/* Special result types */
.result-item.primary-result {
    background-color: #f0f7ff;
    border-left: 4px solid #0066cc;
}

.result-item.postal-code-result .result-primary {
    color: #0066cc;
}

.result-item.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
}

.result-item.error {
    color: #d9534f;
    cursor: default;
}

/* Result item context */
.result-context {
    font-size: 0.85em;
    color: #666;
    margin-left: 5px;
}

/* Mobile styles */
@media (max-width: 768px) {
    #search-results {
        max-height: 300px;
    }
    
    .result-item {
        padding: 10px;
    }
}
/* Additional styles to fix search results display */

/* Force display for result containers */
#search-results,
.hero-search-results,
.search-results-container {
    display: none;
    z-index: 9999;
    position: absolute;
    background: white;
    border: 2px solid #0066cc;  /* Make border more visible */
    border-radius: 8px;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    top: calc(100% + 5px);  /* Add a small gap */
    left: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    padding: 8px 0;
}

/* Style for search result headers - applies to all header elements in search results */
#search-results h2,
.hero-search-results h2,
.search-results h2,
#search-results > div:first-child:not(.result-item):not(.no-results),
.hero-search-results > div:first-child:not(.result-item):not(.no-results),
.search-results-container > div:first-child:not(.result-item):not(.no-results) {
    background-color: #0066cc !important;
    color: white !important;
    padding: 10px 15px !important;
    margin: 0 !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #004d99 !important;
}

#search-results.show,
.hero-search-results.show,
.search-results-container.show {
    display: block !important;
}

/* Make sure all search containers have proper positioning */
.search-container,
.search-form-hero {
    position: relative !important;
}

/* Fix for hero search results positioning */
.hero-section {
    overflow: visible !important;
}

/* Hero search results specific styles */
.hero-search-results {
    position: absolute !important;
    z-index: 10000 !important; /* Higher than other elements */
}

/* Hero search */
.search-form-hero {
    position: relative !important;
}

/* Ensure result items are clearly visible */
.result-item {
    background-color: white;
    padding: 12px 15px;
    border-bottom: 1px solid #e9e9e9;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

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

.result-primary {
    font-weight: 600;
    margin-bottom: 3px;
}

.result-secondary {
    font-size: 14px;
    color: #666;
}

.primary-result {
    background-color: #f0f7ff;
    border-left: 4px solid #0066cc;
    padding-left: 11px; /* Adjust for the border */
}

/* Force display of search results */
#search-results,
.hero-search-results {
    transition: none !important; /* Disable any transitions */
}

#search-results.show,
.hero-search-results.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Clear any conflicting styles */
#search-results[style*="display: none"].show,
.hero-search-results[style*="display: none"].show {
    display: block !important;
}

/* Add explicit styles for result container */
.search-results-container.show {
    display: block !important;
    visibility: visible !important;
}