/* ============================================
   City Pages Stylesheet
   ============================================ */

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: #f8f9fa;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li::after {
    content: '›';
    margin: 0 8px;
    color: #9ca3af;
}

.breadcrumb li:last-child::after {
    content: '';
}

.breadcrumb a {
    color: #533483;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #6b46a0;
    text-decoration: underline;
}

.breadcrumb .active {
    color: #6b7280;
}

/* Hero Section */
.city-hero {
    background: linear-gradient(135deg, #533483 0%, #6b46a0 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.city-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.city-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 16px 0;
    font-weight: 500;
}

.city-description {
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto 32px auto;
    line-height: 1.6;
    opacity: 0.95;
}

/* CTA Buttons */
.city-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cta-primary {
    background: white;
    color: #533483;
    border: 2px solid white;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: #f8f9fa;
}

.cta-secondary {
    background: #2ecc71 !important;
    color: white !important;
    border: 2px solid white;
}

.cta-secondary:hover {
    background: #27ae60 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Stats Section */
.city-stats {
    padding: 60px 0 30px 0;
    background: white;
}

.section-heading {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: start;
    transition: all 0.3s;
}

.stat-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-icon {
    background: linear-gradient(135deg, #533483 0%, #6b46a0 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.stat-content p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Features Section */
.city-features {
    padding: 30px 0 60px 0;
    background: #f9fafb;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.feature-item i {
    color: #10b981;
    font-size: 20px;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 15px;
    color: #374151;
}

/* Other Cities Section */
.other-cities {
    padding: 60px 0;
    background: white;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.city-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.3s;
}

.city-card:hover {
    background: white;
    border-color: #533483;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(83, 52, 131, 0.15);
}

.city-card i {
    color: #533483;
    font-size: 18px;
}

.city-card span {
    font-weight: 500;
    font-size: 15px;
}

/* CTA Section */
.city-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #533483 0%, #6b46a0 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.cta-content p {
    font-size: 18px;
    margin: 0 0 32px 0;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #533483;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Other Regions Section */
.other-regions {
    padding: 60px 0;
    background: #f9fafb;
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.region-link {
    display: block;
    padding: 14px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #533483;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s;
}

.region-link:hover {
    background: #533483;
    color: white;
    border-color: #533483;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(83, 52, 131, 0.2);
}

.view-all {
    text-align: center;
    margin-top: 24px;
}

.view-all a {
    color: #533483;
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
}

.view-all a:hover {
    text-decoration: underline;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .city-title {
        font-size: 32px;
    }
    
    .city-subtitle {
        font-size: 16px;
    }
    
    .city-description {
        font-size: 15px;
    }
    
    .city-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .section-heading {
        font-size: 26px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .city-hero {
        padding: 40px 0;
    }
    
    .city-title {
        font-size: 28px;
    }
    
    .breadcrumb {
        font-size: 13px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .city-stats,
    .city-features,
    .other-cities,
    .other-regions {
        padding: 40px 0;
    }
    
    .city-cta {
        padding: 60px 0;
    }
}

/* ============================================
   Dynamic Statistics Styles
   ============================================ */

/* Loading and Error States */
.stats-loading,
.stats-error {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.stats-loading i,
.stats-error i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.stats-loading i {
    color: #533483;
}

.stats-error i {
    color: #ef4444;
}

.stats-loading p,
.stats-error p {
    font-size: 16px;
    margin: 0;
}

/* Enhanced Stat Cards with Values */
.stat-card-primary { border-top: 4px solid #533483; }
.stat-card-secondary { border-top: 4px solid #10b981; }
.stat-card-tertiary { border-top: 4px solid #f59e0b; }
.stat-card-quaternary { border-top: 4px solid #3b82f6; }

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.stat-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.stat-card p {
    font-size: 13px;
}

/* Crime Statistics Section */
.city-crime-stats {
    background: #f9fafb;
    padding: 30px 0 30px 0;
}

.section-description {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    margin: -10px 0 30px 0;
}

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

.crime-stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.crime-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.crime-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.crime-stat-count {
    font-size: 24px;
    font-weight: 700;
    color: #533483;
    margin-bottom: 12px;
}

.crime-stat-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.crime-stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #533483, #6b46a0);
    border-radius: 3px;
    transition: width 0.6s ease-out;
}

/* SA2 Areas / Suburbs Section */
.city-suburbs {
    padding: 60px 0;
}

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

.sa2-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s;
}

.sa2-card:hover {
    background: #f9fafb;
    border-color: #533483;
    color: #533483;
    transform: translateX(4px);
}

.sa2-card i {
    color: #533483;
    font-size: 16px;
}

.sa2-card span {
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-value {
        font-size: 28px;
    }
    
    .crime-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sa2-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 24px;
    }
    
    .crime-stat-count {
        font-size: 20px;
    }
    
    .sa2-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   City Summary Section (SEO)
   ============================================ */

.city-summary-section {
    background: #ffffff;
    padding: 60px 0;
    border-top: 1px solid #e5e7eb;
}

/* Removed specific override - using default .section-heading style (centered, 32px) */

.summary-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    max-width: 900px;
    margin: 0 auto; /* Center the content block */
}

.summary-content p {
    margin-bottom: 16px;
}

.summary-content strong {
    color: #1f2937;
    font-weight: 600;
}

/* Location and Feature Links */
.location-link,
.feature-link {
    color: #533483;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.location-link:hover,
.feature-link:hover {
    color: #6b46a0;
    border-bottom-color: #6b46a0;
}

.location-link i {
    font-size: 14px;
    margin-right: 4px;
}

/* Distance Tags */
.distance-tag {
    display: inline-block;
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    margin-left: 2px;
}

/* Feature Type Labels */
.feature-type {
    display: inline-block;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
}

/* Māori Name Indicator */
.maori-indicator {
    display: inline-block;
    font-size: 14px;
    margin-left: 2px;
    cursor: help;
}

.cultural-heritage-section {
    margin-top: 30px;
}

.cultural-heritage-section p {
    margin-bottom: 12px;
}

.feature-description {
    color: #4b5563;
    font-style: italic;
    margin-left: 20px;
    margin-top: 8px;
}

.feature-origin {
    color: #6b7280;
    margin-left: 20px;
    margin-top: 8px;
}

/* Responsive for City Summary */
@media (max-width: 768px) {
    .city-summary-section {
        padding: 40px 0;
    }
    
    /* Using default .section-heading responsive styles */
    
    .summary-content {
        font-size: 15px;
    }
}
