/* Municipality Header */
.municipality-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    border-radius: var(--rounded-md);
    color: white;
    box-shadow: var(--shadow-md);
}

.back-button-container {
    margin-bottom: 15px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: var(--rounded-md);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.municipality-title {
    flex: 1;
}

.municipality-title h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.municipality-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.municipality-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.municipality-actions {
    display: flex;
    gap: 15px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: var(--rounded-md);
    transition: all 0.3s ease;
    font-weight: 500;
}

.action-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.action-button.primary {
    background-color: var(--secondary);
}

.action-button.primary:hover {
    background-color: #0f766e;
}

/* Main Content Layout */
.municipality-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* Info Cards */
.info-card {
    background-color: var(--dark-gray);
    border-radius: var(--rounded-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.info-card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
}

.coordinates {
    display: flex;
    gap: 20px;
}

/* Map Section */
.map-container {
    height: 400px;
    border-radius: var(--rounded-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    margin-top: 20px;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--darker-gray) 25%, transparent 25%, transparent 75%, var(--darker-gray) 75%, var(--darker-gray)), 
                linear-gradient(45deg, var(--darker-gray) 25%, transparent 25%, transparent 75%, var(--darker-gray) 75%, var(--darker-gray));
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1.1rem;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background-color: var(--darker-gray);
    border-radius: var(--rounded-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Virtual Tours Section */
.virtual-tours-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: var(--dark);
    font-size: 1.8rem;
}

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

.tour-card {
    background: var(--dark-gray);
    border-radius: var(--rounded-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.tour-image {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.tour-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tour-card:hover .tour-image img {
    transform: scale(1.05);
}

.tour-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tour-content {
    padding: 20px;
}

.tour-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.tour-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.tour-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tour-button {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: var(--light);
    text-decoration: none;
    border-radius: var(--rounded-sm);
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.tour-button:hover {
    background: var(--primary-light);
    color: var(--light);
}

/* Sidebar */
.sidebar-card {
    background-color: var(--dark-gray);
    border-radius: var(--rounded-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.sidebar-card h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-municipalities {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-municipality {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: var(--darker-gray);
    border-radius: var(--rounded-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark);
}

.related-municipality:hover {
    background-color: var(--primary-light);
    color: var(--light);
}

.municipality-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.municipality-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.municipality-info span {
    font-size: 0.85rem;
    color: var(--gray);
}

.related-municipality:hover .municipality-info span {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .municipality-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    /* Header */
    .municipality-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .municipality-title h1 {
        font-size: 2rem;
    }
    
    .municipality-meta {
        gap: 10px;
        flex-wrap: wrap;
        flex-direction: column;
    }
    
    .municipality-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 10px;
    }
    
    .action-button {
        flex: 1;
        min-width: 140px;
        justify-content: center;
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    /* Main Content */
    .municipality-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Info Grid */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Map */
    .map-container {
        height: 300px;
        margin-top: 15px;
        margin-bottom: 20px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Section Header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        width: 100%;
    }
    
    .section-header .action-button {
        width: auto;
    }
    
    /* Tours Grid */
    .tours-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tour-image {
        height: 150px;
    }
    
    /* Info Card */
    .info-card h2 {
        font-size: 1.3rem;
    }
    
    /* Sidebar Card */
    .sidebar-card h3 {
        font-size: 1.2rem;
    }
    
    /* Related Municipalities */
    .related-municipality {
        padding: 12px;
        gap: 12px;
    }
    
    .municipality-color {
        width: 18px;
        height: 18px;
    }
    
    .municipality-info h4 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .municipality-header {
        padding: 15px;
    }
    
    .municipality-title h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .back-button-container {
        width: 100%;
    }
    
    .back-button {
        display: flex;
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .municipality-meta-item {
        font-size: 0.85rem;
    }
    
    .action-button {
        width: 100%;
        padding: 10px;
        font-size: 0.8rem;
        gap: 5px;
    }
    
    .action-button i {
        display: none;
    }
    
    .municipality-actions {
        width: 100%;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .map-container {
        height: 250px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .sidebar-card {
        padding: 15px;
    }
    
    .related-municipality {
        padding: 10px;
    }
    
    .tour-card {
        margin-bottom: 15px;
    }
    
    .tour-title {
        font-size: 1rem;
    }
    
    .tour-stats {
        font-size: 0.75rem;
    }
}